This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
     new 1c05ace  Fix for Bugzilla #128489 (#140)
1c05ace is described below

commit 1c05acecb7f8aba5700445f06fa3359dc21f80ea
Author: Matthias Seidel <msei...@apache.org>
AuthorDate: Sat Nov 6 16:08:06 2021 +0100

    Fix for Bugzilla #128489 (#140)
    
    rendering for extrusion depth of custom shapes is wrong for position values 
other than zero
    See: https://bz.apache.org/ooo/show_bug.cgi?id=128489
    
    Many thanks to Regina Henschel!
    (cherry picked from commit 3ee92af9639dd80a1e93eb1f3aac6a970a5c9228)
---
 main/svx/source/customshapes/EnhancedCustomShape3d.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/main/svx/source/customshapes/EnhancedCustomShape3d.cxx 
b/main/svx/source/customshapes/EnhancedCustomShape3d.cxx
index 18ee453..1510ca0 100644
--- a/main/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/main/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -337,7 +337,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const 
SdrObject* pShape2d, con
 
                double fExtrusionBackward, fExtrusionForward;
                GetExtrusionDepth( rGeometryItem, pMap, fExtrusionBackward, 
fExtrusionForward );
-               double fDepth = fExtrusionBackward - fExtrusionForward;
+               double fDepth = fExtrusionBackward + fExtrusionForward;
                if ( fDepth < 1.0 )
                        fDepth = 1.0;
 
@@ -795,7 +795,7 @@ Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( 
const SdrObject* pCustomS
 
        for ( i = 0L; i < 4L; i++ )
        {
-               aBoundVolume.append(basegfx::B3DPoint(aPolygon[ (sal_uInt16)i 
].X() - aCenter.X(), aPolygon[ (sal_uInt16)i ].Y() - aCenter.Y(), 
fExtrusionForward));
+               aBoundVolume.append(basegfx::B3DPoint(aPolygon[ (sal_uInt16)i 
].X() - aCenter.X(), aPolygon[ (sal_uInt16)i ].Y() - aCenter.Y(), 
-fExtrusionForward));
        }
 
        for ( i = 0L; i < 4L; i++ )

Reply via email to