r18022 by craig - Rename a few pageitem variables to clearer names

scribus-commit scribus-commit at lists.scribus.net
Mon Dec 31 17:49:48 UTC 2012


Author: craig
Date: Mon Dec 31 17:49:48 2012
New Revision: 18022

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18022
Log:
Rename a few pageitem variables to clearer names

Modified:
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/pageitem.h
    trunk/Scribus/scribus/pageitem_imageframe.cpp
    trunk/Scribus/scribus/pageitem_latexframe.cpp
    trunk/Scribus/scribus/pageitem_noteframe.cpp
    trunk/Scribus/scribus/pageitem_textframe.cpp

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18022&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Mon Dec 31 17:49:48 2012
@@ -264,21 +264,21 @@
 	Ypos(other.Ypos),
 	Width(other.Width),
 	Height(other.Height),
-	Rot(other.Rot),
-	Select(other.Select),
-	LocalScX(other.LocalScX),
-	LocalScY(other.LocalScY),
+	m_rotation(other.m_rotation),
+	m_isSelected(other.m_isSelected),
+	m_imageXScale(other.m_imageXScale),
+	m_imageYScale(other.m_imageYScale),
 	LocalX(other.LocalX),
 	LocalY(other.LocalY),
-	LocalRot(other.LocalRot),
-	Reverse(other.Reverse),
+	m_imageRotation(other.m_imageRotation),
+	m_isReversed(other.m_isReversed),
 	m_startArrowIndex(other.m_startArrowIndex),
 	m_endArrowIndex(other.m_endArrowIndex),
 	m_startArrowScale(other.m_startArrowScale),
 	m_endArrowScale(other.m_endArrowScale),
 	m_textDistanceMargins(other.m_textDistanceMargins),
 	firstLineOffsetP(other.firstLineOffsetP),
-	RadRect(other.RadRect),
+	m_roundedCorderRadius(other.m_roundedCorderRadius),
 	oldXpos(other.oldXpos),
 	oldYpos(other.oldYpos),
 	oldWidth(other.oldWidth),
@@ -404,7 +404,7 @@
 	BoundingW = w;
 	BoundingH = h;
 	m_ItemType = newType;
-	oldRot = Rot = 0;
+	oldRot = m_rotation = 0;
 	fillColorVal = fill;
 	lineColorVal = m_ItemType == PageItem::TextFrame ? fill : outline;
 	gWidth = gHeight = 0;
@@ -472,7 +472,7 @@
 	PLineArt = Qt::PenStyle(m_Doc->itemToolPrefs().shapeLineStyle);
 	PLineEnd = Qt::FlatCap;
 	PLineJoin = Qt::MiterJoin;
-	Select = false;
+	m_isSelected = false;
 	ClipEdited = false;
 	FrameType = 0;
 	CurX = 0;
@@ -486,16 +486,16 @@
 	pixm.imgInfo.lowResType = m_Doc->itemToolPrefs().imageLowResType;
 	Pfile2 = "";
 	Pfile3 = "";
-	oldLocalScX = LocalScX = 1;
-	oldLocalScY = LocalScY = 1;
+	oldLocalScX = m_imageXScale = 1;
+	oldLocalScY = m_imageYScale = 1;
 	OrigW = 0;
 	OrigH = 0;
 	oldLocalX = LocalX = 0;
 	oldLocalY = LocalY = 0;
-	LocalRot = 0;
+	m_imageRotation = 0;
 	BBoxX = 0;
 	BBoxH = 0;
