From b0a85159e5f99baee901adad447a157f65e507b4 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 22 Sep 2009 18:14:05 +0200 Subject: #i97509# continued matrix tooling and adapting the usages now to all the ooo code --- sw/source/core/draw/dcontact.cxx | 29 +++++------------------------ sw/source/core/unocore/unodraw.cxx | 15 ++++----------- 2 files changed, 9 insertions(+), 35 deletions(-) (limited to 'sw/source/core') diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index aa20281038da..5d9b90a2f9e0 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -44,7 +44,6 @@ #include #include #include -// AW, OD 2004-04-30 #i28501# #include #include #include @@ -69,31 +68,17 @@ #include #include #include - -// OD 2004-02-11 #110582#-2 #include - -// OD 18.06.2003 #108784# -#include -// OD 2004-05-24 #i28701# #include #include - -// AW: For VCOfDrawVirtObj and stuff -#ifndef _SDR_CONTACT_VIEWCONTACTOFVIRTOBJ_HXX +#include #include -#endif - -#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TRANSFORMPRIMITIVE2D_HXX #include -#endif - -#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFSDROBJ_HXX #include -#endif - #include +#include + using namespace ::com::sun::star; @@ -2605,9 +2590,7 @@ void SwDrawVirtObj::RecalcBoundRect() basegfx::B2DPolyPolygon SwDrawVirtObj::TakeXorPoly() const { basegfx::B2DPolyPolygon aRetval(rRefObj.TakeXorPoly()); - basegfx::B2DHomMatrix aMatrix; - aMatrix.translate(GetOffset().X(), GetOffset().Y()); - aRetval.transform(aMatrix); + aRetval.transform(basegfx::tools::createTranslateB2DHomMatrix(GetOffset().X(), GetOffset().Y())); return aRetval; } @@ -2615,9 +2598,7 @@ basegfx::B2DPolyPolygon SwDrawVirtObj::TakeXorPoly() const basegfx::B2DPolyPolygon SwDrawVirtObj::TakeContour() const { basegfx::B2DPolyPolygon aRetval(rRefObj.TakeContour()); - basegfx::B2DHomMatrix aMatrix; - aMatrix.translate(GetOffset().X(), GetOffset().Y()); - aRetval.transform(aMatrix); + aRetval.transform(basegfx::tools::createTranslateB2DHomMatrix(GetOffset().X(), GetOffset().Y())); return aRetval; } diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 1989c74df6ed..c75e4b691b51 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -75,19 +75,12 @@ #include #include #include -// OD 2004-05-05 #i28701# +#include #include -// --> OD 2004-11-10 #i35007# #include -// <-- -// --> OD 2005-03-10 #i44334#, #i44681# -// --> OD 2007-01-03 #i73079# - use correct matrix type #include -// <-- -// --> OD 2009-01-16 #i59051 +#include #include -// <-- - #include #include #include @@ -2844,8 +2837,8 @@ void SwXShape::_AdjustPositionProperties( const awt::Point _aPosition ) // apply translation difference to PolyPolygonBezier. if ( aTranslateDiff.X != 0 || aTranslateDiff.Y != 0 ) { - basegfx::B2DHomMatrix aMatrix; - aMatrix.translate( aTranslateDiff.X, aTranslateDiff.Y ); + const basegfx::B2DHomMatrix aMatrix(basegfx::tools::createTranslateB2DHomMatrix( + aTranslateDiff.X, aTranslateDiff.Y)); const sal_Int32 nOuterSequenceCount(aConvertedPath.Coordinates.getLength()); drawing::PointSequence* pInnerSequence = aConvertedPath.Coordinates.getArray(); -- cgit v1.2.3