<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [Patch] Skip XRef gaps in PDFDoc save methods"
href="https://bugs.freedesktop.org/show_bug.cgi?id=107057#c8">Comment # 8</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [Patch] Skip XRef gaps in PDFDoc save methods"
href="https://bugs.freedesktop.org/show_bug.cgi?id=107057">bug 107057</a>
from <span class="vcard"><a class="email" href="mailto:haxtibal@posteo.de" title="Tobias Deiminger <haxtibal@posteo.de>"> <span class="fn">Tobias Deiminger</span></a>
</span></b>
<pre>(In reply to Albert Astals Cid from <a href="show_bug.cgi?id=107057#c7">comment #7</a>)
<span class="quote">> Took me a while to realize the problem was getEntry tries to reconstruct on
> the none entries (because i didn't read the comment before reading the
> patch).
>
> I was wondering if changig getEntry would be easier for the next people that
> read the code next time?
>
> i.e. a new bool (or changing the bool to a flag) to tell getEntry to don't
> try to reconstruct?
>
> enum GetEntryFlags
> {
> None,
> DoNotComplainIfMissing
> DoNotTryToRecoverIfNone
> }
>
> XRefEntry *getEntry(int i, GetEntryFlags flags = None);
>
> then the code in saveXXX would be xref->getEntry(i, DoNotTryToRecoverIfNone)
> which may be easier to understand for third party readers?</span >
That's an interesting idea. What I woukd tell getEntry then (perhaps
implicitly) is: "don't recover if none, but yes do recover if offset is wrong
and yes do recover if...<other reasons>". Is this still understandable for
third parties?
I'm traveling right now, will come back to that on Monday.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>