-	RadRect = 0;
+	m_roundedCorderRadius = 0;
 	switch (m_ItemType)
 	{
 		case Polygon:
@@ -605,7 +605,7 @@
 	LayerID = m_Doc->activeLayer();
 	ScaleType = true;
 	AspectRatio = true;
-	Reverse = false;
+	m_isReversed = false;
 	NamedLStyle = "";
 	DashValues.clear();
 	DashOffset = 0;
@@ -966,9 +966,9 @@
 
 void PageItem::setRotation(const double newRotation, bool drawingOnly)
 {
-	double dR = newRotation - Rot;
-	double oldRot = Rot;
-	Rot = newRotation;
+	double dR = newRotation - m_rotation;
+	double oldRot = m_rotation;
+	m_rotation = newRotation;
 	if (drawingOnly || m_Doc->isLoading())
 		return;
 	rotateWelded(dR, oldRot);
@@ -979,7 +979,7 @@
 {
 	if (dR==0.0)
 		return;
-	Rot+=dR;
+	m_rotation+=dR;
 	if (m_Doc->isLoading())
 		return;
 	checkChanges();
@@ -987,12 +987,12 @@
 
 void PageItem::setSelected(const bool toSelect)
 {
-	Select=toSelect;
+	m_isSelected=toSelect;
 }
 
 void PageItem::setImageXScale(const double newImageXScale)
 {
-	LocalScX=newImageXScale;
+	m_imageXScale=newImageXScale;
 	if (m_Doc->isLoading())
 		return;
 	checkChanges();
@@ -1000,7 +1000,7 @@
 
 void PageItem::setImageYScale(const double newImageYScale)
 {
-	LocalScY=newImageYScale;
+	m_imageYScale=newImageYScale;
 	if (m_Doc->isLoading())
 		return;
 	checkChanges();
@@ -1008,8 +1008,8 @@
 
 void PageItem::setImageXYScale(const double newImageXScale, const double newImageYScale)
 {
-	LocalScX=newImageXScale;
-	LocalScY=newImageYScale;
+	m_imageXScale=newImageXScale;
+	m_imageYScale=newImageYScale;
 	if (m_Doc->isLoading())
 		return;
 	checkChanges();
@@ -1055,17 +1055,17 @@
 
 void PageItem::setImageRotation(const double newRotation)
 {
-	if(LocalRot == newRotation)
+	if(m_imageRotation == newRotation)
 		return;
 	if(UndoManager::undoEnabled())
 	{
 		SimpleState *ss = new SimpleState(Um::Rotate,"",Um::IRotate);
 		ss->set("IMAGE_ROTATION","image_rotation");
-		ss->set("OLD_ROT",LocalRot);
+		ss->set("OLD_ROT",m_imageRotation);
 		ss->set("NEW_ROT",newRotation);
 		undoManager->action(this,ss);
 	}
-	LocalRot = newRotation;
+	m_imageRotation = newRotation;
 	if (m_Doc->isLoading())
 		return;
 	checkChanges();
@@ -1073,7 +1073,7 @@
 
 void PageItem::setReversed(bool newReversed)
 {
-	if (Reverse == newReversed)
+	if (m_isReversed == newReversed)
 		return;
 	if (UndoManager::undoEnabled())
 	{
@@ -1081,7 +1081,7 @@
 		ss->set("REVERSE_TEXT", newReversed);
 		undoManager->action(this, ss);
 	}
-	Reverse = newReversed;
+	m_isReversed = newReversed;
 }
 
 //return frame where is text end
@@ -1578,17 +1578,17 @@
 
 void PageItem::setCornerRadius(double newRadius)
 {
-	if(RadRect==newRadius)
+	if(m_roundedCorderRadius==newRadius)
 		return;
 	if(UndoManager::undoEnabled())
 	{
 		SimpleState *state = new SimpleState(Um::RoundCorner,"",Um::IBorder);
 		state->set("CORNER_RADIUS","corner_radius");
-		state->set("OLD_RADIUS",RadRect);
+		state->set("OLD_RADIUS",m_roundedCorderRadius);
 		state->set("NEW_RADIUS",newRadius);
 		undoManager->action(this,state);
 	}
-	RadRect=newRadius;
+	m_roundedCorderRadius=newRadius;
 	//emit cornerRadius(RadRect);
 }
 
@@ -1627,7 +1627,7 @@
 	p->save();
 	if (!isEmbedded)
 		p->translate(Xpos, Ypos);
-	p->rotate(Rot);
+	p->rotate(m_rotation);
 	if (m_Doc->layerOutline(LayerID))
 	{
 		p->setPen(m_Doc->layerMarker(LayerID), 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
@@ -1974,7 +1974,7 @@
 	p->save();
 	if (!isEmbedded)
 		p->translate(Xpos, Ypos);
-	p->rotate(Rot);
+	p->rotate(m_rotation);
 	if ((!isEmbedded) && (!m_Doc->RePos))
 	{
 		double scpInv = 0;
@@ -2589,7 +2589,7 @@
 			}
 			p->save();
 			p->translate(glyphs.xoffset, glyphs.yoffset - ((style.fontSize() / 10.0) * glyphs.scaleV));
-			if (Reverse)
+			if (m_isReversed)
 			{
 				p->scale(-1, 1);
 				p->translate(-glyphs.xadvance, 0);
@@ -4333,8 +4333,8 @@
 				//in undo must be offset and scale saved
 				ss->set("OLD_IMAGEXOFFSET", LocalX);
 				ss->set("OLD_IMAGEYOFFSET", LocalY);
-				ss->set("OLD_IMAGEXSCALE", LocalScX);
-				ss->set("OLD_IMAGEYSCALE", LocalScY);
+				ss->set("OLD_IMAGEXSCALE", m_imageXScale);
+				ss->set("OLD_IMAGEYSCALE", m_imageYScale);
 			}
 		}
 		if (keepRatio != AspectRatio)
@@ -4601,7 +4601,7 @@
 		spreadChanges = (textFlowMode() != TextFlowDisabled );
 	}
 	// has the item been rotated
-	if (force || ((oldRot != Rot) && (shouldCheck())))
+	if (force || ((oldRot != m_rotation) && (shouldCheck())))
 	{
 		rotateUndoAction();
 		spreadChanges = (textFlowMode() != TextFlowDisabled );
@@ -4616,7 +4616,7 @@
 	if (force || ((oldLocalX != LocalX || oldLocalY != LocalY) && shouldCheck()))
 		changeImageOffsetUndoAction();
 	// has the item's image been scaled
-	if (force || ((oldLocalScX != LocalScX || oldLocalScY != LocalScY) && shouldCheck()))
+	if (force || ((oldLocalScX != m_imageXScale || oldLocalScY != m_imageYScale) && shouldCheck()))
 		changeImageScaleUndoAction();
 	
 	if(spreadChanges)
@@ -4695,7 +4695,7 @@
 		ss->set("NEW_RYPOS", Ypos);
 		}
 		ss->set("OLD_RROT", oldRot);
-		ss->set("NEW_RROT", Rot);
+		ss->set("NEW_RROT", m_rotation);
 		undoManager->action(this, ss);
 	}
 	if (!isNoteFrame() || !asNoteFrame()->isAutoWidth())
@@ -4704,24 +4704,24 @@
 		oldHeight = Height;
 	if (!isNoteFrame() || !asNoteFrame()->isAutoWelded())
 	{
-	oldXpos = Xpos;
-	oldYpos = Ypos;
+		oldXpos = Xpos;
+		oldYpos = Ypos;
 	}
 	oldOwnPage = OwnPage;
-	oldRot = Rot;
+	oldRot = m_rotation;
 }
 
 void PageItem::rotateUndoAction()
 {
-	if (oldRot == Rot)
+	if (oldRot == m_rotation)
 		return;
 	if (UndoManager::undoEnabled())
 	{
 		SimpleState *ss = new SimpleState(Um::Rotate,
-                                          QString(Um::FromTo).arg(oldRot).arg(Rot),
+										  QString(Um::FromTo).arg(oldRot).arg(m_rotation),
                                           Um::IRotate);
 		ss->set("OLD_ROT", oldRot);
-		ss->set("NEW_ROT", Rot);
+		ss->set("NEW_ROT", m_rotation);
 		if (!isNoteFrame() || !asNoteFrame()->isAutoWelded())
 		{
 		ss->set("OLD_RXPOS", oldXpos);
@@ -4741,7 +4741,7 @@
 		}
 		undoManager->action(this, ss);
 	}
-	oldRot = Rot;
+	oldRot = m_rotation;
 	oldXpos = Xpos;
 	oldYpos = Ypos;
 	oldOwnPage = OwnPage;
@@ -4770,21 +4770,21 @@
 
 void PageItem::changeImageScaleUndoAction()
 {
-	if (oldLocalScX == LocalScX && oldLocalScY == LocalScY)
+	if (oldLocalScX == m_imageXScale && oldLocalScY == m_imageYScale)
 		return;
 	if (UndoManager::undoEnabled())
 	{
 		SimpleState *ss = new SimpleState(Um::ImageScale,
-			QString(Um::ImageScaleFromTo).arg(oldLocalScX).arg(oldLocalScY).arg(LocalScX).arg(LocalScY), Um::IMove);
+			QString(Um::ImageScaleFromTo).arg(oldLocalScX).arg(oldLocalScY).arg(m_imageXScale).arg(m_imageYScale), Um::IMove);
 		ss->set("IMAGE_SCALE", "image_scale");
 		ss->set("OLD_IMAGEXSCALE", oldLocalScX);
 		ss->set("OLD_IMAGEYSCALE", oldLocalScY);
-		ss->set("NEW_IMAGEXSCALE", LocalScX);
-		ss->set("NEW_IMAGEYSCALE", LocalScY);
+		ss->set("NEW_IMAGEXSCALE", m_imageXScale);
+		ss->set("NEW_IMAGEYSCALE", m_imageYScale);
 		undoManager->action(this, ss);
 	}
-	oldLocalScX = LocalScX;
-	oldLocalScY = LocalScY;
+	oldLocalScX = m_imageXScale;
+	oldLocalScY = m_imageYScale;
 }
 
 void PageItem::restore(UndoState *state, bool isUndo)
@@ -6225,9 +6225,9 @@
 void PageItem::restoreImageRotation(SimpleState *is, bool isUndo)
 {
 	if (isUndo)
-		LocalRot = is->getInt("OLD_ROT");
-	else
-		LocalRot = is->getInt("NEW_ROT");
+		m_imageRotation = is->getInt("OLD_ROT");
+	else
+		m_imageRotation = is->getInt("NEW_ROT");
 }
 
 void PageItem::restorePasteInline(SimpleState *is, bool isUndo)
@@ -6420,9 +6420,9 @@
 void PageItem::restoreCornerRadius(SimpleState *state, bool isUndo)
 {
 	if (isUndo)
-		RadRect=state->getDouble("OLD_RADIUS");
-	else
-		RadRect=state->getDouble("NEW_RADIUS");
+		m_roundedCorderRadius=state->getDouble("OLD_RADIUS");
+	else
+		m_roundedCorderRadius=state->getDouble("NEW_RADIUS");
 	Selection tmpSelection(doc()->m_Selection);
 	doc()->m_Selection->clear();
 	doc()->m_Selection->addItem(this);
@@ -6484,7 +6484,7 @@
 	oldXpos = Xpos;
 	oldYpos = Ypos;
 	oldOwnPage = OwnPage;
-	oldRot = Rot;
+	oldRot = m_rotation;
 }
 
 void PageItem::restoreRotate(SimpleState *state, bool isUndo)
@@ -6513,7 +6513,7 @@
 		m_Doc->MoveItem(x - Xpos, y - Ypos, this, false);
 		m_Doc->SizeItem(w, h, this, false, true, redraw);
 	}
-	oldRot = Rot;
+	oldRot = m_rotation;
 	oldXpos = Xpos;
 	oldYpos = Ypos;
 	oldOwnPage = OwnPage;
@@ -6741,8 +6741,8 @@
 		{
 			state->set("OLD_IMAGEXOFFSET", LocalX);
 			state->set("OLD_IMAGEYOFFSET", LocalY);
-			state->set("OLD_IMAGEXSCALE", LocalScX);
-			state->set("OLD_IMAGEYSCALE", LocalScY);
+			state->set("OLD_IMAGEXSCALE", m_imageXScale);
+			state->set("OLD_IMAGEYSCALE", m_imageYScale);
 		}
 	}
 
@@ -6904,7 +6904,7 @@
 {
 	if (!isTextFrame())
 		return;
-	Reverse = !Reverse;
+	m_isReversed = !m_isReversed;
 }
 
 void PageItem::restorePathOperation(UndoState *state, bool isUndo)
@@ -8311,10 +8311,10 @@
 
 void PageItem::SetFrameRound()
 {
-	setCornerRadius(qMin(RadRect, qMin(Width,Height)/2));
+	setCornerRadius(qMin(m_roundedCorderRadius, qMin(Width,Height)/2));
 	PoLine.resize(0);
-	double rr = fabs(RadRect);
-	if (RadRect > 0.0)
+	double rr = fabs(m_roundedCorderRadius);
+	if (m_roundedCorderRadius > 0.0)
 	{
 		QPainterPath path;
 		path.addRoundedRect(0, 0, Width, Height, rr, rr);
@@ -8344,14 +8344,14 @@
 {
 	QTransform result;
 	result.translate(gXpos, gYpos);
-	result.rotate(Rot);
+	result.rotate(m_rotation);
 	return result;
 }
 
 void PageItem::getTransform(QTransform& mat) const
 {
 	mat.translate(Xpos, Ypos);
-	mat.rotate(Rot);
+	mat.rotate(m_rotation);
 }
 
 QTransform PageItem::getTransform() const
@@ -8419,7 +8419,7 @@
 	else
 	{
 		result.translate(Xpos, Ypos);
-		result.rotate(Rot);
+		result.rotate(m_rotation);
 	}
 	return result;
 }
@@ -8454,14 +8454,14 @@
 	double miny =  std::numeric_limits<double>::max();
 	double maxx = -std::numeric_limits<double>::max();
 	double maxy = -std::numeric_limits<double>::max();
-	if (Rot != 0)
+	if (m_rotation != 0)
 	{
 		FPointArray pb;
 		pb.resize(0);
 		pb.addPoint(FPoint(Xpos, Ypos));
-		pb.addPoint(FPoint(Width,    0.0, Xpos, Ypos, Rot, 1.0, 1.0));
-		pb.addPoint(FPoint(Width, Height, Xpos, Ypos, Rot, 1.0, 1.0));
-		pb.addPoint(FPoint(  0.0, Height, Xpos, Ypos, Rot, 1.0, 1.0));
+		pb.addPoint(FPoint(Width,    0.0, Xpos, Ypos, m_rotation, 1.0, 1.0));
+		pb.addPoint(FPoint(Width, Height, Xpos, Ypos, m_rotation, 1.0, 1.0));
+		pb.addPoint(FPoint(  0.0, Height, Xpos, Ypos, m_rotation, 1.0, 1.0));
 		for (uint pc = 0; pc < 4; ++pc)
 		{
 			minx = qMin(minx, pb.point(pc).x());
@@ -8487,7 +8487,7 @@
 		QTransform arrowTrans;
 		FPointArray arrow = m_Doc->arrowStyles().at(m_startArrowIndex-1).points.copy();
 		arrowTrans.translate(Xpos, Ypos);
-		arrowTrans.rotate(Rot);
+		arrowTrans.rotate(m_rotation);
 		if (itemType() == Line)
 		{
 			arrowTrans.translate(0, 0);
@@ -8542,7 +8542,7 @@
 		QTransform arrowTrans;
 		FPointArray arrow = m_Doc->arrowStyles().at(m_endArrowIndex-1).points.copy();
 		arrowTrans.translate(Xpos, Ypos);
-		arrowTrans.rotate(Rot);
+		arrowTrans.rotate(m_rotation);
 		if (itemType() == Line)
 		{
 			arrowTrans.translate(Width, 0);
@@ -8628,14 +8628,14 @@
 		if ((sl.Color != CommonStrings::None) && (sl.Width != 0))
 			extraSpace = sl.Width / 2.0;
 	}
-	if (Rot != 0)
+	if (m_rotation != 0)
 	{
 		FPointArray pb;
 		pb.resize(0);
-		pb.addPoint(FPoint(-extraSpace,				-extraSpace,			xPos(), yPos(), Rot, 1.0, 1.0));
-		pb.addPoint(FPoint(visualWidth()-extraSpace,	-extraSpace,			xPos(), yPos(), Rot, 1.0, 1.0));
-		pb.addPoint(FPoint(visualWidth()-extraSpace,	visualHeight()-extraSpace,	xPos(), yPos(), Rot, 1.0, 1.0));
-		pb.addPoint(FPoint(-extraSpace, 				visualHeight()-extraSpace,	xPos(), yPos(), Rot, 1.0, 1.0));
+		pb.addPoint(FPoint(-extraSpace,					-extraSpace,				xPos(), yPos(), m_rotation, 1.0, 1.0));
+		pb.addPoint(FPoint(visualWidth()-extraSpace,	-extraSpace,				xPos(), yPos(), m_rotation, 1.0, 1.0));
+		pb.addPoint(FPoint(visualWidth()-extraSpace,	visualHeight()-extraSpace,	xPos(), yPos(), m_rotation, 1.0, 1.0));
+		pb.addPoint(FPoint(-extraSpace, 				visualHeight()-extraSpace,	xPos(), yPos(), m_rotation, 1.0, 1.0));
 		for (uint pc = 0; pc < 4; ++pc)
 		{
 			minx = qMin(minx, pb.point(pc).x());
@@ -8661,7 +8661,7 @@
 		QTransform arrowTrans;
 		FPointArray arrow = m_Doc->arrowStyles().at(m_startArrowIndex-1).points.copy();
 		arrowTrans.translate(Xpos, Ypos);
-		arrowTrans.rotate(Rot);
+		arrowTrans.rotate(m_rotation);
 		if (itemType() == Line)
 		{
 			arrowTrans.translate(0, 0);
@@ -8716,7 +8716,7 @@
 		QTransform arrowTrans;
 		FPointArray arrow = m_Doc->arrowStyles().at(m_endArrowIndex-1).points.copy();
 		arrowTrans.translate(Xpos, Ypos);
-		arrowTrans.rotate(Rot);
+		arrowTrans.rotate(m_rotation);
 		if (itemType() == Line)
 		{
 			arrowTrans.translate(Width, 0);
@@ -8769,7 +8769,7 @@
 	{
 		QTransform clipTrans;
 		clipTrans.translate(Xpos, Ypos);
-		clipTrans.rotate(Rot);
+		clipTrans.rotate(m_rotation);
 		totalRect = totalRect.united(QRectF(clipTrans.mapRect(Clip.boundingRect())));
 	}
 	totalRect.getCoords(x1, y1, x2, y2);
@@ -9031,8 +9031,8 @@
 		
 		if (Pfile != filename)
 		{
-			oldLocalScX = LocalScX = 72.0 / xres;
-			oldLocalScY = LocalScY = 72.0 / yres;
+			oldLocalScX = m_imageXScale = 72.0 / xres;
+			oldLocalScY = m_imageYScale = 72.0 / yres;
 			oldLocalX = LocalX = 0;
 			oldLocalY = LocalY = 0;
 			if ((m_Doc->itemToolPrefs().imageUseEmbeddedPath) && (!pixm.imgInfo.clipPath.isEmpty()))
@@ -9044,8 +9044,8 @@
 					imageClip = pixm.imgInfo.PDSpathData[clPath].copy();
 					pixm.imgInfo.usedPath = clPath;
 					QTransform cl;
-					cl.translate(LocalX*LocalScX, LocalY*LocalScY);
-					cl.scale(LocalScX, LocalScY);
+					cl.translate(LocalX*m_imageXScale, LocalY*m_imageYScale);
+					cl.scale(m_imageXScale, m_imageYScale);
 					imageClip.map(cl);
 				}
 			}
@@ -9057,8 +9057,8 @@
 			imageClip = pixm.imgInfo.PDSpathData[clPath].copy();
 			pixm.imgInfo.usedPath = clPath;
 			QTransform cl;
-			cl.translate(LocalX*LocalScX, LocalY*LocalScY);
-			cl.scale(LocalScX, LocalScY);
+			cl.translate(LocalX*m_imageXScale, LocalY*m_imageYScale);
+			cl.scale(m_imageXScale, m_imageYScale);
 			imageClip.map(cl);
 		}
 		BBoxX = pixm.imgInfo.BBoxX;
@@ -9400,18 +9400,18 @@
 //	LocalRot = 0;
 	double xs = Width / static_cast<double>(OrigW);
 	double ys = Height / static_cast<double>(OrigH);
-	if (LocalRot != 0.0)
+	if (m_imageRotation != 0.0)
 	{
 		QRectF br = QRectF(0, 0, OrigW, OrigH);
 		QTransform m;
-		m.rotate(LocalRot);
+		m.rotate(m_imageRotation);
 		br = m.mapRect(br);
 		xs = Width / br.width();
 		ys = Height / br.height();
 		QLineF wL = QLineF(0, 0, OrigW, 0);
-		wL.setAngle(-LocalRot);
+		wL.setAngle(-m_imageRotation);
 		QLineF hL = QLineF(0, 0, 0, OrigH);
-		hL.setAngle(-LocalRot-90);
+		hL.setAngle(-m_imageRotation-90);
 		QTransform mm;
 		mm.scale(xs, ys);
 		hL = mm.map(hL);
@@ -9423,13 +9423,13 @@
 	}
 	if (AspectRatio)
 	{
-		LocalScX = qMin(xs, ys);
-		LocalScY = qMin(xs, ys);
-	}
-	else
-	{
-		LocalScX = xs;
-		LocalScY = ys;
+		m_imageXScale = qMin(xs, ys);
+		m_imageYScale = qMin(xs, ys);
+	}
+	else
+	{
+		m_imageXScale = xs;
+		m_imageYScale = ys;
 	}
 	// Disable broken code. Code must be independent from doc in that function
 	/*switch (m_Doc->RotMode)
@@ -9459,8 +9459,8 @@
 	{
 		imageClip = pixm.imgInfo.PDSpathData[pixm.imgInfo.usedPath].copy();
 		QTransform cl;
-		cl.translate(LocalX*LocalScX, LocalY*LocalScY);
-		cl.scale(LocalScX, LocalScY);
+		cl.translate(LocalX*m_imageXScale, LocalY*m_imageYScale);
+		cl.scale(m_imageXScale, m_imageYScale);
 		imageClip.map(cl);
 	}
 }

Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18022&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h (original)
+++ trunk/Scribus/scribus/pageitem.h Mon Dec 31 17:49:48 2012
@@ -116,13 +116,13 @@
 	Q_PROPERTY(double yPos READ yPos WRITE setYPos DESIGNABLE false)
 	Q_PROPERTY(double width READ width WRITE setWidth DESIGNABLE false)
 	Q_PROPERTY(double height READ height WRITE setHeight DESIGNABLE false)
-	Q_PROPERTY(double rotation READ rotation WRITE setRotation DESIGNABLE false)
-	Q_PROPERTY(double imageXScale READ imageXScale WRITE setImageXScale DESIGNABLE false)
-	Q_PROPERTY(double imageYScale READ imageYScale WRITE setImageYScale DESIGNABLE false)
+	Q_PROPERTY(double m_rotation READ rotation WRITE setRotation DESIGNABLE false)
+	Q_PROPERTY(double m_imageXScale READ imageXScale WRITE setImageXScale DESIGNABLE false)
+	Q_PROPERTY(double m_imageYScale READ imageYScale WRITE setImageYScale DESIGNABLE false)
 	Q_PROPERTY(double imageXOffset READ imageXOffset WRITE setImageXOffset DESIGNABLE false)
 	Q_PROPERTY(double imageYOffset READ imageYOffset WRITE setImageYOffset DESIGNABLE false)
-	Q_PROPERTY(bool reversed READ reversed WRITE setReversed DESIGNABLE false)
-	Q_PROPERTY(double cornerRadius READ cornerRadius WRITE setCornerRadius DESIGNABLE false)
+	Q_PROPERTY(bool m_isReversed READ reversed WRITE setReversed DESIGNABLE false)
+	Q_PROPERTY(double m_roundedCorderRadius READ cornerRadius WRITE setCornerRadius DESIGNABLE false)
 	Q_PROPERTY(double textToFrameDistLeft READ textToFrameDistLeft WRITE setTextToFrameDistLeft DESIGNABLE false)
 	Q_PROPERTY(double textToFrameDistRight READ textToFrameDistRight WRITE setTextToFrameDistRight DESIGNABLE false)
 	Q_PROPERTY(double textToFrameDistTop READ textToFrameDistTop WRITE setTextToFrameDistTop DESIGNABLE false)
@@ -644,16 +644,16 @@
 	void setWidthHeight(const double, const double);
 	void resizeBy(const double, const double);
 	//Rotation
-	double rotation() const { return Rot; }
+	double rotation() const { return m_rotation; }
 	void setRotation(const double, bool drawingOnly);
 	void setRotation(const double r) { setRotation(r, false); }  // needed for deSaXe
 	void rotateBy(const double);
 	//Selection
-	bool isSelected() const { return Select; }
+	bool isSelected() const { return m_isSelected; }
 	void setSelected(const bool);
 	//Image Data
-	double imageXScale() const { return LocalScX; }
-	double imageYScale() const { return LocalScY; }
+	double imageXScale() const { return m_imageXScale; }
+	double imageYScale() const { return m_imageYScale; }
 	void setImageXScale(const double);
 	void setImageYScale(const double);
 	void setImageXYScale(const double, const double);
@@ -663,13 +663,13 @@
 	void setImageYOffset(const double);
 	void moveImageXYOffsetBy(const double, const double);
 	void setImageXYOffset(const double, const double);
-	double imageRotation() const { return LocalRot; }
+	double imageRotation() const { return m_imageRotation; }
 	void setImageRotation(const double newRotation);
 	//Reverse
-	bool reversed() const { return Reverse; }
+	bool reversed() const { return m_isReversed; }
 	void setReversed(bool);
 	//Rounded Corners
-	double cornerRadius() const { return RadRect; }
+	double cornerRadius() const { return m_roundedCorderRadius; }
 	void setCornerRadius(double);
 	// PDF bookmark
 	bool isPDFBookmark() const { return isBookmark; }
@@ -1637,28 +1637,28 @@
 	/** Height of the item */
 	double Height;
 	/** Rotation of the item */
-	double Rot;
+	double m_rotation;
 	/** Element selected? */
-	bool Select;
+	bool m_isSelected;
 	/** Scaling X Factor for images */
-	double LocalScX;
+	double m_imageXScale;
 	/** Scaling Y Factor for images*/
-	double LocalScY;
+	double m_imageYScale;
 	/** Image X Offset to frame */
 	double LocalX;
 	/** Image Y Offset to frame */
 	double LocalY;
 	/** Image rotation in frame */
-	double LocalRot;
+	double m_imageRotation;
 	/** If the frame is reversed */
-	bool Reverse;
+	bool m_isReversed;
 
 protected:
 	FirstLineOffsetPolicy firstLineOffsetP;
 	
 public:
 	/** Radius of rounded corners */
-	double RadRect;
+	double m_roundedCorderRadius;
 	
 	//Undo Data
 	/** @brief Stores the old X-position for undo action. Is used to detect move actions.*/

Modified: trunk/Scribus/scribus/pageitem_imageframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18022&path=/trunk/Scribus/scribus/pageitem_imageframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_imageframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_imageframe.cpp Mon Dec 31 17:49:48 2012
@@ -155,11 +155,11 @@
 				p->setupPolygon(&imageClip);
 				p->setClipPath();
 			}
-			p->translate(LocalX*LocalScX, LocalY*LocalScY);
-			p->rotate(LocalRot);
-			double mscalex = 1.0 / LocalScX;
-			double mscaley = 1.0 / LocalScY;
-			p->scale(LocalScX, LocalScY);
+			p->translate(LocalX*m_imageXScale, LocalY*m_imageYScale);
+			p->rotate(m_imageRotation);
+			double mscalex = 1.0 / m_imageXScale;
+			double mscaley = 1.0 / m_imageYScale;
+			p->scale(m_imageXScale, m_imageYScale);
 			if (pixm.imgInfo.lowResType != 0)
 			{
 				p->scale(pixm.imgInfo.lowResScale, pixm.imgInfo.lowResScale);
@@ -232,8 +232,8 @@
 	Pfile = "";
 	pixm = ScImage();
 
-	LocalScX = 1;
-	LocalScY = 1;
+	m_imageXScale = 1;
+	m_imageYScale = 1;
 	OrigW = 0;
 	OrigH = 0;
 	LocalX = 0;
@@ -316,22 +316,22 @@
 		}		
 		if (dX!=0.0)
 		{
-			double newXScale=dX / 100.0 * LocalScX;
+			double newXScale=dX / 100.0 * m_imageXScale;
 			setImageXScale(newXScale);
 			if (!controlDown)
 			{
-				double newYScale=dX / 100.0 * LocalScY;
+				double newYScale=dX / 100.0 * m_imageYScale;
 				setImageYScale(newYScale);
 			}
 		}
 		else
 		if (dY!=0.0)
 		{
-			double newYScale=dY / 100.0 * LocalScY;
+			double newYScale=dY / 100.0 * m_imageYScale;
 			setImageYScale(newYScale);
 			if (!controlDown)
 			{
-				double newXScale=dY / 100.0 * LocalScY;
+				double newXScale=dY / 100.0 * m_imageYScale;
 				setImageXScale(newXScale);
 			}
 		}

Modified: trunk/Scribus/scribus/pageitem_latexframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18022&path=/trunk/Scribus/scribus/pageitem_latexframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_latexframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_latexframe.cpp Mon Dec 31 17:49:48 2012
@@ -199,8 +199,8 @@
 	{
 		xres = yres = realDpi();
 	}
-	double scaleX = LocalScX * xres;
-	double scaleY = LocalScY * yres;
+	double scaleX = m_imageXScale * xres;
+	double scaleY = m_imageYScale * yres;
 	double offX   = LocalX   / xres;
 	double offY   = LocalY   / yres;
 	PageItem_ImageFrame::loadImage(imageFile, true, realDpi());
@@ -210,8 +210,8 @@
 	}
 	
 	//Restore parameters, account for dpi changes
-	LocalScX = scaleX / pixm.imgInfo.xres;
-	LocalScY = scaleY / pixm.imgInfo.yres;
+	m_imageXScale = scaleX / pixm.imgInfo.xres;
+	m_imageYScale = scaleY / pixm.imgInfo.yres;
 	LocalX   = offX   * pixm.imgInfo.xres;
 	LocalY   = offY   * pixm.imgInfo.yres;
 	//emit imageOffsetScale(LocalScX, LocalScY, LocalX, LocalY);
@@ -336,10 +336,10 @@
 	QString tmp(formulaText);
 	double scaleX, scaleY, realW, realH, offsetX, offsetY;
 	double lDpi = realDpi()/72.0;
-	scaleX = LocalScX*lDpi;
-	scaleY = LocalScY*lDpi;
-	offsetX = LocalX*LocalScX;
-	offsetY = LocalY*LocalScY;
+	scaleX = m_imageXScale*lDpi;
+	scaleY = m_imageYScale*lDpi;
+	offsetX = LocalX*m_imageXScale;
+	offsetY = LocalY*m_imageYScale;
 	realW = Width/scaleX - LocalX/lDpi;
 	realH = Height/scaleY - LocalY/lDpi;
 	if (!tmp.contains("$scribus_noprepost$") && m_usePreamble) {

Modified: trunk/Scribus/scribus/pageitem_noteframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18022&path=/trunk/Scribus/scribus/pageitem_noteframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_noteframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_noteframe.cpp Mon Dec 31 17:49:48 2012
@@ -101,7 +101,7 @@
 		frameHeight = newStyle.charStyle().fontSize()/10;
 	Height = oldHeight = frameHeight;
 	oldWidth = Width;
-	oldRot = Rot;
+	oldRot = m_rotation;
 	oldXpos = Xpos;
 	Ypos = oldYpos =m_masterFrame->yPos() + m_masterFrame->height();
 

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18022&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp Mon Dec 31 17:49:48 2012
@@ -191,7 +191,7 @@
 			canvasToLocalMat.translate(gXpos, gYpos);
 		else
 			canvasToLocalMat.translate(Xpos, Ypos);
-		canvasToLocalMat.rotate(Rot);
+		canvasToLocalMat.rotate(m_rotation);
 		canvasToLocalMat = canvasToLocalMat.inverted(&invertible);
 
 		if (!invertible) return QRegion();
@@ -3098,7 +3098,7 @@
 		pf2.translate(Xpos, Ypos);
 	}
 	
-	pf2.rotate(Rot);
+	pf2.rotate(m_rotation);
 	if (!m_Doc->layerOutline(LayerID))
 	{
 		if ((fillColor() != CommonStrings::None) || (GrType != 0))
@@ -3220,9 +3220,9 @@
 				p->save();//SA2
 				p->setupPolygon(&PoLine);
 				p->setClipPath();
-				p->scale(LocalScX, LocalScY);
-				p->translate(LocalX*LocalScX, LocalY*LocalScY);
-				p->rotate(LocalRot);
+				p->scale(m_imageXScale, m_imageYScale);
+				p->translate(LocalX*m_imageXScale, LocalY*m_imageYScale);
+				p->rotate(m_imageRotation);
 				if (pixm.width() > 0 && pixm.height() > 0)
 					p->drawImage(pixm.qImagePtr());
 				p->restore();//RE2
@@ -3581,7 +3581,7 @@
 					}
 					if (!m_Doc->RePos)
 					{
-						if (((selecteds && Select) || ((NextBox != 0 || BackBox != 0) && selecteds))
+						if (((selecteds && m_isSelected) || ((NextBox != 0 || BackBox != 0) && selecteds))
 							&& (m_Doc->appMode == modeEdit || m_Doc->appMode == modeEditTable))
 						{
 							double xcoZli = selX + hls->glyph.xoffset;
@@ -3668,7 +3668,7 @@
 					double fontSize = charStyle.fontSize() / 10.0;
 					desc = - font.descent(fontSize);
 					asce = font.ascent(fontSize);
-					if (((selected && Select) || ((NextBox != 0 || BackBox != 0) && selected)) && (m_Doc->appMode == modeEdit || m_Doc->appMode == modeEditTable))
+					if (((selected && m_isSelected) || ((NextBox != 0 || BackBox != 0) && selected)) && (m_Doc->appMode == modeEdit || m_Doc->appMode == modeEditTable))
 					{
 						// set text color to highlight if its selected
 						p->setBrush(qApp->palette().color(QPalette::Active, QPalette::HighlightedText));
@@ -3859,7 +3859,7 @@
 	p->save();
 	if (!isEmbedded)
 		p->translate(Xpos, Ypos);
-	p->rotate(Rot);
+	p->rotate(m_rotation);
 	if ((!isEmbedded) && (!m_Doc->RePos))
 	{
 		double scpInv = 0.0;




More information about the scribus-commit mailing list