r21392 by craig -

scribus-commit scribus-commit at lists.scribus.net
Mon Jun 27 21:19:16 UTC 2016


Author: craig
Date: Mon Jun 27 21:19:16 2016
New Revision: 21392

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21392
Log:
Fix rotation mode function names in ScribusDoc

Modified:
    trunk/Scribus/scribus/canvas.cpp
    trunk/Scribus/scribus/canvasgesture_resize.cpp
    trunk/Scribus/scribus/canvasmode_rotate.cpp
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/plugins/import/ai/importai.cpp
    trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
    trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribusdoc.cpp
    trunk/Scribus/scribus/scribusdoc.h
    trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
    trunk/Scribus/scribus/ui/transformdialog.cpp

Modified: trunk/Scribus/scribus/canvas.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21392&path=/trunk/Scribus/scribus/canvas.cpp
==============================================================================
--- trunk/Scribus/scribus/canvas.cpp	(original)
+++ trunk/Scribus/scribus/canvas.cpp	Mon Jun 27 21:19:16 2016
@@ -2449,15 +2449,15 @@
 	ma.translate(gx, gy);
 	ma.rotate(r);
 	FPoint n;
-	if (m_doc->RotMode() == 0)
+	if (m_doc->rotationMode() == 0)
 		n = FPoint(0.0, 0.0);
-	else if (m_doc->RotMode() == 1)
+	else if (m_doc->rotationMode() == 1)
 		n = FPoint(gw, 0.0);
-	else if (m_doc->RotMode() == 2)
+	else if (m_doc->rotationMode() == 2)
 		n = FPoint(gw / 2.0, gh / 2.0);
-	else if (m_doc->RotMode() == 3)
+	else if (m_doc->rotationMode() == 3)
 		n = FPoint(0.0, gh);
-	else if (m_doc->RotMode() == 4)
+	else if (m_doc->rotationMode() == 4)
 		n = FPoint(gw, gh);
 	gx = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
 	gy = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();

Modified: trunk/Scribus/scribus/canvasgesture_resize.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21392&path=/trunk/Scribus/scribus/canvasgesture_resize.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_resize.cpp	(original)
+++ trunk/Scribus/scribus/canvasgesture_resize.cpp	Mon Jun 27 21:19:16 2016
@@ -313,8 +313,8 @@
 	}
 	if (m_doc->m_Selection->isMultipleSelection())
 	{
-		int RotModeBack = m_doc->RotMode();
-		m_doc->RotMode ( 0 );
+		int RotModeBack = m_doc->rotationMode();
+		m_doc->setRotationMode ( 0 );
 		double gx, gy, gh, gw;
 		m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
 		QRectF oldBounds(gx, gy, gw, gh);
@@ -329,7 +329,7 @@
 		double dy = newBounds.y() - oldBounds.y();
 		if (dx != 0 || dy != 0)
 			m_doc->moveGroup(dx + m_extraX, dy + m_extraY);
-		m_doc->RotMode ( RotModeBack );
+		m_doc->setRotationMode ( RotModeBack );
 	}
 	else
 	{

Modified: trunk/Scribus/scribus/canvasmode_rotate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21392&path=/trunk/Scribus/scribus/canvasmode_rotate.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_rotate.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_rotate.cpp	Mon Jun 27 21:19:16 2016
@@ -154,9 +154,9 @@
 		rotation = newAngle;
 	}
 
-	while (rotation < 0)
-		rotation += 360.0;
-	while (rotation > 360)
+	while (rotation < 0)
+		rotation += 360.0;
+	while (rotation > 360)
 		rotation -= 360.0;
 }
 
