summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-04-30 20:14:13 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-04-30 21:21:06 +0200
commitbb7dec2fa080b9d0ee89ff780db65bc1f97e0d61 (patch)
treee43bf10d5f2c90f9982227fc943426980b35d570 /oox
parent2af36506592908e19b02bdfe00359dfe71eb3322 (diff)
also export point size
The current formula size/250*7 is just a guess based on some test docs. If someone has an idea how to translate them please tell me. Change-Id: Ibdd27d52d545ac96882c128485c48a3116eb4467
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/chartexport.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 68880cdb5539..cab8536eb352 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -2464,9 +2464,11 @@ 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;
+
// TODO: more properties support for marker
const char* pSymbolType = NULL;
switch( nSymbolType )
@@ -2500,12 +2502,25 @@ void ChartExport::exportMarker()
default:
SAL_WARN("oox", "unknown data series symbol");
}
+
if( pSymbolType )
{
pFS->singleElement( FSNS( XML_c, XML_symbol ),
XML_val, pSymbolType,
FSEND );
}
+ if( nSymbolType != cssc::ChartSymbolType::NONE )
+ {
+ if( GetProperty( xPropSet, "SymbolSize" ) )
+ mAny >>= aSymbolSize;;
+ 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 );
+ }
pFS->endElement( FSNS( XML_c, XML_marker ) );
}