summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/gallery1.hxx13
-rw-r--r--include/svx/gallerybinaryengine.hxx6
-rw-r--r--include/svx/gallerybinaryengineentry.hxx7
-rw-r--r--include/svx/gallerybinarystoragelocations.hxx52
-rw-r--r--include/svx/gallerystoragelocations.hxx25
5 files changed, 70 insertions, 33 deletions
diff --git a/include/svx/gallery1.hxx b/include/svx/gallery1.hxx
index 6d3e7bbd105d..41b71c1c6130 100644
--- a/include/svx/gallery1.hxx
+++ b/include/svx/gallery1.hxx
@@ -39,7 +39,7 @@ class GalleryThemeEntry
private:
std::unique_ptr<GalleryBinaryEngineEntry> mpGalleryStorageEngineEntry;
- GalleryStorageLocations maGalleryStorageLocations;
+ std::unique_ptr<GalleryStorageLocations> mpGalleryStorageLocations;
OUString aName;
sal_uInt32 nId;
bool bReadOnly;
@@ -56,14 +56,15 @@ public:
std::unique_ptr<GalleryBinaryEngineEntry> createGalleryStorageEngineEntry();
const std::unique_ptr<GalleryBinaryEngineEntry>& getGalleryStorageEngineEntry() const { return mpGalleryStorageEngineEntry; }
- const GalleryStorageLocations& getGalleryStorageLocations() const { return maGalleryStorageLocations; }
+ static std::unique_ptr<GalleryStorageLocations> createGalleryStorageLocations();
+ const std::unique_ptr<GalleryStorageLocations>& getGalleryStorageLocations() const { return mpGalleryStorageLocations; }
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(); }
+ 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/gallerybinaryengine.hxx b/include/svx/gallerybinaryengine.hxx
index 46322f5b99bf..1e6fd0b28eb1 100644
--- a/include/svx/gallerybinaryengine.hxx
+++ b/include/svx/gallerybinaryengine.hxx
@@ -23,6 +23,7 @@
#include <svx/svxdllapi.h>
#include <svx/fmmodel.hxx>
#include <svx/gallerystoragelocations.hxx>
+#include <svx/gallerybinarystoragelocations.hxx>
#include <svx/galleryfilestorage.hxx>
#include <tools/urlobj.hxx>
#include <sot/storage.hxx>
@@ -33,6 +34,7 @@
#include <memory>
class GalleryStorageLocations;
+class GalleryBinaryStorageLocations;
class GalleryObjectCollection;
class SgaObjectSvDraw;
class SgaObjectBmp;
@@ -47,7 +49,7 @@ class SVXCORE_DLLPUBLIC GalleryBinaryEngine : public GalleryFileStorage
{
private:
tools::SvRef<SotStorage> m_aSvDrawStorageRef;
- const GalleryStorageLocations& maGalleryStorageLocations;
+ const GalleryBinaryStorageLocations& maGalleryStorageLocations;
GalleryObjectCollection& mrGalleryObjectCollection;
bool mbReadOnly;
OUString m_aDestDir;
@@ -59,7 +61,7 @@ private:
const INetURLObject& GetThmURL() const { return maGalleryStorageLocations.GetThmURL(); }
public:
- GalleryBinaryEngine(const GalleryStorageLocations& rGalleryStorageLocations,
+ GalleryBinaryEngine(const GalleryBinaryStorageLocations& rGalleryStorageLocations,
GalleryObjectCollection& rGalleryObjectCollection, bool bReadOnly);
SAL_DLLPRIVATE ~GalleryBinaryEngine();
diff --git a/include/svx/gallerybinaryengineentry.hxx b/include/svx/gallerybinaryengineentry.hxx
index e2561ce764dd..8039661e4dec 100644
--- a/include/svx/gallerybinaryengineentry.hxx
+++ b/include/svx/gallerybinaryengineentry.hxx
@@ -24,17 +24,18 @@
#include <svx/galtheme.hxx>
#include <svx/gallerybinaryengine.hxx>
#include <svx/gallerystoragelocations.hxx>
+#include <svx/gallerybinarystoragelocations.hxx>
#include <svx/galleryfilestorageentry.hxx>
-class GalleryStorageLocations;
+class GalleryBinaryStorageLocations;
class GalleryBinaryEngineEntry : public GalleryFileStorageEntry
{
private:
- GalleryStorageLocations& m_rGalleryStorageLocations;
+ GalleryBinaryStorageLocations& m_rGalleryStorageLocations;
public:
- GalleryBinaryEngineEntry(GalleryStorageLocations& rGalleryStorageLocations);
+ GalleryBinaryEngineEntry(GalleryBinaryStorageLocations& rGalleryStorageLocations);
static void CreateUniqueURL(const INetURLObject& rBaseURL, INetURLObject& aURL);
OUString ReadStrFromIni(const OUString& aKeyName);
diff --git a/include/svx/gallerybinarystoragelocations.hxx b/include/svx/gallerybinarystoragelocations.hxx
new file mode 100644
index 000000000000..c744ea610577
--- /dev/null
+++ b/include/svx/gallerybinarystoragelocations.hxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <tools/urlobj.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/gallerystoragelocations.hxx>
+
+class GalleryBinaryStorageLocations : public GalleryStorageLocations
+{
+private:
+ INetURLObject maThmURL;
+ INetURLObject maSdgURL;
+ INetURLObject maSdvURL;
+ INetURLObject maStrURL;
+
+ void SetThmExtension(INetURLObject& aURL);
+ void SetSdgExtension(INetURLObject& aURL);
+ void SetSdvExtension(INetURLObject& aURL);
+ void SetStrExtension(INetURLObject& aURL);
+
+public:
+ static INetURLObject ImplGetURLIgnoreCase(const INetURLObject& rURL);
+
+ const INetURLObject& GetThmURL() const { return maThmURL; }
+ const INetURLObject& GetSdgURL() const { return maSdgURL; }
+ const INetURLObject& GetSdvURL() const { return maSdvURL; }
+ const INetURLObject& GetStrURL() const { return maStrURL; }
+
+ void SetStorageLocations(INetURLObject& aURL);
+
+ const INetURLObject& getThemeURL() const { return maSdgURL; }
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/gallerystoragelocations.hxx b/include/svx/gallerystoragelocations.hxx
index dbc96207d11d..0e15c35bab70 100644
--- a/include/svx/gallerystoragelocations.hxx
+++ b/include/svx/gallerystoragelocations.hxx
@@ -20,32 +20,13 @@
#pragma once
#include <tools/urlobj.hxx>
-#include <svx/svxdllapi.h>
class GalleryStorageLocations
{
-private:
- INetURLObject maThmURL;
- INetURLObject maSdgURL;
- INetURLObject maSdvURL;
- INetURLObject maStrURL;
-
public:
- static INetURLObject ImplGetURLIgnoreCase(const INetURLObject& rURL);
-
- const INetURLObject& GetThmURL() const { return maThmURL; }
- const INetURLObject& GetSdgURL() const { return maSdgURL; }
- const INetURLObject& GetSdvURL() const { return maSdvURL; }
- const INetURLObject& GetStrURL() const { return maStrURL; }
-
- void SetThmExtension(INetURLObject& aURL);
- void SetSdgExtension(INetURLObject& aURL);
- void SetSdvExtension(INetURLObject& aURL);
- void SetStrExtension(INetURLObject& aURL);
-
- void SetStorageLocations(INetURLObject& aURL);
-
- const INetURLObject& getThemeURL() const { return maSdgURL; }
+ virtual ~GalleryStorageLocations() = 0;
+ virtual void SetStorageLocations(INetURLObject& aURL) = 0;
+ virtual const INetURLObject& getThemeURL() const = 0;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */