summaryrefslogtreecommitdiff
path: root/svx/source/styles
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/styles')
-rw-r--r--svx/source/styles/ColorSets.cxx21
1 files changed, 17 insertions, 4 deletions
diff --git a/svx/source/styles/ColorSets.cxx b/svx/source/styles/ColorSets.cxx
index 8ab3d939ef5a..fbcf4bd4a889 100644
--- a/svx/source/styles/ColorSets.cxx
+++ b/svx/source/styles/ColorSets.cxx
@@ -164,11 +164,15 @@ void Theme::dumpAsXml(xmlTextWriterPtr pWriter) const
void Theme::ToAny(css::uno::Any& rVal) const
{
- beans::PropertyValues aValues = {
- comphelper::makePropertyValue("Name", maName)
- };
+ comphelper::SequenceAsHashMap aMap;
+ aMap["Name"] <<= maName;
- rVal <<= aValues;
+ if (mpColorSet)
+ {
+ aMap["ColorSchemeName"] <<= mpColorSet->getName();
+ }
+
+ rVal <<= aMap.getAsConstPropertyValueList();
}
std::unique_ptr<Theme> Theme::FromAny(const css::uno::Any& rVal)
@@ -184,6 +188,15 @@ std::unique_ptr<Theme> Theme::FromAny(const css::uno::Any& rVal)
pTheme = std::make_unique<Theme>(aName);
}
+ it = aMap.find("ColorSchemeName");
+ if (it != aMap.end() && pTheme)
+ {
+ OUString aName;
+ it->second >>= aName;
+ auto pColorSet = std::make_unique<ColorSet>(aName);
+ pTheme->SetColorSet(std::move(pColorSet));
+ }
+
return pTheme;
}