From 99b7b41992f02ce4ed85475b448ab61f3b596f11 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Tue, 30 Apr 2013 16:30:20 +0200 Subject: export a:noFill to prevent wrong default Except for the data label issue my test file looks good now. There are a few more small issues that I should take care of but it looks nice already. Change-Id: I4a6097baefe26088d0246f6335246a211ba143eb --- oox/source/export/drawingml.cxx | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'oox/source/export') diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index ead3ed2c490f..cad8ea172caf 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -319,19 +319,20 @@ void DrawingML::WriteOutline( Reference< XPropertySet > rXPropSet ) GET( aLineStyle, LineStyle ); - if( aLineStyle == drawing::LineStyle_NONE ) - return; - sal_uInt32 nLineWidth = 0; sal_uInt32 nColor = 0; sal_Bool bColorSet = sal_False; const char* cap = NULL; drawing::LineDash aLineDash; sal_Bool bDashSet = sal_False; + bool bNoFill = false; GET( nLineWidth, LineWidth ); switch( aLineStyle ) { + case drawing::LineStyle_NONE: + bNoFill = true; + break; case drawing::LineStyle_DASH: if( GETA( LineDash ) ) { aLineDash = *(drawing::LineDash*) mAny.getValue(); @@ -375,7 +376,7 @@ void DrawingML::WriteOutline( Reference< XPropertySet > rXPropSet ) mpFS->endElementNS( XML_a, XML_custDash ); } - if( nLineWidth > 1 && GETA( LineJoint ) ) { + if( !bNoFill && nLineWidth > 1 && GETA( LineJoint ) ) { LineJoint eLineJoint; mAny >>= eLineJoint; @@ -395,8 +396,15 @@ void DrawingML::WriteOutline( Reference< XPropertySet > rXPropSet ) } } - WriteLineArrow( rXPropSet, sal_True ); - WriteLineArrow( rXPropSet, sal_False ); + if( !bNoFill ) + { + WriteLineArrow( rXPropSet, sal_True ); + WriteLineArrow( rXPropSet, sal_False ); + } + else + { + mpFS->singleElementNS( XML_a, XML_noFill, FSEND ); + } mpFS->endElementNS( XML_a, XML_ln ); } -- cgit