r22461 by jghali - #15224: Automated generation of a TOC doesn't include items in groups

scribus-commit scribus-commit at lists.scribus.net
Sat Mar 31 11:57:57 UTC 2018


Author: jghali
Date: Sat Mar 31 11:57:57 2018
New Revision: 22461

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22461
Log:
#15224: Automated generation of a TOC doesn't include items in groups

Added:
    trunk/Scribus/scribus/pageitemiterator.cpp
    trunk/Scribus/scribus/pageitemiterator.h
Modified:
    trunk/Scribus/scribus/CMakeLists.txt
    trunk/Scribus/scribus/tocgenerator.cpp
    trunk/Scribus/win32/msvc2012/scribus-main/Scribus.vcxproj
    trunk/Scribus/win32/msvc2012/scribus-main/Scribus.vcxproj.filters
    trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj
    trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters

Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22461&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/scribus/CMakeLists.txt	Sat Mar 31 11:57:57 2018
@@ -675,6 +675,7 @@
 	pageitem_table.cpp
 	pageitem_textframe.cpp
 	pageitem_noteframe.cpp
+	pageitemiterator.cpp
 	pageitempointer.cpp
 	pagesize.cpp
 	pdf_analyzer.cpp

Modified: trunk/Scribus/scribus/tocgenerator.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22461&path=/trunk/Scribus/scribus/tocgenerator.cpp
==============================================================================
--- trunk/Scribus/scribus/tocgenerator.cpp	(original)
+++ trunk/Scribus/scribus/tocgenerator.cpp	Sat Mar 31 11:57:57 2018
@@ -27,6 +27,7 @@
 #include "gtparagraphstyle.h"
 #include "gtwriter.h"
 #include "pageitem.h"
+#include "pageitemiterator.h"
 #include "pagestructs.h"
 #include "scpage.h"
 #include "scribusdoc.h"
@@ -82,9 +83,10 @@
 		for (int i = 0; i < m_doc->DocPages.count(); ++i)
 			pageCounter[i] = 0;
 
