[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - include/vcl sfx2/source vcl/aqua vcl/headless vcl/inc vcl/source vcl/unx vcl/win

Fridrich Å trba fridrich.strba at bluewin.ch
Mon Jul 29 01:25:05 PDT 2013


 include/vcl/svapp.hxx            |    2 +-
 sfx2/source/appl/sfxpicklist.cxx |    4 +++-
 sfx2/source/doc/objstor.cxx      |    3 ++-
 vcl/aqua/source/app/salinst.cxx  |    2 +-
 vcl/headless/svpinst.cxx         |    2 +-
 vcl/inc/aqua/salinst.h           |    2 +-
 vcl/inc/headless/svpinst.hxx     |    2 +-
 vcl/inc/salinst.hxx              |    2 +-
 vcl/inc/unx/gtk/gtkinst.hxx      |    2 +-
 vcl/inc/unx/salinst.h            |    2 +-
 vcl/inc/win/salinst.h            |    2 +-
 vcl/source/app/svapp.cxx         |    4 ++--
 vcl/unx/generic/app/salinst.cxx  |    6 +++---
 vcl/unx/gtk/app/gtkinst.cxx      |    5 +++--
 vcl/win/source/app/salinst.cxx   |    2 +-
 15 files changed, 23 insertions(+), 19 deletions(-)

New commits:
commit ec913f9549ed6fcdcb7306214594227337d274e0
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Sun Jul 28 13:53:02 2013 +0200

    Make AddToRecentDocumentList aware of the DocumentService
    
    This information helps to map a document with an application ID
    needed for Windows 7 shell integration.
    
    (cherry picked from commit a9ae9aefe8384a81dd79827cb76daa9ed8b58dbc)
    
    Conflicts:
    	helpcontent2
    
    Change-Id: I1224f566037ab7597a29b16f310f93d9f5441cce
    
    WaE: unused rDocumentService in one ifdef branch
    
    Change-Id: I542cf23c8077d9f867a2d890dc326465fce8c3a3
    (cherry picked from commit 0354b4335b5c4fcf65d954e03116c44aabe7fa1d)
    Reviewed-on: https://gerrit.libreoffice.org/5161
    Reviewed-by: Luboš Luňák <l.lunak at suse.cz>
    Tested-by: Luboš Luňák <l.lunak at suse.cz>

diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 1ee4c7d..101de7a 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -370,7 +370,7 @@ public:
           If an empty string will be provided "application/octet-stream"
           will be used.
     */
-    static void AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType);
+    static void AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService);
 
     /** Do we have a native / system file selector available ?
      */
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index a32cfee..32b3ea5 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -197,7 +197,9 @@ void SfxPickList::AddDocumentToPickList( SfxObjectShell* pDocSh )
             OUString() );
 
     if ( aURL.GetProtocol() == INET_PROT_FILE )
-        Application::AddToRecentDocumentList( aURL.GetURLNoPass( INetURLObject::NO_DECODE ), (pFilter) ? pFilter->GetMimeType() : OUString() );
+        Application::AddToRecentDocumentList( aURL.GetURLNoPass( INetURLObject::NO_DECODE ),
+                                                                 (pFilter) ? pFilter->GetMimeType() : OUString(),
+                                                                 (pFilter) ? pFilter->GetServiceName() : OUString() );
 }
 
 SfxPickList& SfxPickList::Get()
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index c57c79a..660b843 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2108,7 +2108,8 @@ void SfxObjectShell::AddToRecentlyUsedList()
     {
         const SfxFilter* pOrgFilter = pMedium->GetOrigFilter();
         Application::AddToRecentDocumentList( aUrl.GetURLNoPass( INetURLObject::NO_DECODE ),
-                                              (pOrgFilter) ? pOrgFilter->GetMimeType() : OUString() );
+                                              (pOrgFilter) ? pOrgFilter->GetMimeType() : OUString(),
+                                              (pOrgFilter) ? pOrgFilter->GetServiceName() : OUString() );
     }
 }
 
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index 4ccfc97..167dca5 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -1051,7 +1051,7 @@ static bool isDangerousUrl( const OUString& rUrl )
     return false;
 }
 
