diff options
author | Aditya <adityasahu1511@gmail.com> | 2020-06-17 16:43:49 +0530 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-06-17 15:36:06 +0200 |
commit | f9383f75af46efbb319110921158dcd6b5e91913 (patch) | |
tree | c0463b347bf157df7cee36ddcef05c5220507606 /include/svx | |
parent | 27381dc1b76e4aee5459b3d85e6fc5919d2b8f98 (diff) |
svx: Refactor GalleryTheme class
Change-Id: I60ce3b5a9ca5a28e499015c3ac118d2f6a091f16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96527
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/svx')
-rw-r--r-- | include/svx/gallery1.hxx | 13 | ||||
-rw-r--r-- | include/svx/gallerybinaryengine.hxx | 7 | ||||
-rw-r--r-- | include/svx/galtheme.hxx | 1 |
3 files changed, 15 insertions, 6 deletions
diff --git a/include/svx/gallery1.hxx b/include/svx/gallery1.hxx index 0cb9700f5462..f34a707cd712 100644 --- a/include/svx/gallery1.hxx +++ b/include/svx/gallery1.hxx @@ -36,7 +36,7 @@ class GalleryThemeEntry { private: - GalleryBinaryEngine maGalleryBinaryEngine; + std::unique_ptr<GalleryBinaryEngine> mpGalleryBinaryEngine; OUString aName; sal_uInt32 nId; bool bReadOnly; @@ -50,12 +50,15 @@ public: bool bReadOnly, bool bNewFile, sal_uInt32 nId, bool bThemeNameFromResource ); + static std::unique_ptr<GalleryBinaryEngine> createGalleryBinaryEngine(); + const std::unique_ptr<GalleryBinaryEngine>& getGalleryBinaryEngine() const { return mpGalleryBinaryEngine; } + const OUString& GetThemeName() const { return aName; } - const INetURLObject& GetThmURL() const { return maGalleryBinaryEngine.GetThmURL(); } - const INetURLObject& GetSdgURL() const { return maGalleryBinaryEngine.GetSdgURL(); } - const INetURLObject& GetSdvURL() const { return maGalleryBinaryEngine.GetSdvURL(); } - const INetURLObject& GetStrURL() const { return maGalleryBinaryEngine.GetStrURL(); } + const INetURLObject& GetThmURL() const { return mpGalleryBinaryEngine->GetThmURL(); } + const INetURLObject& GetSdgURL() const { return mpGalleryBinaryEngine->GetSdgURL(); } + const INetURLObject& GetSdvURL() const { return mpGalleryBinaryEngine->GetSdvURL(); } + const INetURLObject& GetStrURL() const { return mpGalleryBinaryEngine->GetStrURL(); } bool IsReadOnly() const { return bReadOnly; } bool IsDefault() const; diff --git a/include/svx/gallerybinaryengine.hxx b/include/svx/gallerybinaryengine.hxx index 15aa8957d510..f658b248735c 100644 --- a/include/svx/gallerybinaryengine.hxx +++ b/include/svx/gallerybinaryengine.hxx @@ -21,6 +21,9 @@ #include <tools/urlobj.hxx> #include <svx/svxdllapi.h> +#include <svx/galtheme.hxx> + +struct GalleryObject; class SVXCORE_DLLPUBLIC GalleryBinaryEngine { @@ -46,6 +49,10 @@ public: const INetURLObject& GetSdgURL() const { return aSdgURL; } const INetURLObject& GetSdvURL() const { return aSdvURL; } const INetURLObject& GetStrURL() const { return aStrURL; } + + bool ImplWriteSgaObject(const SgaObject& rObj, sal_uInt32 nPos, GalleryObject* pExistentEntry, + OUString& aDestDir, + ::std::vector<std::unique_ptr<GalleryObject>>& aObjectList); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx index c7c248d22344..3af46ca2431e 100644 --- a/include/svx/galtheme.hxx +++ b/include/svx/galtheme.hxx @@ -87,7 +87,6 @@ private: SAL_DLLPRIVATE void ImplCreateSvDrawStorage(); std::unique_ptr<SgaObject> ImplReadSgaObject( GalleryObject const * pEntry ); - SAL_DLLPRIVATE bool ImplWriteSgaObject(const SgaObject& rObj, sal_uInt32 nPos, GalleryObject* pExistentEntry); SAL_DLLPRIVATE void ImplWrite(); SAL_DLLPRIVATE const GalleryObject* ImplGetGalleryObject(sal_uInt32 nPos) const { |