<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#c9">Comment # 9</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:aacid@kde.org" title="Albert Astals Cid <aacid@kde.org>"> <span class="fn">Albert Astals Cid</span></a>
</span></b>
<pre>(In reply to Tobias Deiminger from <a href="show_bug.cgi?id=107057#c8">comment #8</a>)
<span class="quote">> (In reply to Albert Astals Cid from <a href="show_bug.cgi?id=107057#c7">comment #7</a>)
> > 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?
>
> 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?</span >
No, on save you always use DoNotTryToRecoverIfNone, it's what you're doing with
your patch code, no?</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>