r16330 by fschmid - Fixed Bug #9721: "Scribus crashes due to Signal 6 when master page is applied". Bug was caused by a very large number for the page number field width, thus the fieldwidth is now limited to 20 chars.

scribus-commit scribus-commit at lists.scribus.net
Mon Jan 31 22:24:19 CET 2011


Author: fschmid
Date: Mon Jan 31 21:24:18 2011
New Revision: 16330

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16330
Log:
Fixed Bug #9721: "Scribus crashes due to Signal 6 when master page is applied". Bug was caused by a very large number for the page number field width, thus the fieldwidth is now limited to 20 chars.

Modified:
    trunk/Scribus/scribus/scribusdoc.cpp

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16330&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Mon Jan 31 21:24:18 2011
@@ -5350,7 +5350,9 @@
 	//If a section is inactive, theres no page numbers printed
 	if (docPrefsData.docSectionMap[key].active==false)
 		return retVal;
-	retVal=docPrefsData.docSectionMap[key].pageNumberFillChar;
+	retVal = docPrefsData.docSectionMap[key].pageNumberFillChar;
+	if (retVal == QChar(0))
+		retVal = QChar(32);
 	return retVal;
 }
 
@@ -5364,7 +5366,7 @@
 	//If a section is inactive, theres no page numbers printed
 	if (docPrefsData.docSectionMap[key].active==false)
 		return retVal;
-	retVal=docPrefsData.docSectionMap[key].pageNumberWidth;
+	retVal = qMin(docPrefsData.docSectionMap[key].pageNumberWidth, 20);			// added the qmin as a sanity check -> fixes bug #9721
 	return retVal;
 }
 




More information about the scribus-commit mailing list