r25005 by craig - PageItem initialiser code cleanup

scribus-commit scribus-commit at lists.scribus.net
Wed Mar 9 21:20:09 UTC 2022


Author: craig
Date: Wed Mar  9 21:20:09 2022
New Revision: 25005

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=25005
Log:
PageItem initialiser code cleanup

Modified:
    trunk/Scribus/scribus/pageitem_textframe.cpp
    trunk/Scribus/scribus/pageitem_textframe.h

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25005&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp	Wed Mar  9 21:20:09 2022
@@ -77,7 +77,6 @@
 	: PageItem(pa, PageItem::TextFrame, x, y, w, h, w2, fill, outline)
 {
 	init();
-	firstChar = 0;
 }
 
 PageItem_TextFrame::PageItem_TextFrame(const PageItem & p) : PageItem(p)
@@ -88,14 +87,7 @@
 
 void PageItem_TextFrame::init()
 {
-	invalid = true;
-	cursorBiasBackward = false;
-	unicodeTextEditMode = false;
-	unicodeInputCount = 0;
 	m_origAnnotPos = QRectF(xPos(), yPos(), width(), height());
-	verticalAlign = 0;
-	incompleteLines = 0;
-	maxY = 0.0;
 	connect(&itemText,SIGNAL(changed(int,int)), this, SLOT(slotInvalidateLayout(int,int)));
 }
 

Modified: trunk/Scribus/scribus/pageitem_textframe.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25005&path=/trunk/Scribus/scribus/pageitem_textframe.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.h	(original)
+++ trunk/Scribus/scribus/pageitem_textframe.h	Wed Mar  9 21:20:09 2022
@@ -96,8 +96,8 @@
 	void drawUnderflowMarker(ScPainter *p);
 	void drawColumnBorders(ScPainter *p);
 
-	bool unicodeTextEditMode;
-	int unicodeInputCount;
+	bool unicodeTextEditMode {false};
+	int unicodeInputCount {0};
 	QString unicodeInputString;
 
 	void drawNoteIcon(ScPainter *p);
@@ -109,10 +109,10 @@
 	void adjustParagraphEndings ();
 
 private:
-	bool cursorBiasBackward;
+	bool cursorBiasBackward {false};
 	// If the last paragraph had to be split, this is how many lines of the paragraph are in this frame.
 	// Used for orphan/widow control
-	int incompleteLines;
+	int incompleteLines {0};
 	// This holds the line splitting positions
 	QList<int> incompletePositions;
 
@@ -156,7 +156,7 @@
 	TextNote* selectedNoteMark(bool onlySelection = true);
 protected:
 	// set text frame height to last line of text
-	double maxY;
+	double maxY {0.0};
 	void setMaxY(double y);
 
 public:




More information about the scribus-commit mailing list