summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-04-20 07:14:43 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-04-21 06:44:26 +0200
commitf3ec35dbea81d60b44d466a9a4651129143f6593 (patch)
treeb57ad76cde06854a20d862d533c96f7447e636d7
parent4aa4a8e660f983baee135b8fb6c6cab3ed240823 (diff)
improve marker export to OOXML
Change-Id: I846783ab4c4718eb82fa99458cdffd861b5bf03d
-rw-r--r--oox/source/export/chartexport.cxx49
1 files changed, 30 insertions, 19 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 3a01c25422a3..27e344c2d4a8 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -3111,6 +3111,13 @@ void ChartExport::exportMarker(Reference< chart2::XDataSeries > xSeries)
break;
}
+ bool bSkipFormatting = false;
+ if (aSymbol.Style == chart2::SymbolStyle_NONE)
+ {
+ bSkipFormatting = true;
+ pSymbolType = "none";
+ }
+
if( pSymbolType )
{
pFS->singleElement( FSNS( XML_c, XML_symbol ),
@@ -3118,30 +3125,34 @@ void ChartExport::exportMarker(Reference< chart2::XDataSeries > xSeries)
FSEND );
}
- awt::Size aSymbolSize = aSymbol.Size;
- sal_Int32 nSize = std::max( aSymbolSize.Width, aSymbolSize.Height );
+ if (!bSkipFormatting)
+ {
+ awt::Size aSymbolSize = aSymbol.Size;
+ sal_Int32 nSize = std::max( aSymbolSize.Width, aSymbolSize.Height );
- nSize = nSize/250.0*7.0 + 1; // just guessed based on some test cases,
- //the value is always 1 less than the actual value.
- 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 + 1; // just guessed based on some test cases,
+ //the value is always 1 less than the actual value.
+ 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->startElement( FSNS( XML_c, XML_spPr ),
- FSEND );
+ pFS->startElement( FSNS( XML_c, XML_spPr ),
+ FSEND );
- util::Color aColor = aSymbol.FillColor;
- if (GetProperty(xPropSet, "Color"))
- mAny >>= aColor;
+ util::Color aColor = aSymbol.FillColor;
+ if (GetProperty(xPropSet, "Color"))
+ mAny >>= aColor;
- if (aColor == -1)
- {
- pFS->singleElement(FSNS(XML_a, XML_noFill), FSEND);
+ if (aColor == -1)
+ {
+ pFS->singleElement(FSNS(XML_a, XML_noFill), FSEND);
+ }
+ else
+ WriteSolidFill(aColor);
+
+ pFS->endElement( FSNS( XML_c, XML_spPr ) );
}
- else
- WriteSolidFill(aColor);
- pFS->endElement( FSNS( XML_c, XML_spPr ) );
pFS->endElement( FSNS( XML_c, XML_marker ) );
}