summaryrefslogtreecommitdiff
path: root/sd/source/ui/unoidl/unomodel.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-02-25 19:12:23 +0900
committerTomaž Vajngerl <quikee@gmail.com>2023-04-08 07:56:19 +0200
commit4f347ebabad6355014889f0a81b107dc774590fe (patch)
tree377e010ec06cf3aed7caf5d04cddf28518fbc676 /sd/source/ui/unoidl/unomodel.cxx
parentad5756f0529a80fbb537979bcfd9de7a83a69805 (diff)
use shared_ptr for model::Theme instead of unique_ptr
Also change other cases to use the shared_ptr so there is no need to do copies and replace some of docmodel/theme/Theme.hxximports with forward declarations. Change-Id: I4588cb25e05e5f3e535011fffb68a8075b05aecc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147691 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sd/source/ui/unoidl/unomodel.cxx')
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index ca741e9bb53f..e5a231d4d405 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -131,6 +131,7 @@
#include <tools/json_writer.hxx>
#include <tools/UnitConversion.hxx>
#include <svx/ColorSets.hxx>
+#include <docmodel/theme/Theme.hxx>
#include <app.hrc>
@@ -1283,8 +1284,8 @@ void SAL_CALL SdXImpressDocument::setPropertyValue( const OUString& aPropertyNam
case WID_MODEL_THEME:
{
SdrModel& rModel = getSdrModelFromUnoModel();
- std::unique_ptr<model::Theme> pTheme = model::Theme::FromAny(aValue);
- rModel.setTheme(std::move(pTheme));
+ std::shared_ptr<model::Theme> pTheme = model::Theme::FromAny(aValue);
+ rModel.setTheme(pTheme);
}
break;
default: