<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/105020/">http://git.reviewboard.kde.org/r/105020/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This review has been submitted with commit e3f1c388de409843150280a2e1b3a738ab982af6 by Fabio D'Urso to branch master.</pre>
<br />
<p>- Commit</p>
<br />
<p>On May 23rd, 2012, 9:37 p.m., Fabio D'Urso wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Okular and Albert Astals Cid.</div>
<div>By Fabio D'Urso.</div>
<p style="color: grey;"><i>Updated May 23, 2012, 9:37 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Recent patches introduced a case (PDF file with existing native annotations and without /Encrypt) in which annotation changes are not saved locally.
This patch turns Okular into a ReadWritePart and checks for such annotation changes in queryClose().
Annotation editing is always disabled if we're loaded as ReadOnlyPart, no matter the document type.
I can change it, if necessary, to prevent annotation editing only in PDF files with existing native annotations and without /Encrypt. I didn't do that because I think that this behavior can be confusing for users.
I added the KParts/ReadWritePart ServiceType only in okular_part.desktop (which only handles .okular archives) so that other apps don't think that we are a real editor for all supported formats.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">It works for me.
Expected result:
- It's possible to edit annotations if we're loaded as ReadWritePart (eg by Okular native shell). If you annotate a PDF file with existing annotations and without /Encrypt, you also get a "Save changes?" prompt if you try to close the document (by pressing Quit, reloading, opening another file, or following a link to another document) and you haven't saved yet.
- It's not possible to edit annotations at all if we're loaded as ReadOnlyPart (eg from Konqueror), not even non-native ones. The relevant GUI items are grayed out.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>core/document.h <span style="color: grey">(cd36ae7f19c4fad7f192073bc0806901e9b29a85)</span></li>
<li>core/document.cpp <span style="color: grey">(e27b7906a8576f68c5a50b360ebe9019f643617f)</span></li>
<li>core/document_p.h <span style="color: grey">(ac24cf9d7995e95560899f546248685f05da9b90)</span></li>
<li>core/observer.h <span style="color: grey">(266993ce99927f1629d964e0bd597786c991428e)</span></li>
<li>okular_part.desktop <span style="color: grey">(9307253d7d4a543db06a6912ccc61cdd0aeaa365)</span></li>
<li>part.h <span style="color: grey">(39cdb721877283380af1b30c85f564a91f183de0)</span></li>
<li>part.cpp <span style="color: grey">(4c6aac8eab36b7e3f430afae92109d2e4ff3c75d)</span></li>
<li>shell/shell.h <span style="color: grey">(850e7e37fa9780e301cc33ae084cd57f7967d871)</span></li>
<li>shell/shell.cpp <span style="color: grey">(af4aa25f602b2749b8d9112174562525a76cc40c)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/105020/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>