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


Hello,

Noticing tdf#71447 ("File menu takes long time to open when network files on
recent documents list are offline") about RecentDocs, I tried some gdb
session (let's take benefit of a debug+symbols build :-)) 

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/

2) I noticed that this line in AddDocumentToPickList was always wrong:
178     if ( !pMed->IsUpdatePickList() )
see
http://opengrok.libreoffice.org/xref/core/sfx2/source/appl/sfxpicklist.cxx#178
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
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" ?

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:
Ex:
bt 1:
#0  BackingWindow::initControls (this=0x738f9a0) at
/home/julien/compile-libreoffice/libreoffice/sfx2/source/dialog/backingwindow.cxx:219
#1  0x00002aaaaeb7bf9c in BackingWindow::setOwningFrame (this=0x738f9a0,
xFrame=uno::Reference to ((anonymous namespace)::Frame *) 0x281aba8)
    at
/home/julien/compile-libreoffice/libreoffice/sfx2/source/dialog/backingwindow.cxx:460
#2  0x00002aaaaeb76de0 in (anonymous namespace)::BackingComp::attachFrame
(this=0x739c340, xFrame=uno::Reference to ((anonymous namespace)::Frame *)
0x281aba8)
    at
/home/julien/compile-libreoffice/libreoffice/sfx2/source/dialog/backingcomp.cxx:436

bt 2:
#0  BackingWindow::initControls (this=0x75dd990) at
/home/julien/compile-libreoffice/libreoffice/sfx2/source/dialog/backingwindow.cxx:219
#1  0x00002aaaaeb7bf9c in BackingWindow::setOwningFrame (this=0x75dd990,
xFrame=uno::Reference to ((anonymous namespace)::Frame *) 0x281aba8)
    at
/home/julien/compile-libreoffice/libreoffice/sfx2/source/dialog/backingwindow.cxx:460
#2  0x00002aaaaeb76de0 in (anonymous namespace)::BackingComp::attachFrame
(this=0x6ebc610, xFrame=uno::Reference to ((anonymous namespace)::Frame *)
0x281aba8)
    at
/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


Sorry for this long description but thought it might pinpoint some locations
to improve for recent docs part.

Julien



--
View this message in context: 
http://nabble.documentfoundation.org/Trying-to-understand-some-points-in-RecentDocs-management-tp4140334.html
Sent from the Dev mailing list archive at Nabble.com.

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.