r18307 by jghali - #11580: crash when inserting image frame in masterpage mode

scribus-commit scribus-commit at lists.scribus.net
Sun Jun 9 15:45:23 UTC 2013


Author: jghali
Date: Sun Jun  9 15:45:22 2013
New Revision: 18307

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18307
Log:
#11580: crash when inserting image frame in masterpage mode

Modified:
    branches/Version14x/Scribus/scribus/insertaframe.cpp
    branches/Version14x/Scribus/scribus/scribusdoc.cpp

Modified: branches/Version14x/Scribus/scribus/insertaframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18307&path=/branches/Version14x/Scribus/scribus/insertaframe.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/insertaframe.cpp (original)
+++ branches/Version14x/Scribus/scribus/insertaframe.cpp Sun Jun  9 15:45:22 2013
@@ -255,7 +255,7 @@
 {
 	if (m_Doc!=0)
 	{
-		CreateRange cr(placementPagesLineEdit->text(), m_Doc->DocPages.count(), this);
+		CreateRange cr(placementPagesLineEdit->text(), m_Doc->Pages->count(), this);
 		if (cr.exec())
 		{
 			CreateRangeData crData;

Modified: branches/Version14x/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18307&path=/branches/Version14x/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scribusdoc.cpp (original)
+++ branches/Version14x/Scribus/scribus/scribusdoc.cpp Sun Jun  9 15:45:22 2013
@@ -3888,10 +3888,10 @@
 		pageNs.push_back(currentPage()->pageNr()+1);
 	else if (iafData.locationType==1) // On all pages
 	{
-		parsePagesString(QString("1-%1").arg(DocPages.count()), &pageNs, DocPages.count());
+		parsePagesString(QString("1-%1").arg(Pages->count()), &pageNs, Pages->count());
 	}
 	else
-		parsePagesString(iafData.pageList, &pageNs, DocPages.count());
+		parsePagesString(iafData.pageList, &pageNs, Pages->count());
 	Page* oldCurrentPage = currentPage();
 	int z=-2;
 	PageItem *prevItem=0; //Previous item for text frame linking
@@ -3904,7 +3904,7 @@
 															  Um::InsertFrame, "", Um::ICreate));
 	for (uint i=0;i<pageNs.size();++i)
 	{
-		Page* targetPage=Pages->at(pageNs[i]-1);
+		Page* targetPage = Pages->at(pageNs[i]-1);
 		//We need this for the itemAdd, FIXME later
 		setCurrentPage(targetPage);
 		
@@ -3918,8 +3918,7 @@
 			x1=targetPage->xOffset();
 			y1=targetPage->yOffset();
 		}
-		else
-		if (iafData.positionType==2) // Frame starts at top left of page - bleeds
+		else if (iafData.positionType==2) // Frame starts at top left of page - bleeds
 		{
 			x1=targetPage->xOffset()-bleeds.Left;
 			y1=targetPage->yOffset()-bleeds.Top;
@@ -3940,8 +3939,7 @@
 			w1=targetPage->width();
 			h1=targetPage->height();
 		}
-		else
-		if (iafData.sizeType==2) // Frame is size of page + bleed 
+		else if (iafData.sizeType==2) // Frame is size of page + bleed 
 		{
 			w1=targetPage->width()+bleeds.Right+bleeds.Left;
 			h1=targetPage->height()+bleeds.Bottom+bleeds.Top;




More information about the scribus-commit mailing list