tobiasdeiminger added inline comments.
INLINE COMMENTS
> generator_pdf.cpp:653
>
> + if (oldRectsGenerated.count() == rectsGenerated.count()) {
> + for (int i = 0; i < oldRectsGenerated.count(); ++i) {
Guess this is the same sanity check as in document.cpp,
Document::swapBackingFile, probably meaning "is it still the same document?".
Could there be situations where old page count != new page count? Or where page
count is equal, but content is completely different?
> generator_pdf.cpp:655-661
> + if (oldRectsGenerated[i]) {
> + Okular::Page *page = newPagesVector[i];
> + Poppler::Page *pp = pdfdoc->page( i );
> + page->setObjectRects(generateLinks(pp->links()));
> + rectsGenerated[i] = true;
> + resolveMediaLinkReferences(page);
> + }
This adds a few lines of redundant code and minor special handling (wrt
PDFGenerator::image). But I shouldn't complain, don't know how to do it better.
REPOSITORY
R223 Okular
REVISION DETAIL
https://phabricator.kde.org/D14752
To: aacid
Cc: tobiasdeiminger, sander, okular-devel, ngraham, aacid