[PATCH] fdo#37775 - EasyHack: Recent Documents not updated by Save & Save As...

Muhammad Haggag mhaggag at gmail.com
Wed Feb 8 05:06:31 PST 2012


Hello,

Bug:
https://bugs.freedesktop.org/show_bug.cgi?id=37775

Patch link:
https://bugs.freedesktop.org/attachment.cgi?id=56740

Patch Review:
https://bugs.freedesktop.org/page.cgi?id=splinter.html&bug=37775&attachment=56740

Changes (copied from patch):
This patch changes LO behavior so that we update recent documents on
file open, save, save as, save all, and close. The previous behavior
was to only update the list on document close.

= Changes =
SfxPickList (sfxpicklist.cxx/hxx):
    . Extracted the logic to add a document to the "Recent Documents"
list into a function of its own: AddDocumentToPickList
        - Simplified the logic used by removing the check of
SfxObjectShell_impl::bWaitingForPickList (see
SfxObjectShell_impl::bWaitingForPickList below for details)
    . Modified SfxPickList::Notify to call the aforementioned function
on open, save, save-to, and save-as.

SfxObjectShell::APISaveAs_Impl (objserv.cxx):
    . Modified it to allow picklist entry when doing "Save As".

SfxObjectShell_impl::bWaitingForPickList (objstor.cxx, objxtor.cxx,
objshimp.hxx):
    . Removed this flag. It was used to indicate that a document wants
to be added to the picklist, then cleared after it's added. Since we
now always add documents to the picklist on saving, we no longer need
it.

= Verification =
The change is in sfx2, so it should apply to all LO apps. I verified
the new behavior in both writer and calc with the following actions:
    . File->Open
    . Open through File->Recent Documents->File Entry
    . File->Save
    . File->Save As
    . File->Save All
    . File->Close

I tested saving both odt and docx for writer.

Regards,
--Muhammad


More information about the LibreOffice mailing list