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/02 18:26:07 UTC

[openoffice] 01/01: Fix for Bugzilla #128489

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

mseidel pushed a commit to branch Pilot-Pirx-patch-1
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 0defa045213c073ccd8a6a2702b3c284cf6d250a
Author: Matthias Seidel <ms...@apache.org>
AuthorDate: Tue Nov 2 19:26:01 2021 +0100

    Fix for Bugzilla #128489
    
    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++ )