summaryrefslogtreecommitdiff
path: root/sc/source/filter
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-05-24 13:22:30 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-05-24 13:23:19 +0200
commitcd834e5c78c65449a47a6a5310d05bf9775f2da6 (patch)
tree71d7550c5772c4fd6e9878ba649a3243d39b119d /sc/source/filter
parent4a3e7dfb0d573cf97555822e11f816dc400b67e4 (diff)
don't export empty color formats & conditional formats
Change-Id: I880facafc155af2e8c67f66f9d3463daf1191207
Diffstat (limited to 'sc/source/filter')
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 5951ee02c0f0..2379401be895 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -2851,7 +2851,7 @@ void ScXMLExport::WriteTable(sal_Int32 nTable, const Reference<sheet::XSpreadshe
WriteNamedRange(pRangeName);
}
- if(getDefaultVersion() > ODFVER_012)
+ if(getDefaultVersion() > SvtSaveOptions::ODFVER_012)
{
//export new conditional format information
ExportConditionalFormat(nTable);
@@ -3823,6 +3823,16 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab)
ScColorFormatList* pColorFormatList = pDoc->GetColorScaleList(nTab);
if(pCondFormatList || pColorFormatList)
{
+ bool bExport = false;
+ if(pCondFormatList && pCondFormatList->size())
+ bExport = true;
+
+ if(pColorFormatList && pColorFormatList->size())
+ bExport = true;
+
+ if(!bExport)
+ return;
+
SvXMLElementExport aElementCondFormats(*this, XML_NAMESPACE_CALC_EXT, XML_CONDITIONAL_FORMATS, true, true);
if(pCondFormatList)