diff options
author | Aditya <adityasahu1511@gmail.com> | 2020-08-27 15:55:46 +0530 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-09-04 14:59:58 +0200 |
commit | fa3f514f33d4beadabf8526278939ed51417918b (patch) | |
tree | 8903076cd276f848e859f4b3d86bb15c01e22e2f /include/svx | |
parent | 7dbd1cd44918c50f2540955f908cd0a96fce024c (diff) |
svx: Refactor Gallery::RemoveTheme()
Introduce GalleryTheme::removeTheme() and GalleryBinaryEngine::removeTheme()
Change-Id: Ic9c1b4fdb3e173d922635e5fd78d463e1f2c220a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101496
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/svx')
-rw-r--r-- | include/svx/gallery1.hxx | 2 | ||||
-rw-r--r-- | include/svx/gallerybinaryengine.hxx | 2 | ||||
-rw-r--r-- | include/svx/gallerybinaryengineentry.hxx | 2 | ||||
-rw-r--r-- | include/svx/gallerystoragelocations.hxx | 2 | ||||
-rw-r--r-- | include/svx/galtheme.hxx | 10 |
5 files changed, 10 insertions, 8 deletions
diff --git a/include/svx/gallery1.hxx b/include/svx/gallery1.hxx index f74a5b5882fb..3aa89cc4211d 100644 --- a/include/svx/gallery1.hxx +++ b/include/svx/gallery1.hxx @@ -78,6 +78,8 @@ public: sal_uInt32 GetId() const { return nId; } void SetId( sal_uInt32 nNewId, bool bResetThemeName ); + + void removeTheme(); }; class SfxListener; diff --git a/include/svx/gallerybinaryengine.hxx b/include/svx/gallerybinaryengine.hxx index bf13cecc9471..7423b7b29c95 100644 --- a/include/svx/gallerybinaryengine.hxx +++ b/include/svx/gallerybinaryengine.hxx @@ -19,7 +19,6 @@ #pragma once -#include <svx/galtheme.hxx> #include <svx/galmisc.hxx> #include <svx/svxdllapi.h> #include <svx/fmmodel.hxx> @@ -67,6 +66,7 @@ public: const INetURLObject& GetSdgURL() const { return maGalleryStorageLocations.GetSdgURL(); } const INetURLObject& GetSdvURL() const { return maGalleryStorageLocations.GetSdvURL(); } const INetURLObject& GetStrURL() const { return maGalleryStorageLocations.GetStrURL(); } + const INetURLObject& getThemeURL() const { return maGalleryStorageLocations.getThemeURL(); } SAL_DLLPRIVATE bool implWrite(const GalleryTheme& rTheme, const GalleryThemeEntry* pThm); diff --git a/include/svx/gallerybinaryengineentry.hxx b/include/svx/gallerybinaryengineentry.hxx index cd3023f71150..9b1f25a5b6b4 100644 --- a/include/svx/gallerybinaryengineentry.hxx +++ b/include/svx/gallerybinaryengineentry.hxx @@ -45,6 +45,8 @@ public: const INetURLObject& GetStrURL() const { return m_rGalleryStorageLocations.GetStrURL(); } static GalleryThemeEntry* CreateThemeEntry(const INetURLObject& rURL, bool bReadOnly); + + void removeTheme(); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/gallerystoragelocations.hxx b/include/svx/gallerystoragelocations.hxx index d2f4ab3fda48..dbc96207d11d 100644 --- a/include/svx/gallerystoragelocations.hxx +++ b/include/svx/gallerystoragelocations.hxx @@ -44,6 +44,8 @@ public: void SetStrExtension(INetURLObject& aURL); void SetStorageLocations(INetURLObject& aURL); + + const INetURLObject& getThemeURL() const { return maSdgURL; } }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx index 97e8d6b63985..c15d03d14b02 100644 --- a/include/svx/galtheme.hxx +++ b/include/svx/galtheme.hxx @@ -22,6 +22,7 @@ #include <svx/svxdllapi.h> #include <svx/galleryobjectcollection.hxx> +#include <svx/gallerybinaryengine.hxx> #include <tools/debug.hxx> #include <tools/urlobj.hxx> @@ -48,8 +49,6 @@ namespace unogallery class GalleryItem; } -class GalleryBinaryEngine; - class SVXCORE_DLLPUBLIC GalleryTheme : public SfxBroadcaster { friend class Gallery; @@ -97,11 +96,6 @@ public: // used for building gallery themes during compilation: void SetDestDir(const OUString& rDestDir, bool bRelative); - SAL_DLLPRIVATE const INetURLObject& GetThmURL() const; - const INetURLObject& GetSdgURL() const; - SAL_DLLPRIVATE const INetURLObject& GetSdvURL() const; - SAL_DLLPRIVATE const INetURLObject& GetStrURL() const; - sal_uInt32 GetId() const; SAL_DLLPRIVATE void SetId( sal_uInt32 nNewId, bool bResetThemeName ); @@ -162,6 +156,8 @@ public: DateTime getModificationDate() const; + const INetURLObject& getThemeURL() const { return mpGalleryStorageEngine->getThemeURL(); } + public: SAL_DLLPRIVATE SvStream& ReadData( SvStream& rIn ); |