summaryrefslogtreecommitdiff
path: root/svx/source/customshapes
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-03-30 20:27:55 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-03-31 06:27:11 +0000
commita5a571307fb3306b74ab46b085cde6388270a770 (patch)
tree66d4ce12bb5236c50ab6a5d253bc8c6d8b5d292d /svx/source/customshapes
parent17d821af6bb9df93569836a92f6bed975587fc6c (diff)
tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'svx/source/customshapes')
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx18
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.cxx12
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.hxx4
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeEngine.cxx8
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFontWork.cxx22
5 files changed, 32 insertions, 32 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index c45e41abe3f4..c3c2d4c33099 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -716,7 +716,7 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) :
Size aS( pCustomShapeObj->GetLogicRect().GetSize() );
aP.X() -= aS.Width() / 2;
aP.Y() -= aS.Height() / 2;
- aLogicRect = Rectangle( aP, aS );
+ aLogicRect = tools::Rectangle( aP, aS );
OUString sShapeType;
const SdrCustomShapeGeometryItem& rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(pCustomShapeObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
@@ -1086,7 +1086,7 @@ Color EnhancedCustomShape2d::GetColorData( const Color& rFillColor, sal_uInt32 n
}
}
-Rectangle EnhancedCustomShape2d::GetTextRect() const
+tools::Rectangle EnhancedCustomShape2d::GetTextRect() const
{
sal_Int32 nIndex, nSize = seqTextFrames.getLength();
if ( !nSize )
@@ -1106,7 +1106,7 @@ Rectangle EnhancedCustomShape2d::GetTextRect() const
aTopLeft.Y() = aLogicRect.GetHeight() - aTopLeft.Y();
aBottomRight.Y() = aLogicRect.GetHeight() - aBottomRight.Y();
}
- Rectangle aRect( aTopLeft, aBottomRight );
+ tools::Rectangle aRect( aTopLeft, aBottomRight );
SAL_INFO("svx", aRect.GetWidth() << " x " << aRect.GetHeight());
if( aRect.GetWidth() <= 1 || aRect.GetHeight() <= 1 )
return aLogicRect;
@@ -1396,9 +1396,9 @@ void EnhancedCustomShape2d::SwapStartAndEndArrow( SdrObject* pObj ) //#108274
pObj->SetMergedItem( aLineEndCenter );
}
-static basegfx::B2DPolygon CreateArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, const bool bClockwise, bool bFullCircle = false )
+static basegfx::B2DPolygon CreateArc( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd, const bool bClockwise, bool bFullCircle = false )
{
- Rectangle aRect( rRect );
+ tools::Rectangle aRect( rRect );
Point aStart( rStart );
Point aEnd( rEnd );
@@ -1641,7 +1641,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen
fHeight*= fYScale;
Point aP( (sal_Int32)( _aCenter.X() - fWidth ), (sal_Int32)( _aCenter.Y() - fHeight ) );
Size aS( (sal_Int32)( fWidth * 2.0 ), (sal_Int32)( fHeight * 2.0 ) );
- Rectangle aRect( aP, aS );
+ tools::Rectangle aRect( aP, aS );
if ( aRect.GetWidth() && aRect.GetHeight() )
{
double fStartAngle, fEndAngle;
@@ -1779,7 +1779,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen
sal_uInt32 nXor = bClockwise ? 3 : 2;
for ( sal_uInt16 i = 0; ( i < nPntCount ) && ( ( rSrcPt + 3 ) < nCoordSize ); i++ )
{
- Rectangle aRect( GetPoint( seqCoordinates[ rSrcPt ], true, true ), GetPoint( seqCoordinates[ rSrcPt + 1 ], true, true ) );
+ tools::Rectangle aRect( GetPoint( seqCoordinates[ rSrcPt ], true, true ), GetPoint( seqCoordinates[ rSrcPt + 1 ], true, true ) );
if ( aRect.GetWidth() && aRect.GetHeight() )
{
Point aCenter( aRect.Center() );
@@ -1831,7 +1831,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen
fWR *= fXScale;
fHR *= fYScale;
- Rectangle aRect ( Point ( aStartPoint.getX() - fWR*cos(fT) - fWR, aStartPoint.getY() - fHR*sin(fT) - fHR ),
+ tools::Rectangle aRect ( Point ( aStartPoint.getX() - fWR*cos(fT) - fWR, aStartPoint.getY() - fHR*sin(fT) - fHR ),
Point ( aStartPoint.getX() - fWR*cos(fT) + fWR, aStartPoint.getY() - fHR*sin(fT) + fHR) );
Point aEndPoint ( aStartPoint.getX() - fWR*(cos(fT) - cos(fTE)), aStartPoint.getY() - fHR*(sin(fT) - sin(fTE)) );
@@ -2334,7 +2334,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly )
if(pRet)
{
// move to target position
- Rectangle aCurRect(pRet->GetSnapRect());
+ tools::Rectangle aCurRect(pRet->GetSnapRect());
aCurRect.Move(aLogicRect.Left(), aLogicRect.Top());
pRet->NbcSetSnapRect(aCurRect);
}
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index a52bfffe4097..d33942b0190f 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -178,7 +178,7 @@ drawing::Direction3D GetDirection3D( const SdrCustomShapeGeometryItem& rItem, co
}
-EnhancedCustomShape3d::Transformation2D::Transformation2D( const SdrObject* pCustomShape, const Rectangle& /*rBoundRect*/, const double *pM )
+EnhancedCustomShape3d::Transformation2D::Transformation2D( const SdrObject* pCustomShape, const tools::Rectangle& /*rBoundRect*/, const double *pM )
: aCenter( pCustomShape->GetSnapRect().Center() )
, eProjectionMode( drawing::ProjectionMode_PARALLEL )
, fSkewAngle(0.0)
@@ -280,7 +280,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
{
bool bIsMirroredX = static_cast<const SdrObjCustomShape*>(pCustomShape)->IsMirroredX();
bool bIsMirroredY = static_cast<const SdrObjCustomShape*>(pCustomShape)->IsMirroredY();
- Rectangle aSnapRect( pCustomShape->GetLogicRect() );
+ tools::Rectangle aSnapRect( pCustomShape->GetLogicRect() );
long nObjectRotation = pCustomShape->GetRotateAngle();
if ( nObjectRotation )
{
@@ -367,7 +367,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
}
}
- Rectangle aBoundRect2d;
+ tools::Rectangle aBoundRect2d;
SdrObjListIter aIter( *pShape2d, SdrIterMode::DeepNoGroups );
const bool bMultipleSubObjects(aIter.Count() > 1);
@@ -476,7 +476,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
}
const basegfx::B2DRange aTempRange(basegfx::tools::getRange(aPolyPoly));
- const Rectangle aBoundRect(basegfx::fround(aTempRange.getMinX()), basegfx::fround(aTempRange.getMinY()), basegfx::fround(aTempRange.getMaxX()), basegfx::fround(aTempRange.getMaxY()));
+ const tools::Rectangle aBoundRect(basegfx::fround(aTempRange.getMinX()), basegfx::fround(aTempRange.getMinY()), basegfx::fround(aTempRange.getMaxX()), basegfx::fround(aTempRange.getMaxY()));
aBoundRect2d.Union( aBoundRect );
// #i122777# depth 0 is okay for planes when using double-sided
@@ -524,7 +524,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
(sal_Int32)( (double)( aBoundRect.Top() - aSnapRect.Top() ) * (double)aBmpSize.Height() / (double)aSnapRect.GetHeight() ) );
Size aSize( (sal_Int32)( aBmpSize.Width() * fXScale ),
(sal_Int32)( aBmpSize.Height() * fYScale ) );
- Rectangle aCropRect( aPt, aSize );
+ tools::Rectangle aCropRect( aPt, aSize );
aFillBmp.Crop( aCropRect );
p3DObj->SetMergedItem(XFillBitmapItem(OUString(), Graphic(aFillBmp)));
}
@@ -736,7 +736,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
return pRet;
}
-Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( const SdrObject* pCustomShape, const Rectangle& rSnapRect, const Rectangle& rBoundRect, const double* pMap )
+tools::Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( const SdrObject* pCustomShape, const tools::Rectangle& rSnapRect, const tools::Rectangle& rBoundRect, const double* pMap )
{
const SdrCustomShapeGeometryItem& rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
const Point aCenter( rSnapRect.Center() );
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.hxx b/svx/source/customshapes/EnhancedCustomShape3d.hxx
index 81c6558065e9..16b5ccffb2ce 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.hxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.hxx
@@ -50,7 +50,7 @@ class EnhancedCustomShape3d
public:
- Transformation2D( const SdrObject* pCustomShape, const Rectangle& rBoundRect, const double* pMap );
+ Transformation2D( const SdrObject* pCustomShape, const tools::Rectangle& rBoundRect, const double* pMap );
basegfx::B3DPolygon ApplySkewSettings( const basegfx::B3DPolygon& rPolygon3D ) const;
Point Transform2D( const basegfx::B3DPoint& rPoint ) const;
@@ -60,7 +60,7 @@ class EnhancedCustomShape3d
friend class Transformation2D;
protected:
- static Rectangle CalculateNewSnapRect( const SdrObject* pCustomShape, const Rectangle& rSnapRect, const Rectangle& rBoundRect, const double* pMap );
+ static tools::Rectangle CalculateNewSnapRect( const SdrObject* pCustomShape, const tools::Rectangle& rSnapRect, const tools::Rectangle& rBoundRect, const double* pMap );
public:
static SdrObject* Create3DObject( const SdrObject* pShape2d, const SdrObject* pCustomShape );
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index b5a600816bae..a919f7c2c38e 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
@@ -190,7 +190,7 @@ SdrObject* EnhancedCustomShapeEngine::ImplForceGroupWithText( const SdrObjCustom
aTargetItemSet.Put(XFillStyleItem(drawing::FillStyle_NONE));
// get the text bounds and set at text object
- Rectangle aTextBounds = pCustoObj->GetSnapRect();
+ tools::Rectangle aTextBounds = pCustoObj->GetSnapRect();
SdrObject* pSdrObjCustomShape( GetSdrObjectFromXShape( mxShape ) );
if ( pSdrObjCustomShape )
{
@@ -293,7 +293,7 @@ Reference< drawing::XShape > SAL_CALL EnhancedCustomShapeEngine::render()
SdrObject::Free( pRenderedShape );
pRenderedShape = pRenderedShape3d;
}
- Rectangle aRect( pSdrObjCustomShape->GetSnapRect() );
+ tools::Rectangle aRect( pSdrObjCustomShape->GetSnapRect() );
const GeoStat& rGeoStat = static_cast<SdrObjCustomShape*>(pSdrObjCustomShape)->GetGeoStat();
if ( rGeoStat.nShearAngle )
@@ -358,7 +358,7 @@ awt::Rectangle SAL_CALL EnhancedCustomShapeEngine::getTextBounds()
if ( pSdrObjCustomShape )
{
EnhancedCustomShape2d aCustomShape2d( pSdrObjCustomShape );
- Rectangle aRect( aCustomShape2d.GetTextRect() );
+ tools::Rectangle aRect( aCustomShape2d.GetTextRect() );
aTextRect.X = aRect.Left();
aTextRect.Y = aRect.Top();
aTextRect.Width = aRect.GetWidth();
@@ -378,7 +378,7 @@ drawing::PolyPolygonBezierCoords SAL_CALL EnhancedCustomShapeEngine::getLineGeom
SdrObject* pObj = aCustomShape2d.CreateLineGeometry();
if ( pObj )
{
- Rectangle aRect( pSdrObjCustomShape->GetSnapRect() );
+ tools::Rectangle aRect( pSdrObjCustomShape->GetSnapRect() );
bool bFlipV = aCustomShape2d.IsFlipVert();
bool bFlipH = aCustomShape2d.IsFlipHorz();
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index 076bfd075003..c01ee3d3282b 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -62,19 +62,19 @@ using namespace com::sun::star::uno;
struct FWCharacterData // representing a single character
{
std::vector< tools::PolyPolygon > vOutlines;
- Rectangle aBoundRect;
+ tools::Rectangle aBoundRect;
};
struct FWParagraphData // representing a single paragraph
{
OUString aString;
std::vector< FWCharacterData > vCharacters;
- Rectangle aBoundRect;
+ tools::Rectangle aBoundRect;
SvxFrameDirection nFrameDirection;
};
struct FWTextArea // representing multiple concluding paragraphs
{
std::vector< FWParagraphData > vParagraphs;
- Rectangle aBoundRect;
+ tools::Rectangle aBoundRect;
};
struct FWData // representing the whole text
{
@@ -279,7 +279,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
// vertical _> each single character needs to be rotated by 90
sal_Int32 i;
sal_Int32 nHeight = 0;
- Rectangle aSingleCharacterUnion;
+ tools::Rectangle aSingleCharacterUnion;
for ( i = 0; i < rText.getLength(); i++ )
{
FWCharacterData aCharacterData;
@@ -364,7 +364,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
rPolyPoly.Move( 0, nVerticalOffset );
// retrieving the boundrect for the paragraph
- Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
+ tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
aParagraphIter->aBoundRect.Union( aBoundRect );
}
++aCharacterIter;
@@ -374,13 +374,13 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
if ( aParagraphIter->aBoundRect.IsEmpty() )
{
if ( rTextArea.aBoundRect.IsEmpty() )
- rTextArea.aBoundRect = Rectangle( Point( 0, 0 ), Size( 1, rFWData.nSingleLineHeight ) );
+ rTextArea.aBoundRect = tools::Rectangle( Point( 0, 0 ), Size( 1, rFWData.nSingleLineHeight ) );
else
rTextArea.aBoundRect.Bottom() += rFWData.nSingleLineHeight;
}
else
{
- Rectangle& rParagraphBoundRect = aParagraphIter->aBoundRect;
+ tools::Rectangle& rParagraphBoundRect = aParagraphIter->aBoundRect;
rTextArea.aBoundRect.Union( rParagraphBoundRect );
if ( bSameLetterHeights )
@@ -393,7 +393,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
std::vector< tools::PolyPolygon >::const_iterator aOutlineIEnd( aCharacterIter->vOutlines.end() );
while( aOutlineIter != aOutlineIEnd )
{
- Rectangle aPolyPolyBoundRect( aOutlineIter->GetBoundRect() );
+ tools::Rectangle aPolyPolyBoundRect( aOutlineIter->GetBoundRect() );
if (aPolyPolyBoundRect.GetHeight() != rParagraphBoundRect.GetHeight() && aPolyPolyBoundRect.GetHeight())
aOutlineIter->Scale( 1.0, (double)rParagraphBoundRect.GetHeight() / aPolyPolyBoundRect.GetHeight() );
aPolyPolyBoundRect = aOutlineIter->GetBoundRect();
@@ -552,7 +552,7 @@ void CalcDistances( const tools::Polygon& rPoly, std::vector< double >& rDistanc
}
void InsertMissingOutlinePoints( const tools::Polygon& /*rOutlinePoly*/, const std::vector< double >& rDistances,
- const Rectangle& rTextAreaBoundRect, tools::Polygon& rPoly )
+ const tools::Rectangle& rTextAreaBoundRect, tools::Polygon& rPoly )
{
sal_uInt16 nSize = rPoly.GetSize();
if (nSize == 0)
@@ -641,7 +641,7 @@ void FitTextOutlinesToShapeOutlines( const tools::PolyPolygon& aOutlines2d, FWDa
sal_uInt16 nOutline2dIdx = 0;
while( aTextAreaIter != aTextAreaIEnd )
{
- Rectangle rTextAreaBoundRect = aTextAreaIter->aBoundRect;
+ tools::Rectangle rTextAreaBoundRect = aTextAreaIter->aBoundRect;
sal_Int32 nLeft = rTextAreaBoundRect.Left();
sal_Int32 nTop = rTextAreaBoundRect.Top();
sal_Int32 nWidth = rTextAreaBoundRect.GetWidth();
@@ -672,7 +672,7 @@ void FitTextOutlinesToShapeOutlines( const tools::PolyPolygon& aOutlines2d, FWDa
while( aOutlineIter != aOutlineIEnd )
{
tools::PolyPolygon& rPolyPoly = *aOutlineIter;
- Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
+ tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
double fx1 = aBoundRect.Left() - nLeft;
double fx2 = aBoundRect.Right() - nLeft;
double fy1, fy2;