summaryrefslogtreecommitdiff
path: root/xmloff/source
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-05-03 22:58:47 +0900
committerTomaž Vajngerl <quikee@gmail.com>2023-05-09 08:25:53 +0200
commit8bafae3656f7a0a6b74bb0985403a96f9a3f61be (patch)
tree41d874ea7223f3e59e672d9feb61f4415058055d /xmloff/source
parent5c5d0c4858a123c6aa1dbadcdfd96641eb91283b (diff)
change model::ColorSet to be stored in a shared_ptr in model::Theme
Change-Id: Ic3067f1681c047cd944e64179c568f4e972e0c95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151447 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'xmloff/source')
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx2
-rw-r--r--xmloff/source/style/XMLThemeContext.cxx12
2 files changed, 7 insertions, 7 deletions
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 2786eb28313e..5a07d78ce249 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2388,7 +2388,7 @@ void SdXMLExport::ExportThemeElement(const uno::Reference<drawing::XDrawPage>& x
AddAttribute(XML_NAMESPACE_LO_EXT, XML_NAME, pTheme->GetName());
SvXMLElementExport aTheme(*this, XML_NAMESPACE_LO_EXT, XML_THEME, true, true);
- auto* pColorSet = pTheme->GetColorSet();
+ auto pColorSet = pTheme->getColorSet();
if (!pColorSet->getName().isEmpty())
AddAttribute(XML_NAMESPACE_LO_EXT, XML_NAME, pColorSet->getName());
SvXMLElementExport aColorTable(*this, XML_NAMESPACE_LO_EXT, XML_COLOR_TABLE, true, true);
diff --git a/xmloff/source/style/XMLThemeContext.cxx b/xmloff/source/style/XMLThemeContext.cxx
index e35aed99c46f..b123cae89561 100644
--- a/xmloff/source/style/XMLThemeContext.cxx
+++ b/xmloff/source/style/XMLThemeContext.cxx
@@ -83,7 +83,7 @@ XMLColorTableContext::XMLColorTableContext(
case XML_ELEMENT(LO_EXT, XML_NAME):
{
OUString aName = rAttribute.toString();
- mpColorSet.reset(new model::ColorSet(aName));
+ m_pColorSet.reset(new model::ColorSet(aName));
break;
}
}
@@ -92,8 +92,8 @@ XMLColorTableContext::XMLColorTableContext(
XMLColorTableContext::~XMLColorTableContext()
{
- if (mpColorSet)
- mrTheme.SetColorSet(std::move(mpColorSet));
+ if (m_pColorSet)
+ mrTheme.setColorSet(m_pColorSet);
}
uno::Reference<xml::sax::XFastContextHandler> SAL_CALL XMLColorTableContext::createFastChildContext(
@@ -101,8 +101,8 @@ uno::Reference<xml::sax::XFastContextHandler> SAL_CALL XMLColorTableContext::cre
{
if (nElement == XML_ELEMENT(LO_EXT, XML_COLOR))
{
- if (mpColorSet)
- return new XMLColorContext(GetImport(), xAttribs, mpColorSet);
+ if (m_pColorSet)
+ return new XMLColorContext(GetImport(), xAttribs, m_pColorSet);
}
return nullptr;
@@ -110,7 +110,7 @@ uno::Reference<xml::sax::XFastContextHandler> SAL_CALL XMLColorTableContext::cre
XMLColorContext::XMLColorContext(SvXMLImport& rImport,
const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
- std::unique_ptr<model::ColorSet>& rpColorSet)
+ std::shared_ptr<model::ColorSet>& rpColorSet)
: SvXMLImportContext(rImport)
{
OUString aName;