diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-02-23 06:20:03 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-02-23 06:42:01 +0100 |
commit | 18ab4793d96a4e33c3a11fe3b1dda52f217c6c16 (patch) | |
tree | 6b4a1100b0b2715dae12ecc75fa683dd2e617a97 /oox | |
parent | prevent invalid OOXML chart files, related #i75121# (diff) | |
download | core-18ab4793d96a4e33c3a11fe3b1dda52f217c6c16.tar.gz core-18ab4793d96a4e33c3a11fe3b1dda52f217c6c16.zip |
prevent invalid OOXML chart files, related #i82905#
Change-Id: I27166772c6eefb4e49eb4c097683a1c6aea4476a
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/chartexport.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index fdc0c2b776a0..e565035fde6b 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -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 ); |