Hello,<br><br>If character count without spaces is not set, ResetModified let DocumentStatistic invalid, so the application should recalculate this before showing the dialog. I've changed this for bug fdo#36931<br><br>
<a href="http://cgit.freedesktop.org/libreoffice/core/commit/?id=70218ae8ef57b96f8064780adebcee3245757b58">http://cgit.freedesktop.org/libreoffice/core/commit/?id=70218ae8ef57b96f8064780adebcee3245757b58</a><br><br><div class="gmail_quote">
2011/8/26 Miklos Vajna <span dir="ltr"><<a href="mailto:vmiklos@frugalware.org">vmiklos@frugalware.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Wed, Aug 24, 2011 at 11:50:02AM +0100, Caolán McNamara <<a href="mailto:caolanm@redhat.com">caolanm@redhat.com</a>> wrote:<br>
> > You mean something like this? Given that the idl says these properties<br>
> > are readonly (I did not notice that so far), I don't think there is a<br>
> > reason to set them.<br>
><br>
> I was thinking more of the "old" rtf filter which const casts away<br>
> constness to set these on import. Need better names than old/new.<br>
<br>
</div>I used RtfReader/RTFTokenizer, but that's confusing as well.<br>
"writerfilter-based rtf import"?<br>
<div class="im"><br>
> re: readonly-ness in the uno api, the AdvancedTextDocument<br>
> CharacterCount etc properties are read-only alright, but no mention is<br>
> made of readonly-ness for DocumentStatistics from XDocumentProperties<br>
<br>
</div>Here is my understanding:<br>
<br>
- PageCount: readonly in TextDocumentView.idl<br>
- WordCount: readonly in AdvancedTextDocument.idl<br>
- CharacterCount: readonly in AdvancedTextDocument.idl<br>
<div class="im"><br>
> I suppose there's a counter-argument that says setting what the<br>
> producing app thinks was the stats allows the expected results from<br>
> fields etc up to as far as the first update when the user edits that<br>
> document.<br>
<br>
</div>Hm, what I see here: with a trivial test doc, like:<br>
<br>
{\rtf1<br>
{\info<br>
{\nofpages99}<br>
}<br>
{foobar<br>
\par }<br>
}<br>
<br>
(which is of course a single page, but it says it's 99 pages)<br>
<br>
when (on master) I go to File -> Properties -> Statistics, Number of<br>
Pages is already 1, without pressing Update.<br>
<br>
It's possible this is a bug in RTFDocumentImpl (search for RTF_NOFPAGES<br>
in rtfdocumentimpl.cxx), but isn't this just because the attributes are<br>
read-only? (Lack of uno knowledge on my side: not sure if "readonly" in<br>
the IDL is just a suggestion for the implementation or in case it's<br>
enforced.)<br>
<br>
Thanks.<br>
<br>_______________________________________________<br>
LibreOffice mailing list<br>
<a href="mailto:LibreOffice@lists.freedesktop.org">LibreOffice@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/libreoffice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/libreoffice</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Arnaud Versini<br>