@@ -229,7 +229,7 @@
 	if (GetItem(&currItem))
 	{
 		m_inItemRotation = true;
-		m_oldRotMode   = m_rotMode   = m_doc->RotMode();
+		m_oldRotMode   = m_rotMode   = m_doc->rotationMode();
 		m_oldRotCenter = m_rotCenter = m_view->RCenter;
 		if (m_doc->m_Selection->isMultipleSelection())
 		{
@@ -246,7 +246,7 @@
 					m_rotCenter = FPoint(gxR, gyR);
 					m_rotMode   = 0;
 				}
-				m_doc->RotMode  ( m_rotMode );
+				m_doc->setRotationMode  ( m_rotMode );
 				m_view->RCenter = m_rotCenter;
 			}
 			m_startAngle = xy2Deg(mousePointDoc.x() - m_view->RCenter.x(), mousePointDoc.y() - m_view->RCenter.y());
@@ -283,7 +283,7 @@
 						m_rotMode   = 1;
 					}	
 				}
-				m_doc->RotMode  ( m_rotMode );
+				m_doc->setRotationMode  ( m_rotMode );
 				m_view->RCenter = m_rotCenter;
 //			}
 			m_view->RCenter = m_rotCenter = FPoint(currItem->xPos()+ m_view->RCenter.x(), currItem->yPos()+ m_view->RCenter.y()); //?????
@@ -342,7 +342,7 @@
 				m_view->updateContents();
 		}
 	}
-	m_doc->RotMode( m_oldRotMode );
+	m_doc->setRotationMode( m_oldRotMode );
 	m_view->RCenter = m_oldRotCenter;
 	if (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools)
 		m_view->requestMode(modeNormal);

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21392&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp	(original)
+++ trunk/Scribus/scribus/pageitem.cpp	Mon Jun 27 21:19:16 2016
@@ -10558,7 +10558,7 @@
 	ma.translate(xPos(), yPos());
 	ma.scale(1, 1);
 	ma.rotate(oldRot);
