[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



Patch link:

Patch Review:

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,
    . 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

= 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.


More information about the LibreOffice mailing list