summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/objstor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc/objstor.cxx')
-rw-r--r--sfx2/source/doc/objstor.cxx24
1 files changed, 15 insertions, 9 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index d570e0b3e028..954df88eb949 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -797,15 +797,7 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed )
&& !( pPreviewItem && pPreviewItem->GetValue() )
&& !( pHiddenItem && pHiddenItem->GetValue() ) )
{
- INetURLObject aUrl( pMedium->GetOrigURL() );
-
- if ( aUrl.GetProtocol() == INET_PROT_FILE )
- {
- const SfxFilter* pOrgFilter = pMedium->GetOrigFilter();
- Application::AddToRecentDocumentList(
- aUrl.GetURLNoPass( INetURLObject::NO_DECODE ),
- (pOrgFilter) ? pOrgFilter->GetMimeType() : String() );
- }
+ AddToRecentlyUsedList();
}
}
@@ -2121,9 +2113,23 @@ sal_Bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed )
pMedium->ClearBackup_Impl();
pMedium->LockOrigFileOnDemand( sal_True, sal_False );
+ AddToRecentlyUsedList();
+
return bOk;
}
+void SfxObjectShell::AddToRecentlyUsedList()
+{
+ INetURLObject aUrl( pMedium->GetOrigURL() );
+
+ if ( aUrl.GetProtocol() == INET_PROT_FILE )
+ {
+ const SfxFilter* pOrgFilter = pMedium->GetOrigFilter();
+ Application::AddToRecentDocumentList( aUrl.GetURLNoPass( INetURLObject::NO_DECODE ),
+ (pOrgFilter) ? pOrgFilter->GetMimeType() : String() );
+ }
+}
+
//-------------------------------------------------------------------------
sal_Bool SfxObjectShell::ConvertFrom