Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


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@frugalware.org>

On Wed, Aug 24, 2011 at 11:50:02AM +0100, Caolán McNamara <
caolanm@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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice




-- 
Arnaud Versini

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.