diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-04-30 20:16:06 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-04-30 21:21:06 +0200 |
commit | 0c58dc8655017523be8c610ebea2200e472fdd8f (patch) | |
tree | 5fb82dc288b6662b0381f9c539403286d587a815 /oox | |
parent | bb7dec2fa080b9d0ee89ff780db65bc1f97e0d61 (diff) |
only export c:SymbolSize if attribute is there
Change-Id: I4f167d1ec6998b27025450e9339d14d94c06e3c1
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/chartexport.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index cab8536eb352..3a806b870e04 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -2464,7 +2464,6 @@ void ChartExport::exportMarker() pFS->startElement( FSNS( XML_c, XML_marker ), FSEND ); Reference< XPropertySet > xPropSet( mxDiagram , uno::UNO_QUERY ); - awt::Size aSymbolSize; sal_Int32 nSymbolType = ::com::sun::star::chart::ChartSymbolType::NONE; if( GetProperty( xPropSet, "SymbolType" ) ) mAny >>= nSymbolType; @@ -2511,15 +2510,18 @@ void ChartExport::exportMarker() } if( nSymbolType != cssc::ChartSymbolType::NONE ) { + awt::Size aSymbolSize; if( GetProperty( xPropSet, "SymbolSize" ) ) + { mAny >>= aSymbolSize;; - sal_Int32 nSize = std::max( aSymbolSize.Width, aSymbolSize.Height ); + sal_Int32 nSize = std::max( aSymbolSize.Width, aSymbolSize.Height ); - nSize = nSize/250.0*7.0; // just guessed based on some test cases - nSize = std::min<sal_Int32>( 72, std::max<sal_Int32>( 2, nSize ) ); - pFS->singleElement( FSNS( XML_c, XML_size), - XML_val, I32S(nSize), - FSEND ); + nSize = nSize/250.0*7.0; // just guessed based on some test cases + nSize = std::min<sal_Int32>( 72, std::max<sal_Int32>( 2, nSize ) ); + pFS->singleElement( FSNS( XML_c, XML_size), + XML_val, I32S(nSize), + FSEND ); + } } pFS->endElement( FSNS( XML_c, XML_marker ) ); } |