You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ms...@apache.org on 2021/11/06 15:08:11 UTC

[openoffice] branch trunk updated: Fix for Bugzilla #128489 (#140)

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

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


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

commit 3ee92af9639dd80a1e93eb1f3aac6a970a5c9228
Author: Matthias Seidel <ms...@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!
---
 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++ )