summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
Diffstat (limited to 'filter')
-rw-r--r--filter/source/flash/swfexporter.cxx2
-rw-r--r--filter/source/flash/swfwriter.cxx4
-rw-r--r--filter/source/flash/swfwriter.hxx12
-rw-r--r--filter/source/flash/swfwriter1.cxx26
-rw-r--r--filter/source/flash/swfwriter2.cxx6
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx22
-rw-r--r--filter/source/graphicfilter/icgm/bitmap.cxx8
-rw-r--r--filter/source/graphicfilter/icgm/class4.cxx4
-rw-r--r--filter/source/graphicfilter/idxf/dxf2mtf.cxx4
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx2
-rw-r--r--filter/source/graphicfilter/ios2met/ios2met.cxx36
-rw-r--r--filter/source/graphicfilter/ipict/ipict.cxx44
-rw-r--r--filter/source/graphicfilter/ipict/shape.cxx20
-rw-r--r--filter/source/graphicfilter/ipict/shape.hxx8
-rw-r--r--filter/source/msfilter/escherex.cxx42
-rw-r--r--filter/source/msfilter/eschesdo.cxx26
-rw-r--r--filter/source/msfilter/eschesdo.hxx8
-rw-r--r--filter/source/msfilter/msdffimp.cxx92
-rw-r--r--filter/source/msfilter/svdfppt.cxx30
-rw-r--r--filter/source/pdf/pdfexport.cxx8
-rw-r--r--filter/source/svg/svgfontexport.cxx8
-rw-r--r--filter/source/svg/svgwriter.cxx28
-rw-r--r--filter/source/svg/svgwriter.hxx8
23 files changed, 224 insertions, 224 deletions
diff --git a/filter/source/flash/swfexporter.cxx b/filter/source/flash/swfexporter.cxx
index b0110010b561..37ea443db756 100644
--- a/filter/source/flash/swfexporter.cxx
+++ b/filter/source/flash/swfexporter.cxx
@@ -684,7 +684,7 @@ bool FlashExporter::getMetaFile( Reference< XComponent >&xComponent, GDIMetaFile
aFilter.ImportGraphic( aGraphic, aFile.GetURL(), *aFile.GetStream( StreamMode::READ ) );
BitmapEx rBitmapEx( aGraphic.GetBitmap(), Color(255,255,255) );
- Rectangle clipRect;
+ tools::Rectangle clipRect;
for( size_t i = 0, nCount = rMtf.GetActionSize(); i < nCount; i++ )
{
const MetaAction* pAction = rMtf.GetAction( i );
diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx
index 91cd5e47f9a4..9c99d8dfb607 100644
--- a/filter/source/flash/swfwriter.cxx
+++ b/filter/source/flash/swfwriter.cxx
@@ -60,7 +60,7 @@ Writer::Writer( sal_Int32 nTWIPWidthOutput, sal_Int32 nTWIPHeightOutput, sal_Int
mpFontsStream = maFontsTempFile.GetStream( StreamMode::WRITE|StreamMode::TRUNC );
// define an invisible button with the size of a page
- Rectangle aRect( 0, 0, (long)( mnDocWidth * mnDocXScale ), (long)( mnDocHeight * mnDocYScale ) );
+ tools::Rectangle aRect( 0, 0, (long)( mnDocWidth * mnDocXScale ), (long)( mnDocHeight * mnDocYScale ) );
tools::Polygon aPoly( aRect );
FillStyle aFill = FillStyle( Color(COL_WHITE) );
mnWhiteBackgroundShapeId = defineShape( aPoly, aFill );
@@ -151,7 +151,7 @@ void Writer::storeTo( Reference< XOutputStream > &xOutStream )
aHeader.WriteUInt32( 0 );
- Rectangle aDocRect( 0, 0, static_cast<long>(mnDocWidth*mnDocXScale), static_cast<long>(mnDocHeight*mnDocYScale) );
+ tools::Rectangle aDocRect( 0, 0, static_cast<long>(mnDocWidth*mnDocXScale), static_cast<long>(mnDocHeight*mnDocYScale) );
aHeader.addRect( aDocRect );
diff --git a/filter/source/flash/swfwriter.hxx b/filter/source/flash/swfwriter.hxx
index f9425162f365..b1640de9a80e 100644
--- a/filter/source/flash/swfwriter.hxx
+++ b/filter/source/flash/swfwriter.hxx
@@ -176,12 +176,12 @@ public:
void addRGBA( const Color& rColor );
void addRGB( const Color& rColor );
- void addRect( const Rectangle& rRect );
+ void addRect( const tools::Rectangle& rRect );
void addMatrix( const ::basegfx::B2DHomMatrix& rMatrix ); // #i73264#
void addStream( SvStream& rIn );
static void writeMatrix( SvStream& rOut, const ::basegfx::B2DHomMatrix& rMatrix ); // #i73264#
- static void writeRect( SvStream& rOut, const Rectangle& rRect );
+ static void writeRect( SvStream& rOut, const tools::Rectangle& rRect );
private:
sal_uInt8 mnTagId;
@@ -215,7 +215,7 @@ public:
explicit FillStyle( const Color& rSolidColor );
/** this c'tor creates a linear or radial gradient fill style */
- FillStyle( const Rectangle& rBoundRect, const Gradient& rGradient );
+ FillStyle( const tools::Rectangle& rBoundRect, const Gradient& rGradient );
/** this c'tor creates a tiled or clipped bitmap fill style */
FillStyle( sal_uInt16 nBitmapId, bool bClipped, const ::basegfx::B2DHomMatrix& rMatrix ); // #i73264#
@@ -230,7 +230,7 @@ private:
sal_uInt16 mnBitmapId;
Color maColor;
Gradient maGradient;
- Rectangle maBoundRect;
+ tools::Rectangle maBoundRect;
};
@@ -317,7 +317,7 @@ private:
sal_uInt16 createID() { return mnNextId++; }
void Impl_writeBmp( sal_uInt16 nBitmapId, sal_uInt32 width, sal_uInt32 height, sal_uInt8 *pCompressed, sal_uInt32 compressed_size );
- void Impl_writeImage( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& rSrcPt, const Size& rSrcSz, const Rectangle& rClipRect, bool bMap );
+ void Impl_writeImage( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& rSrcPt, const Size& rSrcSz, const tools::Rectangle& rClipRect, bool bMap );
void Impl_writeJPEG(sal_uInt16 nBitmapId, const sal_uInt8* pJpgData, sal_uInt32 nJpgDataLength, sal_uInt8 *pCompressed, sal_uInt32 compressed_size );
void Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon);
void Impl_writeActions( const GDIMetaFile& rMtf );
@@ -329,7 +329,7 @@ private:
void Impl_writeText( const Point& rPos, const OUString& rText, const long* pDXArray, long nWidth, Color aTextColor );
void Impl_writeGradientEx( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
void Impl_writeLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = nullptr );
- void Impl_writeRect( const Rectangle& rRect, long nRadX, long nRadY );
+ void Impl_writeRect( const tools::Rectangle& rRect, long nRadX, long nRadY );
void Impl_writeEllipse( const Point& rCenter, long nRadX, long nRadY );
bool Impl_writeFilling( SvtGraphicFill& rFilling );
bool Impl_writeStroke( SvtGraphicStroke& rStroke );
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index ef3bbf5118bf..b3bdb5dff933 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -318,7 +318,7 @@ void Writer::Impl_writeGradientEx( const tools::PolyPolygon& rPolyPoly, const Gr
if( (rGradient.GetStyle() == GradientStyle::Linear && rGradient.GetAngle() == 900) || (rGradient.GetStyle() == GradientStyle::Radial) )
{
- const Rectangle aBoundRect( aPolyPolygon.GetBoundRect() );
+ const tools::Rectangle aBoundRect( aPolyPolygon.GetBoundRect() );
FillStyle aFillStyle( aBoundRect, rGradient );
@@ -576,7 +576,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
// CL: This is still a hack until we figure out how to calculate a correct bound rect
// for rotated text
- Rectangle textBounds( 0, 0, static_cast<long>(mnDocWidth*mnDocXScale), static_cast<long>(mnDocHeight*mnDocYScale) );
+ tools::Rectangle textBounds( 0, 0, static_cast<long>(mnDocWidth*mnDocXScale), static_cast<long>(mnDocHeight*mnDocYScale) );
double scale = 1.0;
// scale width if we have a stretched text
@@ -852,17 +852,17 @@ sal_uInt16 Writer::defineBitmap( const BitmapEx &bmpSource, sal_Int32 nJPEGQuali
}
-void Writer::Impl_writeImage( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& /* rSrcPt */, const Size& /* rSrcSz */, const Rectangle& rClipRect, bool bNeedToMapClipRect )
+void Writer::Impl_writeImage( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& /* rSrcPt */, const Size& /* rSrcSz */, const tools::Rectangle& rClipRect, bool bNeedToMapClipRect )
{
if( !!rBmpEx )
{
BitmapEx bmpSource( rBmpEx );
- Rectangle originalPixelRect = Rectangle(Point(), bmpSource.GetSizePixel());
+ tools::Rectangle originalPixelRect = tools::Rectangle(Point(), bmpSource.GetSizePixel());
Point srcPt( map(rPt) );
Size srcSize( map(rSz) );
- Rectangle destRect( srcPt, srcSize );
+ tools::Rectangle destRect( srcPt, srcSize );
// AS: Christian, my scaling factors are different than yours, and work better for me.
// However, I can't explain why exactly. I got some of this by trial and error.
@@ -879,15 +879,15 @@ void Writer::Impl_writeImage( const BitmapEx& rBmpEx, const Point& rPt, const Si
// clipping rectangle to get mapped. However, sometimes there are multiple layers
// of mapping which eventually do cause the clipping rect to be mapped.
Size clipSize( bNeedToMapClipRect ? map(rClipRect.GetSize()) : rClipRect.GetSize() );
- Rectangle clipRect = Rectangle(Point(), clipSize);
+ tools::Rectangle clipRect = tools::Rectangle(Point(), clipSize);
destRect.Intersection( clipRect );
- Rectangle cropRect(destRect);
+ tools::Rectangle cropRect(destRect);
// AS: The bmp origin is always 0,0 so we have to adjust before we crop.
cropRect.Move(-srcPt.X(), -srcPt.Y());
// AS: Rectangle has no scale function (?!) so I do it manually...
- Rectangle cropPixelRect(static_cast<long>(cropRect.Left()*XScale),
+ tools::Rectangle cropPixelRect(static_cast<long>(cropRect.Left()*XScale),
static_cast<long>(cropRect.Top()*YScale),
static_cast<long>(cropRect.Right()*XScale),
static_cast<long>(cropRect.Bottom()*YScale));
@@ -1114,7 +1114,7 @@ void Writer::Impl_writeLine( const Point& rPt1, const Point& rPt2, const Color*
}
-void Writer::Impl_writeRect( const Rectangle& rRect, long nRadX, long nRadY )
+void Writer::Impl_writeRect( const tools::Rectangle& rRect, long nRadX, long nRadY )
{
if( (rRect.Top() == rRect.Bottom()) || (rRect.Left() == rRect.Right()) )
{
@@ -1187,11 +1187,11 @@ bool Writer::Impl_writeFilling( SvtGraphicFill& rFilling )
tools::PolyPolygon aPolyPolygon;
rFilling.getPath( aPolyPolygon );
- Rectangle aOldRect( aPolyPolygon.GetBoundRect() );
+ tools::Rectangle aOldRect( aPolyPolygon.GetBoundRect() );
map( aPolyPolygon );
- Rectangle aNewRect( aPolyPolygon.GetBoundRect() );
+ tools::Rectangle aNewRect( aPolyPolygon.GetBoundRect() );
switch( rFilling.getFillType() )
{
@@ -1344,7 +1344,7 @@ void Writer::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegf
void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
{
- Rectangle clipRect;
+ tools::Rectangle clipRect;
int bMap = 0;
for( size_t i = 0, nCount = rMtf.GetActionSize(); i < nCount; i++ )
{
@@ -1405,7 +1405,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case MetaActionType::ELLIPSE:
{
const MetaEllipseAction* pA = static_cast<const MetaEllipseAction*>(pAction);
- const Rectangle& rRect = pA->GetRect();
+ const tools::Rectangle& rRect = pA->GetRect();
Impl_writeEllipse( rRect.Center(), rRect.GetWidth() >> 1, rRect.GetHeight() >> 1 );
}
diff --git a/filter/source/flash/swfwriter2.cxx b/filter/source/flash/swfwriter2.cxx
index c9ee555bcb65..5d8acaed1150 100644
--- a/filter/source/flash/swfwriter2.cxx
+++ b/filter/source/flash/swfwriter2.cxx
@@ -220,13 +220,13 @@ void Tag::addRGB( const Color& rColor )
}
-void Tag::addRect( const Rectangle& rRect )
+void Tag::addRect( const tools::Rectangle& rRect )
{
writeRect( *this, rRect );
}
-void Tag::writeRect( SvStream& rOut, const Rectangle& rRect )
+void Tag::writeRect( SvStream& rOut, const tools::Rectangle& rRect )
{
BitStream aBits;
@@ -509,7 +509,7 @@ FillStyle::FillStyleType Impl_getFillStyleType( const Gradient& rGradient )
/** this c'tor creates a linear or radial gradient fill style */
-FillStyle::FillStyle( const Rectangle& rBoundRect, const Gradient& rGradient )
+FillStyle::FillStyle( const tools::Rectangle& rBoundRect, const Gradient& rGradient )
: meType(Impl_getFillStyleType(rGradient))
, mnBitmapId(0)
, maGradient(rGradient)
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 33bf466a2972..6bfb2476f3bd 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -189,8 +189,8 @@ private:
void ImplWriteLineInfo( double fLineWidth, double fMiterLimit, SvtGraphicStroke::CapType eLineCap,
SvtGraphicStroke::JoinType eJoinType, SvtGraphicStroke::DashArray& rDashArray );
void ImplWriteLineInfo( const LineInfo& rLineInfo );
- void ImplRect( const Rectangle & rRectangle );
- void ImplRectFill ( const Rectangle & rRectangle );
+ void ImplRect( const tools::Rectangle & rRectangle );
+ void ImplRectFill ( const tools::Rectangle & rRectangle );
void ImplWriteGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, VirtualDevice& rVDev );
void ImplIntersect( const tools::PolyPolygon& rPolyPoly );
void ImplPolyPoly( const tools::PolyPolygon & rPolyPolygon, bool bTextOutline = false );
@@ -664,7 +664,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case MetaActionType::ELLIPSE :
{
- Rectangle aRect = static_cast<const MetaEllipseAction*>(pMA)->GetRect();
+ tools::Rectangle aRect = static_cast<const MetaEllipseAction*>(pMA)->GetRect();
Point aCenter = aRect.Center();
tools::Polygon aPoly( aCenter, aRect.GetWidth() / 2, aRect.GetHeight() / 2 );
tools::PolyPolygon aPolyPoly( aPoly );
@@ -816,7 +816,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case MetaActionType::BMPSCALEPART :
{
Bitmap aBitmap( static_cast<const MetaBmpScalePartAction*>(pMA)->GetBitmap() );
- aBitmap.Crop( Rectangle( static_cast<const MetaBmpScalePartAction*>(pMA)->GetSrcPoint(),
+ aBitmap.Crop( tools::Rectangle( static_cast<const MetaBmpScalePartAction*>(pMA)->GetSrcPoint(),
static_cast<const MetaBmpScalePartAction*>(pMA)->GetSrcSize() ) );
if ( mbGrayScale )
aBitmap.Convert( BmpConversion::N8BitGreys );
@@ -855,7 +855,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case MetaActionType::BMPEXSCALEPART :
{
BitmapEx aBitmapEx( static_cast<const MetaBmpExScalePartAction*>(pMA)->GetBitmapEx() );
- aBitmapEx.Crop( Rectangle( static_cast<const MetaBmpExScalePartAction*>(pMA)->GetSrcPoint(),
+ aBitmapEx.Crop( tools::Rectangle( static_cast<const MetaBmpExScalePartAction*>(pMA)->GetSrcPoint(),
static_cast<const MetaBmpExScalePartAction*>(pMA)->GetSrcSize() ) );
Bitmap aBitmap( aBitmapEx.GetBitmap() );
if ( mbGrayScale )
@@ -905,7 +905,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case MetaActionType::WALLPAPER :
{
const MetaWallpaperAction* pA = static_cast<const MetaWallpaperAction*>(pMA);
- Rectangle aRect = pA->GetRect();
+ tools::Rectangle aRect = pA->GetRect();
Wallpaper aWallpaper = pA->GetWallpaper();
if ( aWallpaper.IsBitmap() )
@@ -1450,7 +1450,7 @@ void PSWriter::ImplScale( const double& fX, const double& fY )
ImplExecMode( PS_RET );
}
-void PSWriter::ImplRect( const Rectangle & rRect )
+void PSWriter::ImplRect( const tools::Rectangle & rRect )
{
if ( bFillColor )
ImplRectFill( rRect );
@@ -1473,7 +1473,7 @@ void PSWriter::ImplRect( const Rectangle & rRect )
mnCursorPos = 0;
}
-void PSWriter::ImplRectFill( const Rectangle & rRect )
+void PSWriter::ImplRectFill( const tools::Rectangle & rRect )
{
double nWidth = rRect.GetWidth();
double nHeight = rRect.GetHeight();
@@ -1672,7 +1672,7 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi
bool bDoTrans = false;
- Rectangle aRect;
+ tools::Rectangle aRect;
vcl::Region aRegion;
if ( pMaskBitmap )
@@ -1685,7 +1685,7 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi
if ( nHeight > 10 )
nHeight = 8;
}
- aRect = Rectangle( Point( 0, nHeightOrg - nHeightLeft ), Size( (long)nWidth, (long)nHeight ) );
+ aRect = tools::Rectangle( Point( 0, nHeightOrg - nHeightLeft ), Size( (long)nWidth, (long)nHeight ) );
aRegion = vcl::Region( pMaskBitmap->CreateRegion( COL_BLACK, aRect ) );
if( mnLevel == 1 )
@@ -1707,7 +1707,7 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi
if ( nHeight != nHeightOrg )
{
nYHeight = nYHeightOrg * nHeight / nHeightOrg;
- aTileBitmap.Crop( Rectangle( Point( 0, nHeightOrg - nHeightLeft ), Size( nWidth, nHeight ) ) );
+ aTileBitmap.Crop( tools::Rectangle( Point( 0, nHeightOrg - nHeightLeft ), Size( nWidth, nHeight ) ) );
}
if ( bDoTrans )
{
diff --git a/filter/source/graphicfilter/icgm/bitmap.cxx b/filter/source/graphicfilter/icgm/bitmap.cxx
index 44c8169562f4..215b46a17019 100644
--- a/filter/source/graphicfilter/icgm/bitmap.cxx
+++ b/filter/source/graphicfilter/icgm/bitmap.cxx
@@ -323,8 +323,8 @@ void CGMBitmap::ImplInsert( CGMBitmapDescriptor& rSource, CGMBitmapDescriptor& r
if ( mpCGM->mnVDCYmul == -1 )
rDest.mnOrigin = rSource.mnOrigin; // new origin
rDest.mpBitmap->Expand( 0, rSource.mnY );
- rDest.mpBitmap->CopyPixel( Rectangle( Point( 0, rDest.mnY ), Size( rSource.mnX, rSource.mnY ) ),
- Rectangle( Point( 0, 0 ), Size( rSource.mnX, rSource.mnY ) ), rSource.mpBitmap );
+ rDest.mpBitmap->CopyPixel( tools::Rectangle( Point( 0, rDest.mnY ), Size( rSource.mnX, rSource.mnY ) ),
+ tools::Rectangle( Point( 0, 0 ), Size( rSource.mnX, rSource.mnY ) ), rSource.mpBitmap );
FloatPoint aFloatPoint;
aFloatPoint.X = rSource.mnQ.X - rSource.mnR.X;
aFloatPoint.Y = rSource.mnQ.Y - rSource.mnR.Y;
@@ -338,8 +338,8 @@ void CGMBitmap::ImplInsert( CGMBitmapDescriptor& rSource, CGMBitmapDescriptor& r
if ( mpCGM->mnVDCYmul == 1 )
rDest.mnOrigin = rSource.mnOrigin; // new origin
rDest.mpBitmap->Expand( 0, rSource.mnY );
- rDest.mpBitmap->CopyPixel( Rectangle( Point( 0, rDest.mnY ), Size( rSource.mnX, rSource.mnY ) ),
- Rectangle( Point( 0, 0 ), Size( rSource.mnX, rSource.mnY ) ), rSource.mpBitmap );
+ rDest.mpBitmap->CopyPixel( tools::Rectangle( Point( 0, rDest.mnY ), Size( rSource.mnX, rSource.mnY ) ),
+ tools::Rectangle( Point( 0, 0 ), Size( rSource.mnX, rSource.mnY ) ), rSource.mpBitmap );
rDest.mnP = rSource.mnP;
rDest.mnR = rSource.mnR;
}
diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx
index 805b92785fd3..c74333123c6b 100644
--- a/filter/source/graphicfilter/icgm/class4.cxx
+++ b/filter/source/graphicfilter/icgm/class4.cxx
@@ -404,7 +404,7 @@ void CGM::ImplDoClass4()
if ( mbFigure )
{
- Rectangle aBoundingBox( Point( (long)( aCenterPoint.X - fRadius ), long( aCenterPoint.Y - fRadius ) ),
+ tools::Rectangle aBoundingBox( Point( (long)( aCenterPoint.X - fRadius ), long( aCenterPoint.Y - fRadius ) ),
Size( ( static_cast< long >( 2 * fRadius ) ), (long)( 2 * fRadius) ) );
tools::Polygon aPolygon( aBoundingBox, Point( (long)aStartingPoint.X, (long)aStartingPoint.Y ) ,Point( (long)aEndingPoint.X, (long)aEndingPoint.Y ), PolyStyle::Arc );
if ( nSwitch )
@@ -520,7 +520,7 @@ void CGM::ImplDoClass4()
if ( mbFigure )
{
- Rectangle aBoundingBox(
+ tools::Rectangle aBoundingBox(
Point( (long)( aCenter.X - aRadius.X ), long( aCenter.Y - aRadius.X ) ),
Size( static_cast< long >( 2 * aRadius.X ), (long)( 2 * aRadius.X ) ) );
tools::Polygon aPolygon( aBoundingBox,
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
index b867bca6e372..3ceab9525257 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
@@ -264,7 +264,7 @@ void DXF2GDIMetaFile::DrawCircleEntity(const DXFCircleEntity & rE, const DXFTran
rTransform.Transform(rE.aP0,aC);
if (rE.fThickness==0 && rTransform.TransCircleToEllipse(rE.fRadius,frx,fry)) {
pVirDev->DrawEllipse(
- Rectangle((long)(aC.fx-frx+0.5),(long)(aC.fy-fry+0.5),
+ tools::Rectangle((long)(aC.fx-frx+0.5),(long)(aC.fy-fry+0.5),
(long)(aC.fx+frx+0.5),(long)(aC.fy+fry+0.5)));
}
else {
@@ -324,7 +324,7 @@ void DXF2GDIMetaFile::DrawArcEntity(const DXFArcEntity & rE, const DXFTransform
rTransform.Transform(aVE,aPS);
}
pVirDev->DrawArc(
- Rectangle((long)(aC.fx-frx+0.5),(long)(aC.fy-fry+0.5),
+ tools::Rectangle((long)(aC.fx-frx+0.5),(long)(aC.fy-fry+0.5),
(long)(aC.fx+frx+0.5),(long)(aC.fy+fry+0.5)),
aPS,aPE
);
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index af4ab68457ea..3ab880a9ae3a 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -470,7 +470,7 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead,
pVDev->Push( PushFlags::FONT );
pVDev->SetFont( aFont );
- Rectangle aRect( Point( 1, 1 ), Size( nWidth - 2, nHeight - 2 ) );
+ tools::Rectangle aRect( Point( 1, 1 ), Size( nWidth - 2, nHeight - 2 ) );
pVDev->DrawRect( aRect );
OUString aString;
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index 9ba110cd8ec7..e2ebb601d1d6 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -350,8 +350,8 @@ private:
// While doing this a recording in the GDIMetaFile
// will take place.
sal_uLong nOrigPos; // initial position in pOS2MET
- Rectangle aBoundingRect; // bounding rectangle as stored in the file
- Rectangle aCalcBndRect; // bounding rectangle calculated on our own
+ tools::Rectangle aBoundingRect; // bounding rectangle as stored in the file
+ tools::Rectangle aCalcBndRect; // bounding rectangle calculated on our own
MapMode aGlobMapMode; // resolution of the picture
bool bCoord32;
@@ -853,7 +853,7 @@ Point OS2METReader::ReadPoint( const bool bAdjustBoundRect )
y=aBoundingRect.Bottom()-y;
if ( bAdjustBoundRect )
- aCalcBndRect.Union(Rectangle(x,y,x+1,y+1));
+ aCalcBndRect.Union(tools::Rectangle(x,y,x+1,y+1));
return Point(x,y);
}
@@ -908,7 +908,7 @@ void OS2METReader::ReadRelLine(bool bGivenPos, sal_uInt16 nOrderLen)
sal_Int8 nsignedbyte;
pOS2MET->ReadSChar( nsignedbyte ); aP0.X()+=(long)nsignedbyte;
pOS2MET->ReadSChar( nsignedbyte ); aP0.Y()-=(long)nsignedbyte;
- aCalcBndRect.Union(Rectangle(aP0,Size(1,1)));
+ aCalcBndRect.Union(tools::Rectangle(aP0,Size(1,1)));
aPolygon.SetPoint(aP0,i);
}
aAttr.aCurPos=aPolygon.GetPoint(nPolySize-1);
@@ -940,7 +940,7 @@ void OS2METReader::ReadBox(bool bGivenPos)
nHRound=ReadCoord(bCoord32);
nVRound=ReadCoord(bCoord32);
- Rectangle aBoxRect( P0, aAttr.aCurPos );
+ tools::Rectangle aBoxRect( P0, aAttr.aCurPos );
if ( pAreaStack )
AddPointsToArea( tools::Polygon( aBoxRect ) );
@@ -1057,7 +1057,7 @@ void OS2METReader::ReadChrStr(bool bGivenPos, bool bMove, bool bExtra, sal_uInt1
aSize = Size( pVirDev->GetTextWidth(aStr), pVirDev->GetTextHeight() );
if ( aAttr.nChrAng == 0 )
{
- aCalcBndRect.Union(Rectangle( Point(aP0.X(),aP0.Y()-aSize.Height()),
+ aCalcBndRect.Union(tools::Rectangle( Point(aP0.X(),aP0.Y()-aSize.Height()),
Size(aSize.Width(),aSize.Height()*2)));
if (bMove)
aAttr.aCurPos = Point( aP0.X() + aSize.Width(), aP0.Y());
@@ -1073,8 +1073,8 @@ void OS2METReader::ReadChrStr(bool bGivenPos, bool bMove, bool bExtra, sal_uInt1
aDummyPoly.Rotate( aP0, (short)aAttr.nChrAng );
if ( bMove )
aAttr.aCurPos = aDummyPoly.GetPoint( 0 );
- aCalcBndRect.Union( Rectangle( aDummyPoly.GetPoint( 0 ), aDummyPoly.GetPoint( 3 ) ) );
- aCalcBndRect.Union( Rectangle( aDummyPoly.GetPoint( 1 ), aDummyPoly.GetPoint( 2 ) ) );
+ aCalcBndRect.Union( tools::Rectangle( aDummyPoly.GetPoint( 0 ), aDummyPoly.GetPoint( 3 ) ) );
+ aCalcBndRect.Union( tools::Rectangle( aDummyPoly.GetPoint( 1 ), aDummyPoly.GetPoint( 2 ) ) );
}
}
@@ -1113,11 +1113,11 @@ void OS2METReader::ReadArc(bool bGivenPos)
w1=fmod((atan2(x1-cx,y1-cy)-atan2(x2-cx,y2-cy)),6.28318530718); if (w1<0) w1+=6.28318530718;
w3=fmod((atan2(x3-cx,y3-cy)-atan2(x2-cx,y2-cy)),6.28318530718); if (w3<0) w3+=6.28318530718;
if (w3<w1) {
- pVirDev->DrawArc(Rectangle((long)(cx-rx),(long)(cy-ry),
+ pVirDev->DrawArc(tools::Rectangle((long)(cx-rx),(long)(cy-ry),
(long)(cx+rx),(long)(cy+ry)),aP1,aP3);
}
else {
- pVirDev->DrawArc(Rectangle((long)(cx-rx),(long)(cy-ry),
+ pVirDev->DrawArc(tools::Rectangle((long)(cx-rx),(long)(cy-ry),
(long)(cx+rx),(long)(cy+ry)),aP3,aP1);
}
}
@@ -1126,7 +1126,7 @@ void OS2METReader::ReadFullArc(bool bGivenPos, sal_uInt16 nOrderSize)
{
Point aCenter;
long nP,nQ;
- Rectangle aRect;
+ tools::Rectangle aRect;
sal_uInt32 nMul; sal_uInt16 nMulS;
if (bGivenPos) {
@@ -1145,7 +1145,7 @@ void OS2METReader::ReadFullArc(bool bGivenPos, sal_uInt16 nOrderSize)
nQ=(nQ*nMul)>>16;
}
- aRect=Rectangle(aCenter.X()-nP,aCenter.Y()-nQ,
+ aRect=tools::Rectangle(aCenter.X()-nP,aCenter.Y()-nQ,
aCenter.X()+nP,aCenter.Y()+nQ);
aCalcBndRect.Union(aRect);
@@ -1170,7 +1170,7 @@ void OS2METReader::ReadPartialArc(bool bGivenPos, sal_uInt16 nOrderSize)
{
Point aP0, aCenter,aPStart,aPEnd;
sal_Int32 nP,nQ,nStart, nSweep;
- Rectangle aRect;
+ tools::Rectangle aRect;
sal_uInt32 nMul; sal_uInt16 nMulS;
double fStart, fEnd;
@@ -1199,7 +1199,7 @@ void OS2METReader::ReadPartialArc(bool bGivenPos, sal_uInt16 nOrderSize)
aPEnd= Point(aCenter.X()+(sal_Int32)( cos(fEnd)*nP),
aCenter.Y()+(sal_Int32)(-sin(fEnd)*nQ));
- aRect=Rectangle(aCenter.X()-nP,aCenter.Y()-nQ,
+ aRect=tools::Rectangle(aCenter.X()-nP,aCenter.Y()-nQ,
aCenter.X()+nP,aCenter.Y()+nQ);
aCalcBndRect.Union(aRect);
@@ -1387,7 +1387,7 @@ void OS2METReader::ReadMarker(bool bGivenPos, sal_uInt16 nOrderLen)
if (i!=0 || bGivenPos) aAttr.aCurPos=ReadPoint();
const long x = aAttr.aCurPos.X();
const long y=aAttr.aCurPos.Y();
- aCalcBndRect.Union(Rectangle(x-5,y-5,x+5,y+5));
+ aCalcBndRect.Union(tools::Rectangle(x-5,y-5,x+5,y+5));
switch (aAttr.nMrkSymbol) {
case 2: // PLUS
pVirDev->DrawLine(Point(x-4,y),Point(x+4,y));
@@ -1452,10 +1452,10 @@ void OS2METReader::ReadMarker(bool bGivenPos, sal_uInt16 nOrderLen)
break;
}
case 9: // DOT
- pVirDev->DrawEllipse(Rectangle(x-1,y-1,x+1,y+1));
+ pVirDev->DrawEllipse(tools::Rectangle(x-1,y-1,x+1,y+1));
break;
case 10: // SMALLCIRCLE
- pVirDev->DrawEllipse(Rectangle(x-2,y-2,x+2,y+2));
+ pVirDev->DrawEllipse(tools::Rectangle(x-2,y-2,x+2,y+2));
break;
case 64: // BLANK
break;
@@ -2233,7 +2233,7 @@ void OS2METReader::ReadDsc(sal_uInt16 nDscID, sal_uInt16 /*nDscLen*/)
aBoundingRect.Bottom() = y2;
// no output beside this bounding rect
- pVirDev->IntersectClipRegion( Rectangle( Point(), aBoundingRect.GetSize() ) );
+ pVirDev->IntersectClipRegion( tools::Rectangle( Point(), aBoundingRect.GetSize() ) );
break;
}
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index bcdbc3caa867..08fa3b6a9a5c 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -150,7 +150,7 @@ private:
sal_uLong nOrigPos; // Initial position in pPict.
bool IsVersion2; // If it is a version 2 Pictfile.
- Rectangle aBoundingRect; // Min/Max-Rectangle for the whole drawing.
+ tools::Rectangle aBoundingRect; // Min/Max-Rectangle for the whole drawing.
Point aPenPosition;
Point aTextPosition;
@@ -183,21 +183,21 @@ private:
Color ReadRGBColor();
- void ReadRectangle(Rectangle & rRect);
+ void ReadRectangle(tools::Rectangle & rRect);
sal_uLong ReadPolygon(tools::Polygon & rPoly);
sal_uLong ReadPixPattern(Pattern &pattern);
- Rectangle aLastRect;
+ tools::Rectangle aLastRect;
sal_uLong ReadAndDrawRect(PictDrawingMethod eMethod);
sal_uLong ReadAndDrawSameRect(PictDrawingMethod eMethod);
- Rectangle aLastRoundRect;
+ tools::Rectangle aLastRoundRect;
sal_uLong ReadAndDrawRoundRect(PictDrawingMethod eMethod);
sal_uLong ReadAndDrawSameRoundRect(PictDrawingMethod eMethod);
- Rectangle aLastOval;
+ tools::Rectangle aLastOval;
sal_uLong ReadAndDrawOval(PictDrawingMethod eMethod);
sal_uLong ReadAndDrawSameOval(PictDrawingMethod eMethod);
@@ -205,7 +205,7 @@ private:
sal_uLong ReadAndDrawPolygon(PictDrawingMethod eMethod);
sal_uLong ReadAndDrawSamePolygon(PictDrawingMethod eMethod);
- Rectangle aLastArcRect;
+ tools::Rectangle aLastArcRect;
sal_uLong ReadAndDrawArc(PictDrawingMethod eMethod);
sal_uLong ReadAndDrawSameArc(PictDrawingMethod eMethod);
@@ -224,7 +224,7 @@ private:
sal_uLong ReadAndDrawText();
sal_uLong ReadPixMapEtc(Bitmap & rBitmap, bool bBaseAddr, bool bColorTable,
- Rectangle * pSrcRect, Rectangle * pDestRect,
+ tools::Rectangle * pSrcRect, tools::Rectangle * pDestRect,
bool bMode, bool bMaskRgn);
void ReadHeader();
@@ -443,13 +443,13 @@ Color PictReader::ReadRGBColor()
}
-void PictReader::ReadRectangle(Rectangle & rRect)
+void PictReader::ReadRectangle(tools::Rectangle & rRect)
{
Point aTopLeft, aBottomRight;
aTopLeft=ReadPoint();
aBottomRight=ReadPoint();
- rRect=Rectangle(aTopLeft,aBottomRight);
+ rRect=tools::Rectangle(aTopLeft,aBottomRight);
SAL_INFO("filter.pict", "ReadRectangle: " << rRect);
}
@@ -721,8 +721,8 @@ namespace
}
}
-sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColorTable, Rectangle* pSrcRect,
- Rectangle* pDestRect, bool bMode, bool bMaskRgn )
+sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColorTable, tools::Rectangle* pSrcRect,
+ tools::Rectangle* pDestRect, bool bMode, bool bMaskRgn )
{
Bitmap aBitmap;
sal_uInt16 nPackType(0), nPixelSize(0), nCmpCount(0), nCmpSize(0);
@@ -805,7 +805,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo
{
sal_uInt16 nTop, nLeft, nBottom, nRight;
pPict->ReadUInt16( nTop ).ReadUInt16( nLeft ).ReadUInt16( nBottom ).ReadUInt16( nRight );
- *pSrcRect = Rectangle( (sal_uLong)nLeft, (sal_uLong)nTop, (sal_uLong)nRight, (sal_uLong)nBottom );
+ *pSrcRect = tools::Rectangle( (sal_uLong)nLeft, (sal_uLong)nTop, (sal_uLong)nRight, (sal_uLong)nBottom );
nDataSize += 8;
}
@@ -815,7 +815,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo
Point aTL, aBR;
aTL = ReadPoint();
aBR = ReadPoint();
- *pDestRect = Rectangle( aTL, aBR );
+ *pDestRect = tools::Rectangle( aTL, aBR );
nDataSize += 8;
}
@@ -1220,7 +1220,7 @@ void PictReader::ReadHeader()
else if (x2 < x1+8 || y2 < y1+8) // a little dubious
actualConfid-=1;
if (st >= 3 && actualConfid != 20) continue;
- aBoundingRect=Rectangle( x1,y1, x2, y2 );
+ aBoundingRect=tools::Rectangle( x1,y1, x2, y2 );
if (pPict->IsEof() || pPict->GetError()) continue;
// read version
@@ -1272,7 +1272,7 @@ void PictReader::ReadHeader()
fVRes /= 65536;
aHRes /= fHRes;
aVRes /= fVRes;
- aBoundingRect=Rectangle( x1,y1, x2, y2 );
+ aBoundingRect=tools::Rectangle( x1,y1, x2, y2 );
pPict->SeekRel( 4 ); // 4 bytes reserved
return;
}
@@ -1344,7 +1344,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
break;
case 0x0001: { // Clip
- Rectangle aRect;
+ tools::Rectangle aRect;
pPict->ReadUInt16( nUSHORT );
nDataSize=nUSHORT;
ReadRectangle(aRect);
@@ -1806,7 +1806,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
case 0x0090: { // BitsRect
Bitmap aBmp;
- Rectangle aSrcRect, aDestRect;
+ tools::Rectangle aSrcRect, aDestRect;
nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, false);
DrawingMethod( PictDrawingMethod::PAINT );
pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
@@ -1814,7 +1814,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
}
case 0x0091: { // BitsRgn
Bitmap aBmp;
- Rectangle aSrcRect, aDestRect;
+ tools::Rectangle aSrcRect, aDestRect;
nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, true);
DrawingMethod( PictDrawingMethod::PAINT );
pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
@@ -1831,7 +1831,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
case 0x0098: { // PackBitsRect
Bitmap aBmp;
- Rectangle aSrcRect, aDestRect;
+ tools::Rectangle aSrcRect, aDestRect;
nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, false);
DrawingMethod( PictDrawingMethod::PAINT );
pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
@@ -1839,7 +1839,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
}
case 0x0099: { // PackBitsRgn
Bitmap aBmp;
- Rectangle aSrcRect, aDestRect;
+ tools::Rectangle aSrcRect, aDestRect;
nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, true);
DrawingMethod( PictDrawingMethod::PAINT );
pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
@@ -1847,7 +1847,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
}
case 0x009a: { // DirectBitsRect
Bitmap aBmp;
- Rectangle aSrcRect, aDestRect;
+ tools::Rectangle aSrcRect, aDestRect;
nDataSize=ReadPixMapEtc(aBmp, true, false, &aSrcRect, &aDestRect, true, false);
DrawingMethod( PictDrawingMethod::PAINT );
pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
@@ -1855,7 +1855,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
}
case 0x009b: { // DirectBitsRgn
Bitmap aBmp;
- Rectangle aSrcRect, aDestRect;
+ tools::Rectangle aSrcRect, aDestRect;
nDataSize=ReadPixMapEtc(aBmp, true, false, &aSrcRect, &aDestRect, true, true);
DrawingMethod( PictDrawingMethod::PAINT );
pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp);
diff --git a/filter/source/graphicfilter/ipict/shape.cxx b/filter/source/graphicfilter/ipict/shape.cxx
index 5aba327f869d..c7ab3ba2f8a0 100644
--- a/filter/source/graphicfilter/ipict/shape.cxx
+++ b/filter/source/graphicfilter/ipict/shape.cxx
@@ -38,14 +38,14 @@ Here, we choose:
namespace PictReaderShapePrivate {
/** returns an inside rectangle knowing the penSize in order to obtain the ``correct'' position
when we draw a frame in wide length*/
- Rectangle contractRectangle(bool drawFrame, Rectangle const &rect, Size const &pSize) {
+ tools::Rectangle contractRectangle(bool drawFrame, tools::Rectangle const &rect, Size const &pSize) {
if (!drawFrame) return rect;
long penSize=(pSize.Width()+pSize.Height())/2;
if (2*penSize > rect.Right()-rect.Left()) penSize = (rect.Right()-rect.Left()+1)/2;
if (2*penSize > rect.Bottom()-rect.Top()) penSize = (rect.Bottom()-rect.Top()+1)/2;
long const X[2] = { rect.Left()+penSize/2, rect.Right()-(penSize+1)/2 };
long const Y[2] = { rect.Top()+penSize/2, rect.Bottom()-(penSize+1)/2 };
- return Rectangle(Point(X[0],Y[0]), Point(X[1], Y[1]));
+ return tools::Rectangle(Point(X[0],Y[0]), Point(X[1], Y[1]));
}
}
@@ -125,9 +125,9 @@ namespace PictReaderShape {
/* Note(checkme): contradictally with the QuickDraw's reference 3-23, it seems better to consider
that the frame/content of a rectangle appears inside the given rectangle. Does a conversion
appear between the pascal functions and the data stored in the file ? */
- void drawRectangle(VirtualDevice *dev, bool drawFrame, Rectangle const &orig, Size const &pSize) {
+ void drawRectangle(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, Size const &pSize) {
int penSize=(pSize.Width()+pSize.Height())/2;
- Rectangle rect = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize);
+ tools::Rectangle rect = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize);
long const X[2] = { rect.Left(), rect.Right() };
long const Y[2] = { rect.Top(), rect.Bottom() };
@@ -144,9 +144,9 @@ namespace PictReaderShape {
}
//-------------------- draws an ellipse --------------------
- void drawEllipse(VirtualDevice *dev, bool drawFrame, Rectangle const &orig, Size const &pSize) {
+ void drawEllipse(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, Size const &pSize) {
int penSize=(pSize.Width()+pSize.Height())/2;
- Rectangle oval = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize);
+ tools::Rectangle oval = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize);
using namespace basegfx;
long const X[2] = { oval.Left(), oval.Right() };
long const Y[2] = { oval.Top(), oval.Bottom() };
@@ -159,9 +159,9 @@ namespace PictReaderShape {
}
//-------------------- draws an arc/pie --------------------
- void drawArc(VirtualDevice *dev, bool drawFrame, Rectangle const &orig, const double& angle1, const double& angle2, Size const &pSize) {
+ void drawArc(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, const double& angle1, const double& angle2, Size const &pSize) {
int penSize=(pSize.Width()+pSize.Height())/2;
- Rectangle arc = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize);
+ tools::Rectangle arc = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize);
using namespace basegfx;
double const PI2 = M_PI/2.0;
@@ -194,9 +194,9 @@ namespace PictReaderShape {
}
}
//-------------------- draws a rectangle with round corner --------------------
- void drawRoundRectangle(VirtualDevice *dev, bool drawFrame, Rectangle const &orig, Size const &ovalSize, Size const &pSize) {
+ void drawRoundRectangle(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, Size const &ovalSize, Size const &pSize) {
int penSize=(pSize.Width()+pSize.Height())/2;
- Rectangle oval = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize);
+ tools::Rectangle oval = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize);
int ovalW=ovalSize.Width(), ovalH=ovalSize.Height();
using namespace basegfx;
long const X[2] = { oval.Left(), oval.Right() };
diff --git a/filter/source/graphicfilter/ipict/shape.hxx b/filter/source/graphicfilter/ipict/shape.hxx
index 1264df4f4b01..bccd39e63c26 100644
--- a/filter/source/graphicfilter/ipict/shape.hxx
+++ b/filter/source/graphicfilter/ipict/shape.hxx
@@ -33,23 +33,23 @@ namespace PictReaderShape {
void drawLine(VirtualDevice *dev, Point const &orig, Point const &dest, Size const &pSize);
/** draws a rectangle knowing penSize */
- void drawRectangle(VirtualDevice *dev, bool drawFrame, Rectangle const &rect, Size const &pSize);
+ void drawRectangle(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &rect, Size const &pSize);
/** draws a polygon knowing penSize */
void drawPolygon(VirtualDevice *dev, bool drawFrame, tools::Polygon const &rect, Size const &pSize);
/** draws an ellipse knowing penSize */
- void drawEllipse(VirtualDevice *dev, bool drawFrame, Rectangle const &orig, Size const &pSize);
+ void drawEllipse(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, Size const &pSize);
/** draws a rounded rectangle knowing penSize
\note ovalSize is two time the size of the corner
*/
- void drawRoundRectangle(VirtualDevice *dev, bool drawFrame, Rectangle const &orig, Size const &ovalS, Size const &pSize);
+ void drawRoundRectangle(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, Size const &ovalS, Size const &pSize);
/** draws an arc in a b2dpolygon knowing penSize
\note - it supposes that angl1 < angl2
*/
- void drawArc(VirtualDevice *dev, bool drawFrame, Rectangle const &orig, const double& angle1, const double& angle2, Size const &pSize);
+ void drawArc(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, const double& angle1, const double& angle2, Size const &pSize);
}
#endif // INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IPICT_SHAPE_HXX
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 00efa154aa86..87daad96ae83 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -143,7 +143,7 @@ EscherExClientAnchor_Base::~EscherExClientAnchor_Base()
EscherPropertyContainer::EscherPropertyContainer(
EscherGraphicProvider * pGraphProv, SvStream * pPiOutStrm,
- Rectangle * pBoundRect):
+ tools::Rectangle * pBoundRect):
pGraphicProvider(pGraphProv),
pPicOutStrm(pPiOutStrm),
pShapeBoundRect(pBoundRect),
@@ -162,7 +162,7 @@ EscherPropertyContainer::EscherPropertyContainer()
EscherPropertyContainer::EscherPropertyContainer(
EscherGraphicProvider& rGraphProv,
SvStream* pPiOutStrm,
- Rectangle& rBoundRect ) :
+ tools::Rectangle& rBoundRect ) :
EscherPropertyContainer(&rGraphProv, pPiOutStrm, &rBoundRect)
{}
@@ -1292,7 +1292,7 @@ bool EscherPropertyContainer::CreateGraphicProperties( const css::uno::Reference
pVisArea.reset(new css::awt::Rectangle);
aAny >>= (*pVisArea);
}
- Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() );
+ tools::Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() );
sal_uInt32 nBlibId = pGraphicProvider->GetBlibID( *pPicOutStrm, aUniqueId, aRect, pVisArea.get() );
if ( nBlibId )
{
@@ -1327,7 +1327,7 @@ bool EscherPropertyContainer::ImplCreateEmbeddedBmp( const OString& rUniqueId )
{
EscherGraphicProvider aProvider;
SvMemoryStream aMemStrm;
- Rectangle aRect;
+ tools::Rectangle aRect;
if ( aProvider.GetBlibID( aMemStrm, rUniqueId, aRect ) )
{
// grab BLIP from stream and insert directly as complex property
@@ -1367,7 +1367,7 @@ void EscherPropertyContainer::CreateEmbeddedBitmapProperties(
namespace {
-GraphicObject* lclDrawHatch( const css::drawing::Hatch& rHatch, const Color& rBackColor, bool bFillBackground, const Rectangle& rRect )
+GraphicObject* lclDrawHatch( const css::drawing::Hatch& rHatch, const Color& rBackColor, bool bFillBackground, const tools::Rectangle& rRect )
{
// #i121183# For hatch, do no longer create a bitmap with the fixed size of 28x28 pixels. Also
// do not create a bitmap in page size, that would explode file sizes (and have no good quality).
@@ -1397,7 +1397,7 @@ GraphicObject* lclDrawHatch( const css::drawing::Hatch& rHatch, const Color& rBa
void EscherPropertyContainer::CreateEmbeddedHatchProperties( const css::drawing::Hatch& rHatch, const Color& rBackColor, bool bFillBackground )
{
- const Rectangle aRect(pShapeBoundRect ? *pShapeBoundRect : Rectangle(Point(0,0), Size(28000, 21000)));
+ const tools::Rectangle aRect(pShapeBoundRect ? *pShapeBoundRect : tools::Rectangle(Point(0,0), Size(28000, 21000)));
std::unique_ptr<GraphicObject> xGraphicObject(lclDrawHatch(rHatch, rBackColor, bFillBackground, aRect));
OString aUniqueId = xGraphicObject->GetUniqueID();
bool bRetValue = ImplCreateEmbeddedBmp( aUniqueId );
@@ -1497,7 +1497,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(
aAny >>= bFillBackground;
}
- const Rectangle aRect(Point(0, 0), pShapeBoundRect ? pShapeBoundRect->GetSize() : Size(28000, 21000));
+ const tools::Rectangle aRect(Point(0, 0), pShapeBoundRect ? pShapeBoundRect->GetSize() : Size(28000, 21000));
xGraphicObject.reset(lclDrawHatch(aHatch, aBackColor, bFillBackground, aRect));
aUniqueId = xGraphicObject->GetUniqueID();
eBitmapMode = css::drawing::BitmapMode_REPEAT;
@@ -1696,7 +1696,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(
// write out embedded graphic
if ( pGraphicProvider && pPicOutStrm && pShapeBoundRect )
{
- Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() );
+ tools::Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() );
const sal_uInt32 nBlibId(pGraphicProvider->GetBlibID(*pPicOutStrm, aUniqueId, aRect, nullptr, pGraphicAttr.get()));
if(nBlibId)
@@ -1718,7 +1718,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(
{
EscherGraphicProvider aProvider;
SvMemoryStream aMemStrm;
- Rectangle aRect;
+ tools::Rectangle aRect;
if ( aProvider.GetBlibID( aMemStrm, aUniqueId, aRect, nullptr, pGraphicAttr.get(), bOOxmlExport ) )
{
@@ -1940,7 +1940,7 @@ bool EscherPropertyContainer::CreatePolygonProperties(
sal_uInt16 nPolyCount = aPolyPolygon.Count();
sal_uInt32 nTotalPoints(0), nTotalBezPoints(0);
- Rectangle aRect( aPolyPolygon.GetBoundRect() );
+ tools::Rectangle aRect( aPolyPolygon.GetBoundRect() );
rGeoRect = css::awt::Rectangle( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight() );
for (sal_uInt16 i = 0; i < nPolyCount; ++i)
@@ -3811,7 +3811,7 @@ bool EscherPropertyContainer::CreateBlipPropertiesforOLEControl(const css::uno
{
if ( pGraphicProvider && pPicOutStrm && pShapeBoundRect )
{
- Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() );
+ tools::Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() );
sal_uInt32 nBlibId = pGraphicProvider->GetBlibID( *pPicOutStrm, aUniqueId, aRect );
if ( nBlibId )
@@ -4190,7 +4190,7 @@ bool EscherGraphicProvider::GetPrefSize( const sal_uInt32 nBlibId, Size& rPrefSi
}
sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OString& rId,
- const Rectangle& /* rBoundRect */, const css::awt::Rectangle* pVisArea,
+ const tools::Rectangle& /* rBoundRect */, const css::awt::Rectangle* pVisArea,
const GraphicAttr* pGraphicAttr, const bool bOOxmlExport )
{
sal_uInt32 nBlibId = 0;
@@ -4688,7 +4688,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
css::awt::Point aPoint( aXShape->getPosition() );
css::awt::Size aSize( aXShape->getSize() );
- Rectangle aRect( Point( aPoint.X, aPoint.Y ), Size( aSize.Width, aSize.Height ) );
+ tools::Rectangle aRect( Point( aPoint.X, aPoint.Y ), Size( aSize.Width, aSize.Height ) );
Point aCenter( aRect.Center() );
tools::Polygon aPoly( 4 );
@@ -5216,7 +5216,7 @@ void EscherEx::AddAtom( sal_uInt32 nAtomSize, sal_uInt16 nRecType, int nRecVersi
mpOutStrm->WriteUInt16( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ).WriteUInt16( nRecType ).WriteUInt32( nAtomSize );
}
-void EscherEx::AddChildAnchor( const Rectangle& rRect )
+void EscherEx::AddChildAnchor( const tools::Rectangle& rRect )
{
AddAtom( 16, ESCHER_ChildAnchor );
mpOutStrm ->WriteInt32( rRect.Left() )
@@ -5225,7 +5225,7 @@ void EscherEx::AddChildAnchor( const Rectangle& rRect )
.WriteInt32( rRect.Bottom() );
}
-void EscherEx::AddClientAnchor( const Rectangle& rRect )
+void EscherEx::AddClientAnchor( const tools::Rectangle& rRect )
{
AddAtom( 8, ESCHER_ClientAnchor );
mpOutStrm->WriteInt16( rRect.Top() )
@@ -5239,9 +5239,9 @@ EscherExHostAppData* EscherEx::EnterAdditionalTextGroup()
return nullptr;
}
-sal_uInt32 EscherEx::EnterGroup( const OUString& rShapeName, const Rectangle* pBoundRect )
+sal_uInt32 EscherEx::EnterGroup( const OUString& rShapeName, const tools::Rectangle* pBoundRect )
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if( pBoundRect )
aRect = *pBoundRect;
@@ -5287,12 +5287,12 @@ sal_uInt32 EscherEx::EnterGroup( const OUString& rShapeName, const Rectangle* pB
return nShapeId;
}
-sal_uInt32 EscherEx::EnterGroup( const Rectangle* pBoundRect )
+sal_uInt32 EscherEx::EnterGroup( const tools::Rectangle* pBoundRect )
{
return EnterGroup( OUString(), pBoundRect );
}
-void EscherEx::SetGroupSnapRect( sal_uInt32 nGroupLevel, const Rectangle& rRect )
+void EscherEx::SetGroupSnapRect( sal_uInt32 nGroupLevel, const tools::Rectangle& rRect )
{
if ( nGroupLevel )
{
@@ -5308,7 +5308,7 @@ void EscherEx::SetGroupSnapRect( sal_uInt32 nGroupLevel, const Rectangle& rRect
}
}
-void EscherEx::SetGroupLogicRect( sal_uInt32 nGroupLevel, const Rectangle& rRect )
+void EscherEx::SetGroupLogicRect( sal_uInt32 nGroupLevel, const tools::Rectangle& rRect )
{
if ( nGroupLevel )
{
@@ -5344,7 +5344,7 @@ void EscherEx::AddShape( sal_uInt32 nShpInstance, sal_uInt32 nFlags, sal_uInt32
mpOutStrm->WriteUInt32( nShapeID ).WriteUInt32( nFlags );
}
-void EscherEx::Commit( EscherPropertyContainer& rProps, const Rectangle& )
+void EscherEx::Commit( EscherPropertyContainer& rProps, const tools::Rectangle& )
{
rProps.Commit( GetStream() );
}
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index 95bd490582af..75bd52cdff99 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -95,7 +95,7 @@ Size ImplEESdrWriter::ImplMapSize( const Size& rSize )
void ImplEESdrWriter::ImplFlipBoundingBox( ImplEESdrObject& rObj, EscherPropertyContainer& rPropOpt )
{
sal_Int32 nAngle = rObj.GetAngle();
- Rectangle aRect( rObj.GetRect() );
+ tools::Rectangle aRect( rObj.GetRect() );
// for position calculations, we normalize the angle between 0 and 90 degrees
if ( nAngle < 0 )
@@ -232,7 +232,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
const css::awt::Size aSize100thmm( rObj.GetShapeRef()->getSize() );
const css::awt::Point aPoint100thmm( rObj.GetShapeRef()->getPosition() );
- Rectangle aRect100thmm( Point( aPoint100thmm.X, aPoint100thmm.Y ), Size( aSize100thmm.Width, aSize100thmm.Height ) );
+ tools::Rectangle aRect100thmm( Point( aPoint100thmm.X, aPoint100thmm.Y ), Size( aSize100thmm.Width, aSize100thmm.Height ) );
if ( !mpPicStrm )
mpPicStrm = mpEscherEx->QueryPictureStream();
EscherPropertyContainer aPropOpt( mpEscherEx->GetGraphicProvider(), mpPicStrm, aRect100thmm );
@@ -271,10 +271,10 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
SdrObject* pObj = GetSdrObjectFromXShape( rObj.GetShapeRef() );
if ( pObj )
{
- Rectangle aBound = pObj->GetCurrentBoundRect();
+ tools::Rectangle aBound = pObj->GetCurrentBoundRect();
Point aPosition( ImplMapPoint( aBound.TopLeft() ) );
Size aSize( ImplMapSize( aBound.GetSize() ) );
- rObj.SetRect( Rectangle( aPosition, aSize ) );
+ rObj.SetRect( tools::Rectangle( aPosition, aSize ) );
rObj.SetAngle( 0 );
bDontWriteText = true;
}
@@ -378,7 +378,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
F_PI18000 ) ) * 100.0 ) );
aEnd.Y() = - (sal_Int32)( ( sin( (double)( nEndAngle *
F_PI18000 ) ) * 100.0 ) );
- const Rectangle& rRect = aRect100thmm;
+ const tools::Rectangle& rRect = aRect100thmm;
aCenter.X() = rRect.Left() + ( rRect.GetWidth() / 2 );
aCenter.Y() = rRect.Top() + ( rRect.GetHeight() / 2 );
aStart.X() += aCenter.X();
@@ -411,7 +411,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
}
break;
}
- rObj.SetRect( Rectangle( ImplMapPoint( Point( aNewRect.X, aNewRect.Y ) ),
+ rObj.SetRect( tools::Rectangle( ImplMapPoint( Point( aNewRect.X, aNewRect.Y ) ),
ImplMapSize( Size( aNewRect.Width, aNewRect.Height ) ) ) );
}
if ( rObj.ImplGetText() )
@@ -431,7 +431,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
if ( ! aPropOpt.CreateConnectorProperties( rObj.GetShapeRef(),
rSolverContainer, aNewRect, nSpType, nSpFlags ) )
break;
- rObj.SetRect( Rectangle( ImplMapPoint( Point( aNewRect.X, aNewRect.Y ) ),
+ rObj.SetRect( tools::Rectangle( ImplMapPoint( Point( aNewRect.X, aNewRect.Y ) ),
ImplMapSize( Size( aNewRect.Width, aNewRect.Height ) ) ) );
mpEscherEx->OpenContainer( ESCHER_SpContainer );
@@ -656,7 +656,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
}
{
- Rectangle aRect( rObj.GetRect() );
+ tools::Rectangle aRect( rObj.GetRect() );
aRect.Justify();
rObj.SetRect( aRect );
}
@@ -708,7 +708,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj,
const css::awt::Size aSize100thmm( rObj.GetShapeRef()->getSize() );
const css::awt::Point aPoint100thmm( rObj.GetShapeRef()->getPosition() );
- Rectangle aRect100thmm( Point( aPoint100thmm.X, aPoint100thmm.Y ), Size( aSize100thmm.Width, aSize100thmm.Height ) );
+ tools::Rectangle aRect100thmm( Point( aPoint100thmm.X, aPoint100thmm.Y ), Size( aSize100thmm.Width, aSize100thmm.Height ) );
if ( !mpPicStrm )
mpPicStrm = mpEscherEx->QueryPictureStream();
EscherPropertyContainer aPropOpt( mpEscherEx->GetGraphicProvider(), mpPicStrm, aRect100thmm );
@@ -719,7 +719,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj,
//2do: this does not work right
double fDist = hypot( rObj.GetRect().GetWidth(),
rObj.GetRect().GetHeight() );
- rObj.SetRect( Rectangle( rTextRefPoint,
+ rObj.SetRect( tools::Rectangle( rTextRefPoint,
Point( (sal_Int32)( rTextRefPoint.X() + fDist ), rTextRefPoint.Y() - 1 ) ) );
mpEscherEx->OpenContainer( ESCHER_SpContainer );
@@ -797,7 +797,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj,
sal_uInt32 ImplEESdrWriter::ImplEnterAdditionalTextGroup( const Reference< XShape >& rShape,
- const Rectangle* pBoundRect )
+ const tools::Rectangle* pBoundRect )
{
mpHostAppData = mpEscherEx->EnterAdditionalTextGroup();
sal_uInt32 nGrpId = mpEscherEx->EnterGroup( pBoundRect );
@@ -953,7 +953,7 @@ void EscherEx::EndSdrObjectPage()
mpImplEESdrWriter->ImplExitPage();
}
-EscherExHostAppData* EscherEx::StartShape( const Reference< XShape >& /* rShape */, const Rectangle* /*pChildAnchor*/ )
+EscherExHostAppData* EscherEx::StartShape( const Reference< XShape >& /* rShape */, const tools::Rectangle* /*pChildAnchor*/ )
{
return nullptr;
}
@@ -1195,7 +1195,7 @@ bool ImplEESdrObject::ImplGetPropertyValue( const sal_Unicode* rString )
void ImplEESdrObject::SetRect( const Point& rPos, const Size& rSz )
{
- maRect = Rectangle( rPos, rSz );
+ maRect = tools::Rectangle( rPos, rSz );
}
const SdrObject* ImplEESdrObject::GetSdrObject() const
diff --git a/filter/source/msfilter/eschesdo.hxx b/filter/source/msfilter/eschesdo.hxx
index 0a9fbc7144d3..bde285a83cfc 100644
--- a/filter/source/msfilter/eschesdo.hxx
+++ b/filter/source/msfilter/eschesdo.hxx
@@ -37,7 +37,7 @@ class ImplEESdrObject
css::uno::Reference< css::drawing::XShape > mXShape;
// XTextRef mXText; // TextRef des globalen Text
css::uno::Any mAny;
- Rectangle maRect;
+ tools::Rectangle maRect;
OUString mType;
sal_uInt32 mnShapeId;
sal_uInt32 mnTextSize;
@@ -68,9 +68,9 @@ public:
const OUString& GetType() const { return mType; }
void SetType( const OUString& rS ) { mType = rS; }
- const Rectangle& GetRect() const { return maRect; }
+ const tools::Rectangle& GetRect() const { return maRect; }
void SetRect( const Point& rPos, const Size& rSz );
- void SetRect( const Rectangle& rRect )
+ void SetRect( const tools::Rectangle& rRect )
{ maRect = rRect; }
sal_Int32 GetAngle() const { return mnAngle; }
@@ -130,7 +130,7 @@ class ImplEESdrWriter
const Point& rTextRefPoint );
sal_uInt32 ImplEnterAdditionalTextGroup(
const css::uno::Reference< css::drawing::XShape >& rShape,
- const Rectangle* pBoundRect );
+ const tools::Rectangle* pBoundRect );
void ImplFlushSolverContainer();
public:
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 545d6a0be1fd..cad1ea27f9a7 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -533,7 +533,7 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
sal_uInt16 k, j, nPolySize = aPolyPoly.Count();
if ( nPolySize )
{
- Rectangle aBoundRect( aPolyPoly.GetBoundRect() );
+ tools::Rectangle aBoundRect( aPolyPoly.GetBoundRect() );
if ( aBoundRect.GetWidth() && aBoundRect.GetHeight() )
{
sal_uInt32 nPointCount = 0;
@@ -2560,7 +2560,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet ) const
{
- Rectangle aEmptyRect;
+ tools::Rectangle aEmptyRect;
DffRecordHeader aHdTemp;
DffObjData aDffObjTemp( aHdTemp, aEmptyRect, 0 );
ApplyAttributes( rIn, rSet, aDffObjTemp );
@@ -3750,7 +3750,7 @@ static void lcl_ApplyCropping( const DffPropSet& rPropSet, SfxItemSet* pSet, Gra
pSet->Put( SdrGrafCropItem( nLeft, nTop, nRight, nBottom ) );
else
{
- Rectangle aCropRect( nLeft, nTop, aCropSize.Width() - nRight, aCropSize.Height() - nBottom );
+ tools::Rectangle aCropRect( nLeft, nTop, aCropSize.Width() - nRight, aCropSize.Height() - nBottom );
aCropBitmap.Crop( aCropRect );
rGraf = aCropBitmap;
}
@@ -3762,7 +3762,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
SdrObject* pRet = nullptr;
OUString aFileName;
OUString aLinkFileName, aLinkFilterName;
- Rectangle aVisArea;
+ tools::Rectangle aVisArea;
MSO_BlipFlags eFlags = (MSO_BlipFlags)GetPropertyValue( DFF_Prop_pibFlags, mso_blipflagDefault );
sal_uInt32 nBlipId = GetPropertyValue( DFF_Prop_pib, 0 );
@@ -4010,7 +4010,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
// PptSlidePersistEntry& rPersistEntry, SdPage* pPage
SdrObject* SvxMSDffManager::ImportObj( SvStream& rSt, void* pClientData,
- Rectangle& rClientRect, const Rectangle& rGlobalChildRect, int nCalledByGroup, sal_Int32* pShapeId )
+ tools::Rectangle& rClientRect, const tools::Rectangle& rGlobalChildRect, int nCalledByGroup, sal_Int32* pShapeId )
{
SdrObject* pRet = nullptr;
DffRecordHeader aObjHd;
@@ -4028,7 +4028,7 @@ SdrObject* SvxMSDffManager::ImportObj( SvStream& rSt, void* pClientData,
}
SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& rSt, void* pClientData,
- Rectangle& rClientRect, const Rectangle& rGlobalChildRect,
+ tools::Rectangle& rClientRect, const tools::Rectangle& rGlobalChildRect,
int nCalledByGroup, sal_Int32* pShapeId )
{
SdrObject* pRet = nullptr;
@@ -4053,9 +4053,9 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r
sal_Int32 nSpFlags = nGroupShapeFlags;
nGroupRotateAngle = mnFix16Angle;
- Rectangle aClientRect( rClientRect );
+ tools::Rectangle aClientRect( rClientRect );
- Rectangle aGlobalChildRect;
+ tools::Rectangle aGlobalChildRect;
if ( !nCalledByGroup || rGlobalChildRect.IsEmpty() )
aGlobalChildRect = GetGlobalChildAnchor( rHd, rSt, aClientRect );
else
@@ -4071,7 +4071,7 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r
const long nRotatedWidth = aClientRect.GetHeight();
const long nRotatedHeight = aClientRect.GetWidth();
Size aNewSize(nRotatedWidth, nRotatedHeight);
- Rectangle aNewRect( aTopLeft, aNewSize );
+ tools::Rectangle aNewRect( aTopLeft, aNewSize );
aClientRect = aNewRect;
}
@@ -4086,7 +4086,7 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r
break;
if ( aRecHd2.nRecType == DFF_msofbtSpgrContainer )
{
- Rectangle aGroupClientAnchor, aGroupChildAnchor;
+ tools::Rectangle aGroupClientAnchor, aGroupChildAnchor;
GetGroupAnchors( aRecHd2, rSt, aGroupClientAnchor, aGroupChildAnchor, aClientRect, aGlobalChildRect );
if (!aRecHd2.SeekToBegOfRecord(rSt))
return pRet;
@@ -4145,7 +4145,7 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r
}
SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& rSt, void* pClientData,
- Rectangle& rClientRect, const Rectangle& rGlobalChildRect,
+ tools::Rectangle& rClientRect, const tools::Rectangle& rGlobalChildRect,
int nCalledByGroup, sal_Int32* pShapeId )
{
SdrObject* pRet = nullptr;
@@ -4234,7 +4234,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
Scale( o );
Scale( r );
Scale( u );
- aObjData.aChildAnchor = Rectangle( l, o, r, u );
+ aObjData.aChildAnchor = tools::Rectangle( l, o, r, u );
if ( !rGlobalChildRect.IsEmpty() && !rClientRect.IsEmpty() && rGlobalChildRect.GetWidth() && rGlobalChildRect.GetHeight() )
{
double fWidth = r - l;
@@ -4245,7 +4245,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
double fo = ( ( o - rGlobalChildRect.Top() ) * fYScale ) + rClientRect.Top();
fWidth *= fXScale;
fHeight *= fYScale;
- aObjData.aChildAnchor = Rectangle( Point( (sal_Int32)fl, (sal_Int32)fo ), Size( (sal_Int32)( fWidth + 1 ), (sal_Int32)( fHeight + 1 ) ) );
+ aObjData.aChildAnchor = tools::Rectangle( Point( (sal_Int32)fl, (sal_Int32)fo ), Size( (sal_Int32)( fWidth + 1 ), (sal_Int32)( fHeight + 1 ) ) );
}
}
@@ -4257,9 +4257,9 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
aObjData.aBoundRect = aObjData.aChildAnchor;
if ( aObjData.nSpFlags & SP_FBACKGROUND )
- aObjData.aBoundRect = Rectangle( Point(), Size( 1, 1 ) );
+ aObjData.aBoundRect = tools::Rectangle( Point(), Size( 1, 1 ) );
- Rectangle aTextRect;
+ tools::Rectangle aTextRect;
if ( !aObjData.aBoundRect.IsEmpty() )
{ // apply rotation to the BoundingBox BEFORE an object has been generated
if( mnFix16Angle )
@@ -4272,7 +4272,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
Point aTopLeft( aObjData.aBoundRect.Left() + nHalfWidth - nHalfHeight,
aObjData.aBoundRect.Top() + nHalfHeight - nHalfWidth );
Size aNewSize( aObjData.aBoundRect.GetHeight(), aObjData.aBoundRect.GetWidth() );
- Rectangle aNewRect( aTopLeft, aNewSize );
+ tools::Rectangle aNewRect( aTopLeft, aNewSize );
aObjData.aBoundRect = aNewRect;
}
}
@@ -4470,7 +4470,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
// before clearing the GeometryItem we have to store the current Coordinates
const uno::Any* pAny = ((SdrCustomShapeGeometryItem&)aGeometryItem).GetPropertyValueByName( sPath, sCoordinates );
- Rectangle aPolyBoundRect;
+ tools::Rectangle aPolyBoundRect;
Point aStartPt( 0,0 );
if ( pAny && ( *pAny >>= seqCoordinates ) && ( seqCoordinates.getLength() >= 4 ) )
{
@@ -4486,7 +4486,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
aP.Y() = nY;
aXP[ (sal_uInt16)nPtNum ] = aP;
}
- aPolyBoundRect = Rectangle( aXP.GetBoundRect() );
+ aPolyBoundRect = tools::Rectangle( aXP.GetBoundRect() );
if ( nNumElemVert >= 3 )
{ // arc first command is always wr -- clockwise arc
// the parameters are : (left,top),(right,bottom),start(x,y),end(x,y)
@@ -4494,7 +4494,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
}
}
else
- aPolyBoundRect = Rectangle( -21600, 0, 21600, 43200 ); // defaulting
+ aPolyBoundRect = tools::Rectangle( -21600, 0, 21600, 43200 ); // defaulting
// clearing items, so MergeDefaultAttributes will set the corresponding defaults from EnhancedCustomShapeGeometry
aGeometryItem.ClearPropertyValue( sHandles );
@@ -4553,7 +4553,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
{
XPolygon aXPoly( aPolyBoundRect.Center(), aPolyBoundRect.GetWidth() / 2, aPolyBoundRect.GetHeight() / 2,
(sal_uInt16)nStartAngle / 10, (sal_uInt16)nEndAngle / 10, true );
- Rectangle aPolyPieRect( aXPoly.GetBoundRect() );
+ tools::Rectangle aPolyPieRect( aXPoly.GetBoundRect() );
double fYScale = 0.0, fXScale = 0.0;
double fYOfs, fXOfs;
@@ -4562,7 +4562,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
Size aS( aObjData.aBoundRect.GetSize() );
aP.X() -= aS.Width() / 2;
aP.Y() -= aS.Height() / 2;
- Rectangle aLogicRect( aP, aS );
+ tools::Rectangle aLogicRect( aP, aS );
fYOfs = fXOfs = 0.0;
@@ -4588,8 +4588,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
if ( aPolyPieRect.GetHeight() )
fYScale = (double)aPolyBoundRect.GetHeight() / (double)aPolyPieRect.GetHeight();
- Rectangle aOldBoundRect( aObjData.aBoundRect );
- aObjData.aBoundRect = Rectangle( Point( aLogicRect.Left() + (sal_Int32)fXOfs, aLogicRect.Top() + (sal_Int32)fYOfs ),
+ tools::Rectangle aOldBoundRect( aObjData.aBoundRect );
+ aObjData.aBoundRect = tools::Rectangle( Point( aLogicRect.Left() + (sal_Int32)fXOfs, aLogicRect.Top() + (sal_Int32)fYOfs ),
Size( (sal_Int32)( aLogicRect.GetWidth() * fXScale ), (sal_Int32)( aLogicRect.GetHeight() * fYScale ) ) );
// creating the text frame -> scaling into (0,0),(21600,21600) destination coordinate system
@@ -4664,7 +4664,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
// mirrored horizontally?
if ( nSpFlags & SP_FFLIPH )
{
- Rectangle aBndRect( pRet->GetSnapRect() );
+ tools::Rectangle aBndRect( pRet->GetSnapRect() );
Point aTop( ( aBndRect.Left() + aBndRect.Right() ) >> 1, aBndRect.Top() );
Point aBottom( aTop.X(), aTop.Y() + 1000 );
pRet->NbcMirror( aTop, aBottom );
@@ -4672,7 +4672,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
// mirrored vertically?
if ( nSpFlags & SP_FFLIPV )
{
- Rectangle aBndRect( pRet->GetSnapRect() );
+ tools::Rectangle aBndRect( pRet->GetSnapRect() );
Point aLeft( aBndRect.Left(), ( aBndRect.Top() + aBndRect.Bottom() ) >> 1 );
Point aRight( aLeft.X() + 1000, aLeft.Y() );
pRet->NbcMirror( aLeft, aRight );
@@ -4775,7 +4775,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
// mirrored horizontally?
if ( nSpFlags & SP_FFLIPH )
{
- Rectangle aBndRect( pRet->GetSnapRect() );
+ tools::Rectangle aBndRect( pRet->GetSnapRect() );
Point aTop( ( aBndRect.Left() + aBndRect.Right() ) >> 1, aBndRect.Top() );
Point aBottom( aTop.X(), aTop.Y() + 1000 );
pRet->NbcMirror( aTop, aBottom );
@@ -4783,7 +4783,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
// mirrored vertically?
if ( nSpFlags & SP_FFLIPV )
{
- Rectangle aBndRect( pRet->GetSnapRect() );
+ tools::Rectangle aBndRect( pRet->GetSnapRect() );
Point aLeft( aBndRect.Left(), ( aBndRect.Top() + aBndRect.Bottom() ) >> 1 );
Point aRight( aLeft.X() + 1000, aLeft.Y() );
pRet->NbcMirror( aLeft, aRight );
@@ -4832,9 +4832,9 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
return pRet;
}
-Rectangle SvxMSDffManager::GetGlobalChildAnchor( const DffRecordHeader& rHd, SvStream& rSt, Rectangle& aClientRect )
+tools::Rectangle SvxMSDffManager::GetGlobalChildAnchor( const DffRecordHeader& rHd, SvStream& rSt, tools::Rectangle& aClientRect )
{
- Rectangle aChildAnchor;
+ tools::Rectangle aChildAnchor;
if (!rHd.SeekToContent(rSt))
return aChildAnchor;
@@ -4880,12 +4880,12 @@ Rectangle SvxMSDffManager::GetGlobalChildAnchor( const DffRecordHeader& rHd, SvS
Scale( b );
if ( bIsClientRectRead )
{
- Rectangle aChild( l, t, r, b );
+ tools::Rectangle aChild( l, t, r, b );
aChildAnchor.Union( aChild );
}
else
{
- aClientRect = Rectangle( l, t, r, b );
+ aClientRect = tools::Rectangle( l, t, r, b );
bIsClientRectRead = true;
}
}
@@ -4899,7 +4899,7 @@ Rectangle SvxMSDffManager::GetGlobalChildAnchor( const DffRecordHeader& rHd, SvS
Scale( o );
Scale( r );
Scale( u );
- Rectangle aChild( l, o, r, u );
+ tools::Rectangle aChild( l, o, r, u );
aChildAnchor.Union( aChild );
break;
}
@@ -4914,8 +4914,8 @@ Rectangle SvxMSDffManager::GetGlobalChildAnchor( const DffRecordHeader& rHd, SvS
}
void SvxMSDffManager::GetGroupAnchors( const DffRecordHeader& rHd, SvStream& rSt,
- Rectangle& rGroupClientAnchor, Rectangle& rGroupChildAnchor,
- const Rectangle& rClientRect, const Rectangle& rGlobalChildRect )
+ tools::Rectangle& rGroupClientAnchor, tools::Rectangle& rGroupChildAnchor,
+ const tools::Rectangle& rClientRect, const tools::Rectangle& rGlobalChildRect )
{
if (!rHd.SeekToContent(rSt))
return;
@@ -4945,7 +4945,7 @@ void SvxMSDffManager::GetGroupAnchors( const DffRecordHeader& rHd, SvStream& rSt
Scale( o );
Scale( r );
Scale( u );
- Rectangle aChild( l, o, r, u );
+ tools::Rectangle aChild( l, o, r, u );
if ( bFirst )
{
@@ -4959,7 +4959,7 @@ void SvxMSDffManager::GetGroupAnchors( const DffRecordHeader& rHd, SvStream& rSt
double fo = ( ( o - rGlobalChildRect.Top() ) * fYScale ) + rClientRect.Top();
fWidth *= fXScale;
fHeight *= fYScale;
- rGroupClientAnchor = Rectangle( Point( (sal_Int32)fl, (sal_Int32)fo ), Size( (sal_Int32)( fWidth + 1 ), (sal_Int32)( fHeight + 1 ) ) );
+ rGroupClientAnchor = tools::Rectangle( Point( (sal_Int32)fl, (sal_Int32)fo ), Size( (sal_Int32)( fWidth + 1 ), (sal_Int32)( fHeight + 1 ) ) );
}
bFirst = false;
}
@@ -4979,7 +4979,7 @@ void SvxMSDffManager::GetGroupAnchors( const DffRecordHeader& rHd, SvStream& rSt
SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
DffObjData& rObjData,
void* pData,
- Rectangle& rTextRect,
+ tools::Rectangle& rTextRect,
SdrObject* pObj
)
{
@@ -5185,7 +5185,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
// the vertical paragraph indents are part of the BoundRect,
// here we 'remove' them by calculating
- Rectangle aNewRect(rTextRect);
+ tools::Rectangle aNewRect(rTextRect);
aNewRect.Bottom() -= nTextTop + nTextBottom;
aNewRect.Right() -= nTextLeft + nTextRight;
@@ -6237,7 +6237,7 @@ bool SvxMSDffManager::GetShape(sal_uLong nId, SdrObject*& rpShape,
/* access to a BLIP at runtime (if the Blip-Number is already known)
---------------------------
******************************************************************************/
-bool SvxMSDffManager::GetBLIP( sal_uLong nIdx_, Graphic& rData, Rectangle* pVisArea )
+bool SvxMSDffManager::GetBLIP( sal_uLong nIdx_, Graphic& rData, tools::Rectangle* pVisArea )
{
if (!pStData)
return false;
@@ -6324,7 +6324,7 @@ bool SvxMSDffManager::GetBLIP( sal_uLong nIdx_, Graphic& rData, Rectangle* pVisA
/* access to a BLIP at runtime (with correctly positioned stream)
---------------------------------
******************************************************************************/
-bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rectangle* pVisArea )
+bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, tools::Rectangle* pVisArea )
{
sal_uLong nOldPos = rBLIPStream.Tell();
@@ -6361,7 +6361,7 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect
aMtfSize100.Height() /= 360;
if ( pVisArea ) // seem that we currently are skipping the visarea position
- *pVisArea = Rectangle( Point(), aMtfSize100 );
+ *pVisArea = tools::Rectangle( Point(), aMtfSize100 );
// skip rest of header
nSkip = 6;
@@ -6552,8 +6552,8 @@ bool SvxMSDffManager::ShapeHasText( sal_uLong /* nShapeId */, sal_uLong /* nFile
// #i32596# - add new parameter <_nCalledByGroup>
SdrObject* SvxMSDffManager::ImportOLE( sal_uInt32 nOLEId,
const Graphic& rGrf,
- const Rectangle& rBoundRect,
- const Rectangle& rVisArea,
+ const tools::Rectangle& rBoundRect,
+ const tools::Rectangle& rVisArea,
const int /* _nCalledByGroup */,
sal_Int64 nAspect ) const
{
@@ -6880,7 +6880,7 @@ OUString GetFilterNameFromClassID_Impl( const SvGlobalName& aGlobName )
css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForConvertToSOObj( sal_uInt32 nConvertFlags,
SotStorage& rSrcStg, const uno::Reference < embed::XStorage >& rDestStorage,
const Graphic& rGrf,
- const Rectangle& rVisArea, OUString const& rBaseURL)
+ const tools::Rectangle& rVisArea, OUString const& rBaseURL)
{
uno::Reference < embed::XEmbeddedObject > xObj;
SvGlobalName aStgNm = rSrcStg.GetClassName();
@@ -7061,8 +7061,8 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
tools::SvRef<SotStorage>& rSrcStorage,
const uno::Reference < embed::XStorage >& xDestStorage,
const Graphic& rGrf,
- const Rectangle& rBoundRect,
- const Rectangle& rVisArea,
+ const tools::Rectangle& rBoundRect,
+ const tools::Rectangle& rVisArea,
SvStream* pDataStrm,
ErrCode& rError,
sal_uInt32 nConvertFlags,
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 4b31ec3ef5ef..6cbec6992f76 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -610,7 +610,7 @@ void SdrEscherImport::ProcessClientAnchor2( SvStream& rSt, DffRecordHeader& rHd,
Scale( t );
Scale( r );
Scale( b );
- rObj.aChildAnchor = Rectangle( l, t, r, b );
+ rObj.aChildAnchor = tools::Rectangle( l, t, r, b );
rObj.bChildAnchor = true;
return;
};
@@ -732,7 +732,7 @@ sal_uLong DffPropSet::SanitizeEndPos(SvStream &rIn, sal_uLong nEndRecPos)
The parameter pOriginalObj is the object as it was imported by our general escher import, it must either
be deleted or it can be returned to be inserted into the sdr page.
*/
-SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, void* pData, Rectangle& rTextRect, SdrObject* pOriginalObj )
+SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, void* pData, tools::Rectangle& rTextRect, SdrObject* pOriginalObj )
{
if ( dynamic_cast<const SdrObjCustomShape* >(pOriginalObj) != nullptr )
pOriginalObj->SetMergedItem( SdrTextFixedCellHeightItem( true ) );
@@ -1243,7 +1243,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
{
if ( rObjData.nSpFlags & SP_FBACKGROUND )
{
- pRet->NbcSetSnapRect( Rectangle( Point(), rData.pPage.page->GetSize() ) ); // set size
+ pRet->NbcSetSnapRect( tools::Rectangle( Point(), rData.pPage.page->GetSize() ) ); // set size
}
if ( rPersistEntry.pSolverContainer )
{
@@ -1782,8 +1782,8 @@ bool SdrPowerPointOLEDecompress( SvStream& rOutput, SvStream& rInput, sal_uInt32
// #i32596# - add new parameter <_nCalledByGroup>
SdrObject* SdrPowerPointImport::ImportOLE( sal_uInt32 nOLEId,
const Graphic& rGraf,
- const Rectangle& rBoundRect,
- const Rectangle& rVisArea,
+ const tools::Rectangle& rBoundRect,
+ const tools::Rectangle& rVisArea,
const int /*_nCalledByGroup*/,
sal_Int64 /*nAspect*/ ) const
{
@@ -2796,7 +2796,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
{
case DFF_msofbtSpContainer :
{
- Rectangle aPageSize( Point(), pRet->GetSize() );
+ tools::Rectangle aPageSize( Point(), pRet->GetSize() );
if ( rSlidePersist.aSlideAtom.nFlags & 4 ) // follow master background?
{
if ( HasMasterPage( nAktPageNum, eAktPageKind ) )
@@ -2876,7 +2876,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
ReadDffRecordHeader( rStCtrl, aShapeHd );
if ( ( aShapeHd.nRecType == DFF_msofbtSpContainer ) || ( aShapeHd.nRecType == DFF_msofbtSpgrContainer ) )
{
- Rectangle aEmpty;
+ tools::Rectangle aEmpty;
aShapeHd.SeekToBegOfRecord( rStCtrl );
sal_Int32 nShapeId;
aProcessData.pTableRowProperties.reset();
@@ -3037,7 +3037,7 @@ SdrObject* SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage
mnFix16Angle = Fix16ToAngle( GetPropertyValue( DFF_Prop_Rotation, 0 ) );
sal_uInt32 nColor = GetPropertyValue( DFF_Prop_fillColor, 0xffffff );
pSet.reset(new SfxItemSet( pSdrModel->GetItemPool() ));
- DffObjData aObjData( aEscherObjectHd, Rectangle( 0, 0, 28000, 21000 ), 0 );
+ DffObjData aObjData( aEscherObjectHd, tools::Rectangle( 0, 0, 28000, 21000 ), 0 );
ApplyAttributes( rStCtrl, *pSet, aObjData );
Color aColor( MSO_CLR_ToColor( nColor ) );
pSet->Put( XFillColorItem( OUString(), aColor ) );
@@ -3053,7 +3053,7 @@ SdrObject* SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage
pSet->Put( XFillStyleItem( drawing::FillStyle_NONE ) );
}
pSet->Put( XLineStyleItem( drawing::LineStyle_NONE ) );
- Rectangle aRect( rPage.GetLftBorder(), rPage.GetUppBorder(), rPage.GetWdt()-rPage.GetRgtBorder(), rPage.GetHgt()-rPage.GetLwrBorder() );
+ tools::Rectangle aRect( rPage.GetLftBorder(), rPage.GetUppBorder(), rPage.GetWdt()-rPage.GetRgtBorder(), rPage.GetHgt()-rPage.GetLwrBorder() );
pRet = new SdrRectObj( aRect );
pRet->SetModel( pSdrModel );
@@ -7192,7 +7192,7 @@ bool IsLine( const SdrObject* pObj )
bool GetCellPosition( const SdrObject* pObj, const std::set< sal_Int32 >& rRows, const std::set< sal_Int32 >& rColumns,
sal_Int32& nTableIndex, sal_Int32& nRow, sal_Int32& nRowCount, sal_Int32& nColumn, sal_Int32& nColumnCount )
{
- Rectangle aSnapRect( pObj->GetSnapRect() );
+ tools::Rectangle aSnapRect( pObj->GetSnapRect() );
bool bCellObject = ( aSnapRect.GetWidth() > 1 ) && ( aSnapRect.GetHeight() > 1 );
if ( bCellObject )
{
@@ -7232,7 +7232,7 @@ bool GetCellPosition( const SdrObject* pObj, const std::set< sal_Int32 >& rRows,
#define LinePositionBLTR 0x20000000
-void GetRowPositions( const Rectangle& rSnapRect, const std::set< sal_Int32 >& rRows,
+void GetRowPositions( const tools::Rectangle& rSnapRect, const std::set< sal_Int32 >& rRows,
const std::set< sal_Int32 >& rColumns, std::vector< sal_Int32 >& rPositions, sal_Int32 nColumn, sal_Int32 nFlags )
{
std::set< sal_Int32 >::const_iterator aRow( rRows.find( rSnapRect.Top() ) );
@@ -7253,7 +7253,7 @@ void GetRowPositions( const Rectangle& rSnapRect, const std::set< sal_Int32 >& r
}
-void GetColumnPositions( const Rectangle& rSnapRect, const std::set< sal_Int32 >& /* rRows */,
+void GetColumnPositions( const tools::Rectangle& rSnapRect, const std::set< sal_Int32 >& /* rRows */,
const std::set< sal_Int32 >& rColumns, std::vector< sal_Int32 >& rPositions, sal_Int32 nRow, sal_Int32 nFlags )
{
std::set< sal_Int32 >::const_iterator aColumn( rColumns.find( rSnapRect.Left() ) );
@@ -7274,9 +7274,9 @@ void GetColumnPositions( const Rectangle& rSnapRect, const std::set< sal_Int32 >
}
void GetLinePositions( const SdrObject* pObj, const std::set< sal_Int32 >& rRows, const std::set< sal_Int32 >& rColumns,
- std::vector< sal_Int32 >& rPositions, const Rectangle& rGroupSnap )
+ std::vector< sal_Int32 >& rPositions, const tools::Rectangle& rGroupSnap )
{
- Rectangle aSnapRect( pObj->GetSnapRect() );
+ tools::Rectangle aSnapRect( pObj->GetSnapRect() );
if ( aSnapRect.Left() == aSnapRect.Right() )
{
std::set< sal_Int32 >::const_iterator aColumn( rColumns.find( aSnapRect.Left() ) );
@@ -7592,7 +7592,7 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab
const SdrObject* pObj( aGroupIter.Next() );
if ( !IsLine( pObj ) )
{
- Rectangle aSnapRect( pObj->GetSnapRect() );
+ tools::Rectangle aSnapRect( pObj->GetSnapRect() );
aRows.insert( aSnapRect.Top() );
aColumns.insert( aSnapRect.Left() );
}
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 5be242f870e7..4dc6a9dca0cc 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -1014,7 +1014,7 @@ bool PDFExport::ImplExportPage( vcl::PDFWriter& rWriter, vcl::PDFExtOutDevData&
{
const Size aSizePDF( OutputDevice::LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MapUnit::MapPoint ) );
Point aOrigin;
- Rectangle aPageRect( aOrigin, rMtf.GetPrefSize() );
+ tools::Rectangle aPageRect( aOrigin, rMtf.GetPrefSize() );
bool bRet = true;
rWriter.NewPage( aSizePDF.Width(), aSizePDF.Height() );
@@ -1096,12 +1096,12 @@ void PDFExport::ImplWriteWatermark( vcl::PDFWriter& rWriter, const Size& rPageSi
rWriter.SetFont( aFont );
rWriter.SetTextColor( COL_LIGHTGREEN );
Point aTextPoint;
- Rectangle aTextRect;
+ tools::Rectangle aTextRect;
if( rPageSize.Width() > rPageSize.Height() )
{
aTextPoint = Point( (rPageSize.Width()-w)/2,
rPageSize.Height()-(rPageSize.Height()-nTextHeight)/2 );
- aTextRect = Rectangle( Point( (rPageSize.Width()-w)/2,
+ aTextRect = tools::Rectangle( Point( (rPageSize.Width()-w)/2,
(rPageSize.Height()-nTextHeight)/2 ),
Size( w, nTextHeight ) );
}
@@ -1109,7 +1109,7 @@ void PDFExport::ImplWriteWatermark( vcl::PDFWriter& rWriter, const Size& rPageSi
{
aTextPoint = Point( (rPageSize.Width()-nTextHeight)/2,
(rPageSize.Height()-w)/2 );
- aTextRect = Rectangle( aTextPoint, Size( nTextHeight, w ) );
+ aTextRect = tools::Rectangle( aTextPoint, Size( nTextHeight, w ) );
}
rWriter.SetClipRegion();
rWriter.BeginTransparencyGroup();
diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx
index 39b7276f3f7f..cd6b224b0041 100644
--- a/filter/source/svg/svgfontexport.cxx
+++ b/filter/source/svg/svgfontexport.cxx
@@ -229,7 +229,7 @@ void SVGFontExport::implEmbedFont( const vcl::Font& rFont )
{
const Point aPos;
- const tools::PolyPolygon aMissingGlyphPolyPoly( Rectangle( aPos, aSize ) );
+ const tools::PolyPolygon aMissingGlyphPolyPoly( tools::Rectangle( aPos, aSize ) );
mrExport.AddAttribute( XML_NAMESPACE_NONE, "d", SVGActionWriter::GetPathString( aMissingGlyphPolyPoly, false ) );
@@ -257,17 +257,17 @@ void SVGFontExport::implEmbedGlyph( OutputDevice& rOut, const OUString& rCellStr
if( rOut.GetTextOutline( aPolyPoly, rCellStr ) )
{
- Rectangle aBoundRect;
+ tools::Rectangle aBoundRect;
aPolyPoly.Scale( 1.0, -1.0 );
if( !rOut.GetTextBoundRect( aBoundRect, rCellStr ) )
- aBoundRect = Rectangle( Point( 0, 0 ), Size( rOut.GetTextWidth( rCellStr ), 0 ) );
+ aBoundRect = tools::Rectangle( Point( 0, 0 ), Size( rOut.GetTextWidth( rCellStr ), 0 ) );
mrExport.AddAttribute( XML_NAMESPACE_NONE, "unicode", rCellStr );
if( rCellStr[ 0 ] == nSpace && rCellStr.getLength() == 1 )
- aBoundRect = Rectangle( Point( 0, 0 ), Size( rOut.GetTextWidth( OUString(' ') ), 0 ) );
+ aBoundRect = tools::Rectangle( Point( 0, 0 ), Size( rOut.GetTextWidth( OUString(' ') ), 0 ) );
mrExport.AddAttribute( XML_NAMESPACE_NONE, "horiz-adv-x", OUString::number( aBoundRect.GetWidth() ) );
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 12cf98074131..e271db6cfceb 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -175,7 +175,7 @@ void SVGAttributeWriter::AddColorAttr( const char* pColorAttrName,
void SVGAttributeWriter::AddPaintAttr( const Color& rLineColor, const Color& rFillColor,
- const Rectangle* pObjBoundRect, const Gradient* pFillGradient )
+ const tools::Rectangle* pObjBoundRect, const Gradient* pFillGradient )
{
// Fill
if( pObjBoundRect && pFillGradient )
@@ -198,7 +198,7 @@ void SVGAttributeWriter::AddPaintAttr( const Color& rLineColor, const Color& rFi
}
-void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradient& rGradient, OUString& rGradientId )
+void SVGAttributeWriter::AddGradientDef( const tools::Rectangle& rObjRect, const Gradient& rGradient, OUString& rGradientId )
{
if( rObjRect.GetWidth() && rObjRect.GetHeight() &&
( rGradient.GetStyle() == GradientStyle::Linear || rGradient.GetStyle() == GradientStyle::Axial ||
@@ -212,7 +212,7 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie
static sal_Int32 nCurGradientId = 1;
aPoly.Rotate( aObjRectCenter, nAngle );
- Rectangle aRect( aPoly.GetBoundRect() );
+ tools::Rectangle aRect( aPoly.GetBoundRect() );
// adjust start/end colors with intensities
aStartColor.SetRed( (sal_uInt8)( ( aStartColor.GetRed() * rGradient.GetStartIntensity() ) / 100 ) );
@@ -1764,12 +1764,12 @@ Size& SVGActionWriter::ImplMap( const Size& rSz, Size& rDstSz ) const
}
-void SVGActionWriter::ImplMap( const Rectangle& rRect, Rectangle& rDstRect ) const
+void SVGActionWriter::ImplMap( const tools::Rectangle& rRect, tools::Rectangle& rDstRect ) const
{
Point aTL( rRect.TopLeft() );
Size aSz( rRect.GetSize() );
- rDstRect = Rectangle( ImplMap( aTL, aTL ), ImplMap( aSz, aSz ) );
+ rDstRect = tools::Rectangle( ImplMap( aTL, aTL ), ImplMap( aSz, aSz ) );
}
@@ -1903,9 +1903,9 @@ void SVGActionWriter::ImplWriteLine( const Point& rPt1, const Point& rPt2,
}
-void SVGActionWriter::ImplWriteRect( const Rectangle& rRect, long nRadX, long nRadY )
+void SVGActionWriter::ImplWriteRect( const tools::Rectangle& rRect, long nRadX, long nRadY )
{
- Rectangle aRect;
+ tools::Rectangle aRect;
ImplMap( rRect, aRect );
@@ -2023,7 +2023,7 @@ void SVGActionWriter::ImplWriteShape( const SVGShapeDescriptor& rShape )
ImplMap( rShape.maShapePolyPoly, aPolyPoly );
const bool bLineOnly = ( rShape.maShapeFillColor == Color( COL_TRANSPARENT ) ) && ( !rShape.mapShapeGradient.get() );
- Rectangle aBoundRect( aPolyPoly.GetBoundRect() );
+ tools::Rectangle aBoundRect( aPolyPoly.GetBoundRect() );
maAttributeWriter.AddPaintAttr( rShape.maShapeLineColor, rShape.maShapeFillColor, &aBoundRect, rShape.mapShapeGradient.get() );
@@ -2167,7 +2167,7 @@ void SVGActionWriter::ImplWritePattern( const tools::PolyPolygon& rPolyPoly,
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrId, aPatternId );
- Rectangle aRect;
+ tools::Rectangle aRect;
ImplMap( rPolyPoly.GetBoundRect(), aRect );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, OUString::number( aRect.Left() ) );
@@ -2238,7 +2238,7 @@ void SVGActionWriter::ImplWriteGradientLinear( const tools::PolyPolygon& rPolyPo
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrId, aGradientId );
{
- Rectangle aTmpRect, aRect;
+ tools::Rectangle aTmpRect, aRect;
Point aTmpCenter, aCenter;
rGradient.GetBoundRect( rPolyPoly.GetBoundRect(), aTmpRect, aTmpCenter );
@@ -2412,7 +2412,7 @@ void SVGActionWriter::ImplWriteMask( GDIMetaFile& rMtf,
{
SvXMLElementExport aElemMask( mrExport, XML_NAMESPACE_NONE, "mask", true, true );
- const tools::PolyPolygon aPolyPolygon( tools::PolyPolygon( Rectangle( rDestPt, rDestSize ) ) );
+ const tools::PolyPolygon aPolyPolygon( tools::PolyPolygon( tools::Rectangle( rDestPt, rDestSize ) ) );
Gradient aGradient( rGradient );
// swap gradient stops to adopt SVG mask
@@ -2718,8 +2718,8 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx,
{
BitmapEx aBmpEx( rBmpEx );
Point aPoint;
- const Rectangle aBmpRect( aPoint, rBmpEx.GetSizePixel() );
- const Rectangle aSrcRect( rSrcPt, rSrcSz );
+ const tools::Rectangle aBmpRect( aPoint, rBmpEx.GetSizePixel() );
+ const tools::Rectangle aSrcRect( rSrcPt, rSrcSz );
if( aSrcRect != aBmpRect )
aBmpEx.Crop( aSrcRect );
@@ -2901,7 +2901,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
const MetaEllipseAction* pA = static_cast<const MetaEllipseAction*>(pAction);
- const Rectangle& rRect = pA->GetRect();
+ const tools::Rectangle& rRect = pA->GetRect();
maAttributeWriter.AddPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() );
ImplWriteEllipse( rRect.Center(), rRect.GetWidth() >> 1, rRect.GetHeight() >> 1 );
diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index 659d635d8ca7..46fced788f72 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -164,9 +164,9 @@ public:
~SVGAttributeWriter();
void AddColorAttr( const char* pColorAttrName, const char* pColorOpacityAttrName, const Color& rColor );
- void AddGradientDef( const Rectangle& rObjRect,const Gradient& rGradient, OUString& rGradientId );
+ void AddGradientDef( const tools::Rectangle& rObjRect,const Gradient& rGradient, OUString& rGradientId );
void AddPaintAttr( const Color& rLineColor, const Color& rFillColor,
- const Rectangle* pObjBoundRect = nullptr, const Gradient* pFillGradient = nullptr );
+ const tools::Rectangle* pObjBoundRect = nullptr, const Gradient* pFillGradient = nullptr );
void SetFontAttr( const vcl::Font& rFont );
void startFontSettings();
@@ -336,12 +336,12 @@ private:
long ImplMap( sal_Int32 nVal ) const;
Point& ImplMap( const Point& rPt, Point& rDstPt ) const;
Size& ImplMap( const Size& rSz, Size& rDstSz ) const;
- void ImplMap( const Rectangle& rRect, Rectangle& rDstRect ) const;
+ void ImplMap( const tools::Rectangle& rRect, tools::Rectangle& rDstRect ) const;
tools::Polygon& ImplMap( const tools::Polygon& rPoly, tools::Polygon& rDstPoly ) const;
tools::PolyPolygon& ImplMap( const tools::PolyPolygon& rPolyPoly, tools::PolyPolygon& rDstPolyPoly ) const;
void ImplWriteLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = nullptr );
- void ImplWriteRect( const Rectangle& rRect, long nRadX = 0, long nRadY = 0 );
+ void ImplWriteRect( const tools::Rectangle& rRect, long nRadX = 0, long nRadY = 0 );
void ImplWriteEllipse( const Point& rCenter, long nRadX, long nRadY );
void ImplWritePattern( const tools::PolyPolygon& rPolyPoly, const Hatch* pHatch, const Gradient* pGradient, sal_uInt32 nWriteFlags );
void ImplAddLineAttr( const LineInfo &rAttrs );