r18723 by fschmid - Fixed Bug #11954: Incorrect line spacing in imported MS Office files

scribus-commit scribus-commit at lists.scribus.net
Mon Jan 13 21:06:32 UTC 2014


Author: fschmid
Date: Mon Jan 13 21:06:32 2014
New Revision: 18723

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18723
Log:
Fixed Bug #11954: Incorrect line spacing in imported MS Office files

Modified:
    trunk/Scribus/scribus/plugins/import/pub/importpub.cpp

Modified: trunk/Scribus/scribus/plugins/import/pub/importpub.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18723&path=/trunk/Scribus/scribus/plugins/import/pub/importpub.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pub/importpub.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pub/importpub.cpp Mon Jan 13 21:06:32 2014
@@ -825,7 +825,8 @@
 		textStyle.setGapAfter(valueAsPoint(propList["fo:margin-bottom"]));
 	if (propList["fo:margin-top"])
 		textStyle.setGapBefore(valueAsPoint(propList["fo:margin-top"]));
-	m_maxFontSize = textStyle.charStyle().fontSize() / 10.0;
+//	m_maxFontSize = textStyle.charStyle().fontSize() / 10.0;
+	m_maxFontSize = 1.0;
 	if (propList["fo:line-height"])
 	{
 		m_linespace = propList["fo:line-height"]->getDouble();
@@ -916,6 +917,7 @@
 			QTextDocument texDoc;
 			texDoc.setHtml(actText);
 			actText = texDoc.toPlainText();
+			actText = actText.trimmed();
 			actTextItem->itemText.insertChars(posC, actText);
 			actTextItem->itemText.applyStyle(posC, textStyle);
 			actTextItem->itemText.applyCharStyle(posC, actText.length(), textCharStyle);




More information about the scribus-commit mailing list