[poppler] Branch 'poppler-0.8' - poppler/XRef.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Fri Jul 25 11:17:36 PDT 2008


 poppler/XRef.cc |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

New commits:
commit 0d33373ca689bf7b8a8fcd6a1e1c26acd0bac12e
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Jul 25 20:16:54 2008 +0200

    Fix XRef::writeToFile after my change

diff --git a/poppler/XRef.cc b/poppler/XRef.cc
index 5c19c09..30d514c 100644
--- a/poppler/XRef.cc
+++ b/poppler/XRef.cc
@@ -1074,15 +1074,11 @@ void XRef::writeToFile(OutStream* outStr) {
     }
   }
   //write the new xref
-  int j;
   outStr->printf("xref\r\n");
+  outStr->printf("%i %i\r\n", 0, size);
   for (int i=0; i<size; i++) {
-    outStr->printf("%i %i\r\n", i, i+size);
-    for (int k=i; k<j; k++) {
-      if(entries[k].gen > 65535) entries[k].gen = 65535; //cap generation number to 65535 (required by PDFReference)
-      outStr->printf("%010i %05i %c\r\n", entries[k].offset, entries[k].gen, (entries[k].type==xrefEntryFree)?'f':'n');
-    }
-    i = j-1;
+    if(entries[i].gen > 65535) entries[i].gen = 65535; //cap generation number to 65535 (required by PDFReference)
+    outStr->printf("%010i %05i %c\r\n", entries[i].offset, entries[i].gen, (entries[i].type==xrefEntryFree)?'f':'n');
   }
 }
 


More information about the poppler mailing list