r21383 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Sat Jun 18 13:58:43 UTC 2016


Author: jghali
Date: Sat Jun 18 13:58:43 2016
New Revision: 21383

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21383
Log:
#14159: PDF export of bookmarks fails

Modified:
    trunk/Scribus/scribus/pdflib_core.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21383&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp	(original)
+++ trunk/Scribus/scribus/pdflib_core.cpp	Sat Jun 18 13:58:43 2016
@@ -10875,7 +10875,7 @@
 				}
 				Inhal += "/Dest ["+Pdf::toPdf(PageTree.Kids[ip->PageObject->OwnPage])+" 0 R "+action+"\n";
 			}
-			//Inhal += ">>\nendObj\n");
+			Inhal += ">>";
 			Inha[ip->ItemNr] = Inhal;
 			++it;
 		}

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21383&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	Sat Jun 18 13:58:43 2016
@@ -1593,12 +1593,12 @@
 	for (it = bookmarks.begin(); it != bookmarks.end(); ++it)
 	{
 		int elem = it.key();
-		if (elem < m_Doc->Items->count())
-		{
-			ScribusDoc::BookMa bookmark = it.value();
-			bookmark.PageObject = m_Doc->Items->at(elem);
-			m_Doc->BookMarks.append( bookmark );
-		}
+		PageItem* item = LinkID.value(elem, (PageItem*) 0);
+		if (!item)
+			continue;
+		ScribusDoc::BookMa bookmark = it.value();
+		bookmark.PageObject = item;
+		m_Doc->BookMarks.append( bookmark );
 	}
 
 	if (isNewFormat)
@@ -6243,12 +6243,12 @@
 	for (it = bookmarks.begin(); it != bookmarks.end(); ++it)
 	{
 		int elem = it.key();
-		if (elem < m_Doc->Items->count())
-		{
-			ScribusDoc::BookMa bookmark = it.value();
-			bookmark.PageObject = LinkID[elem];
-			m_Doc->BookMarks.append( bookmark );
-		}
+		PageItem* item = LinkID.value(elem, (PageItem*) 0);
+		if (!item)
+			continue;
+		ScribusDoc::BookMa bookmark = it.value();
+		bookmark.PageObject = item;
+		m_Doc->BookMarks.append( bookmark );
 	}
 
 	if (isNewFormat)




More information about the scribus-commit mailing list