[poppler] poppler/poppler: Outline.cc, 1.1.1.1, 1.2 Outline.h, 1.1.1.1, 1.2

Kristian Hogsberg krh at freedesktop.org
Thu Apr 21 12:50:47 PDT 2005


Update of /cvs/poppler/poppler/poppler
In directory gabe:/tmp/cvs-serv1252/poppler

Modified Files:
	Outline.cc Outline.h 
Log Message:
Thu Apr 21 15:43:52 2005  Kristian Høgsberg  <krh at redhat.com>

        * poppler/Outline.cc:
        * poppler/Outline.h: Implement the documented behaviour for
        Outline::getItems() and OutlineItem::getKids() and make
        documentation more precise (Patch from Marco).



Index: Outline.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Outline.cc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- Outline.cc	3 Mar 2005 19:46:03 -0000	1.1.1.1
+++ Outline.cc	21 Apr 2005 19:50:45 -0000	1.2
@@ -134,6 +134,12 @@
     }
     p = &item->nextRef;
   }
+
+  if (!items->getLength()) {
+    delete items;
+    items = NULL;
+  }
+
   return items;
 }
 

Index: Outline.h
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Outline.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- Outline.h	3 Mar 2005 19:46:01 -0000	1.1.1.1
+++ Outline.h	21 Apr 2005 19:50:45 -0000	1.2
@@ -33,8 +33,8 @@
 
 private:
 
-  GooList *items;			// NULL if document has no outline
-				//   [OutlineItem]
+  GooList *items;		// NULL if document has no outline,
+				// otherwise, a list of OutlineItem
 };
 
 //------------------------------------------------------------------------
@@ -68,7 +68,8 @@
   Object lastRef;
   Object nextRef;
   GBool startsOpen;
-  GooList *kids;			// NULL unless this item is open [OutlineItem]
+  GooList *kids;	// NULL if this item is closed or has no kids,
+			// otherwise a list of OutlineItem
 };
 
 #endif



More information about the poppler mailing list