r23912 by craig - Set default initialisers for pageitem, remove the unnecessary calls,

scribus-commit scribus-commit at lists.scribus.net
Thu Jul 9 20:59:19 UTC 2020


Author: craig
Date: Thu Jul  9 20:59:19 2020
New Revision: 23912

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23912
Log:
Set default initialisers for pageitem, remove the unnecessary calls,
hopefully making initialisation a little faster.

Modified:
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/pageitem.h
    trunk/Scribus/scribus/pageitem_textframe.cpp
    trunk/Scribus/scribus/ui/bookmarkpalette.cpp
    trunk/Scribus/scribus/ui/checkDocument.cpp
    trunk/Scribus/scribus/vgradient.h

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23912&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp	(original)
+++ trunk/Scribus/scribus/pageitem.cpp	Thu Jul  9 20:59:19 2020
@@ -286,8 +286,6 @@
 	hatchForegroundQ(other.hatchForegroundQ),
 	// protected
 	undoManager(other.undoManager),
-	BackBox(nullptr),  // otherwise other.BackBox->NextBox would be inconsistent
-	NextBox(nullptr),  // otherwise other.NextBox->BackBox would be inconsistent
 	firstChar(0),   // since this box is unlinked now
 	m_maxChars(0),   // since the layout is invalid now
 	m_sampleItem(false),
@@ -400,36 +398,16 @@
 }
 
 
-PageItem::PageItem(ScribusDoc *pa, ItemType newType, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline)
+PageItem::PageItem(ScribusDoc *doc, ItemType newType, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline)
 	// Initialize superclass(es)
-	: QObject(pa), SingleObservable<PageItem>(pa->itemsChanged()), TextContext(this),
+	: QObject(doc), SingleObservable<PageItem>(doc->itemsChanged()), TextContext(this),
 	// Initialize member variables
-	OverrideCompressionMethod(false),
-	CompressionMethodIndex(0),
-	OverrideCompressionQuality(false),
-	CompressionQualityIndex(0),
-	itemText(pa),
+	itemText(doc),
 	textLayout(&itemText, this),
-	undoManager(UndoManager::instance()),
-	m_lineShade(100),
-	m_fillShade(100),
-	m_fillTransparency(0.0),
-	m_lineTransparency(0.0),
-	m_fillBlendMode(0),
-	m_lineBlendMode(0),
-	m_ImageIsFlippedH(false),
-	m_ImageIsFlippedV(false),
-	m_Locked(false),
-	m_SizeLocked(false),
-	m_SizeHLocked(false),
-	m_SizeVLocked(false),
-	m_textFlowMode(TextFlowDisabled)
-{
-	Parent = nullptr;
-	m_Doc = pa;
+	undoManager(UndoManager::instance())
+{
+	m_Doc = doc;
 	QString tmp;
-	BackBox = nullptr;
-	NextBox = nullptr;
 	gXpos = oldXpos = m_xPos = x;
 	gYpos = oldYpos = m_yPos = y;
 	//CB Surely we can remove some of these?
@@ -440,100 +418,22 @@
 	BoundingW = w;
 	BoundingH = h;
 	m_itemType = newType;
-	oldRot = m_rotation = 0;
 	m_fillColor = fill;
 	m_lineColor = m_itemType == PageItem::TextFrame ? fill : outline;
-	gWidth = gHeight = 0;
-	GrType = 0;
-	GrStartX = 0;
-	GrStartY = 0;
 	GrEndX = w;
-	GrEndY = 0;
-	GrFocalX = 0;
-	GrFocalY = 0;
-	GrScale = 1;
-	GrSkew = 0;
-	GrExtend = VGradient::pad;
-	GrControl1 = FPoint(0,0);
+
 	GrControl2 = FPoint(w, 0);
 	GrControl3 = FPoint(w, h);
 	GrControl4 = FPoint(0, h);
 	GrControl5 = FPoint(w / 2.0, h / 2.0);
-	GrCol1transp = 1.0;
-	GrCol2transp = 1.0;
-	GrCol3transp = 1.0;
-	GrCol4transp = 1.0;
-	GrCol1Shade = 100;
-	GrCol2Shade = 100;
-	GrCol3Shade = 100;
-	GrCol4Shade = 100;
-	meshGradientPatches.clear();
-	meshGradientArray.clear();
-	selectedMeshPointX = -1;
-	selectedMeshPointY = -1;
-	m_gradientName = "";
-	GrTypeStroke = 0;
-	GrStrokeStartX = 0;
-	GrStrokeStartY = 0;
 	GrStrokeEndX = w;
-	GrStrokeEndY = 0;
-	GrStrokeFocalX = 0;
-	GrStrokeFocalY = 0;
-	GrStrokeScale = 1;
-	GrStrokeSkew = 0;
-	gradientStrokeVal.clear();
-	m_patternName = "";
-	patternScaleX = 100;
-	patternScaleY = 100;
-	patternOffsetX = 0;
-	patternOffsetY = 0;
-	patternRotation = 0;
-	patternSkewX = 0;
-	patternSkewY = 0;
-	patternMirrorX = false;
-	patternMirrorY = false;
-	patternStrokeVal = "";
-	patternStrokeScaleX = 100;
-	patternStrokeScaleY = 100;
-	patternStrokeOffsetX = 0;
-	patternStrokeOffsetY = 0;
-	patternStrokeRotation = 0;
-	patternStrokeSkewX = 0;
-	patternStrokeSkewY = 0;
-	patternStrokeSpace = 1.0;
-	patternStrokeMirrorX = false;
-	patternStrokeMirrorY = false;
-	patternStrokePath = false;
 	m_lineWidth = w2;
 	m_oldLineWidth = w2;
 	PLineArt = Qt::PenStyle(m_Doc->itemToolPrefs().shapeLineStyle);
 	PLineEnd = Qt::FlatCap;
 	PLineJoin = Qt::MiterJoin;
-	m_isSelected = false;
-	ClipEdited = false;
-	FrameType = 0;
-	CurX = 0;
-	CurY = 0;
 	m_textDistanceMargins=m_Doc->itemToolPrefs().textDistances;
-	verticalAlign = 0;
-	firstChar = 0;
-	m_maxChars = 0;
-	m_sampleItem = false;
-	Pfile = "";
-	pixm = ScImage();
 	pixm.imgInfo.lowResType = m_Doc->itemToolPrefs().imageLowResType;
-	Pfile2 = "";
-	Pfile3 = "";
-	oldLocalScX = m_imageXScale = 1;
-	oldLocalScY = m_imageYScale = 1;
-	OrigW = 0;
-	OrigH = 0;
-	oldLocalX = m_imageXOffset = 0;
-	oldLocalY = m_imageYOffset = 0;
-	m_imageRotation = 0;
-	BBoxX = 0;
-	BBoxH = 0;
-	m_roundedCornerRadius = 0;
 	switch (m_itemType)
 	{
 		case Polygon:
@@ -544,83 +444,70 @@
 			Clip.setPoints(4, 0, 0, static_cast<int>(w), 0, static_cast<int>(w), static_cast<int>(h), 0, static_cast<int>(h));
 			break;
 	}
-	PoLine.resize(0);
-	ContourLine.resize(0);
-	imageClip.resize(0);
-	Segments.clear();
-	PoShow = false;
-	BaseOffs = 0;
-	textPathType = 0;
-	textPathFlipped = false;
 	OwnPage = m_Doc->currentPage() ? m_Doc->currentPage()->pageNr() : -1;
 	oldOwnPage = OwnPage;
 	savedOwnPage = OwnPage;
 	m_imageVisible = m_Doc->guidesPrefs().showPic;
-	imageIsAvailable = false;
-	m_PrintEnabled = true;
-	isBookmark = false;
-	m_isAnnotation = false;
-	weldList.clear();
 	
 	switch (m_itemType)
 	{
-	case ImageFrame:
-	case OSGFrame:
-	case LatexFrame:
-		//We can't determine if this is a latex frame here
-		// because c++'s typeinfos are still saying it's 
-		// a plain pageitem
-		// This is fixed in the PageItem_LatexFrame constructor
-		m_itemName = tr("Image");
-		setUPixmap(Um::IImageFrame);
-		break;
-	case TextFrame:
-		m_itemName = tr("Text");
-		setUPixmap(Um::ITextFrame);
-		break;
-	case Line:
-		m_itemName = tr("Line");
-		setUPixmap(Um::ILine);
-		break;
-	case Polygon:
-		m_itemName = tr("Polygon");
-		setUPixmap(Um::IPolygon);
-		break;
-	case PolyLine:
-		m_itemName = tr("Polyline");
-		setUPixmap(Um::IPolyline);
-		break;
-	case PathText:
-		m_itemName = tr("PathText");
-		setUPixmap(Um::IPathText);
-		break;
-	case Symbol:
-		m_itemName = tr("Symbol");
-		setUPixmap(Um::IPolygon);
-		break;
-	case Group:
-		m_itemName = tr("Group");
-		setUPixmap(Um::IPolygon);
-		break;
-	case RegularPolygon:
-		m_itemName = tr("RegularPolygon");
-		setUPixmap(Um::IPolygon);
-		break;
-	case Arc:
-		m_itemName = tr("Arc");
-		setUPixmap(Um::IPolygon);
-		break;
-	case Spiral:
-		m_itemName = tr("Spiral");
-		setUPixmap(Um::IPolygon);
-		break;
-	case Table:
-		m_itemName = tr("Table");
-		//setUPixmap(Um::IPolygon); // TODO: Fix this.
-		break;
-	default:
-		m_itemName = "Item";
-		break;
+		case ImageFrame:
+		case OSGFrame:
+		case LatexFrame:
+			//We can't determine if this is a latex frame here
+			// because c++'s typeinfos are still saying it's
+			// a plain pageitem
+			// This is fixed in the PageItem_LatexFrame constructor
+			m_itemName = tr("Image");
+			setUPixmap(Um::IImageFrame);
+			break;
+		case TextFrame:
+			m_itemName = tr("Text");
+			setUPixmap(Um::ITextFrame);
+			break;
+		case Line:
+			m_itemName = tr("Line");
+			setUPixmap(Um::ILine);
+			break;
+		case Polygon:
+			m_itemName = tr("Polygon");
+			setUPixmap(Um::IPolygon);
+			break;
+		case PolyLine:
+			m_itemName = tr("Polyline");
+			setUPixmap(Um::IPolyline);
+			break;
+		case PathText:
+			m_itemName = tr("PathText");
+			setUPixmap(Um::IPathText);
+			break;
+		case Symbol:
+			m_itemName = tr("Symbol");
+			setUPixmap(Um::IPolygon);
+			break;
+		case Group:
+			m_itemName = tr("Group");
+			setUPixmap(Um::IPolygon);
+			break;
+		case RegularPolygon:
+			m_itemName = tr("RegularPolygon");
+			setUPixmap(Um::IPolygon);
+			break;
+		case Arc:
+			m_itemName = tr("Arc");
+			setUPixmap(Um::IPolygon);
+			break;
+		case Spiral:
+			m_itemName = tr("Spiral");
+			setUPixmap(Um::IPolygon);
+			break;
+		case Table:
+			m_itemName = tr("Table");
+			//setUPixmap(Um::IPolygon); // TODO: Fix this.
+			break;
+		default:
+			m_itemName = "Item";
+			break;
 	}
 	m_Doc->TotalItems++;
 	
@@ -634,29 +521,11 @@
 	}
 	
 	uniqueNr = m_Doc->TotalItems;
-	AutoName = true;
 	setUName(m_itemName);
 	m_annotation.setBorderColor(outline);
-	HasSel = false;
-	isAutoText = false;
-	inPdfArticle = false;
-	isRaster = false;
-	Sizing = false;
 //	toPixmap = false;
-	UseEmbedded = true;
 	ImageIntent = Intent_Relative_Colorimetric;
-	EmbeddedProfile.clear();
-	groupItemList.clear();
-	groupWidth = 1.0;
-	groupHeight = 1.0;
 	m_layerID = m_Doc->activeLayer();
-	ScaleType = true;
-	AspectRatio = true;
-	NamedLStyle = "";
-	DashValues.clear();
-	DashOffset = 0;
-	fillRule = true;
-	doOverprint = false;
 	stroke_gradient = VGradient(VGradient::linear);
 	stroke_gradient.clearStops();
 	if (m_lineColor != CommonStrings::None)
@@ -769,28 +638,8 @@
 			}
 		}
 	}
