diff options
Diffstat (limited to 'oox/source/drawingml/fillproperties.cxx')
-rw-r--r-- | oox/source/drawingml/fillproperties.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index aa97dfbe4994..a4eedfaa6d63 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -624,6 +624,9 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap, aGradient.Angle = static_cast< sal_Int16 >( (8100 - (nDmlAngle / (PER_DEGREE / 10))) % 3600 ); Color aStartColor, aEndColor; + // Make a note where the widest segment stops, because we will try to grow it next. + auto aWidestSegmentEnd = std::next(aWidestSegmentStart); + // Try to grow the widest segment backwards: if a previous segment has the same // color, just different transparency, include it. while (aWidestSegmentStart != aGradientStops.begin()) @@ -638,7 +641,6 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap, aWidestSegmentStart = it; } - auto aWidestSegmentEnd = std::next(aWidestSegmentStart); // Try to grow the widest segment forward: if a next segment has the same // color, just different transparency, include it. while (aWidestSegmentEnd != std::prev(aGradientStops.end())) |