summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-07-28 13:53:02 +0200
committerLuboš Luňák <l.lunak@suse.cz>2013-07-29 08:24:44 +0000
commitec913f9549ed6fcdcb7306214594227337d274e0 (patch)
tree9ef5ab7871f7fd9ab6e1a73ed837a6a7aca96450
parenta3ba357d09ee7ae47f55d2f7eba364c4237037e8 (diff)
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@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
-rw-r--r--include/vcl/svapp.hxx2
-rw-r--r--sfx2/source/appl/sfxpicklist.cxx4
-rw-r--r--sfx2/source/doc/objstor.cxx3
-rw-r--r--vcl/aqua/source/app/salinst.cxx2
-rw-r--r--vcl/headless/svpinst.cxx2
-rw-r--r--vcl/inc/aqua/salinst.h2
-rw-r--r--vcl/inc/headless/svpinst.hxx2
-rw-r--r--vcl/inc/salinst.hxx2
-rw-r--r--vcl/inc/unx/gtk/gtkinst.hxx2
-rw-r--r--vcl/inc/unx/salinst.h2
-rw-r--r--vcl/inc/win/salinst.h2
-rw-r--r--vcl/source/app/svapp.cxx4
-rw-r--r--vcl/unx/generic/app/salinst.cxx6
-rw-r--r--vcl/unx/gtk/app/gtkinst.cxx5
-rw-r--r--vcl/win/source/app/salinst.cxx2
15 files changed, 23 insertions, 19 deletions
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 1ee4c7dcdd0d..101de7a07a4c 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 a32cfee1fe78..32b3ea561bad 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 c57c79a45549..660b843ce1f1 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 4ccfc978c5d3..167dca5fc8fc 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 f74d37d74ab8..340f4f4601a1 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 441cbefdab6c..72c000006bca 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 7f625e86f4de..af0c68051008 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 ca304cae1daa..ba9a9b5b2c14 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 b97ffa2788ff..cf901ccd3848 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 3f8d06e1eb24..879dfad348fa 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 7defd4a95fcc..2b0dfaa1bc0a 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 de64b9484ad2..fa32a318d738 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 27d10456b726..c9b8b943b08d 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 b8afc3bed808..caca8190a764 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 7da838c058dd..f5deb4598b10 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);