-	GrMask = 0;
-	GrMaskStartX = 0;
-	GrMaskStartY = 0;
 	GrMaskEndX = w;
-	GrMaskEndY = 0;
-	GrMaskFocalX = 0;
-	GrMaskFocalY = 0;
-	GrMaskScale = 1;
-	GrMaskSkew = 0;
-	patternMaskScaleX = 100;
-	patternMaskScaleY = 100;
-	patternMaskOffsetX = 0;
-	patternMaskOffsetY = 0;
-	patternMaskRotation = 0;
-	patternMaskSkewX = 0;
-	patternMaskSkewY = 0;
-	patternMaskMirrorX = false;
-	patternMaskMirrorY = false;
-	patternMaskVal = "";
-	gradientMaskVal = "";
 	mask_gradient = VGradient(VGradient::linear);
-	mask_gradient.clearStops();
 	const ScColor& col = m_Doc->PageColors["Black"];
 	QColor qcol = ScColorEngine::getRGBColor(col, m_Doc);
 	mask_gradient.addStop(qcol, 0.0, 0.5, 1.0, "Black", 100);
@@ -835,28 +684,10 @@
 	m_firstLineOffset = FLOPRealGlyphHeight;
 	m_columns = m_Doc->itemToolPrefs().textColumns;
 	m_columnGap = m_Doc->itemToolPrefs().textColumnGap;
-	m_leftLink = nullptr;
-	m_rightLink = nullptr;
-	m_topLink = nullptr;
-	m_bottomLink = nullptr;
-	LeftLinkID = 0;
-	RightLinkID = 0;
-	TopLinkID = 0;
-	BottomLinkID = 0;
-	LeftLine = false;
-	RightLine = false;
-	TopLine = false;
-	BottomLine = false;
-	isTableItem = false;
-	isSingleSel = false;
-	invalid = true;
-	ChangedMasterItem = false;
-	isEmbedded = false;
+
 	OnMasterPage = m_Doc->currentPage() ? m_Doc->currentPage()->pageName() : QString();
 	m_startArrowIndex = m_Doc->itemToolPrefs().lineStartArrow;
 	m_endArrowIndex = m_Doc->itemToolPrefs().lineEndArrow;
-	m_startArrowScale = 100;
-	m_endArrowScale = 100;
 	effectsInUse.clear();
 	//Page Item Attributes
 	pageItemAttributes.clear();
@@ -867,35 +698,10 @@
 			)
 			pageItemAttributes.append(*objAttrIt);
 	}
-	isInlineImage = false;
-	isTempFile = false;
-
-	m_hasSoftShadow = false;
-	m_softShadowColor = "Black";
-	m_softShadowShade = 100;
-	m_softShadowBlurRadius = 5.0;
-	m_softShadowXOffset = 5.0;
-	m_softShadowYOffset = 5.0;
-	m_softShadowOpacity = 0.0;
-	m_softShadowBlendMode = 0;
-	m_softShadowErasedByObject = false;
-	m_softShadowHasObjectTransparency = false;
-	m_groupClips = true;
-	hatchAngle = 0;
-	hatchDistance = 2;
-	hatchType = 0;
-	hatchUseBackground = false;
 	hatchBackground = CommonStrings::None;
 	hatchBackgroundQ = QColor();
 	hatchForeground = "Black";
 	hatchForegroundQ = qcol;
-	selectedMeshControlPoint = 0;
-	snapToPatchGrid = false;
-	FrameOnly = false;
-	inlineCharID = 0;
-	GrStrokeExtend = VGradient::none;
-	no_fill = false;
-	no_stroke = false;
 }
 
 PageItem::~PageItem()
