diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-06-27 14:46:36 +1000 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-06-27 08:42:29 +0200 |
commit | b8ecabc07a04537a1d1f317c83556e9d58abd318 (patch) | |
tree | 674246d3390c2fbe76c20654ea9c3827c06cc198 /shell/inc | |
parent | db9965054d90c16f5c00a7726f2876301d4e3c2c (diff) |
Register versions from 1 to 5 for SharePoint OpenDocuments object
This is required fro two reasons:
1. For our custom LOSPSupport.OpenDocuments, it allows SharePoint site's
js code to properly find out the supported methods of the object.
Previously we only registered v.1 for it, and that made SharePoint to
assume that only older subset of methods is supported.
2. For SharePoint.OpenDocuments, which is used to register MS component
to point to our implementation, leaving out v.4 and v.5 made problems on
systems with co-existing MS Office; leftover registration of v.4 and v.5
resulted in mixed results: when opened from web view, documents used MS
ActiveX, while for documents opened from list view in SharePoint, our
ActiveX was used. Registering all versions produces consistent results.
Change-Id: I7e8d4216cce1708e676c834a465654751f079c89
Reviewed-on: https://gerrit.libreoffice.org/74776
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'shell/inc')
-rw-r--r-- | shell/inc/spsupp/registrar.hpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/shell/inc/spsupp/registrar.hpp b/shell/inc/spsupp/registrar.hpp index b055ac8b0d42..920e076de97c 100644 --- a/shell/inc/spsupp/registrar.hpp +++ b/shell/inc/spsupp/registrar.hpp @@ -10,6 +10,8 @@ #ifndef INCLUDED_SHELL_INC_SPSUPP_REGISTRAR_H #define INCLUDED_SHELL_INC_SPSUPP_REGISTRAR_H +#include <initializer_list> + #if !defined WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN #endif @@ -18,16 +20,25 @@ class Registrar { public: explicit Registrar(REFIID riidCLSID); + // First version in list becomes default HRESULT RegisterObject(REFIID riidTypeLib, const wchar_t* sProgram, const wchar_t* sComponent, - int nVersion, - const wchar_t* Path, + std::initializer_list<int> aVersions, + const wchar_t* Path); + HRESULT UnRegisterObject(const wchar_t* sProgram, const wchar_t* sComponent, + std::initializer_list<int> aVersions); + // First version in list becomes the default + HRESULT RegisterProgIDs(const wchar_t* sProgram, const wchar_t* sComponent, + std::initializer_list<int> aVersions); + HRESULT UnRegisterProgIDs(const wchar_t* sProgram, const wchar_t* sComponent, + std::initializer_list<int> aVersions); + +private: + HRESULT RegisterProgID(const wchar_t* sProgram, const wchar_t* sComponent, int nVersion, bool bSetDefault); - HRESULT UnRegisterObject(const wchar_t* sProgram, const wchar_t* sComponent, int nVersion); - HRESULT RegisterProgID(const wchar_t* sProgram, const wchar_t* sComponent, int nVersion, bool bSetDefault); HRESULT UnRegisterProgID(const wchar_t* sProgram, const wchar_t* sComponent, int nVersion); -private: + static const size_t nGUIDlen = 40; wchar_t m_sCLSID[nGUIDlen]; HRESULT m_ConstructionResult; |