Kaydet (Commit) bb7dec2f authored tarafından Markus Mohrhard's avatar Markus Mohrhard

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
üst 2af36506
......@@ -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 ) );
}
......
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