diff options
author | Muhammad Haggag <mhaggag@gmail.com> | 2012-02-14 10:46:46 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-02-14 16:24:57 +0000 |
commit | 2e01faac3fa50f7036093583ae52f1584b3de55c (patch) | |
tree | 3076dcc848e0567258ae4900682634b2cc8eb894 /sfx2/source/doc | |
parent | 475d0c59c66fb7752d230f76130b17145aad0c12 (diff) |
fdo#37775: Recent Documents not updated by Save & Save As
This patch changes LO behavior so that we update recent documents on file 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 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->Save
. File->Save As
. File->Save All
. File->Close
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objxtor.cxx | 1 |
3 files changed, 0 insertions, 6 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 9563f58c417e..bce45ff33e3a 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -342,9 +342,6 @@ sal_Bool SfxObjectShell::APISaveAs_Impl aParams ); } - - // prevent picklist-entry - GetMedium()->SetUpdatePickList( sal_False ); } return bOk; diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index a4f165de5c1f..604d824f090b 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2605,8 +2605,6 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl if ( PreDoSaveAs_Impl(aURL.GetMainURL( INetURLObject::NO_DECODE ),aFilterName,aParams)) { - pImp->bWaitingForPicklist = sal_True; - // Update Data on media SfxItemSet *pSet = GetMedium()->GetItemSet(); pSet->ClearItem( SID_INTERACTIONHANDLER ); diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 89d42be7327e..1cda68be05ae 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -236,7 +236,6 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell ) ,bImportDone ( sal_False) ,bInPrepareClose( sal_False ) ,bPreparedForClose( sal_False ) - ,bWaitingForPicklist( sal_True ) ,bForbidReload( sal_False ) ,bBasicInitialized( sal_False ) ,bIsPrintJobCancelable( sal_True ) |