summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-10-23 21:38:30 +0200
committerKatarina Behrens <Katarina.Behrens@cib.de>2015-11-25 08:50:42 +0000
commit4d9a757a384b79cee452b5625bfadeb2eaa42bc2 (patch)
tree8ce439107060b177fac5f674b6065aa339452602 /sc
parentc0772f7037794e1cea578a8833c79730fbe448c2 (diff)
store custom icon set info into ODF
Change-Id: I1581b28237d2b9f9c22d3f3b0436dc281508aafa Reviewed-on: https://gerrit.libreoffice.org/20118 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index bdda325cac1c..25eb6032f75b 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -4396,7 +4396,24 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab)
const ScIconSetFormat& mrIconSet = static_cast<const ScIconSetFormat&>(*pFormatEntry);
OUString aIconSetName = getIconSetName(mrIconSet.GetIconSetData()->eIconSetType);
AddAttribute( XML_NAMESPACE_CALC_EXT, XML_ICON_SET_TYPE, aIconSetName );
+ if (mrIconSet.GetIconSetData()->mbCustom)
+ AddAttribute(XML_NAMESPACE_CALC_EXT, XML_CUSTOM, OUString::boolean(true));
+
SvXMLElementExport aElementColorScale(*this, XML_NAMESPACE_CALC_EXT, XML_ICON_SET, true, true);
+
+ if (mrIconSet.GetIconSetData()->mbCustom)
+ {
+ for (std::vector<std::pair<ScIconSetType, sal_Int32> >::const_iterator
+ it = mrIconSet.GetIconSetData()->maCustomVector.begin();
+ it != mrIconSet.GetIconSetData()->maCustomVector.end(); ++it)
+ {
+ AddAttribute(XML_NAMESPACE_CALC_EXT, XML_CUSTOM_ICONSET_NAME, getIconSetName(it->first));
+ AddAttribute(XML_NAMESPACE_CALC_EXT, XML_CUSTOM_ICONSET_INDEX, OUString::number(it->second));
+ SvXMLElementExport aCustomIcon(*this, XML_NAMESPACE_CALC_EXT, XML_CUSTOM_ICONSET, true, true);
+ }
+
+ }
+
if(!mrIconSet.GetIconSetData()->mbShowValue)
AddAttribute(XML_NAMESPACE_CALC_EXT, XML_SHOW_VALUE, XML_FALSE);
for (auto const& it : mrIconSet)