-void AquaSalInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUString& /*rMimeType*/)
+void AquaSalInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUString& /*rMimeType*/, const OUString& /*rDocumentService*/)
 {
     // Convert file URL for external use (see above)
     OUString externalUrl = translateToExternalUrl(rFileUrl);
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index f74d37d..340f4f4 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -382,7 +382,7 @@ void SvpSalInstance::StartTimer( sal_uLong nMS )
     }
 }
 
-void SvpSalInstance::AddToRecentDocumentList(const OUString&, const OUString&)
+void SvpSalInstance::AddToRecentDocumentList(const OUString&, const OUString&, const OUString&)
 {
 }
 
diff --git a/vcl/inc/aqua/salinst.h b/vcl/inc/aqua/salinst.h
index 441cbef..72c0000 100644
--- a/vcl/inc/aqua/salinst.h
+++ b/vcl/inc/aqua/salinst.h
@@ -119,7 +119,7 @@ public:
     virtual void                DestroyMenuItem( SalMenuItem* );
     virtual SalSession*         CreateSalSession();
     virtual void*               GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
-    virtual void                AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType);
+    virtual void                AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService);
     virtual void            SetEventCallback( void* pInstance, bool(*pCallback)(void*,void*,int) );
     virtual void            SetErrorEventCallback( void* pInstance, bool(*pCallback)(void*,void*,int) );
 
diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx
index 7f625e8..af0c680 100644
--- a/vcl/inc/headless/svpinst.hxx
+++ b/vcl/inc/headless/svpinst.hxx
@@ -158,7 +158,7 @@ public:
 
     virtual void*           GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
 
-    virtual void            AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType);
+    virtual void            AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService);
 
     virtual GenPspGraphics *CreatePrintGraphics();
 };
diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx
index ca304ca..ba9a9b5 100644
--- a/vcl/inc/salinst.hxx
+++ b/vcl/inc/salinst.hxx
@@ -159,7 +159,7 @@ public:
                             CreateDragSource();
     virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
                             CreateDropTarget();
-    virtual void            AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType) = 0;
+    virtual void            AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) = 0;
 
     virtual bool            hasNativeFileSelection() const { return false; }
 
diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index b97ffa2..cf901cc 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -79,7 +79,7 @@ public:
     virtual SalMenuItem*        CreateMenuItem( const SalItemParams* );
     virtual void                DestroyMenuItem( SalMenuItem* pItem );
     virtual SalTimer*           CreateSalTimer();
-    virtual void                AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType);
+    virtual void                AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService);
     virtual SalVirtualDevice*   CreateVirtualDevice( SalGraphics*,
                                                      long nDX, long nDY,
                                                      sal_uInt16 nBitCount,
diff --git a/vcl/inc/unx/salinst.h b/vcl/inc/unx/salinst.h
index 3f8d06e..879dfad 100644
--- a/vcl/inc/unx/salinst.h
+++ b/vcl/inc/unx/salinst.h
@@ -79,7 +79,7 @@ public:
         CreateClipboard( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& i_rArguments );
     virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDragSource();
     virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDropTarget();
-    virtual void            AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType);
+    virtual void            AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService);
 };
 
 #endif // _SV_SALINST_H
diff --git a/vcl/inc/win/salinst.h b/vcl/inc/win/salinst.h
index 7defd4a..2b0dfaa 100644
--- a/vcl/inc/win/salinst.h
+++ b/vcl/inc/win/salinst.h
@@ -72,7 +72,7 @@ public:
     virtual void                DestroyMenuItem( SalMenuItem* );
     virtual SalSession*                         CreateSalSession();
     virtual void*               GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