-		for (int d = 0; d < m_doc->DocItems.count(); ++d)
+		PageItemIterator itemIter(m_doc->DocItems);
+		while (itemIter.next())
 		{
-			currentDocItem = m_doc->DocItems.at(d);
+			currentDocItem = itemIter.current();
 			if (currentDocItem == NULL)
 				continue;
 			//Item not on a page, continue

Modified: trunk/Scribus/win32/msvc2012/scribus-main/Scribus.vcxproj
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22461&path=/trunk/Scribus/win32/msvc2012/scribus-main/Scribus.vcxproj
==============================================================================
--- trunk/Scribus/win32/msvc2012/scribus-main/Scribus.vcxproj	(original)
+++ trunk/Scribus/win32/msvc2012/scribus-main/Scribus.vcxproj	Sat Mar 31 11:57:57 2018
@@ -325,6 +325,7 @@
     <ClInclude Include="..\..\..\scribus\imagedataloaders\scimgdataloader_ora.h" />
     <moc Include="..\..\..\scribus\selectionrubberband.h" />
     <ClInclude Include="..\..\..\scribus\nodeeditcontext.h" />
+    <ClInclude Include="..\..\..\scribus\pageitemiterator.h" />
     <ClInclude Include="..\..\..\scribus\palettes\cxfcolor.h" />
     <ClInclude Include="..\..\..\scribus\palettes\cxfcolorspecification.h" />
     <ClInclude Include="..\..\..\scribus\palettes\cxfdocument.h" />
@@ -861,6 +862,7 @@
     <ClCompile Include="..\..\..\scribus\imagedataloaders\scimgdataloader_kra.cpp" />
     <ClCompile Include="..\..\..\scribus\marks.cpp" />
     <ClCompile Include="..\..\..\scribus\nodeeditcontext.cpp" />
+    <ClCompile Include="..\..\..\scribus\pageitemiterator.cpp" />
     <ClCompile Include="..\..\..\scribus\palettes\cxfcolor.cpp" />
     <ClCompile Include="..\..\..\scribus\palettes\cxfcolorspecification.cpp" />
     <ClCompile Include="..\..\..\scribus\palettes\cxfdocument.cpp" />

Modified: trunk/Scribus/win32/msvc2012/scribus-main/Scribus.vcxproj.filters
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22461&path=/trunk/Scribus/win32/msvc2012/scribus-main/Scribus.vcxproj.filters
==============================================================================
--- trunk/Scribus/win32/msvc2012/scribus-main/Scribus.vcxproj.filters	(original)
+++ trunk/Scribus/win32/msvc2012/scribus-main/Scribus.vcxproj.filters	Sat Mar 31 11:57:57 2018
@@ -791,7 +791,7 @@
     <ClInclude Include="..\..\..\scribus\colormgmt\sce308tables.h">
       <Filter>colorMgmt</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\..\scribus\ui\cxfimportdialog.h">
+    <ClInclude Include="..\..\..\scribus\pageitemiterator.h">
       <Filter>Header Files</Filter>
     </ClInclude>
   </ItemGroup>
@@ -2471,6 +2471,9 @@
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="..\..\..\scribus\ui\cxfimportdialog.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\pageitemiterator.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
   </ItemGroup>
@@ -4094,6 +4097,9 @@
     <moc Include="..\..\..\scribus\ui\pdfversionmodel.h">
       <Filter>Header Files</Filter>
     </moc>
+    <moc Include="..\..\..\scribus\ui\cxfimportdialog.h">
+      <Filter>Header Files</Filter>
+    </moc>
   </ItemGroup>
   <ItemGroup>
     <CustomBuild Include="..\..\..\scribus\color.h">

Modified: trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22461&path=/trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj
==============================================================================
--- trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj	(original)
+++ trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj	Sat Mar 31 11:57:57 2018
@@ -325,6 +325,7 @@
     <ClInclude Include="..\..\..\scribus\imagedataloaders\scimgdataloader_ora.h" />
     <moc Include="..\..\..\scribus\selectionrubberband.h" />
     <ClInclude Include="..\..\..\scribus\nodeeditcontext.h" />
+    <ClInclude Include="..\..\..\scribus\pageitemiterator.h" />
     <ClInclude Include="..\..\..\scribus\palettes\cxfcolor.h" />
     <ClInclude Include="..\..\..\scribus\palettes\cxfcolorspecification.h" />
     <ClInclude Include="..\..\..\scribus\palettes\cxfdocument.h" />
@@ -861,6 +862,7 @@
     <ClCompile Include="..\..\..\scribus\imagedataloaders\scimgdataloader_kra.cpp" />
     <ClCompile Include="..\..\..\scribus\marks.cpp" />
     <ClCompile Include="..\..\..\scribus\nodeeditcontext.cpp" />
+    <ClCompile Include="..\..\..\scribus\pageitemiterator.cpp" />
     <ClCompile Include="..\..\..\scribus\palettes\cxfcolor.cpp" />
     <ClCompile Include="..\..\..\scribus\palettes\cxfcolorspecification.cpp" />
     <ClCompile Include="..\..\..\scribus\palettes\cxfdocument.cpp" />

Modified: trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22461&path=/trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters
==============================================================================
--- trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters	(original)
+++ trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters	Sat Mar 31 11:57:57 2018
@@ -791,7 +791,7 @@
     <ClInclude Include="..\..\..\scribus\colormgmt\sce308tables.h">
       <Filter>colorMgmt</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\..\scribus\ui\cxfimportdialog.h">
+    <ClInclude Include="..\..\..\scribus\pageitemiterator.h">
       <Filter>Header Files</Filter>
     </ClInclude>
   </ItemGroup>
@@ -2471,6 +2471,9 @@
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="..\..\..\scribus\ui\cxfimportdialog.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\pageitemiterator.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
   </ItemGroup>
@@ -4094,6 +4097,9 @@
     <moc Include="..\..\..\scribus\ui\pdfversionmodel.h">
       <Filter>Header Files</Filter>
     </moc>
+    <moc Include="..\..\..\scribus\ui\cxfimportdialog.h">
+      <Filter>Header Files</Filter>
+    </moc>
   </ItemGroup>
   <ItemGroup>
     <CustomBuild Include="..\..\..\scribus\color.h">




More information about the scribus-commit mailing list