r22400 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Sun Feb 18 14:42:20 UTC 2018


Author: jghali
Date: Sun Feb 18 14:42:19 2018
New Revision: 22400

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22400
Log:
improve #15149 fix by handling other breaks and SpecialChars::OBJECT which could also break document XML

Modified:
    branches/Version14x/Scribus/scribus/bookmwin.cpp

Modified: branches/Version14x/Scribus/scribus/bookmwin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22400&path=/branches/Version14x/Scribus/scribus/bookmwin.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/bookmwin.cpp	(original)
+++ branches/Version14x/Scribus/scribus/bookmwin.cpp	Sun Feb 18 14:42:19 2018
@@ -153,9 +153,10 @@
 	const StoryText& itemText = item->itemText;
 	for (int i = 0; i < item->itemText.length(); ++i)
 	{
-		str = item->itemText.text(i);
-		if ((str == SpecialChars::PARSEP) || (str == SpecialChars::LINEBREAK) || (str == QChar(10)))
+		ch = item->itemText.text(i);
+		if (SpecialChars::isBreak(ch) || (ch == QChar(10)))
 			break;
+		str = ch;
 		if (str == SpecialChars::PAGENUMBER || str == SpecialChars::PAGECOUNT)
 		{
 			str = item->ExpandToken(i);
@@ -165,7 +166,7 @@
 		for (int j = 0; j < str.length(); ++j)
 		{
 			ch = str.at(j);
-			if (ch == SpecialChars::OLD_NBSPACE)
+			if (ch == SpecialChars::OLD_NBSPACE || ch == SpecialChars::OBJECT)
 				ch = ' ';
 			if ((ch == '(') || (ch == ')') || (ch == '\\'))
 				title += "\\";




More information about the scribus-commit mailing list