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


Hi julien2412,

On Monday, 2015-02-16 14:43:03 -0700, julien2412 wrote:

1) I noticed that AddDocumentToPickList was called at the opening and at the
close of a doc (+ some other events like saveAs)
See
http://opengrok.libreoffice.org/xref/core/sfx2/source/appl/sfxpicklist.cxx#406
=> I wonder in which case calling this method at close would be useful so
submitted https://gerrit.libreoffice.org/#/c/14507/

See my comment there.

2) I noticed that this line in AddDocumentToPickList was always wrong:
178     if ( !pMed->IsUpdatePickList() )

Why wrong? A medium could be set to not updating / be mentioned in the picklist.

I mean either the recent list or not, it seems we never return from 
AddDocumentToPickList and so we generate thumbnail of the file (some lines
below)
Trying to investigate here, I must recognize I'm not sure what
"bUpdatePickList" variable from SfxMedium_Impl (see
http://opengrok.libreoffice.org/xref/core/sfx2/source/doc/docfile.cxx#174)
means:
a) boolean to indicate pick list should be updated

Yes.

or b) boolean to indicate pick list has been updated
IsUpdatePickList shows a bit this confusion, does it mean: "is updated
PickList" or "must Update PickList" ?

"is UpdatePickList set" ;-)

3) I noticed that at each close, BackingWindow::initControls is called (see
opengrok.libreoffice.org/xref/core/sfx2/source/dialog/backingwindow.cxx#217) 
and we never return early from here:
    217 void BackingWindow::initControls()
    218 {
    219     if( mbInitControls )
    220         return;
    221 
    222     mbInitControls = true;

Indeed, by closing several times the same file (without any change in it
each time), the object address is different:

Probably the BackingWindow is destroyed when a document is opened, which
makes sense because it is not needed anymore. Once the last document is
closed, a new BackingWindow is created. Just assumptions, I didn't
investigate, you'd have to place a break in dtor and ctor.

/home/julien/compile-libreoffice/libreoffice/sfx2/source/dialog/backingcomp.cxx:436

the main problem here is we call mpAllRecentThumbnails->Reload(); (line 260
of this same file) (see
http://opengrok.libreoffice.org/xref/core/sfx2/source/control/recentdocsview.cxx#158)
This method clears and reloads completely SvtHistoryOptions list

Why is that bad? The alternative would be to keep the BackingWindow (IF
my assumption of it being destroyed holds) but then you would have to
refresh the history and corresponding thumbnails of documents that were
opened or saved in the mean time. Which unnecessarily would tie memory
when a document is open and complicate handling.

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack

Attachment: pgpfH3Iekx3Qy.pgp
Description: PGP signature


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.