r22579 by jghali - #15352: Scribus looses color setting of variable text marks

scribus-commit scribus-commit at lists.scribus.net
Wed Jun 6 20:17:20 UTC 2018


Author: jghali
Date: Wed Jun  6 20:17:20 2018
New Revision: 22579

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22579
Log:
#15352: Scribus looses color setting of variable text marks

Modified:
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22579&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	Wed Jun  6 20:17:20 2018
@@ -4624,10 +4624,13 @@
 			else
 			{
 				//set pointer to item holds mark in his text
+				CharStyle newStyle;
 				if (t == MARKAnchorType)
 					mark->setItemPtr(item);
 				mark->OwnPage = item->OwnPage;
 				item->itemText.insertMark(mark, item->itemText.length());
+				readCharacterStyleAttrs(doc, tAtt, newStyle);
+				item->itemText.setCharStyle(item->itemText.length() - 1, 1, newStyle);
 			}
 		}
 	}

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22579&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	Wed Jun  6 20:17:20 2018
@@ -635,7 +635,7 @@
 		VGradient gra = itGrad.value();
 		docu.writeAttribute("Ext", gra.repeatMethod());
 		QList<VColorStop*> cstops = gra.colorStops();
-		for (uint cst = 0; cst < gra.Stops(); ++cst)
+		for (int cst = 0; cst < gra.Stops(); ++cst)
 		{
 			docu.writeEmptyElement("CSTOP");
 			docu.writeAttribute("RAMP", cstops.at(cst)->rampPoint);
@@ -1685,6 +1685,7 @@
 				docu.writeEmptyElement("MARK");
 				docu.writeAttribute("label", mark->label);
 				docu.writeAttribute("type", mark->getType());
+				putCStyle(docu, lastStyle);
 			}
 		}
 		else if (ch == SpecialChars::PARSEP)	// stores also the paragraphstyle for preceding chars
@@ -2072,7 +2073,7 @@
 		if (((item->GrType > 0) && (item->GrType != 8) && (item->GrType != 9) && (item->GrType != 11) && (item->GrType != 14)) && (item->gradient().isEmpty()))
 		{
 			QList<VColorStop*> cstops = item->fill_gradient.colorStops();
-			for (uint cst = 0; cst < item->fill_gradient.Stops(); ++cst)
+			for (int cst = 0; cst < item->fill_gradient.Stops(); ++cst)
 			{
 				docu.writeEmptyElement("CSTOP");
 				docu.writeAttribute("RAMP", cstops.at(cst)->rampPoint);
@@ -2084,7 +2085,7 @@
 		if ((item->GrTypeStroke > 0) && (item->strokeGradient().isEmpty()))
 		{
 			QList<VColorStop*> cstops = item->stroke_gradient.colorStops();
-			for (uint cst = 0; cst < item->stroke_gradient.Stops(); ++cst)
+			for (int cst = 0; cst < item->stroke_gradient.Stops(); ++cst)
 			{
 				docu.writeEmptyElement("S_CSTOP");
 				docu.writeAttribute("RAMP", cstops.at(cst)->rampPoint);
@@ -2096,7 +2097,7 @@
 		if ((item->GrMask > 0) && (item->gradientMask().isEmpty()))
 		{
 			QList<VColorStop*> cstops = item->mask_gradient.colorStops();
-			for (uint cst = 0; cst < item->mask_gradient.Stops(); ++cst)
+			for (int cst = 0; cst < item->mask_gradient.Stops(); ++cst)
 			{
 				docu.writeEmptyElement("M_CSTOP");
 				docu.writeAttribute("RAMP", cstops.at(cst)->rampPoint);




More information about the scribus-commit mailing list