diff options
author | Aditya <adityasahu1511@gmail.com> | 2020-08-28 18:55:03 +0530 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-09-04 21:58:57 +0200 |
commit | 44e81831dfc194b60b6d0c89ba275669e23c443e (patch) | |
tree | 10fe8764a9cae80094d87b2f094ce48193b5d1ff | |
parent | 86099e6ec0a2ae72c560c5f2d8b2c3e482ce2e60 (diff) |
svx refactoring: Remove GalleryThemeEntry::GetThmURL() and others
Remove GalleryThemeEntry::GetThmURL(), GetSdvURL(), GetSdgURL(), GetStrURL
because they don't belong here because they deal with URL.
Change-Id: I5a36742c49793726505ebbf394d9410194c39e6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101547
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r-- | include/svx/gallery1.hxx | 5 | ||||
-rw-r--r-- | include/svx/gallerybinarystoragelocations.hxx | 2 | ||||
-rw-r--r-- | include/svx/gallerystoragelocations.hxx | 3 | ||||
-rw-r--r-- | svx/qa/unit/gallery/test_gallery.cxx | 36 |
4 files changed, 23 insertions, 23 deletions
diff --git a/include/svx/gallery1.hxx b/include/svx/gallery1.hxx index 41b71c1c6130..81d22ac1e5ae 100644 --- a/include/svx/gallery1.hxx +++ b/include/svx/gallery1.hxx @@ -61,11 +61,6 @@ public: const OUString& GetThemeName() const { return aName; } - const INetURLObject& GetThmURL() const { return mpGalleryStorageEngineEntry->GetThmURL(); } - const INetURLObject& GetSdgURL() const { return mpGalleryStorageEngineEntry->GetSdgURL(); } - const INetURLObject& GetSdvURL() const { return mpGalleryStorageEngineEntry->GetSdvURL(); } - const INetURLObject& GetStrURL() const { return mpGalleryStorageEngineEntry->GetStrURL(); } - bool IsReadOnly() const { return bReadOnly; } bool IsDefault() const; diff --git a/include/svx/gallerybinarystoragelocations.hxx b/include/svx/gallerybinarystoragelocations.hxx index c744ea610577..aefe1fcad3eb 100644 --- a/include/svx/gallerybinarystoragelocations.hxx +++ b/include/svx/gallerybinarystoragelocations.hxx @@ -23,7 +23,7 @@ #include <svx/svxdllapi.h> #include <svx/gallerystoragelocations.hxx> -class GalleryBinaryStorageLocations : public GalleryStorageLocations +class SVXCORE_DLLPUBLIC GalleryBinaryStorageLocations : public GalleryStorageLocations { private: INetURLObject maThmURL; diff --git a/include/svx/gallerystoragelocations.hxx b/include/svx/gallerystoragelocations.hxx index 0e15c35bab70..343ed0b7e77b 100644 --- a/include/svx/gallerystoragelocations.hxx +++ b/include/svx/gallerystoragelocations.hxx @@ -19,9 +19,10 @@ #pragma once +#include <svx/svxdllapi.h> #include <tools/urlobj.hxx> -class GalleryStorageLocations +class SVXCORE_DLLPUBLIC GalleryStorageLocations { public: virtual ~GalleryStorageLocations() = 0; diff --git a/svx/qa/unit/gallery/test_gallery.cxx b/svx/qa/unit/gallery/test_gallery.cxx index c423f900cd64..83ccf600ed36 100644 --- a/svx/qa/unit/gallery/test_gallery.cxx +++ b/svx/qa/unit/gallery/test_gallery.cxx @@ -15,6 +15,8 @@ #include <svx/gallery1.hxx> #include <svx/galtheme.hxx> +#include <svx/gallerybinarystoragelocations.hxx> +#include <svx/gallerystoragelocations.hxx> #include <galobj.hxx> #include <cppunit/TestAssert.h> @@ -255,6 +257,8 @@ void GalleryObjTest::TestGalleryThemeEntry() myThemeName); // Check URLs + GalleryBinaryStorageLocations& aGalleryBinaryStorageLocations + = dynamic_cast<GalleryBinaryStorageLocations&>(*mpThemeEntry->getGalleryStorageLocations()); INetURLObject aURL(aGalleryURL); aURL.Append(myThemeName); INetURLObject aThemeURL(aURL), aSdvURL(aURL), aSdgURL(aURL), aStrURL(aURL); @@ -262,22 +266,22 @@ void GalleryObjTest::TestGalleryThemeEntry() aSdvURL.setExtension("sdv"); aSdgURL.setExtension("sdg"); aStrURL.setExtension("str"); - CPPUNIT_ASSERT_EQUAL_MESSAGE( - "Theme URL doesn't match", - mpThemeEntry->GetThmURL().GetMainURL(INetURLObject::DecodeMechanism::Unambiguous), - aThemeURL.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous)); - CPPUNIT_ASSERT_EQUAL_MESSAGE( - "Sdv URL doesn't match", - mpThemeEntry->GetSdvURL().GetMainURL(INetURLObject::DecodeMechanism::Unambiguous), - aSdvURL.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous)); - CPPUNIT_ASSERT_EQUAL_MESSAGE( - "Sdg URL doesn't match", - mpThemeEntry->GetSdgURL().GetMainURL(INetURLObject::DecodeMechanism::Unambiguous), - aSdgURL.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous)); - CPPUNIT_ASSERT_EQUAL_MESSAGE( - "Str URL doesn't match", - mpThemeEntry->GetStrURL().GetMainURL(INetURLObject::DecodeMechanism::Unambiguous), - aStrURL.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Theme URL doesn't match", + aGalleryBinaryStorageLocations.GetThmURL().GetMainURL( + INetURLObject::DecodeMechanism::Unambiguous), + aThemeURL.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Sdv URL doesn't match", + aGalleryBinaryStorageLocations.GetSdvURL().GetMainURL( + INetURLObject::DecodeMechanism::Unambiguous), + aSdvURL.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Sdg URL doesn't match", + aGalleryBinaryStorageLocations.GetSdgURL().GetMainURL( + INetURLObject::DecodeMechanism::Unambiguous), + aSdgURL.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Str URL doesn't match", + aGalleryBinaryStorageLocations.GetStrURL().GetMainURL( + INetURLObject::DecodeMechanism::Unambiguous), + aStrURL.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous)); } void GalleryObjTest::TestInsertGalleryObject() |