[Poppler-bugs] [Bug 90066] pdfunite: embedded files discarded during merge

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Apr 21 01:02:54 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=90066

--- Comment #8 from Thomas Freitag <Thomas.Freitag at alfa.de> ---
(In reply to Jason Crain from comment #7)

Thanks for reviewing. I hadn't done a memory leak check, sorry, normally I do
that. The next patch will remove the memory leaks.

BUT:
> @@ +249,5 @@
> >      }
> > +    catDict->lookup("Names", &names);
> > +    if (!names.isNull() && names.isDict()) {
> > +      docs[0]->markPageObjects(names.getDict(), yRef, countRef, 0, refPage->num, refPage->num);
> > +    }
> 
> You are processing the first document twice, first here and again below.

That's not true. The problem is probably the name "markPageObjects". But the
first parameter is a dictionary, so probably a better name for this method
should be markDictObjects. So here it marks every object referenced by the
"Names"-dict in the catalog dict, and this is the only place where
markPageObjects is called with it (in doMergeNameTree it will be called for the
"Names"-dict of the othere pages!).
The name for the method "markPageObjects" has historical reasons. When I
developped it first it was just called with the page dictionary!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20150421/ce51c414/attachment.html>


More information about the Poppler-bugs mailing list