summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/docmodel/uno/UnoTheme.hxx17
-rw-r--r--include/oox/drawingml/theme.hxx2
-rw-r--r--include/oox/export/ThemeExport.hxx7
-rw-r--r--include/svx/dialog/ThemeDialog.hxx6
-rw-r--r--include/svx/svdmodel.hxx4
-rw-r--r--include/svx/svdpage.hxx8
6 files changed, 29 insertions, 15 deletions
diff --git a/include/docmodel/uno/UnoTheme.hxx b/include/docmodel/uno/UnoTheme.hxx
index f1abc4ccaede..4ca033b8e9c4 100644
--- a/include/docmodel/uno/UnoTheme.hxx
+++ b/include/docmodel/uno/UnoTheme.hxx
@@ -19,20 +19,24 @@
#include <utility>
#include <docmodel/dllapi.h>
-#include <docmodel/theme/Theme.hxx>
+
+namespace model
+{
+class Theme;
+}
class DOCMODEL_DLLPUBLIC UnoTheme final : public cppu::WeakImplHelper<css::util::XTheme>
{
private:
- model::Theme maTheme;
+ std::shared_ptr<model::Theme> mpTheme;
public:
- UnoTheme(model::Theme const& rTheme)
- : maTheme(rTheme)
+ UnoTheme(std::shared_ptr<model::Theme> const& pTheme)
+ : mpTheme(pTheme)
{
}
- model::Theme const& getTheme() const { return maTheme; }
+ std::shared_ptr<model::Theme> const& getTheme() const { return mpTheme; }
// XTheme
OUString SAL_CALL getName() override;
@@ -41,6 +45,7 @@ public:
namespace model::theme
{
-DOCMODEL_DLLPUBLIC css::uno::Reference<css::util::XTheme> createXTheme(model::Theme const& rTheme);
+DOCMODEL_DLLPUBLIC css::uno::Reference<css::util::XTheme>
+createXTheme(std::shared_ptr<model::Theme> const& pTheme);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/oox/drawingml/theme.hxx b/include/oox/drawingml/theme.hxx
index a779472b5331..c2408ec1c015 100644
--- a/include/oox/drawingml/theme.hxx
+++ b/include/oox/drawingml/theme.hxx
@@ -107,7 +107,7 @@ public:
const css::uno::Reference<css::xml::dom::XDocument>& getFragment() const { return mxFragment; }
void setFragment( const css::uno::Reference< css::xml::dom::XDocument>& xRef ) { mxFragment=xRef; }
- std::unique_ptr<model::Theme> createSvxTheme() const;
+ std::shared_ptr<model::Theme> createSvxTheme() const;
void addTheme(const css::uno::Reference<css::drawing::XDrawPage>& xDrawPage) const;
private:
diff --git a/include/oox/export/ThemeExport.hxx b/include/oox/export/ThemeExport.hxx
index 69f048afbaa0..1889709ab352 100644
--- a/include/oox/export/ThemeExport.hxx
+++ b/include/oox/export/ThemeExport.hxx
@@ -12,7 +12,12 @@
#include <sal/config.h>
#include <oox/dllapi.h>
#include <oox/core/xmlfilterbase.hxx>
-#include <docmodel/theme/Theme.hxx>
+
+namespace model
+{
+class Theme;
+class FontScheme;
+}
namespace oox
{
diff --git a/include/svx/dialog/ThemeDialog.hxx b/include/svx/dialog/ThemeDialog.hxx
index 5d3fdc70f250..aa068f9528c1 100644
--- a/include/svx/dialog/ThemeDialog.hxx
+++ b/include/svx/dialog/ThemeDialog.hxx
@@ -11,11 +11,15 @@
#include <svx/svxdllapi.h>
#include <vcl/weld.hxx>
-#include <docmodel/theme/Theme.hxx>
#include <svx/svdpage.hxx>
#include <svx/theme/IThemeColorChanger.hxx>
#include <svx/dialog/ThemeColorValueSet.hxx>
+namespace model
+{
+class Theme;
+}
+
namespace svx
{
class SVX_DLLPUBLIC ThemeDialog final : public weld::GenericDialogController
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index fe216d569919..69beb4646175 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -538,8 +538,8 @@ public:
SfxStyleSheetBasePool* GetStyleSheetPool() const { return mxStyleSheetPool.get(); }
void SetStyleSheetPool(SfxStyleSheetBasePool* pPool) { mxStyleSheetPool=pPool; }
- void setTheme(std::unique_ptr<model::Theme> pTheme);
- std::unique_ptr<model::Theme> const& getTheme() const;
+ void setTheme(std::shared_ptr<model::Theme> const& pTheme);
+ std::shared_ptr<model::Theme> const& getTheme() const;
void SetStarDrawPreviewMode(bool bPreview);
bool IsStarDrawPreviewMode() const { return m_bStarDrawPreviewMode; }
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index fde15ccedcd9..7443c408814d 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -30,7 +30,6 @@
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
#include <svx/svdobj.hxx>
-#include <docmodel/theme/Theme.hxx>
#include <unotools/weakref.hxx>
#include <memory>
#include <optional>
@@ -39,6 +38,7 @@
// predefines
+namespace model { class Theme; }
namespace reportdesign { class OSection; }
namespace sdr::contact { class ViewContact; }
class SdrPage;
@@ -317,7 +317,7 @@ private:
// data
SdrPage* mpSdrPage;
SfxStyleSheet* mpStyleSheet;
- std::unique_ptr<model::Theme> mpTheme;
+ std::shared_ptr<model::Theme> mpTheme;
SfxItemSet maProperties;
// internal helpers
@@ -346,8 +346,8 @@ public:
void SetStyleSheet(SfxStyleSheet* pStyleSheet);
SfxStyleSheet* GetStyleSheet() const { return mpStyleSheet;}
- void SetTheme(std::unique_ptr<model::Theme> pTheme);
- std::unique_ptr<model::Theme> const& GetTheme() const;
+ void SetTheme(std::shared_ptr<model::Theme> const& pTheme);
+ std::shared_ptr<model::Theme> const& GetTheme() const;
void dumpAsXml(xmlTextWriterPtr pWriter) const;
};