[Libreoffice] [PUSHED][PATCH] Remove unnecessary parameter to IDocumentStatistics::UpdateDocStat

Arnaud Versini arnaud.versini at gmail.com
Thu Aug 25 22:44:34 PDT 2011


Hello,

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

http://cgit.freedesktop.org/libreoffice/core/commit/?id=70218ae8ef57b96f8064780adebcee3245757b58

2011/8/26 Miklos Vajna <vmiklos at frugalware.org>

> On Wed, Aug 24, 2011 at 11:50:02AM +0100, Caolán McNamara <
> caolanm at redhat.com> wrote:
> > > You mean something like this? Given that the idl says these properties
> > > are readonly (I did not notice that so far), I don't think there is a
> > > reason to set them.
> >
> > I was thinking more of the "old" rtf filter which const casts away
> > constness to set these on import. Need better names than old/new.
>
> I used RtfReader/RTFTokenizer, but that's confusing as well.
> "writerfilter-based rtf import"?
>
> > re: readonly-ness in the uno api, the AdvancedTextDocument
> > CharacterCount etc properties are read-only alright, but no mention is
> > made of readonly-ness for DocumentStatistics from XDocumentProperties
>
> Here is my understanding:
>
> - PageCount: readonly in TextDocumentView.idl
> - WordCount: readonly in AdvancedTextDocument.idl
> - CharacterCount: readonly in AdvancedTextDocument.idl
>
> > I suppose there's a counter-argument that says setting what the
> > producing app thinks was the stats allows the expected results from
> > fields etc up to as far as the first update when the user edits that
> > document.
>
> Hm, what I see here: with a trivial test doc, like:
>
> {\rtf1
> {\info
> {\nofpages99}
> }
> {foobar
> \par }
> }
>
> (which is of course a single page, but it says it's 99 pages)
>
> when (on master) I go to File -> Properties -> Statistics, Number of
> Pages is already 1, without pressing Update.
>
> It's possible this is a bug in RTFDocumentImpl (search for RTF_NOFPAGES
> in rtfdocumentimpl.cxx), but isn't this just because the attributes are
> read-only? (Lack of uno knowledge on my side: not sure if "readonly" in
> the IDL is just a suggestion for the implementation or in case it's
> enforced.)
>
> Thanks.
>
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
>


-- 
Arnaud Versini
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110826/ff9ae03a/attachment.htm>


More information about the LibreOffice mailing list