[poppler] utils/HtmlOutputDev.cc utils/HtmlOutputDev.h

Albert Astals Cid aacid at kemper.freedesktop.org
Fri Mar 23 18:56:28 UTC 2018


 utils/HtmlOutputDev.cc |   13 ++++++-------
 utils/HtmlOutputDev.h  |    4 ++--
 2 files changed, 8 insertions(+), 9 deletions(-)

New commits:
commit c14dfa44a70ce32bbe1268ddff6106cab3f33bc2
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Mar 23 19:56:12 2018 +0100

    HtmlOutputDev: don't pass catalog around to not use it

diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index 7c67dbbd..f386740a 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -1697,7 +1697,6 @@ GBool HtmlOutputDev::dumpDocOutline(PDFDoc* doc)
 #else
 	FILE * output = nullptr;
 	GBool bClose = gFalse;
-	Catalog *catalog = doc->getCatalog();
 
 	if (!ok)
                 return gFalse;
@@ -1747,7 +1746,7 @@ GBool HtmlOutputDev::dumpDocOutline(PDFDoc* doc)
  
 	if (!xml)
 	{
-		GBool done = newHtmlOutlineLevel(output, outlines, catalog);
+		GBool done = newHtmlOutlineLevel(output, outlines);
 		if (done && !complexMode)
 			fputs("<hr/>\n", output);
 	
@@ -1758,13 +1757,13 @@ GBool HtmlOutputDev::dumpDocOutline(PDFDoc* doc)
 		}
 	}
 	else
-		newXmlOutlineLevel(output, outlines, catalog);
+		newXmlOutlineLevel(output, outlines);
 
 	return gTrue;
 #endif
 }
 
-GBool HtmlOutputDev::newHtmlOutlineLevel(FILE *output, GooList *outlines, Catalog* catalog, int level)
+GBool HtmlOutputDev::newHtmlOutlineLevel(FILE *output, GooList *outlines, int level)
 {
 #ifdef DISABLE_OUTLINE
 	return gFalse;
@@ -1825,7 +1824,7 @@ GBool HtmlOutputDev::newHtmlOutlineLevel(FILE *output, GooList *outlines, Catalo
 		if (item->hasKids() && item->getKids())
 		{
 			fputs("\n",output);
-			newHtmlOutlineLevel(output, item->getKids(), catalog, level+1);
+			newHtmlOutlineLevel(output, item->getKids(), level+1);
 		}
 		item->close();
 		fputs("</li>\n",output);
@@ -1836,7 +1835,7 @@ GBool HtmlOutputDev::newHtmlOutlineLevel(FILE *output, GooList *outlines, Catalo
 #endif
 }
 
-void HtmlOutputDev::newXmlOutlineLevel(FILE *output, GooList *outlines, Catalog* catalog)
+void HtmlOutputDev::newXmlOutlineLevel(FILE *output, GooList *outlines)
 {
 #ifndef DISABLE_OUTLINE
     fputs("<outline>\n", output);
@@ -1861,7 +1860,7 @@ void HtmlOutputDev::newXmlOutlineLevel(FILE *output, GooList *outlines, Catalog*
         item->open();
         if (item->hasKids() && item->getKids())
         {
-            newXmlOutlineLevel(output, item->getKids(), catalog);
+            newXmlOutlineLevel(output, item->getKids());
         }
         item->close();
     }    
diff --git a/utils/HtmlOutputDev.h b/utils/HtmlOutputDev.h
index c3212998..794d725e 100644
--- a/utils/HtmlOutputDev.h
+++ b/utils/HtmlOutputDev.h
@@ -330,8 +330,8 @@ private:
   GooString* getLinkDest(AnnotLink *link);
   void dumpMetaVars(FILE *);
   void doFrame(int firstPage);
-  GBool newHtmlOutlineLevel(FILE *output, GooList *outlines, Catalog* catalog, int level = 1);
-  void newXmlOutlineLevel(FILE *output, GooList *outlines, Catalog* catalog);
+  GBool newHtmlOutlineLevel(FILE *output, GooList *outlines, int level = 1);
+  void newXmlOutlineLevel(FILE *output, GooList *outlines);
 #ifndef DISABLE_OUTLINE
   int getOutlinePageNum(OutlineItem *item);
 #endif


More information about the poppler mailing list