Kaydet (Commit) e44119c5 authored tarafından Xisco Fauli's avatar Xisco Fauli Kaydeden (comit) Armin Le Grand

SVG: tdf#95714 stop-color can be defined once too

Change-Id: I8a660281a255d28981e23d3cf30ff6c337f0424d
Reviewed-on: https://gerrit.libreoffice.org/19876Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarArmin Le Grand <Armin.Le.Grand@cib.de>
üst 5af87330
...@@ -513,8 +513,12 @@ struct AnnotatingVisitor ...@@ -513,8 +513,12 @@ struct AnnotatingVisitor
return true; // cannot write style, svm import case return true; // cannot write style, svm import case
// do we have a gradient fill? then write out gradient as well // do we have a gradient fill? then write out gradient as well
if( rState.meFillType == GRADIENT && rState.maFillGradient.maStops.size() > 1 ) if( rState.meFillType == GRADIENT && rState.maFillGradient.maStops.size() > 0 )
{ {
// if only one stop-color is defined
if( rState.maFillGradient.maStops.size() == 1 )
rState.maFillGradient.maStops.push_back(rState.maFillGradient.maStops[0]);
// TODO(F3): ODF12 supposedly also groks svg:linear/radialGradient. But CL says: nope. // TODO(F3): ODF12 supposedly also groks svg:linear/radialGradient. But CL says: nope.
xAttrs->AddAttribute( "draw:name", getStyleName("svggradient", rState.maFillGradient.mnId) ); xAttrs->AddAttribute( "draw:name", getStyleName("svggradient", rState.maFillGradient.mnId) );
if( rState.maFillGradient.meType == Gradient::LINEAR ) if( rState.maFillGradient.meType == Gradient::LINEAR )
......
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