Kaydet (Commit) 4d9a757a authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Katarina Behrens

store custom icon set info into ODF

Change-Id: I1581b28237d2b9f9c22d3f3b0436dc281508aafa
Reviewed-on: https://gerrit.libreoffice.org/20118Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
Tested-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
üst c0772f70
...@@ -525,6 +525,9 @@ namespace xmloff { namespace token { ...@@ -525,6 +525,9 @@ namespace xmloff { namespace token {
XML_CUSTOM3, XML_CUSTOM3,
XML_CUSTOM4, XML_CUSTOM4,
XML_CUSTOM5, XML_CUSTOM5,
XML_CUSTOM_ICONSET,
XML_CUSTOM_ICONSET_INDEX,
XML_CUSTOM_ICONSET_NAME,
XML_CUT, XML_CUT,
XML_CUT_OFFS, XML_CUT_OFFS,
XML_CX, XML_CX,
......
...@@ -4396,7 +4396,24 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab) ...@@ -4396,7 +4396,24 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab)
const ScIconSetFormat& mrIconSet = static_cast<const ScIconSetFormat&>(*pFormatEntry); const ScIconSetFormat& mrIconSet = static_cast<const ScIconSetFormat&>(*pFormatEntry);
OUString aIconSetName = getIconSetName(mrIconSet.GetIconSetData()->eIconSetType); OUString aIconSetName = getIconSetName(mrIconSet.GetIconSetData()->eIconSetType);
AddAttribute( XML_NAMESPACE_CALC_EXT, XML_ICON_SET_TYPE, aIconSetName ); 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); 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) if(!mrIconSet.GetIconSetData()->mbShowValue)
AddAttribute(XML_NAMESPACE_CALC_EXT, XML_SHOW_VALUE, XML_FALSE); AddAttribute(XML_NAMESPACE_CALC_EXT, XML_SHOW_VALUE, XML_FALSE);
for (auto const& it : mrIconSet) for (auto const& it : mrIconSet)
......
...@@ -529,6 +529,9 @@ namespace xmloff { namespace token { ...@@ -529,6 +529,9 @@ namespace xmloff { namespace token {
TOKEN( "custom3", XML_CUSTOM3 ), TOKEN( "custom3", XML_CUSTOM3 ),
TOKEN( "custom4", XML_CUSTOM4 ), TOKEN( "custom4", XML_CUSTOM4 ),
TOKEN( "custom5", XML_CUSTOM5 ), TOKEN( "custom5", XML_CUSTOM5 ),
TOKEN( "custom-iconset", XML_CUSTOM_ICONSET ),
TOKEN( "custom-iconset-index", XML_CUSTOM_ICONSET_INDEX ),
TOKEN( "custom-iconset-name", XML_CUSTOM_ICONSET_NAME ),
TOKEN( "cut", XML_CUT ), TOKEN( "cut", XML_CUT ),
TOKEN( "cut-offs", XML_CUT_OFFS ), TOKEN( "cut-offs", XML_CUT_OFFS ),
TOKEN( "cx", XML_CX ), TOKEN( "cx", XML_CX ),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment