r22374 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Mon Feb 5 18:23:21 UTC 2018


Author: jghali
Date: Mon Feb  5 18:23:21 2018
New Revision: 22374

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22374
Log:
#15099, improve librevenge based import: handle more style effects <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=22374&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:23:21 2018
@@ -1658,7 +1658,11 @@
 	}
 	StyleFlag styleEffects = textCharStyle.effects();
 	if (propList["style:text-underline-type"])
+	{
 		styleEffects |= ScStyle_Underline;
+		if (propList["style:text-underline-mode"] && propList["style:text-underline-mode"]->getStr() == "skip-white-space")
+			styleEffects |= ScStyle_UnderlineWords;
+	}
 	if (propList["style:text-position"])
 	{
 		if (propList["style:text-position"]->getStr() == "50% 67%")
@@ -1666,6 +1670,19 @@
 		else
 			styleEffects |= ScStyle_Subscript;
 	}
+	if (propList["fo:font-variant"] && propList["fo:font-variant"]->getStr() == "small-caps")
+		styleEffects |= ScStyle_SmallCaps;
+	if (propList["fo:text-transform"] && propList["fo:text-transform"]->getStr() == "uppercase")
+		styleEffects |= ScStyle_AllCaps;
+	if (propList["style:text-line-through-style"])
+		styleEffects |= ScStyle_Strikethrough;
+	if (propList["style:text-outline"] && propList["style:text-outline"]->getInt())
+		styleEffects |= ScStyle_Outline;
+	if (propList["style:text-shadow"]) // TODO: parse offsets
+		styleEffects |= ScStyle_Shadowed;
+	if (propList["fo:hyphenate"])
+		styleEffects |= ScStyle_HyphenationPossible;
+	// TODO: handle drop caps
 	textCharStyle.setFeatures(styleEffects.featureList());
 }
 




More information about the scribus-commit mailing list