@@ -1210,15 +1016,15 @@
 PageItem * PageItem::frameTextEnd()
 {
 	PageItem * LastBox = this;
-	if (frameOverflows() && NextBox)
+	if (frameOverflows() && m_nextBox)
 	{ // text ending in some next frame
-		LastBox = NextBox;
+		LastBox = m_nextBox;
 		while (LastBox != nullptr && !LastBox->frameDisplays(itemText.length()-1))
 			LastBox = LastBox->nextInChain();
 	}
-	else if (frameUnderflows() && BackBox)
+	else if (frameUnderflows() && m_backBox)
 	{ //text ending in some previous frame
-		LastBox = BackBox;
+		LastBox = m_backBox;
 		while (LastBox != nullptr && !LastBox->frameDisplays(itemText.length()-1))
 			LastBox = LastBox->prevInChain();
 	}
@@ -1230,7 +1036,7 @@
 {
 	// Fix #6991 : "Text overflow" warning when there is a text underflow in fact
 	/*return NextBox == nullptr && itemText.length() > static_cast<int>(MaxChars);*/
-	return ( NextBox == nullptr )
+	return ( m_nextBox == nullptr )
 		   && ( firstChar < itemText.length() )
 		   // Fix #7766 : scribus.textOverflows() returns 0 if there is no place for the overflow mark
 		   /*&& ( firstChar < MaxChars )*/
@@ -1260,7 +1066,7 @@
 /// returns true if text is ending before that frame
 bool PageItem::frameUnderflows() const
 {
-	if (BackBox == nullptr)
+	if (m_backBox == nullptr)
 		return false;
 	//FIX ME - I have found that condition if frame is empty
 	//and has been linked with previous frame
@@ -1280,7 +1086,7 @@
 	QColor color(PrefsManager::instance().appPrefs.displayPrefs.frameNormColor);
 	if ((isBookmark) || (m_isAnnotation))
 		color = PrefsManager::instance().appPrefs.displayPrefs.frameAnnotationColor;
-	if ((BackBox != nullptr) || (NextBox != nullptr))
+	if ((m_backBox != nullptr) || (m_nextBox != nullptr))
 		color = PrefsManager::instance().appPrefs.displayPrefs.frameLinkColor;
 	if (m_Locked)
 		color = PrefsManager::instance().appPrefs.displayPrefs.frameLockColor;
@@ -1354,8 +1160,8 @@
 	}
 	else
 		addPARSEP = false;
-	NextBox = nxt;
-	nxt->BackBox = this;
+	m_nextBox = nxt;
+	nxt->m_backBox = this;
 	// update AutoText
 	if (isAutoText)
 	{
@@ -1364,7 +1170,7 @@
 		{
 			after->isAutoText = true;
 			m_Doc->LastAuto = after;
-			after = after->NextBox;
+			after = after->m_nextBox;
 		}
 	}
 	else if (nxt->isAutoText)
@@ -1374,22 +1180,22 @@
 		{
 			before->isAutoText = true;
 			m_Doc->FirstAuto = before;
-			before = before->BackBox;
+			before = before->m_backBox;
 		}
 	}
 	invalid = true;
 	PageItem* prev = this;
-	while (prev->BackBox && !prev->BackBox->frameOverflows())
-	{
-		prev->BackBox->invalid = true;
-		prev = prev->BackBox;
+	while (prev->m_backBox && !prev->m_backBox->frameOverflows())
+	{
+		prev->m_backBox->invalid = true;
+		prev = prev->m_backBox;
 	}
 	while (nxt)
 	{
 		nxt->itemText = itemText;
 		nxt->invalid = true;
 		nxt->firstChar = 0;
-		nxt = nxt->NextBox;
+		nxt = nxt->m_nextBox;
 	}
 	if (UndoManager::undoEnabled() && createUndo) //addPARESEP is false only if linking is invoked from undo action for unlinkWithText
 	{
@@ -1398,16 +1204,16 @@
 		is->set("FIRST", first);
 		is->set("JOIN_POS", textLen);
 		is->set("ADDPARSEP", addPARSEP);
-		is->setItem(qMakePair(this, NextBox));
+		is->setItem(qMakePair(this, m_nextBox));
 		undoManager->action(this, is);
 	}
 }
 
 void PageItem::unlink(bool createUndo)
 {
-	if (NextBox)
-	{
-		PageItem *undoNextBox=NextBox;
+	if (m_nextBox)
+	{
+		PageItem *undoNextBox=m_nextBox;
 		// make sure lastInFrame is valid
 		layout();
 		/*
@@ -1430,22 +1236,22 @@
 			while (before) 
 			{
 				before->isAutoText = false;
-				before = before->BackBox;
+				before = before->m_backBox;
 			}
-			m_Doc->FirstAuto = NextBox;
+			m_Doc->FirstAuto = m_nextBox;
 		}
 		// link following frames to new text
-		NextBox->firstChar = 0;
-		NextBox->BackBox = nullptr;
-		while (NextBox)
-		{
-			NextBox->itemText = follow;
-			NextBox->invalid = true;
-			NextBox->firstChar = 0;
-			NextBox = NextBox->NextBox;
+		m_nextBox->firstChar = 0;
+		m_nextBox->m_backBox = nullptr;
+		while (m_nextBox)
+		{
+			m_nextBox->itemText = follow;
+			m_nextBox->invalid = true;
+			m_nextBox->firstChar = 0;
+			m_nextBox = m_nextBox->m_nextBox;
 		}
 		// NextBox == nullptr now
-		NextBox = nullptr;
+		m_nextBox = nullptr;
 		if (UndoManager::undoEnabled() && createUndo)
 		{
 			ScItemState<QPair<PageItem*, PageItem*> > *is = new ScItemState<QPair<PageItem*, PageItem*> >(Um::UnlinkTextFrame);
@@ -1459,15 +1265,15 @@
 void PageItem::dropLinks()
 {
 	// update auto pointers
-	if (isAutoText && NextBox == nullptr)
-		m_Doc->LastAuto = BackBox;
-	if (isAutoText && BackBox == nullptr)
-		m_Doc->FirstAuto = NextBox;
+	if (isAutoText && m_nextBox == nullptr)
+		m_Doc->LastAuto = m_backBox;
+	if (isAutoText && m_backBox == nullptr)
+		m_Doc->FirstAuto = m_nextBox;
 	isAutoText = false;
 
 	// leave text in remaining chain
-	PageItem* before = BackBox;
-	PageItem* after = NextBox;
+	PageItem* before = m_backBox;
+	PageItem* after = m_nextBox;
 	if (after == nullptr && before == nullptr)
 		return;
 
@@ -1476,17 +1282,17 @@
 	int afterChar = 0;
 	if (before)
 	{
-		before->NextBox = after;
+		before->m_nextBox = after;
 		afterChar = qMin((int) before->m_maxChars, before->itemText.length());
 	}
 	if (after) 
 	{
-		after->BackBox = before;
+		after->m_backBox = before;
 		while (after)
 		{ 
 			after->invalid = true;
 			after->firstChar = afterChar;
-			after = after->NextBox;
+			after = after->m_nextBox;
 		}
 	}
 
@@ -1494,20 +1300,20 @@
 	{
 		ScItemState<QPair<PageItem*, PageItem*> > *is = new ScItemState<QPair<PageItem*, PageItem*> >(Um::UnlinkTextFrame);
 		is->set("DROP_LINKS");
-		is->setItem(qMakePair(BackBox, NextBox));
+		is->setItem(qMakePair(m_backBox, m_nextBox));
 		undoManager->action(this, is);
 	}
 
 	// JG we should set BackBox and NextBox to nullptr at a point
-	BackBox = NextBox = nullptr;
+	m_backBox = m_nextBox = nullptr;
 }
 
 //unlink selected frame from text chain
 //but copy or cut its content from itemText
 void PageItem::unlinkWithText()
 {
-	PageItem* Next = NextBox;
-	PageItem* Prev = BackBox;
+	PageItem* Next = m_nextBox;
+	PageItem* Prev = m_backBox;
 	int length = itemText.length();
 
 	if (this->invalid)
@@ -2174,7 +1980,7 @@
 				p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 				if ((isBookmark) || (m_isAnnotation))
 					p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameAnnotationColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-				if ((BackBox != nullptr) || (NextBox != nullptr))
+				if ((m_backBox != nullptr) || (m_nextBox != nullptr))
 					p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameLinkColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 				if (m_Locked)
 					p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameLockColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
@@ -7162,19 +6968,19 @@
 		PageItem* prev = is->getItem().first;
 		PageItem* next = is->getItem().second;
 
-		BackBox = prev;
-		NextBox = next;
+		m_backBox = prev;
+		m_nextBox = next;
 		invalid = true;
 
 		if (prev)
 		{
 			this->itemText  = prev->itemText;
 			this->isAutoText |= prev->isAutoText;
-			prev->NextBox = this;
+			prev->m_nextBox = this;
 			while (prev)
 			{
 				prev->invalid = true;
-				prev = prev->BackBox;
+				prev = prev->m_backBox;
 			}
 		}
 		if (next)
@@ -7182,20 +6988,20 @@
 			this->itemText = next->itemText;
 			this->isAutoText |= next->isAutoText;
 
-			next->BackBox = this;
+			next->m_backBox = this;
 			while (next)
 			{
 				next->invalid = true;
-				next = next->NextBox;
+				next = next->m_nextBox;
 			}
 		}
 
 		// update auto pointers
-		if (isAutoText && NextBox == nullptr)
+		if (isAutoText && m_nextBox == nullptr)
 		{
 			m_Doc->LastAuto = this;
 		}
-		if (isAutoText && BackBox == nullptr)
+		if (isAutoText && m_backBox == nullptr)
 		{
 			m_Doc->FirstAuto = this;
 		}

Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23912&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h	(original)
+++ trunk/Scribus/scribus/pageitem.h	Thu Jul  9 20:59:19 2020
@@ -232,7 +232,7 @@
 
 public: // Start public functions
 
-	PageItem(ScribusDoc *pa, ItemType newType, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline);
+	PageItem(ScribusDoc *doc, ItemType newType, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline);
 	~PageItem() override;
 
 	/* these do essentially the same as a dynamic cast but might be more readable */
@@ -248,7 +248,7 @@
 	virtual PageItem_Polygon * asPolygon()					{ return nullptr; } ///< Return self if Polygon item, otherwise null
 	virtual PageItem_RegularPolygon * asRegularPolygon()	{ return nullptr; } ///< Return self if Regular Polygon item, otherwise null
 	virtual PageItem_Spiral * asSpiral()					{ return nullptr; } ///< Return self if Spiral item, otherwise null
-	virtual PageItem_Symbol * asSymbol()				{ return nullptr; } ///< Return self if Symbol item, otherwise null
+	virtual PageItem_Symbol * asSymbol()					{ return nullptr; } ///< Return self if Symbol item, otherwise null
 	virtual PageItem_Table * asTable()						{ return nullptr; } ///< Return self if Table item, otherwise null
 	virtual PageItem_TextFrame * asTextFrame()				{ return nullptr; } ///< Return self if Text item, otherwise null
 
@@ -473,11 +473,11 @@
 	PageItem* firstInChain();
 	PageItem* lastInChain();
 	PageItem* lastInChainSamePage();
-	PageItem* prevInChain() { return BackBox; }
-	PageItem* nextInChain() { return NextBox; }
-	const PageItem* prevInChain() const { return BackBox; }
-	const PageItem* nextInChain() const { return NextBox; }
-	bool isInChain() const { return ((BackBox != nullptr) || (NextBox != nullptr)); }
+	PageItem* prevInChain() { return m_backBox; }
+	PageItem* nextInChain() { return m_nextBox; }
+	const PageItem* prevInChain() const { return m_backBox; }
+	const PageItem* nextInChain() const { return m_nextBox; }
+	bool isInChain() const { return ((m_backBox != nullptr) || (m_nextBox != nullptr)); }
 
 	bool canBeLinkedTo(const PageItem* nextFrame) const;
 	void unlink(bool createUndo = true);
@@ -1268,21 +1268,21 @@
 
 public:	// Start public variables
 	int maxCharsInFrame();
-	bool AutoName;
-	double gXpos;
-	double gYpos;
-	double gWidth;
-	double gHeight;
-	int GrType; ///< used values 6 = linear, 7 = radial, 8 = pattern, 9 = 4 color gradient, 10 = diamond, 11,12,13 = mesh gradient, 14 = hatch
-	double GrStartX;
-	double GrStartY;
-	double GrEndX;
-	double GrEndY;
-	double GrFocalX;
-	double GrFocalY;
-	double GrScale;
-	double GrSkew;
-	VGradient::VGradientRepeatMethod GrExtend;
+	bool AutoName {true};
+	double gXpos {0.0};
+	double gYpos {0.0};
+	double gWidth {0.0};
+	double gHeight {0.0};
+	int GrType {0}; ///< used values 6 = linear, 7 = radial, 8 = pattern, 9 = 4 color gradient, 10 = diamond, 11,12,13 = mesh gradient, 14 = hatch
+	double GrStartX {0.0};
+	double GrStartY {0.0};
+	double GrEndX {0.0};
+	double GrEndY {0.0};
+	double GrFocalX {0.0};
+	double GrFocalY {0.0};
+	double GrScale {1.0};
+	double GrSkew {0.0};
+	VGradient::VGradientRepeatMethod GrExtend {VGradient::pad};
 	FPoint GrControl1;
 	FPoint GrControl2;
 	FPoint GrControl3;
@@ -1292,20 +1292,20 @@
 	QString GrColorP2;
 	QString GrColorP3;
 	QString GrColorP4;
-	double GrCol1transp;
-	double GrCol2transp;
-	double GrCol3transp;
-	double GrCol4transp;
-	int GrCol1Shade;
-	int GrCol2Shade;
-	int GrCol3Shade;
-	int GrCol4Shade;
+	double GrCol1transp {1.0};
+	double GrCol2transp {1.0};
+	double GrCol3transp {1.0};
+	double GrCol4transp {1.0};
+	int GrCol1Shade {100};
+	int GrCol2Shade {100};
+	int GrCol3Shade {100};
+	int GrCol4Shade {100};
 	QList<meshGradientPatch> meshGradientPatches;
 	QList<QList<MeshPoint> > meshGradientArray;
-	int selectedMeshPointX;
-	int selectedMeshPointY;
-	int selectedMeshControlPoint;
-	bool snapToPatchGrid;
+	int selectedMeshPointX {-1};
+	int selectedMeshPointY {-1};
+	int selectedMeshControlPoint {0};
+	bool snapToPatchGrid {false};
 	int m_columns;
 	double m_columnGap;
 	Qt::PenStyle PLineArt; ///< Linestyle
@@ -1319,12 +1319,12 @@
 	FPointArray imageClip;
 	QList<uint> Segments;
 	ScImageEffectList effectsInUse;
-	bool PoShow;
-	double BaseOffs;
-	int textPathType;
-	bool textPathFlipped;
-	bool ClipEdited;
-	int FrameType; ///< Don't know exactly what this is, but it's not the same as itemType
+	bool PoShow {false};
+	double BaseOffs {0.0};
+	int textPathType {0};
+	bool textPathFlipped {false};
+	bool ClipEdited {false};
+	int FrameType {0}; ///< Don't know exactly what this is, but it's not the same as itemType
 	uint uniqueNr; ///< Internal unique Item-Number, used for the undo system
 	int OwnPage; ///< page this element belongs to
 	int oldOwnPage; ///< Old page number tracked for the move undo action
@@ -1334,87 +1334,87 @@
 	QString Pfile2;
 	QString Pfile3;
 	QString ImageProfile;
-	bool UseEmbedded;
+	bool UseEmbedded {true};
 	QString EmbeddedProfile;
 	eRenderIntent ImageIntent;
-	bool OverrideCompressionMethod;
-	int CompressionMethodIndex;
-	bool OverrideCompressionQuality;
-	int CompressionQualityIndex;
-	bool imageIsAvailable; ///< Flag to hold image file availability
-	int OrigW;
-	int OrigH;
-	double BBoxX; ///< Bounding Box-X
-	double BBoxH; ///< Bounding Box-H
-	double CurX; ///< Zeichen X-Position
-	double CurY; ///< Zeichen Y-Position
+	bool OverrideCompressionMethod {false};
+	int CompressionMethodIndex {0};
+	bool OverrideCompressionQuality {false};
+	int CompressionQualityIndex {0};
+	bool imageIsAvailable {false}; ///< Flag to hold image file availability
+	int OrigW {0};
+	int OrigH {0};
+	double BBoxX {0.0}; ///< Bounding Box-X
+	double BBoxH {0.0}; ///< Bounding Box-H
+	double CurX {0.0}; ///< Zeichen X-Position
+	double CurY {0.0}; ///< Zeichen Y-Position
 	StoryText itemText; ///< Text of element
 	TextLayout textLayout;
-	bool isBookmark; ///< Flag for PDF Bookmark
-	bool invalid; ///< Flag indicates that layout has changed (eg. for textlayout)
-	bool HasSel; ///< Flag for text selection
-	bool FrameOnly; ///< avoid artefacts while moving
-	bool isAutoText;
-	PageItem *Parent;
-	bool inPdfArticle;
-	bool isRaster;
+	bool isBookmark {false}; ///< Flag for PDF Bookmark
+	bool invalid {true}; ///< Flag indicates that layout has changed (eg. for textlayout)
+	bool HasSel {false}; ///< Flag for text selection
+	bool FrameOnly {false}; ///< avoid artefacts while moving
+	bool isAutoText {false};
+	PageItem *Parent {nullptr};
+	bool inPdfArticle {false};
+	bool isRaster {false};
 	double OldB;
 	double OldH;
 	double OldB2;
 	double OldH2;
-	bool Sizing;
+	bool Sizing {false};
 	int  m_layerID;
-	bool ScaleType;
-	bool AspectRatio;
+	bool ScaleType {true};
+	bool AspectRatio {true};
 	QVector<double> DashValues;
-	double DashOffset;
+	double DashOffset {0.0};
 	VGradient fill_gradient;
-	bool fillRule;
-	bool doOverprint;
+	bool fillRule {true};
+	bool doOverprint {false};
 
 	/* Additions for Table Support */
 	/* now deprecated with the new PageItem_Table */
-	PageItem* m_leftLink;
-	PageItem* m_rightLink;
-	PageItem* m_topLink;
-	PageItem* m_bottomLink;
-	int LeftLinkID;
-	int RightLinkID;
-	int TopLinkID;
-	int BottomLinkID;
-	bool LeftLine;
-	bool RightLine;
-	bool TopLine;
-	bool BottomLine;
-	bool isTableItem;
+	PageItem* m_leftLink {nullptr};
+	PageItem* m_rightLink {nullptr};
+	PageItem* m_topLink {nullptr};
+	PageItem* m_bottomLink {nullptr};
+	int LeftLinkID {0};
+	int RightLinkID {0};
+	int TopLinkID{0};
+	int BottomLinkID{0};
+	bool LeftLine {false};
+	bool RightLine {false};
+	bool TopLine {false};
+	bool BottomLine {false};
+	bool isTableItem {false};
 
 	/* end deprecated vars */
-	bool isSingleSel;
+	bool isSingleSel {false};
 	QList<PageItem*> groupItemList;
-	double groupWidth;
-	double groupHeight;
+	double groupWidth {1.0};
+	double groupHeight {1.0};
 	double BoundingX;
 	double BoundingY;
 	double BoundingW;
 	double BoundingH;
-	bool ChangedMasterItem;
+	bool ChangedMasterItem {false};
 	QString OnMasterPage;
-	bool isEmbedded;
-	int inlineCharID;
+	bool isEmbedded {false};
+	int inlineCharID {0};
 	QString inlineExt;
 	/** Radius of rounded corners */
-	double m_roundedCornerRadius;
+	double m_roundedCornerRadius {0.0};
 
 	//Undo Data
-	double oldXpos; ///< Stores the old X-position for undo action. Is used to detect move actions.
-	double oldYpos; ///< Stores the old Y-position for undo action. Is used to detect move actions.
-	double oldWidth; ///< Stores the old width for undo action. Is used to detect resize actions.
-	double oldHeight; ///< Stores the old height for undo action. Is used to detect resize actions.
-	double oldRot; ///< Stores the old rotation value for undo action. Is used to detect rotation actions.
-	double oldLocalScX; ///< Stores the old LocalScX value for undo action. Is used to detect image scale actions.
-	double oldLocalScY; ///< Stores the old LocalScY value for undo action. Is used to detect image scale actions.
-	double oldLocalX; ///< Stores the old LocalX value for undo action. Is used to detect image offset actions.lo j
-	double oldLocalY; ///< Stores the old LocalY value for undo action. Is used to detect image offset actions.
+	double oldXpos {0.0}; ///< Stores the old X-position for undo action. Is used to detect move actions.
+	double oldYpos {0.0}; ///< Stores the old Y-position for undo action. Is used to detect move actions.
+	double oldWidth {0.0}; ///< Stores the old width for undo action. Is used to detect resize actions.
+	double oldHeight {0.0}; ///< Stores the old height for undo action. Is used to detect resize actions.
+	double oldRot {0.0}; ///< Stores the old rotation value for undo action. Is used to detect rotation actions.
+	double oldLocalScX {1.0}; ///< Stores the old LocalScX value for undo action. Is used to detect image scale actions.
+	double oldLocalScY {1.0}; ///< Stores the old LocalScY value for undo action. Is used to detect image scale actions.
+	double oldLocalX {0.0}; ///< Stores the old LocalX value for undo action. Is used to detect image offset actions.lo j
+	double oldLocalY {0.0}; ///< Stores the old LocalY value for undo action. Is used to detect image offset actions.
 
 	ScribusDoc *m_Doc; ///< Document this item belongs to
 
@@ -1429,18 +1429,17 @@
 	/**
 		* @brief Stroke pattern transformation matrix
 		*/
-	double patternStrokeScaleX;
-	double patternStrokeScaleY;
-	double patternStrokeOffsetX;
-	double patternStrokeOffsetY;
-	double patternStrokeRotation;
-	double patternStrokeSkewX;
-	double patternStrokeSkewY;
-	double patternStrokeSpace;
-	bool patternStrokeMirrorX;
-	bool patternStrokeMirrorY;
-	bool patternStrokePath;
-
+	double patternStrokeScaleX {100.0};
+	double patternStrokeScaleY {100.0};
+	double patternStrokeOffsetX {0};
+	double patternStrokeOffsetY {0};
+	double patternStrokeRotation {0};
+	double patternStrokeSkewX {0};
+	double patternStrokeSkewY {0};
+	double patternStrokeSpace {1.0};
+	bool patternStrokeMirrorX {false};
+	bool patternStrokeMirrorY {false};
+	bool patternStrokePath {false};
 
 	/**
 		* @brief Stroke gradient name
@@ -1452,57 +1451,57 @@
 	/**
 	* @brief Stroke gradient variables
 	*/
-	int GrTypeStroke;
-	double GrStrokeStartX;
-	double GrStrokeStartY;
-	double GrStrokeEndX;
-	double GrStrokeEndY;
-	double GrStrokeFocalX;
-	double GrStrokeFocalY;
-	double GrStrokeScale;
-	double GrStrokeSkew;
-	VGradient::VGradientRepeatMethod GrStrokeExtend;
+	int GrTypeStroke {0};
+	double GrStrokeStartX {0.0};
+	double GrStrokeStartY {0.0};
+	double GrStrokeEndX {0.0};
+	double GrStrokeEndY {0.0};
+	double GrStrokeFocalX {0.0};
+	double GrStrokeFocalY {0.0};
+	double GrStrokeScale {1.0};
+	double GrStrokeSkew {0.0};
+	VGradient::VGradientRepeatMethod GrStrokeExtend {VGradient::none};
 
 	/**
 	* @brief Mask gradient variables
 	*/
-	int GrMask;
-	double GrMaskStartX;
-	double GrMaskStartY;
-	double GrMaskEndX;
-	double GrMaskEndY;
-	double GrMaskFocalX;
-	double GrMaskFocalY;
-	double GrMaskScale;
-	double GrMaskSkew;
-	double patternMaskScaleX;
-	double patternMaskScaleY;
-	double patternMaskOffsetX;
-	double patternMaskOffsetY;
-	double patternMaskRotation;
-	double patternMaskSkewX;
-	double patternMaskSkewY;
-	bool patternMaskMirrorX;
-	bool patternMaskMirrorY;
+	int GrMask {0};
+	double GrMaskStartX {0.0};
+	double GrMaskStartY {0.0};
+	double GrMaskEndX {0.0};
+	double GrMaskEndY {0.0};
+	double GrMaskFocalX {0.0};
+	double GrMaskFocalY {0.0};
+	double GrMaskScale {1.0};
+	double GrMaskSkew {0.0};
+	double patternMaskScaleX {100.0};
+	double patternMaskScaleY {100.0};
+	double patternMaskOffsetX {0.0};
+	double patternMaskOffsetY {0.0};
+	double patternMaskRotation {0.0};
+	double patternMaskSkewX {0.0};
+	double patternMaskSkewY {0.0};
+	bool patternMaskMirrorX {false};
+	bool patternMaskMirrorY {false};
 	QString patternMaskVal;
 	QString gradientMaskVal;
 	VGradient mask_gradient;
 
 	/** Inline Image */
-	bool isInlineImage;
-	bool isTempFile;
+	bool isInlineImage {false};
+	bool isTempFile {false};
 	//items welding (item follows while item moves which they are connected with)
 	struct WeldingInfo
 	{
-		PageItem *weldItem;
+		PageItem *weldItem {nullptr};
 		FPoint weldPoint;
-		int weldID;
+		int weldID {0};
 	};
 	QList<WeldingInfo> weldList;
-	double hatchAngle;
-	double hatchDistance;
-	int hatchType;				// 0 = single 1 = double 2 = triple
-	bool hatchUseBackground;
+	double hatchAngle {0.0};
+	double hatchDistance {2.0};
+	int hatchType {0};				// 0 = single 1 = double 2 = triple
+	bool hatchUseBackground {false};
 	QString hatchBackground;
 	QString hatchForeground;
 	QColor  hatchBackgroundQ;
@@ -1682,13 +1681,13 @@
 		// End protected functions
 
 protected: // Start protected variables
-	PageItem *BackBox;
-	PageItem *NextBox;
-	int  firstChar;
-	int  m_maxChars;
-	bool m_sampleItem; ///< Used to not draw the frame for sample items
+	PageItem *m_backBox {nullptr};
+	PageItem *m_nextBox {nullptr};
+	int  firstChar {0};
+	int  m_maxChars {0};
+	bool m_sampleItem {false}; ///< Used to not draw the frame for sample items
 	MarginStruct m_textDistanceMargins; ///< Left, Top, Bottom, Right distances of text from the frame
-	int verticalAlign;
+	int verticalAlign {0};
 	/**
 	 * @brief Frame Type, eg line, text frame, etc.
 	 *
@@ -1707,7 +1706,7 @@
 	/**
 	 * Flag to tell if this item is a PDF annotation item
 	 */
-	bool m_isAnnotation; 
+	bool m_isAnnotation {false};
 
 	/**
 	 * PDF annotation data
@@ -1728,15 +1727,15 @@
 	/**
 	 * @brief Fill pattern transformation matrix
 	 */
-	double patternScaleX;
-	double patternScaleY;
-	double patternOffsetX;
-	double patternOffsetY;
-	double patternRotation;
-	double patternSkewX;
-	double patternSkewY;
-	bool   patternMirrorX;
-	bool   patternMirrorY;
+	double patternScaleX {100.0};
+	double patternScaleY {100.0};
+	double patternOffsetX {0.0};
+	double patternOffsetY {0.0};
+	double patternRotation {0.0};
+	double patternSkewX {0.0};
+	double patternSkewY {0.0};
+	bool   patternMirrorX {false};
+	bool   patternMirrorY {false};
 
 	/**
 	 * @brief Fill color name
@@ -1766,62 +1765,62 @@
 	 * @brief Fill transparency
 	 * @sa PageItem::fillTransparency(), PageItem::setFillTransparency()
 	 */
-	double m_fillTransparency;
+	double m_fillTransparency {0.0};
 
 	/**
 	 * @brief Line stroke transparency.
 	 * @sa PageItem::lineTransparency(), PageItem::setLineTransparency()
 	 */
-	double m_lineTransparency;
+	double m_lineTransparency {0.0};
 
 	/**
 	 * @brief Fill transparency blendmode
 	 * @sa PageItem::fillBlendmode(), PageItem::setFillBlendmode()
 	 */
-	int m_fillBlendMode;
+	int m_fillBlendMode {0};
 
 	/**
 	 * @brief Line stroke transparency blendmode.
 	 * @sa PageItem::lineBlendmode(), PageItem::setLineBlendmode()
 	 */
-	int m_lineBlendMode;
+	int m_lineBlendMode {0};
 
 	/**
 	 * @brief Is the image in this image item flipped horizontally?
 	 * @sa PageItem::isImageFlippedH(), PageItem::setImageFlippedH(),
 	 *     PageItem::flipImageH(), PageItem::flippedV
 	 */
-	bool m_ImageIsFlippedH;
+	bool m_ImageIsFlippedH {false};
 
 	/**
 	 * @brief Is the image in this image item flipped vertically?
 	 * @sa PageItem::isImageFlippedV(), PageItem::setImageFlippedV(),
 	 *     PageItem::flipImageV(), PageItem::flippedH
 	 */
-	bool m_ImageIsFlippedV;
+	bool m_ImageIsFlippedV {false};
 
 	/**
 	 * @brief Is the item locked (cannot be moved, resized, etc)?
 	 * @sa PageItem::locked(), PageItem::setLocked(), PageItem::toggleLock()
 	 */
-	bool m_Locked;
+	bool m_Locked {false};
 
 	/**
 	 * @brief Is the item's size locked?
 	 * @sa PageItem::sizeLocked(), PageItem::setSizeLocked(), PageItem::toggleSizeLock()
 	 */
-	bool m_SizeLocked;
+	bool m_SizeLocked {false};
 
 	/**
 	 * @for notes frames - locking horizontal or vertical size
 	**/
-	bool m_SizeHLocked;
-	bool m_SizeVLocked;
+	bool m_SizeHLocked {false};
+	bool m_SizeVLocked {false};
 	/**
 	 * @brief Should text flow around the item
 	 * @sa PageItem::textFlowMode(), PateItem::setTextFlowMode()
 	 */
-	TextFlowMode m_textFlowMode;
+	TextFlowMode m_textFlowMode {TextFlowDisabled};
 
 	/**
 	 * @brief Stores the attributes of the pageitem (NOT properties, the user defined ATTRIBUTES)
@@ -1833,10 +1832,10 @@
 	 * @brief Is this item set to be printed/exported
 	 * @sa PageItem::printable(), PageItem::setPrintable()
 	 */
-	bool m_PrintEnabled;
-
-	bool no_fill;
-	bool no_stroke;
+	bool m_PrintEnabled {true};
+
+	bool no_fill {false};
+	bool no_stroke {false};
 
 	QColor m_fillQColor;
 	QColor m_strokeQColor;
@@ -1845,36 +1844,36 @@
 	QColor m_grQColorP3;
 	QColor m_grQColorP4;
 
-	double m_xPos; ///< X position on the page
-	double m_yPos; ///< Y position on the page
-	double m_width; ///< Width of the item
-	double m_height; ///<  Height of the item
-	double m_rotation; ///< Rotation of the item
-	bool   m_isSelected; ///< Is the item selected?
-	bool   m_imageVisible; ///< Darstellungsart Bild/Titel
-	double m_imageXScale; ///< Scaling X Factor for images
-	double m_imageYScale; ///< Scaling Y Factor for images
-	double m_imageXOffset; ///< Image X Offset to frame
-	double m_imageYOffset; ///< Image Y Offset to frame
-	double m_imageRotation; ///< Image rotation in frame
+	double m_xPos {0.0}; ///< X position on the page
+	double m_yPos {0.0}; ///< Y position on the page
+	double m_width {0.0}; ///< Width of the item
+	double m_height {0.0}; ///<  Height of the item
+	double m_rotation {0.0}; ///< Rotation of the item
+	bool   m_isSelected {false}; ///< Is the item selected?
+	bool   m_imageVisible {true}; ///< Darstellungsart Bild/Titel
+	double m_imageXScale {1.0}; ///< Scaling X Factor for images
+	double m_imageYScale {1.0}; ///< Scaling Y Factor for images
+	double m_imageXOffset {0.0}; ///< Image X Offset to frame
+	double m_imageYOffset {0.0}; ///< Image Y Offset to frame
+	double m_imageRotation {0.0}; ///< Image rotation in frame
 	FirstLineOffsetPolicy m_firstLineOffset;
-	bool   m_groupClips;
-
-	int m_startArrowIndex;
-	int m_endArrowIndex;
-	int m_startArrowScale;
-	int m_endArrowScale;
-
-	bool   m_hasSoftShadow;
-	QString m_softShadowColor;
-	int    m_softShadowShade;
-	double m_softShadowBlurRadius;
-	double m_softShadowXOffset;
-	double m_softShadowYOffset;
-	double m_softShadowOpacity;
-	int    m_softShadowBlendMode;
-	bool   m_softShadowErasedByObject;
-	bool   m_softShadowHasObjectTransparency;
+	bool m_groupClips {true};
+
+	int m_startArrowIndex {0};
+	int m_endArrowIndex {0};
+	int m_startArrowScale {100};
+	int m_endArrowScale {100};
+
+	bool    m_hasSoftShadow {false};
+	QString m_softShadowColor {"Black"};
+	int     m_softShadowShade {100};
+	double  m_softShadowBlurRadius {5.0};
+	double  m_softShadowXOffset {5.0};
+	double  m_softShadowYOffset {5.0};
+	double  m_softShadowOpacity {0.0};
+	int     m_softShadowBlendMode {0};
+	bool    m_softShadowErasedByObject {false};
+	bool    m_softShadowHasObjectTransparency {false};
 
 	// End protected variables
 

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23912&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp	Thu Jul  9 20:59:19 2020
@@ -1115,7 +1115,7 @@
 // incomplete* vars for us
 bool PageItem_TextFrame::moveLinesFromPreviousFrame ()
 {
-	PageItem_TextFrame* prev = dynamic_cast<PageItem_TextFrame*>(BackBox);
+	PageItem_TextFrame* prev = dynamic_cast<PageItem_TextFrame*>(m_backBox);
 	if (!prev)
 		return false;
 	if (!prev->incompleteLines)
@@ -1207,21 +1207,21 @@
 {
 //	qDebug()<<"==Layout==" << itemName() ;
 // 	printBacktrace(24);
-	if (BackBox != nullptr) {
+	if (m_backBox != nullptr) {
 //		qDebug("textframe: len=%d, going back", itemText.length());
 		PageItem_TextFrame* firstInvalid = nullptr;
-		PageItem_TextFrame* prevInChain  = dynamic_cast<PageItem_TextFrame*>(BackBox);
+		PageItem_TextFrame* prevInChain  = dynamic_cast<PageItem_TextFrame*>(m_backBox);
 		while (prevInChain)
 		{
 			if (prevInChain->invalid)
 				firstInvalid = prevInChain;
-			prevInChain = dynamic_cast<PageItem_TextFrame*>(prevInChain->BackBox);
+			prevInChain = dynamic_cast<PageItem_TextFrame*>(prevInChain->m_backBox);
 		}
 		PageItem_TextFrame* nextInChain = firstInvalid;
 		while (nextInChain && (nextInChain != this))
 		{
 			nextInChain->layout();
-			nextInChain = dynamic_cast<PageItem_TextFrame*>(nextInChain->NextBox);
+			nextInChain = dynamic_cast<PageItem_TextFrame*>(nextInChain->m_nextBox);
 		}
 		// #9592 : warning, BackBox->layout() may not layout BackBox next box
 		if (!invalid)
@@ -1231,7 +1231,7 @@
 //		qDebug() << QString("textframe: len=%1, invalid=%2 OnMasterPage=%3: no relayout").arg(itemText.length()).arg(invalid).arg(OnMasterPage);
 		return;
 	}
-	if (invalid && BackBox == nullptr)
+	if (invalid && m_backBox == nullptr)
 		firstChar = 0;
 
 //	qDebug() << QString("textframe(%1,%2): len=%3, start relayout at %4").arg(m_xPos).arg(m_yPos).arg(itemText.length()).arg(firstInFrame());
@@ -1546,7 +1546,7 @@
 				if (current.startOfCol && !current.afterOverflow && current.recalculateY)
 					current.yPos = qMax(current.yPos, m_textDistanceMargins.top());
 				// more about par gap and dropcaps
-				if ((a > firstInFrame() && itemText.isBlockStart(a)) || (a == 0 && BackBox == nullptr && current.startOfCol))
+				if ((a > firstInFrame() && itemText.isBlockStart(a)) || (a == 0 && m_backBox == nullptr && current.startOfCol))
 				{
 					if (!current.afterOverflow && current.recalculateY && !current.startOfCol)
 						current.yPos += style.gapBefore();
@@ -2934,14 +2934,14 @@
 		}
 		UndoManager::instance()->setUndoEnabled(true);
 	}
-	if (NextBox != nullptr)
-	{
-		PageItem_TextFrame * nextFrame = dynamic_cast<PageItem_TextFrame*>(NextBox);
+	if (m_nextBox != nullptr)
+	{
+		PageItem_TextFrame * nextFrame = dynamic_cast<PageItem_TextFrame*>(m_nextBox);
 		while (nextFrame)
 		{
 			nextFrame->invalid   = true;
 			nextFrame->firstChar = m_maxChars;
-			nextFrame = dynamic_cast<PageItem_TextFrame*>(nextFrame->NextBox);
+			nextFrame = dynamic_cast<PageItem_TextFrame*>(nextFrame->m_nextBox);
 		}
 	}
 	itemText.blockSignals(false);
@@ -2987,7 +2987,7 @@
 		UndoManager::instance()->setUndoEnabled(true);
 	}
 
-	PageItem_TextFrame * next = dynamic_cast<PageItem_TextFrame*>(NextBox);
+	PageItem_TextFrame * next = dynamic_cast<PageItem_TextFrame*>(m_nextBox);
 	if (next != nullptr)
 	{
 		if (itemText.cursorPosition() > signed(m_maxChars))
@@ -3000,7 +3000,7 @@
 		{
 			next->invalid   = true;
 			next->firstChar = m_maxChars;
-			next = dynamic_cast<PageItem_TextFrame*>(next->NextBox);
+			next = dynamic_cast<PageItem_TextFrame*>(next->m_nextBox);
 		}
 	}
 //	qDebug("textframe: len=%d, done relayout (no room %d)", itemText.length(), MaxChars);
@@ -3046,14 +3046,14 @@
 			break;
 		if (firstInvalid->firstChar <= firstItem && firstItem <= firstInvalid->m_maxChars)
 			break;
-		firstInvalid = dynamic_cast<PageItem_TextFrame*>(firstInvalid->NextBox);
+		firstInvalid = dynamic_cast<PageItem_TextFrame*>(firstInvalid->m_nextBox);
 	}
 
 	PageItem_TextFrame* invalidFrame = firstInvalid;
 	while (invalidFrame)
 	{
 		invalidFrame->invalid = true;
-		invalidFrame = dynamic_cast<PageItem_TextFrame*>(invalidFrame->NextBox);
+		invalidFrame = dynamic_cast<PageItem_TextFrame*>(invalidFrame->m_nextBox);
 	}
 }
 
@@ -3061,7 +3061,7 @@
 {
 	if (invalid)
 		return false;
-	if (BackBox == nullptr)
+	if (m_backBox == nullptr)
 		return !invalid;
 
 	PageItem* prev = prevInChain();
@@ -3699,7 +3699,7 @@
 			p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 			if ((isBookmark) || (m_isAnnotation))
 				p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameAnnotationColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-			if ((BackBox != nullptr) || (NextBox != nullptr))
+			if ((m_backBox != nullptr) || (m_nextBox != nullptr))
 				p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameLinkColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 			if (m_Locked)
 				p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameLockColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
@@ -4054,25 +4054,25 @@
 					ExpandSel(oldPos);
 				}
 				else
-					if ((textLayout.lines() > 0) && (oldPos >= textLayout.line(textLayout.lines()-1)->firstChar()) && (itemText.cursorPosition() >= lastInFrame()) && (NextBox != nullptr))
-					{
-						if (NextBox->frameDisplays(itemText.cursorPosition()))
+					if ((textLayout.lines() > 0) && (oldPos >= textLayout.line(textLayout.lines()-1)->firstChar()) && (itemText.cursorPosition() >= lastInFrame()) && (m_nextBox != nullptr))
+					{
+						if (m_nextBox->frameDisplays(itemText.cursorPosition()))
 						{
 							view->deselectItems(true);
 							// we position the cursor at the beginning of the next frame
 							// TODO position at the right place in next frame
-							m_Doc->scMW()->selectItemsFromOutlines(NextBox);
+							m_Doc->scMW()->selectItemsFromOutlines(m_nextBox);
 						}
 					}
 			}
 			else
 			{
-				if (NextBox != nullptr)
-				{
-					if (NextBox->frameDisplays(lastInFrame()+1))
+				if (m_nextBox != nullptr)
+				{
+					if (m_nextBox->frameDisplays(lastInFrame()+1))
 					{
 						view->deselectItems(true);
-						m_Doc->scMW()->selectItemsFromOutlines(NextBox);
+						m_Doc->scMW()->selectItemsFromOutlines(m_nextBox);
 					}
 				}
 			}
@@ -4105,22 +4105,22 @@
 					ExpandSel(oldPos);
 				}
 				else
-					if ((textLayout.lines() > 0) && (oldPos <= textLayout.line(0)->lastChar()) && (itemText.cursorPosition()  == firstInFrame()) && (BackBox != nullptr))
+					if ((textLayout.lines() > 0) && (oldPos <= textLayout.line(0)->lastChar()) && (itemText.cursorPosition()  == firstInFrame()) && (m_backBox != nullptr))
 					{
 						view->deselectItems(true);
 						// TODO position at the right place in previous frame
-						BackBox->itemText.setCursorPosition( BackBox->lastInFrame() );
-						m_Doc->scMW()->selectItemsFromOutlines(BackBox);
+						m_backBox->itemText.setCursorPosition( m_backBox->lastInFrame() );
+						m_Doc->scMW()->selectItemsFromOutlines(m_backBox);
 					}
 			}
 			else
 			{
 				itemText.setCursorPosition( firstInFrame() );
-				if (BackBox != nullptr)
+				if (m_backBox != nullptr)
 				{
 					view->deselectItems(true);
-					BackBox->itemText.setCursorPosition( BackBox->lastInFrame() );
-					m_Doc->scMW()->selectItemsFromOutlines(BackBox);
+					m_backBox->itemText.setCursorPosition( m_backBox->lastInFrame() );
+					m_Doc->scMW()->selectItemsFromOutlines(m_backBox);
 				}
 			}
 		}
@@ -4129,11 +4129,11 @@
 		m_Doc->scMW()->setTBvals(this);
 		break;
 	case Qt::Key_PageUp:
-		if (itemText.cursorPosition() == firstInFrame() && BackBox != nullptr)
+		if (itemText.cursorPosition() == firstInFrame() && m_backBox != nullptr)
 		{
 			view->deselectItems(true);
-			BackBox->itemText.setCursorPosition( BackBox->firstInFrame() );
-			m_Doc->scMW()->selectItemsFromOutlines(BackBox);
+			m_backBox->itemText.setCursorPosition( m_backBox->firstInFrame() );
+			m_Doc->scMW()->selectItemsFromOutlines(m_backBox);
 			//currItem = currItem->BackBox;
 		}
 		else
@@ -4143,11 +4143,11 @@
 		m_Doc->scMW()->setTBvals(this);
 		break;
 	case Qt::Key_PageDown:
-		if (!frameDisplays(itemText.length()-1) && itemText.cursorPosition() >= lastInFrame() && NextBox != nullptr)
+		if (!frameDisplays(itemText.length()-1) && itemText.cursorPosition() >= lastInFrame() && m_nextBox != nullptr)
 		{
 			view->deselectItems(true);
-			itemText.setCursorPosition( NextBox->lastInFrame() );
-			m_Doc->scMW()->selectItemsFromOutlines(NextBox);
+			itemText.setCursorPosition( m_nextBox->lastInFrame() );
+			m_Doc->scMW()->selectItemsFromOutlines(m_nextBox);
 			//currItem = currItem->BackBox;
 		}
 		else
@@ -4174,11 +4174,11 @@
 			if (itemText.cursorPosition() < firstInFrame())
 			{
 				itemText.setCursorPosition( firstInFrame() );
-				if (BackBox != nullptr)
+				if (m_backBox != nullptr)
 				{
 					view->deselectItems(true);
-					BackBox->itemText.setCursorPosition( BackBox->lastInFrame() );
-					m_Doc->scMW()->selectItemsFromOutlines(BackBox);
+					m_backBox->itemText.setCursorPosition( m_backBox->lastInFrame() );
+					m_Doc->scMW()->selectItemsFromOutlines(m_backBox);
 					//currItem = currItem->BackBox;
 				}
 			}
@@ -4214,12 +4214,12 @@
 			{
 //				--CPos;
 				itemText.setCursorPosition(lastInFrame() + 1);
-				if (NextBox != nullptr)
-				{
-					if (NextBox->frameDisplays(itemText.cursorPosition()))
+				if (m_nextBox != nullptr)
+				{
+					if (m_nextBox->frameDisplays(itemText.cursorPosition()))
 					{
 						view->deselectItems(true);
-						m_Doc->scMW()->selectItemsFromOutlines(NextBox);
+						m_Doc->scMW()->selectItemsFromOutlines(m_nextBox);
 						//currItem = currItem->NextBox;
 					}
 				}
@@ -4275,8 +4275,8 @@
 		else
 		{
 			layout();
-			if (oldLast != lastInFrame() && NextBox != nullptr && NextBox->invalid)
-				NextBox->updateLayout();
+			if (oldLast != lastInFrame() && m_nextBox != nullptr && m_nextBox->invalid)
+				m_nextBox->updateLayout();
 		}
 //		Tinput = false;
 //		if ((cr == QChar(13)) && (itemText.length() != 0))
@@ -4332,19 +4332,19 @@
 		else
 		{
 			layout();
-			if (oldLast != lastInFrame() && NextBox != nullptr && NextBox->invalid)
-				NextBox->updateLayout();
+			if (oldLast != lastInFrame() && m_nextBox != nullptr && m_nextBox->invalid)
+				m_nextBox->updateLayout();
 		}
 		if (itemText.cursorPosition() < firstInFrame())
 		{
 			itemText.setCursorPosition( firstInFrame() );
-			if (BackBox != nullptr)
+			if (m_backBox != nullptr)
 			{
 				view->deselectItems(true);
-				if (BackBox->invalid)
-					BackBox->updateLayout();
-				itemText.setCursorPosition( BackBox->lastInFrame() );
-				m_Doc->scMW()->selectItemsFromOutlines(BackBox);
+				if (m_backBox->invalid)
+					m_backBox->updateLayout();
+				itemText.setCursorPosition( m_backBox->lastInFrame() );
+				m_Doc->scMW()->selectItemsFromOutlines(m_backBox);
 				//currItem = currItem->BackBox;
 			}
 		}
@@ -4500,16 +4500,16 @@
 			}
 			else
 				update();
-			if (oldLast != lastInFrame() && NextBox != nullptr && NextBox->invalid)
-				NextBox->updateLayout();
+			if (oldLast != lastInFrame() && m_nextBox != nullptr && m_nextBox->invalid)
+				m_nextBox->updateLayout();
 		}
 		//check if cursor need to jump to next linked frame
 		//but not for notes frames can`t be updated as may disapper during update
-		if ((itemText.cursorPosition() > lastInFrame() + 1) && (lastInFrame() < (itemText.length() - 2)) && NextBox != nullptr)
+		if ((itemText.cursorPosition() > lastInFrame() + 1) && (lastInFrame() < (itemText.length() - 2)) && m_nextBox != nullptr)
 		{
 			view->deselectItems(true);
-			NextBox->update();
-			m_Doc->scMW()->selectItemsFromOutlines(NextBox);
+			m_nextBox->update();
+			m_Doc->scMW()->selectItemsFromOutlines(m_nextBox);
 		}
 		break;
 	}
@@ -5874,7 +5874,7 @@
 	if (textLayout.lines() <= 0)
 		return;
 
-	if (NextBox == nullptr) // Vertical alignment is not used inside a text chain
+	if (m_nextBox == nullptr) // Vertical alignment is not used inside a text chain
 	{
 		textLayout.box()->moveTo(textLayout.box()->x(), 0);
 		double newHeight = textLayout.box()->naturalHeight();

Modified: trunk/Scribus/scribus/ui/bookmarkpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23912&path=/trunk/Scribus/scribus/ui/bookmarkpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/bookmarkpalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/bookmarkpalette.cpp	Thu Jul  9 20:59:19 2020
@@ -25,7 +25,7 @@
 
 #include "bookmarkpalette.h"
 
-BookPalette::BookPalette(QWidget* parent) : ScDockPalette( parent, "Books", nullptr )
+BookPalette::BookPalette(QWidget* parent) : ScDockPalette( parent, "Books" )
 {
 	setObjectName(QString::fromLocal8Bit("Books"));
 	setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));

Modified: trunk/Scribus/scribus/ui/checkDocument.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23912&path=/trunk/Scribus/scribus/ui/checkDocument.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/checkDocument.cpp	(original)
+++ trunk/Scribus/scribus/ui/checkDocument.cpp	Thu Jul  9 20:59:19 2020
@@ -38,7 +38,7 @@
 // #define COLUMN_INFO 3
 
 CheckDocument::CheckDocument( QWidget* parent, bool modal )
-	: ScrPaletteBase( parent, "checkDocument", modal, nullptr )
+	: ScrPaletteBase( parent, "checkDocument", modal )
 {
 	showPagesWithoutErrors = PrefsManager::instance().appPrefs.verifierPrefs.showPagesWithoutErrors;
 	showNonPrintingLayerErrors = PrefsManager::instance().appPrefs.verifierPrefs.showNonPrintingLayerErrors;

Modified: trunk/Scribus/scribus/vgradient.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23912&path=/trunk/Scribus/scribus/vgradient.h
==============================================================================
--- trunk/Scribus/scribus/vgradient.h	(original)
+++ trunk/Scribus/scribus/vgradient.h	Thu Jul  9 20:59:19 2020
@@ -84,18 +84,18 @@
 public:
 	enum VGradientType
 	{
-	    linear = 0,
-	    radial = 1,
-	    fourcolor  = 2,
-	    diamond = 3,
+		linear = 0,
+		radial = 1,
+		fourcolor  = 2,
+		diamond = 3,
 		mesh = 4,
 		freemesh = 5
 	};
 
 	enum VGradientRepeatMethod
 	{
-	    none    = 0,
-	    reflect = 1,
+		none    = 0,
+		reflect = 1,
 		repeat  = 2,
 		pad     = 3
 	};




More information about the scribus-commit mailing list