-    virtual void                AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType);
+    virtual void                AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService);
 
     static int WorkaroundExceptionHandlingInUSER32Lib(int nExcept, LPEXCEPTION_POINTERS pExceptionInfo);
 };
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index de64b94..fa32a31 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1832,10 +1832,10 @@ const OUString& Application::GetDesktopEnvironment()
     return SalGetDesktopEnvironment();
 }
 
-void Application::AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType)
+void Application::AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService)
 {
     ImplSVData* pSVData = ImplGetSVData();
-    pSVData->mpDefInst->AddToRecentDocumentList(rFileUrl, rMimeType);
+    pSVData->mpDefInst->AddToRecentDocumentList(rFileUrl, rMimeType, rDocumentService);
 }
 
 bool InitAccessBridge( bool bShowCancel, bool &rCancelled )
diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx
index 27d1045..c9b8b94 100644
--- a/vcl/unx/generic/app/salinst.cxx
+++ b/vcl/unx/generic/app/salinst.cxx
@@ -311,11 +311,11 @@ void X11SalInstance::FillFontPathList( std::list< OString >& o_rFontPaths )
 
 extern "C" { static void SAL_CALL thisModule() {} }
 
-void X11SalInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType)
+void X11SalInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService)
 {
     const OUString SYM_ADD_TO_RECENTLY_USED_FILE_LIST("add_to_recently_used_file_list");
     const OUString LIB_RECENT_FILE("librecentfile.so");
-    typedef void (*PFUNC_ADD_TO_RECENTLY_USED_LIST)(const OUString&, const OUString&);
+    typedef void (*PFUNC_ADD_TO_RECENTLY_USED_LIST)(const OUString&, const OUString&, const OUString&);
 
     PFUNC_ADD_TO_RECENTLY_USED_LIST add_to_recently_used_file_list = 0;
 
@@ -324,7 +324,7 @@ void X11SalInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUS
     if (module.is())
         add_to_recently_used_file_list = (PFUNC_ADD_TO_RECENTLY_USED_LIST)module.getFunctionSymbol(SYM_ADD_TO_RECENTLY_USED_FILE_LIST);
     if (add_to_recently_used_file_list)
-        add_to_recently_used_file_list(rFileUrl, rMimeType);
+        add_to_recently_used_file_list(rFileUrl, rMimeType, rDocumentService);
 }
 
 void X11SalInstance::PostPrintersChanged()
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index b8afc3b..caca819 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -219,7 +219,7 @@ extern "C"
     typedef void(* addItemFnc)(void *, const char *);
 }
 
-void GtkInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType)
+void GtkInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService)
 {
     OString sGtkURL;
     rtl_TextEncoding aSystemEnc = osl_getThreadTextEncoding();
@@ -241,6 +241,7 @@ void GtkInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUStri
     GtkRecentManager *manager = gtk_recent_manager_get_default ();
     gtk_recent_manager_add_item (manager, sGtkURL.getStr());
     (void)rMimeType;
+    (void)rDocumentService;
 #else
     static getDefaultFnc sym_gtk_recent_manager_get_default =
         (getDefaultFnc)osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gtk_recent_manager_get_default" );
@@ -250,7 +251,7 @@ void GtkInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUStri
     if (sym_gtk_recent_manager_get_default && sym_gtk_recent_manager_add_item)
         sym_gtk_recent_manager_add_item(sym_gtk_recent_manager_get_default(), sGtkURL.getStr());
     else
-        X11SalInstance::AddToRecentDocumentList(rFileUrl, rMimeType);
+        X11SalInstance::AddToRecentDocumentList(rFileUrl, rMimeType, rDocumentService);
 #endif
 }
 
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index 7da838c..f5deb45 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -1017,7 +1017,7 @@ void* WinSalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturn
       @param aFileUrl
                 The file url of the document.
 */
-void WinSalInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUString& /*rMimeType*/)
+void WinSalInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUString& /*rMimeType*/, const OUString& /* rDocumentService */)
 {
     OUString system_path;
     osl::FileBase::RC rc = osl::FileBase::getSystemPathFromFileURL(rFileUrl, system_path);


More information about the Libreoffice-commits mailing list