summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/core/theme/ThemeTest.cxx1
-rw-r--r--sw/source/core/model/ThemeColorChanger.cxx1
-rw-r--r--sw/source/core/unocore/unodraw.cxx7
3 files changed, 5 insertions, 4 deletions
diff --git a/sw/qa/core/theme/ThemeTest.cxx b/sw/qa/core/theme/ThemeTest.cxx
index 5c95de1e7c38..f13063bc30ac 100644
--- a/sw/qa/core/theme/ThemeTest.cxx
+++ b/sw/qa/core/theme/ThemeTest.cxx
@@ -17,6 +17,7 @@
#include <IDocumentDrawModelAccess.hxx>
#include <svx/svdpage.hxx>
#include <docmodel/uno/UnoThemeColor.hxx>
+#include <docmodel/theme/Theme.hxx>
using namespace css;
diff --git a/sw/source/core/model/ThemeColorChanger.cxx b/sw/source/core/model/ThemeColorChanger.cxx
index 9424e016ab72..dd198c14723e 100644
--- a/sw/source/core/model/ThemeColorChanger.cxx
+++ b/sw/source/core/model/ThemeColorChanger.cxx
@@ -26,6 +26,7 @@
#include <svx/svdpage.hxx>
#include <svx/svditer.hxx>
#include <docmodel/uno/UnoThemeColor.hxx>
+#include <docmodel/theme/Theme.hxx>
#include <editeng/unoprnms.hxx>
#include <com/sun/star/text/XTextRange.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 90536712cb7e..7337ce297895 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -406,8 +406,7 @@ void SwFmDrawPage::setPropertyValue(const OUString& rPropertyName, const uno::An
if (aValue >>= xTheme)
{
auto& rUnoTheme = dynamic_cast<UnoTheme&>(*xTheme);
- std::unique_ptr<model::Theme> pTheme(new model::Theme(rUnoTheme.getTheme()));
- pPage->getSdrPageProperties().SetTheme(std::move(pTheme));
+ pPage->getSdrPageProperties().SetTheme(rUnoTheme.getTheme());
}
}
break;
@@ -443,9 +442,9 @@ uno::Any SwFmDrawPage::getPropertyValue(const OUString& rPropertyName)
{
css::uno::Reference<css::util::XTheme> xTheme;
- auto const& pTheme = GetSdrPage()->getSdrPageProperties().GetTheme();
+ auto pTheme = GetSdrPage()->getSdrPageProperties().GetTheme();
if (pTheme)
- xTheme = new UnoTheme(*pTheme);
+ xTheme = model::theme::createXTheme(pTheme);
aAny <<= xTheme;
}
break;