-	switch (m_Doc->RotMode())
+	switch (m_Doc->rotationMode())
 	{
 		case 2:
 			ma.translate(width()/2.0, height()/2.0);

Modified: trunk/Scribus/scribus/plugins/import/ai/importai.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21392&path=/trunk/Scribus/scribus/plugins/import/ai/importai.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ai/importai.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/ai/importai.cpp	Mon Jun 27 21:19:16 2016
@@ -1531,9 +1531,9 @@
 			//	}
 				b->setXPos(xp + xoffset);
 				b->setYPos(yp + yoffset);
-				m_Doc->RotMode(3);
+				m_Doc->setRotationMode(3);
 				m_Doc->rotateItem(rotation * 180 / M_PI, b);
-				m_Doc->RotMode(0);
+				m_Doc->setRotationMode(0);
 //				b->setRotation(rotation * 180 / M_PI);
 				b->setTextFlowMode(PageItem::TextFlowDisabled);
 				b->setFillTransparency(1.0 - Opacity);

Modified: trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21392&path=/trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp	Mon Jun 27 21:19:16 2016
@@ -1022,10 +1022,10 @@
 									  FPoint tp2(getMinClipF(&Coords));
 									  Coords.translate(-tp2.x(), -tp2.y());
 									  ite->PoLine = Coords.copy();
-									  int rm = m_Doc->RotMode();
-									  m_Doc->RotMode(2);
+									  int rm = m_Doc->rotationMode();
+									  m_Doc->setRotationMode(2);
 									  m_Doc->rotateItem(-rot, ite);
-									  m_Doc->RotMode(rm);
+									  m_Doc->setRotationMode(rm);
 								  }
 								  else
 								  {
@@ -1175,10 +1175,10 @@
 									  FPoint tp2(getMinClipF(&Coords));
 									  Coords.translate(-tp2.x(), -tp2.y());
 									  ite->PoLine = Coords.copy();
-									  int rm = m_Doc->RotMode();
-									  m_Doc->RotMode(2);
+									  int rm = m_Doc->rotationMode();
+									  m_Doc->setRotationMode(2);
 									  m_Doc->rotateItem(-rot, ite);
-									  m_Doc->RotMode(rm);
+									  m_Doc->setRotationMode(rm);
 								  }
 								  else
 								  {
@@ -1315,10 +1315,10 @@
 									ite->setXYPos(baseX + baR.x(), baseY + baR.y(), true);
 									ite->setWidthHeight(baR.width(), baR.height(), true);
 									ite->updateClip();
-									int rm = m_Doc->RotMode();
-									m_Doc->RotMode(2);
+									int rm = m_Doc->rotationMode();
+									m_Doc->setRotationMode(2);
 									m_Doc->rotateItem(-rot, ite);
-									m_Doc->RotMode(rm);
+									m_Doc->setRotationMode(rm);
 								}
 								else
 								{
@@ -1385,10 +1385,10 @@
 		applyShadow(ite);
 		if (rot != 0)
 		{
-			int rm = m_Doc->RotMode();
-			m_Doc->RotMode(2);
+			int rm = m_Doc->rotationMode();
+			m_Doc->setRotationMode(2);
 			m_Doc->rotateItem(rot, ite);
-			m_Doc->RotMode(rm);
+			m_Doc->setRotationMode(rm);
 		}
 		if (propList["draw-mirror-horizontal"])
 			ite->flipImageH();
@@ -2644,10 +2644,10 @@
 								  FPoint tp2(getMinClipF(&Coords));
 								  Coords.translate(-tp2.x(), -tp2.y());
 								  ite->PoLine = Coords.copy();
-								  int rm = m_Doc->RotMode();
-								  m_Doc->RotMode(2);
+								  int rm = m_Doc->setRotationMode();
+								  m_Doc->setRotationMode(2);
 								  m_Doc->rotateItem(-rot, ite);
-								  m_Doc->RotMode(rm);
+								  m_Doc->setRotationMode(rm);
 							  }
 							  else
 							  {
@@ -2792,10 +2792,10 @@
 									  FPoint tp2(getMinClipF(&Coords));
 									  Coords.translate(-tp2.x(), -tp2.y());
 									  ite->PoLine = Coords.copy();
-									  int rm = m_Doc->RotMode();
-									  m_Doc->RotMode(2);
+									  int rm = m_Doc->setRotationMode();
+									  m_Doc->setRotationMode(2);
 									  m_Doc->rotateItem(-rot, ite);
-									  m_Doc->RotMode(rm);
+									  m_Doc->setRotationMode(rm);
 								  }
 								  else
 								  {
@@ -2927,10 +2927,10 @@
 									FPoint tp2(getMinClipF(&Coords));
 									Coords.translate(-tp2.x(), -tp2.y());
 									ite->PoLine = Coords.copy();
-									int rm = m_Doc->RotMode();
-									m_Doc->RotMode(2);
+									int rm = m_Doc->setRotationMode();
+									m_Doc->setRotationMode(2);
 									m_Doc->rotateItem(-rot, ite);
-									m_Doc->RotMode(rm);
+									m_Doc->setRotationMode(rm);
 								}
 								else
 								{
@@ -2990,10 +2990,10 @@
 		applyShadow(ite);
 		if (rot != 0)
 		{
-			int rm = m_Doc->RotMode();
-			m_Doc->RotMode(2);
+			int rm = m_Doc->setRotationMode();
+			m_Doc->setRotationMode(2);
 			m_Doc->rotateItem(rot, ite);
-			m_Doc->RotMode(rm);
+			m_Doc->setRotationMode(rm);
 		}
 		if (propList["draw-mirror-horizontal"])
 			ite->flipImageH();

Modified: trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21392&path=/trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp	Mon Jun 27 21:19:16 2016
@@ -1197,10 +1197,10 @@
 		if (line_style > 0)
 			ite->setDashes(getDashValues(LineW, line_style));
 		ite->setTextFlowMode(PageItem::TextFlowDisabled);
-		int rot = m_Doc->RotMode();
-		m_Doc->RotMode ( 2);
+		int rot = m_Doc->rotationMode();
+		m_Doc->setRotationMode ( 2);
 		m_Doc->rotateItem(-angle * 180.0 / M_PI, ite);
-		m_Doc->RotMode( rot);
+		m_Doc->setRotationMode( rot);
 		depthMap.insert(999 - depth, currentItemNr);
 		currentItemNr++;
 	}

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21392&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Mon Jun 27 21:19:16 2016
@@ -2821,7 +2821,7 @@
 		break;
 	}
 	doc->CurrentSel = SelectedType;
