diff options
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdmodel.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdpage.cxx | 7 |
2 files changed, 8 insertions, 7 deletions
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 6f243113c0e1..c3716a4a3efa 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -88,7 +88,7 @@ struct SdrModelImpl bool mbLegacySingleLineFontwork; // tdf#148000 compatibility flag bool mbConnectorUseSnapRect; // tdf#149756 compatibility flag bool mbIgnoreBreakAfterMultilineField; ///< tdf#148966 compatibility flag - std::unique_ptr<model::Theme> mpTheme; + std::shared_ptr<model::Theme> mpTheme; SdrModelImpl() : mpUndoManager(nullptr) @@ -1563,12 +1563,12 @@ void SdrModel::SetStarDrawPreviewMode(bool bPreview) } } -void SdrModel::setTheme(std::unique_ptr<model::Theme> pTheme) +void SdrModel::setTheme(std::shared_ptr<model::Theme> const& pTheme) { - mpImpl->mpTheme = std::move(pTheme); + mpImpl->mpTheme = pTheme; } -std::unique_ptr<model::Theme> const& SdrModel::getTheme() const +std::shared_ptr<model::Theme> const& SdrModel::getTheme() const { return mpImpl->mpTheme; } diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 280e5d2f8c70..235fc58da508 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -54,6 +54,7 @@ #include <svl/hint.hxx> #include <rtl/strbuf.hxx> #include <libxml/xmlwriter.h> +#include <docmodel/theme/Theme.hxx> #include <com/sun/star/lang/IllegalArgumentException.hpp> @@ -1300,9 +1301,9 @@ void SdrPageProperties::SetStyleSheet(SfxStyleSheet* pStyleSheet) ImpPageChange(*mpSdrPage); } -void SdrPageProperties::SetTheme(std::unique_ptr<model::Theme> pTheme) +void SdrPageProperties::SetTheme(std::shared_ptr<model::Theme> const& pTheme) { - mpTheme = std::move(pTheme); + mpTheme = pTheme; if (mpTheme && mpTheme->GetColorSet() && mpSdrPage->IsMasterPage()) { @@ -1322,7 +1323,7 @@ void SdrPageProperties::SetTheme(std::unique_ptr<model::Theme> pTheme) } } -std::unique_ptr<model::Theme> const& SdrPageProperties::GetTheme() const +std::shared_ptr<model::Theme> const& SdrPageProperties::GetTheme() const { return mpTheme; } |