r24605 by jghali - PDF importer: add more default initializers

scribus-commit scribus-commit at lists.scribus.net
Wed Apr 7 18:58:42 UTC 2021


Author: jghali
Date: Wed Apr  7 18:58:42 2021
New Revision: 24605

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24605
Log:
PDF importer: add more default initializers

Modified:
    trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
    trunk/Scribus/scribus/plugins/import/pdf/slaoutput.h

Modified: trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24605&path=/trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp	Wed Apr  7 18:58:42 2021
@@ -2310,11 +2310,6 @@
 	QString id;
 	PageItem *ite;
 	groupEntry gElements;
-	gElements.forSoftMask = gFalse;
-	gElements.alpha = gFalse;
-	gElements.inverted = false;
-	gElements.maskName = "";
-	gElements.Items.clear();
 	m_groupStack.push(gElements);
 	double width, height;
 	width = bbox[2] - bbox[0];

Modified: trunk/Scribus/scribus/plugins/import/pdf/slaoutput.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24605&path=/trunk/Scribus/scribus/plugins/import/pdf/slaoutput.h
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/slaoutput.h	(original)
+++ trunk/Scribus/scribus/plugins/import/pdf/slaoutput.h	Wed Apr  7 18:58:42 2021
@@ -285,10 +285,10 @@
 	//----- links
 	void processLink(AnnotLink * /*link*/) override { qDebug() << "Draw Link"; }
 
-	bool layersSetByOCG;
-	double cropOffsetX {0.0};
-	double cropOffsetY {0.0};
-	int rotate;
+	bool layersSetByOCG { false };
+	double cropOffsetX { 0.0 };
+	double cropOffsetY { 0.0 };
+	int rotate { 0 };
 
 protected:
 	void setItemFillAndStroke(GfxState* state, PageItem* textNode);
@@ -296,26 +296,26 @@
 	void pushGroup(const QString& maskName = "", GBool forSoftMask = gFalse, GBool alpha = gFalse, bool inverted = false);
 
 	ScribusDoc* m_doc;
-	Qt::PenCapStyle m_lineEnd{ Qt::FlatCap };
-	Qt::PenJoinStyle m_lineJoin{ Qt::MiterJoin };
+	Qt::PenCapStyle m_lineEnd { Qt::FlatCap };
+	Qt::PenJoinStyle m_lineJoin { Qt::MiterJoin };
 	QList<PageItem*>* m_Elements;
 
 	struct groupEntry
 	{
 		QList<PageItem*> Items;
-		GBool forSoftMask;
-		GBool isolated;
-		GBool alpha;
+		GBool forSoftMask { gFalse };
+		GBool isolated { gFalse };
+		GBool alpha { gFalse };
 		QString maskName;
 		QPointF maskPos;
-		bool inverted;
+		bool inverted { false };
 	};
 
 	QStack<groupEntry> m_groupStack;
 	QString m_currColorFill;
 	QString m_currColorStroke;
-	int m_currFillShade{ 100 };
-	int m_currStrokeShade {100};
+	int m_currFillShade { 100 };
+	int m_currStrokeShade { 100 };
 
 private:
 	void getPenState(GfxState *state);
@@ -337,9 +337,9 @@
 
 	void createImageFrame(QImage& image, GfxState *state, int numColorComponents);
 
-	bool pathIsClosed {false};
+	bool pathIsClosed { false };
 	QVector<double> DashValues;
-	double DashOffset {0.0};
+	double DashOffset { 0.0 };
 	QString Coords;
 	// The currently visible area. If it is empty, everything is visible.
 	// QPainterPath has the drawback that it sometimes approximates Bezier curves
@@ -354,7 +354,7 @@
 
 	QString m_currentMask;
 	QPointF m_currentMaskPosition;
-	Selection* tmpSel;
+	Selection* tmpSel { nullptr };
 	QStringList *m_importedColors;
 	QTransform m_ctm;
 	struct F3Entry
@@ -370,7 +370,7 @@
 	QStack<mContent> m_mcStack;
 	int inPattern {0};
 	int layerNum {1};
-	int currentLayer;
+	int currentLayer { 0 };
 	bool firstLayer {true};
 	int importerFlags;
 	int updateGUICounter {0};
@@ -386,6 +386,6 @@
 #endif
 	QHash<QString, QList<int> > m_radioMap;
 	QHash<int, PageItem*> m_radioButtons;
-	int m_actPage;
-};
-#endif
+	int m_actPage { 1 };
+};
+#endif




More information about the scribus-commit mailing list