Kaydet (Commit) 18ab4793 authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Markus Mohrhard

prevent invalid OOXML chart files, related #i82905#

Change-Id: I27166772c6eefb4e49eb4c097683a1c6aea4476a
üst 783a0757
......@@ -3063,7 +3063,7 @@ const char* getErrorBarStyle(sal_Int32 nErrorBarStyle)
default:
assert(false); // can't happen
}
return "";
return NULL;
}
Reference< chart2::data::XDataSequence> getLabeledSequence(
......@@ -3100,6 +3100,12 @@ Reference< chart2::data::XDataSequence> getLabeledSequence(
void ChartExport::exportErrorBar(Reference< XPropertySet> xErrorBarProps, bool bYError)
{
sal_Int32 nErrorBarStyle = cssc::ErrorBarStyle::NONE;
xErrorBarProps->getPropertyValue("ErrorBarStyle") >>= nErrorBarStyle;
const char* pErrorBarStyle = getErrorBarStyle(nErrorBarStyle);
if(!pErrorBarStyle)
return;
FSHelperPtr pFS = GetFS();
pFS->startElement( FSNS( XML_c, XML_errBars ),
FSEND );
......@@ -3125,10 +3131,6 @@ void ChartExport::exportErrorBar(Reference< XPropertySet> xErrorBarProps, bool b
pFS->singleElement( FSNS( XML_c, XML_errBarType ),
XML_val, pErrBarType,
FSEND );
sal_Int32 nErrorBarStyle = cssc::ErrorBarStyle::NONE;
xErrorBarProps->getPropertyValue("ErrorBarStyle") >>= nErrorBarStyle;
const char* pErrorBarStyle = getErrorBarStyle(nErrorBarStyle);
pFS->singleElement( FSNS( XML_c, XML_errValType ),
XML_val, pErrorBarStyle,
FSEND );
......
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