<div dir="ltr">Hi Thorsten,<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 16, 2017 at 5:22 AM, Thorsten Behrens <span dir="ltr"><<a href="mailto:thb@libreoffice.org" target="_blank">thb@libreoffice.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">Miklos Vajna wrote:<br>
> The idea is that per-paragraph signature should be non-chained, similar<br>
> to per-document signatures, so the Writer field(s) representing the<br>
> signature(s) should be filtered out before hashing, but otherwise this<br>
> just takes the paragraph text as-is. (My understanding is that ODF<br>
> specifies what is the exact paragraph string for a <text:p> element.)<br>
><br>
</span>Hi Miklos,<br>
<br>
ok - as long as that could be described (or pseudo code given),<br>
that'll do I guess. Just be aware that text:p can still be quite<br>
complex in xml, with whitespace mangling & all sorts of child elements<br>
(see paragraph-content-or-hyperlink / paragraph-content in the<br>
schema).<br></blockquote><div><br></div><div>The code currently in master was a temporary first step. The logic I currently have locally ready to push soon is to only use Text portions. </div><div><br></div><div>Roughly as follows:</div><div><br></div><div><span style="font-size:12.8px">  OUStringBuffer strBuf;</span><br style="font-size:12.8px"><span style="font-size:12.8px">  for (auto& portion : paragraphTextPortions) {</span><br style="font-size:12.8px"><span style="font-size:12.8px">      if (portion.TextPortionType == "Text")</span><br style="font-size:12.8px"><span style="font-size:12.8px">          strBuf.append(portion.Text);</span></div><div>  }<br style="font-size:12.8px">  sign(strBuf.makeStringAndClear());<br style="font-size:12.8px"><br>I expect this should exclude any unwanted fields/characters/LO-specific conversions etc.</div><div><br></div><div>Let me know if there are concerns with this approach.<br><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
And I wonder if char attribute sets shouldn't be included in the<br>
signature, no idea what funny view vs. content games could be played<br>
otherwise?<br>
<br></blockquote><div><br></div><div>We considered/discussed this, but it quickly became apparent that there are other complications in considering attributes. For now at least we are leaving all formatting/styles out of document signing and only considering the plain text.</div><div><br></div><div>Thanks</div></div></div></div>