From 427412448cfa80df7546bf684ce891751204e28a Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Sun, 28 Jan 2018 18:59:18 +0100
Subject: [PATCH 12/12] read more paragraph props

---
 Scribus/scribus/plugins/import/revenge/rawpainter.cpp | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/Scribus/scribus/plugins/import/revenge/rawpainter.cpp b/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
index 11fc76ce2..88acb1042 100644
--- a/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
+++ b/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
@@ -1598,6 +1598,19 @@ void RawPainter::openParagraph(const librevenge::RVNGPropertyList &propList)
 		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()
-- 
2.14.3

