summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/XMLExportDataPilot.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter/xml/XMLExportDataPilot.cxx')
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index e43ff21a114d..f8cba5ecf6c3 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -503,9 +503,13 @@ void ScXMLExportDataPilot::WriteMembers(ScDPSaveDimension* pDim)
void ScXMLExportDataPilot::WriteLevels(ScDPSaveDimension* pDim)
{
- rtl::OUStringBuffer sBuffer;
- SvXMLUnitConverter::convertBool(sBuffer, pDim->GetShowEmpty());
- rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SHOW_EMPTY, sBuffer.makeStringAndClear());
+ // #i114202# GetShowEmpty is only valid if HasShowEmpty is true.
+ if (pDim->HasShowEmpty())
+ {
+ rtl::OUStringBuffer sBuffer;
+ SvXMLUnitConverter::convertBool(sBuffer, pDim->GetShowEmpty());
+ rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SHOW_EMPTY, sBuffer.makeStringAndClear());
+ }
SvXMLElementExport aElemDPL(rExport, XML_NAMESPACE_TABLE, XML_DATA_PILOT_LEVEL, sal_True, sal_True);
WriteSubTotals(pDim);