r22384 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Mon Feb 5 18:40:35 UTC 2018


Author: jghali
Date: Mon Feb  5 18:40:35 2018
New Revision: 22384

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22384
Log:
#15099, improve librevenge based import: read more paragraph properties <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=22384&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:40:35 2018
@@ -1598,6 +1598,19 @@
 		lineSpIsPT = lsp.endsWith("pt");
 		lineSpSet = true;
 	}
+	if (propList["fo:keep-together"])
+		textStyle.setKeepTogether(propList["fo:keep-together"]->getStr() == "always");
+	if (propList["fo:keep-with-next"])
+		textStyle.setKeepWithNext(propList["fo:keep-with-next"]->getStr() == "always");
+	if (propList["fo:orphans"])
+		textStyle.setKeepLinesEnd(propList["fo:orphans"]->getInt());
+	if (propList["fo:widows"])
+		textStyle.setKeepLinesStart(propList["fo:widows"]->getInt());
+	if (propList["fo:hyphenate"])
+		textStyle.setHyphenationMode(propList["fo:hyphenate"]->getInt() ? ParagraphStyle::AutomaticHyphenation : ParagraphStyle::NoHyphenation);
+	if (propList["fo:hyphenation-ladder-count"] && propList["fo:hyphenation-ladder-count"]->getStr() != "no-limit")
+		// TODO: how to specify no-limit? 0?
+		textStyle.setHyphenConsecutiveLines(propList["fo:hyphenation-ladder-count"]->getInt());
 }
 
 void RawPainter::closeParagraph()




More information about the scribus-commit mailing list