[ooo-build-commit] .: patches/dev300

Radek Doulík rodo at kemper.freedesktop.org
Thu Mar 4 07:30:48 PST 2010


 patches/dev300/apply                                     |    1 
 patches/dev300/sfx2-add-to-recently-used-after-save.diff |   57 +++++++++++++++
 2 files changed, 58 insertions(+)

New commits:
commit dfbf6899dcee9b528835cb8cbb0f2e51e2d701b6
Author: Radek Doulik <rodo at novell.com>
Date:   Thu Mar 4 16:29:55 2010 +0100

    add an entry to recently used list when document is saved
    
     - helps with thumbnail generation in file managers
    
    * patches/dev300/apply:
    * patches/dev300/sfx2-add-to-recently-used-after-save.diff:

diff --git a/patches/dev300/apply b/patches/dev300/apply
index b889f77..bff6270 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3644,6 +3644,7 @@ vcl-xinerama-clone-fix.diff, n#578730, thorsten
 basegfx-colorspace-fix.diff, i#109364, thorsten
 vbahelper-optionality-fix.diff, i#108853, ericb
 vcl-gtk-process-events-on-exit.diff, rodo
+sfx2-add-to-recently-used-after-save.diff, rodo
 
 [ Toolbars ]
 SectionOwner => cbosdo
diff --git a/patches/dev300/sfx2-add-to-recently-used-after-save.diff b/patches/dev300/sfx2-add-to-recently-used-after-save.diff
new file mode 100644
index 0000000..40fabf4
--- /dev/null
+++ b/patches/dev300/sfx2-add-to-recently-used-after-save.diff
@@ -0,0 +1,57 @@
+diff -rup sfx2-orig/inc/sfx2/objsh.hxx sfx2/inc/sfx2/objsh.hxx
+--- sfx2-orig/inc/sfx2/objsh.hxx	2010-03-04 11:39:35.000000000 +0100
++++ sfx2/inc/sfx2/objsh.hxx	2010-03-04 15:27:38.000000000 +0100
+@@ -257,6 +257,9 @@ protected:
+     /// template method, called by FlushDocInfo; this implementation is empty
+     virtual void                DoFlushDocInfo();
+ 
++    // helper method
++    void AddToRecentlyUsedList();
++
+ public:
+                                 TYPEINFO();
+                                 SFX_DECL_INTERFACE(SFX_INTERFACE_SFXDOCSH)
+diff -rup sfx2-orig/source/doc/objstor.cxx sfx2/source/doc/objstor.cxx
+--- sfx2-orig/source/doc/objstor.cxx	2010-03-04 11:39:31.000000000 +0100
++++ sfx2/source/doc/objstor.cxx	2010-03-04 15:30:43.000000000 +0100
+@@ -1010,15 +1010,7 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedi
+             && !( 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();
+             }
+         }
+ 
+@@ -2413,9 +2405,23 @@ sal_Bool SfxObjectShell::DoSaveCompleted
+     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


More information about the ooo-build-commit mailing list