<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/127371/">https://git.reviewboard.kde.org/r/127371/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for Calligra and Camilla Boemann.</div>
<div>By Friedrich W. H. Kossebau.</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
calligra
</div>
<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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">A first approach to collect chars and their positions on a given page, as needed by Okular.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I followed the logic used for painting, as that one also needs to calculate what content is part of a certain page, so copying the algorithm seemed most obvious for a start.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Disadvantage: This approach needs access to internal data of the area objects, so I had to add the code to the actual *Area classes. So they now carry logic for a currently single use-case, which also is not the most typical. Surely not a lot of code, but ideally this special need for the Okular plugin should not add its payload for everyone.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">So looking for better ideas here, at least for later.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">TODOs for the future:
- text from master pages (headers/footers)
- text in objects (floating text boxes, diagrams, whatever)
- include header/paragraph numbering/bullet points
- only add line-breaks for real paragraph ends perhaps</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Please give this some first round of feedback. IMHO it already adds value, as it finally allows to copy text from the main textflow.
So would not mind to have this as-is for 3.0, to be improved than at least later, if not before. Unless it is unacceptable for good reasons :)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">In a perfect future OkularĀ“s plugin API will allow native selections, so all the knowledge about text flow is not lost. But for now we have to support the API which exists.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">(Short note: I will not be able to instantly reply, currently seeing to replace broken IT, might take another week at least, no email or irc for now. This patch here was already uploaded before things turned defunct locally, so pushing it out now for review at least).</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Normal text, text in tables, text in generated content, footnotes & endnotes could be selected in the ODT (& DOC/DOCX/WPD) files I tried.</p></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>extras/okularodtgenerator/OkularOdtGenerator.h <span style="color: grey">(c4404c4)</span></li>
<li>extras/okularodtgenerator/OkularOdtGenerator.cpp <span style="color: grey">(d1d428d)</span></li>
<li>libs/textlayout/KoCharAreaInfo.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>libs/textlayout/KoTextLayoutArea.h <span style="color: grey">(27934d7)</span></li>
<li>libs/textlayout/KoTextLayoutArea.cpp <span style="color: grey">(bacfa58)</span></li>
<li>libs/textlayout/KoTextLayoutEndNotesArea.h <span style="color: grey">(6c1eb12)</span></li>
<li>libs/textlayout/KoTextLayoutEndNotesArea.cpp <span style="color: grey">(2c1e241)</span></li>
<li>libs/textlayout/KoTextLayoutTableArea.h <span style="color: grey">(8d912ee)</span></li>
<li>libs/textlayout/KoTextLayoutTableArea.cpp <span style="color: grey">(4d2cdc1)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/127371/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>