r22377 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Mon Feb 5 18:31:28 UTC 2018


Author: jghali
Date: Mon Feb  5 18:31:28 2018
New Revision: 22377

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22377
Log:
#15099, improve librevenge based import: fix outline text color <dtardon>

Modified:
    trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp

Modified: trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22377&path=/trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp	Mon Feb  5 18:31:28 2018
@@ -1636,8 +1636,6 @@
 	}
 	if (propList["style:text-scale"])
 		textCharStyle.setFontSize(textCharStyle.fontSize() * fromPercentage(QString(propList["style:text-scale"]->getStr().cstr())));
-	if (propList["fo:color"])
-		textCharStyle.setFillColor(parseColor(QString(propList["fo:color"]->getStr().cstr())));
 	if (propList["style:font-name"])
 	{
 		QString fontVari;
@@ -1677,7 +1675,18 @@
 	if (propList["style:text-line-through-style"])
 		styleEffects |= ScStyle_Strikethrough;
 	if (propList["style:text-outline"] && propList["style:text-outline"]->getInt())
+	{
 		styleEffects |= ScStyle_Outline;
+		textCharStyle.setFillColor(CommonStrings::None);
+	}
+	if (propList["fo:color"])
+	{
+		const QString color = parseColor(QString(propList["fo:color"]->getStr().cstr()));
+		if (styleEffects & ScStyle_Outline)
+			textCharStyle.setStrokeColor(color);
+		else
+			textCharStyle.setFillColor(color);
+	}
 	if (propList["style:text-shadow"]) // TODO: parse offsets
 		styleEffects |= ScStyle_Shadowed;
 	if (propList["fo:hyphenate"])




More information about the scribus-commit mailing list