[Libreoffice] [PUSHED][PATCH] Remove unnecessary parameter to IDocumentStatistics::UpdateDocStat
caolanm at redhat.com
Tue Aug 23 08:41:59 PDT 2011
On Sun, 2011-08-21 at 20:41 +0200, Arnaud Versini wrote:
> New version of the patch. I have added a method :
> IDocumentStatistic::GetUpdatedDocStat wich check state before
> returning. I left some UpdateDocStat but I will continue it later.
Looks basically good to me. We can distinguish between the two purposes
of the old call, to get updated stats because something wants to use
them, and to force updating of cached statistics for e.g. updating
I paused for a bit seeing as I got a bit confused, and wrote a
regression test for SwDocStat e.g. sw/qa/core/swdoc-test.cxx
So, pushed now. I took the liberty of adding a GetUpdatedDocStat to
EditShell as well and making those additional changes.
There's probably no good reason to want possibly out-dated stats is
there ?, so...
a) We/you should remove any remaining GetDocStat calls and replace them
with the GetUpdatedDocStat when they want to get current stats or
UpdateDocStat when they might want to update the internal stats only
b) Remove GetDocStat entirely and remove it from the new regression test
c) remove that bModified member from SwDocStat and move it into SwDoc as
m_bStaleStats or something
d) I'm not sure there's any good reason to set the DocStat in the
(current) rtf filter.
More information about the LibreOffice