oox/source/drawingml/fillproperties.cxx |   14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

New commits:
commit 4f6666529003185fcf40bf23a8f2bcfd8596724c
Author:     Regina Henschel <rb.hensc...@t-online.de>
AuthorDate: Sun Apr 13 14:04:33 2025 +0200
Commit:     Regina Henschel <rb.hensc...@t-online.de>
CommitDate: Mon Apr 14 01:13:17 2025 +0200

    tdf#154858 radial gradient import remove obsolete part
    
    LO has imported radial gradients as rotated linear gradient in case
    of gradient center in shape corner. That was changed in commit
    65439ab2c4fc87e7cc115710a605e9f35dfb39d8 to always using radial gradient.
    So the comment about linear gradient is no longer valid and the gradient
    rotation is useless.
    
    Change-Id: I679f8afc347845eb012e3377e03877c3a7c7d6c1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184117
    Reviewed-by: Balazs Varga <balazs.varga.ext...@allotropia.de>
    Reviewed-by: Regina Henschel <rb.hensc...@t-online.de>
    Tested-by: Jenkins

diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index a3a1957ca187..fc734b743a46 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -512,24 +512,14 @@ void FillProperties::pushToPropMap(ShapePropertyMap& 
rPropMap, const GraphicHelp
                     aGradient.SetYOffset(getLimitedValue<sal_Int16, sal_Int32>(
                         nCenterY / PER_PERCENT, 0, 100));
 
+                    // FIXME tdf#166140: Size of gradient is smaller than in 
MSO
                     if( maGradientProps.moGradientPath.value() == XML_circle )
                     {
-                        // Style should be radial at least when the horizontal 
center is at 50%.
-                        // Otherwise import as a linear gradient, because it 
is the most similar to the MSO radial style.
-                        // 
aGradient.SetGradientStyle(awt::GradientStyle_LINEAR);
-                        if( 100 == aGradient.GetXOffset() && 100 == 
aGradient.GetYOffset() )
-                            aGradient.SetAngle( Degree10(450) );
-                        else if( 0 == aGradient.GetXOffset() && 100 == 
aGradient.GetYOffset() )
-                            aGradient.SetAngle( Degree10(3150) );
-                        else if( 100 == aGradient.GetXOffset() && 0 == 
aGradient.GetYOffset() )
-                            aGradient.SetAngle( Degree10(1350) );
-                        else if( 0 == aGradient.GetXOffset() && 0 == 
aGradient.GetYOffset() )
-                            aGradient.SetAngle( Degree10(2250) );
-
                         aGradient.SetGradientStyle(awt::GradientStyle_RADIAL);
                     }
                     else
                     {
+                        // XML_rect or XML_shape, but the latter is not 
implemented.
                         aGradient.SetGradientStyle(awt::GradientStyle_RECT);
                     }
 

Reply via email to