-	propertiesPalette->xyzPal->basePointWidget->setCheckedId(doc->RotMode());
+	propertiesPalette->xyzPal->basePointWidget->setCheckedId(doc->rotationMode());
 
 	if (docSelectionCount != 0)
 	{

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21392&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp	(original)
+++ trunk/Scribus/scribus/scribusdoc.cpp	Mon Jun 27 21:19:16 2016
@@ -10771,8 +10771,8 @@
 		QTransform comulatedMatrix = matrix;
 		PageItem *currItem = m_Selection->itemAt(0);
 		Elements.append(currItem);
-		int rotBack = RotMode();
-		RotMode ( 0 );
+		int rotBack = rotationMode();
+		setRotationMode ( 0 );
 		ScriXmlDoc xmlDoc;
 		QString copyBuffer = xmlDoc.WriteElem(this, m_Selection);
 		view()->Deselect(true);
@@ -10862,7 +10862,7 @@
 			m_Selection->addItem(Elements.at(c), true);
 		}
 		m_Selection->setGroupRect();
-		RotMode (rotBack);
+		setRotationMode (rotBack);
 		SnapGrid  = savedAlignGrid;
 		SnapGuides = savedAlignGuides;
 		SnapElement = savedAlignElement;
@@ -16031,7 +16031,7 @@
 }
 
 
-void ScribusDoc::RotMode(const int& val)
+void ScribusDoc::setRotationMode(const int val)
 {
 	m_rotMode = val;
 	emit rotationMode(m_rotMode);

Modified: trunk/Scribus/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21392&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h	(original)
+++ trunk/Scribus/scribus/scribusdoc.h	Mon Jun 27 21:19:16 2016
@@ -1175,9 +1175,9 @@
 	Serializer *textSerializer();
 
 	//! \brief Get rotation mode
-	int RotMode() const {return m_rotMode;}
+	int rotationMode() const {return m_rotMode;}
 	//! \brief Set rotation mode
-	void RotMode(const int& val);
+	void setRotationMode(const int val);
 
 	//! \brief Fonctions which avoid doc updater and update manager to send too much
 	// unncessary signals when doing updates on multiple items

Modified: trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21392&path=/trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp	Mon Jun 27 21:19:16 2016
@@ -1062,7 +1062,7 @@
 	if ((m_haveDoc) && (m_haveItem))
 	{
 		m_haveItem = false;
-		m_doc->RotMode ( m );
+		m_doc->setRotationMode(m);
 		if (m_doc->m_Selection->isMultipleSelection())
 		{
 			m_doc->m_Selection->setGroupRect();

Modified: trunk/Scribus/scribus/ui/transformdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21392&path=/trunk/Scribus/scribus/ui/transformdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/transformdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/transformdialog.cpp	Mon Jun 27 21:19:16 2016
@@ -72,7 +72,7 @@
 	verticalSkew->setSuffix(unitGetSuffixFromIndex(6));
 	linkSkew->setChecked(true);
 	numberOfCopies->setValue(0);
-	basePoint->setCheckedId(m_doc->RotMode());
+	basePoint->setCheckedId(m_doc->rotationMode());
 	connect(transformSelector, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(setCurrentTransform(QListWidgetItem*)));
 	connect(horizontalScale, SIGNAL(valueChanged(double)), this, SLOT(changeHScale(double)));
 	connect(verticalScale, SIGNAL(valueChanged(double)), this, SLOT(changeVScale(double)));




More information about the scribus-commit mailing list