summaryrefslogtreecommitdiff
path: root/vcl/source/filter/wmf
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/filter/wmf')
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx12
-rw-r--r--vcl/source/filter/wmf/emfwr.hxx2
-rw-r--r--vcl/source/filter/wmf/enhwmf.cxx28
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx36
-rw-r--r--vcl/source/filter/wmf/winmtf.hxx44
-rw-r--r--vcl/source/filter/wmf/winwmf.cxx48
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx20
-rw-r--r--vcl/source/filter/wmf/wmfwr.hxx16
8 files changed, 103 insertions, 103 deletions
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index 7eb9c63103bb..0091aa1e8fe9 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -602,9 +602,9 @@ void EMFWriter::ImplWriteSize( const Size& rSize)
m_rStm.WriteInt32( aSize.Width() ).WriteInt32( aSize.Height() );
}
-void EMFWriter::ImplWriteRect( const Rectangle& rRect )
+void EMFWriter::ImplWriteRect( const tools::Rectangle& rRect )
{
- const Rectangle aRect( OutputDevice::LogicToLogic ( rRect, maVDev->GetMapMode(), maDestMapMode ));
+ const tools::Rectangle aRect( OutputDevice::LogicToLogic ( rRect, maVDev->GetMapMode(), maDestMapMode ));
m_rStm
.WriteInt32( aRect.Left() )
.WriteInt32( aRect.Top() )
@@ -780,7 +780,7 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
const Size aBmpSizePixel( rBmp.GetSizePixel() );
ImplBeginRecord( WIN_EMR_STRETCHDIBITS );
- ImplWriteRect( Rectangle( rPt, rSz ) );
+ ImplWriteRect( tools::Rectangle( rPt, rSz ) );
ImplWritePoint( rPt );
m_rStm.WriteInt32( 0 ).WriteInt32( 0 ).WriteInt32( aBmpSizePixel.Width() ).WriteInt32( aBmpSizePixel.Height() );
@@ -872,7 +872,7 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const OUString& rText, c
// write text record
ImplBeginRecord( WIN_EMR_EXTTEXTOUTW );
- ImplWriteRect( Rectangle( rPos, Size( nNormWidth, maVDev->GetTextHeight() ) ) );
+ ImplWriteRect( tools::Rectangle( rPos, Size( nNormWidth, maVDev->GetTextHeight() ) ) );
m_rStm.WriteUInt32( 1 );
m_rStm.WriteInt32( 0 ).WriteInt32( 0 );
ImplWritePoint( rPos );
@@ -1253,7 +1253,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
const MetaBmpScalePartAction* pA = static_cast<const MetaBmpScalePartAction*>(pAction);
Bitmap aTmp( pA->GetBitmap() );
- if( aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) )
+ if( aTmp.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) )
ImplWriteBmpRecord( aTmp, pA->GetDestPoint(), pA->GetDestSize(), WIN_SRCCOPY );
}
break;
@@ -1298,7 +1298,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
const MetaBmpExScalePartAction* pA = static_cast<const MetaBmpExScalePartAction*>(pAction);
BitmapEx aBmpEx( pA->GetBitmapEx() );
- aBmpEx.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
+ aBmpEx.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
Bitmap aBmp( aBmpEx.GetBitmap() );
Bitmap aMsk( aBmpEx.GetMask() );
diff --git a/vcl/source/filter/wmf/emfwr.hxx b/vcl/source/filter/wmf/emfwr.hxx
index c34ad63358c2..0e01db54dcf8 100644
--- a/vcl/source/filter/wmf/emfwr.hxx
+++ b/vcl/source/filter/wmf/emfwr.hxx
@@ -73,7 +73,7 @@ private:
void ImplWriteExtent( long nExtent );
void ImplWritePoint( const Point& rPoint );
void ImplWriteSize( const Size& rSize);
- void ImplWriteRect( const Rectangle& rRect );
+ void ImplWriteRect( const tools::Rectangle& rRect );
void ImplWritePath( const tools::PolyPolygon& rPolyPoly, bool bClose );
void ImplWritePolygonRecord( const tools::Polygon& rPoly, bool bClose );
void ImplWritePolyPolygonRecord( const tools::PolyPolygon& rPolyPoly );
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 6249b41c748d..d07e96fe394e 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -386,7 +386,7 @@ bool ImplReadRegion( tools::PolyPolygon& rPolyPoly, SvStream& rStream, sal_uInt3
rStream.ReadInt32(nx2);
rStream.ReadInt32(ny2);
- Rectangle aRectangle(Point(nx1, ny1), Point(nx2, ny2));
+ tools::Rectangle aRectangle(Point(nx1, ny1), Point(nx2, ny2));
tools::Polygon aPolygon(aRectangle);
tools::PolyPolygon aPolyPolyOr1(aPolygon);
@@ -1141,7 +1141,7 @@ bool EnhWMFReader::ReadEnhWMF()
{
sal_uInt32 nStartX, nStartY, nEndX, nEndY;
pWMF->ReadInt32( nX32 ).ReadInt32( nY32 ).ReadInt32( nx32 ).ReadInt32( ny32 ).ReadUInt32( nStartX ).ReadUInt32( nStartY ).ReadUInt32( nEndX ).ReadUInt32( nEndY );
- const Rectangle aRect( ReadRectangle( nX32, nY32, nx32, ny32 ));
+ const tools::Rectangle aRect( ReadRectangle( nX32, nY32, nx32, ny32 ));
// #i73608# OutputDevice deviates from WMF
// semantics. start==end means full ellipse here.
@@ -1249,7 +1249,7 @@ bool EnhWMFReader::ReadEnhWMF()
.ReadUInt32( offBitsSrc ).ReadUInt32( cbBitsSrc ).ReadInt32( cxSrc ).ReadInt32( cySrc ) ;
sal_uInt32 dwRop = SRCAND|SRCINVERT;
- Rectangle aRect( Point( xDest, yDest ), Size( cxDest+1, cyDest+1 ) );
+ tools::Rectangle aRect( Point( xDest, yDest ), Size( cxDest+1, cyDest+1 ) );
if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) )
bStatus = false;
@@ -1345,7 +1345,7 @@ bool EnhWMFReader::ReadEnhWMF()
( xSrc + cxSrc < aBitmapEx.GetSizePixel().Width() ) &&
( ySrc + cySrc < aBitmapEx.GetSizePixel().Height() ) )
{
- const Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) );
+ const tools::Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) );
aBitmapEx.Crop( aCropRect );
}
@@ -1388,7 +1388,7 @@ bool EnhWMFReader::ReadEnhWMF()
cxSrc = cySrc = 0;
Bitmap aBitmap;
- Rectangle aRect( Point( xDest, yDest ), Size( cxDest, cyDest ) );
+ tools::Rectangle aRect( Point( xDest, yDest ), Size( cxDest, cyDest ) );
if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) )
bStatus = false;
@@ -1419,7 +1419,7 @@ bool EnhWMFReader::ReadEnhWMF()
( xSrc + cxSrc <= aBitmap.GetSizePixel().Width() ) &&
( ySrc + cySrc <= aBitmap.GetSizePixel().Height() ) )
{
- Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) );
+ tools::Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) );
aBitmap.Crop( aCropRect );
}
aBmpSaveList.emplace_back(new BSaveStruct(aBitmap, aRect, dwRop));
@@ -1451,7 +1451,7 @@ bool EnhWMFReader::ReadEnhWMF()
.ReadInt32( cyDest );
Bitmap aBitmap;
- Rectangle aRect( Point( xDest, yDest ), Size( cxDest, cyDest ) );
+ tools::Rectangle aRect( Point( xDest, yDest ), Size( cxDest, cyDest ) );
if ( ((SAL_MAX_UINT32 - 14) < cbBitsSrc)
|| ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc )
@@ -1486,7 +1486,7 @@ bool EnhWMFReader::ReadEnhWMF()
( xSrc + cxSrc <= aBitmap.GetSizePixel().Width() ) &&
( ySrc + cySrc <= aBitmap.GetSizePixel().Height() ) )
{
- Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) );
+ tools::Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) );
aBitmap.Crop( aCropRect );
}
aBmpSaveList.emplace_back(new BSaveStruct(aBitmap, aRect, dwRop));
@@ -1836,10 +1836,10 @@ bool EnhWMFReader::ReadHeader()
// Start reading the EMR_HEADER Header object
// bound size (RectL object, see [MS-WMF] section 2.2.2.19)
- Rectangle rclBounds = ReadRectangle(); // rectangle in logical units
+ tools::Rectangle rclBounds = ReadRectangle(); // rectangle in logical units
// picture frame size (RectL object)
- Rectangle rclFrame = ReadRectangle(); // rectangle in device units 1/100th mm
+ tools::Rectangle rclFrame = ReadRectangle(); // rectangle in device units 1/100th mm
pWMF->ReadUInt32( nSignature );
@@ -1924,21 +1924,21 @@ bool EnhWMFReader::ReadHeader()
return true;
}
-Rectangle EnhWMFReader::ReadRectangle()
+tools::Rectangle EnhWMFReader::ReadRectangle()
{
sal_Int32 nLeft, nTop, nRight, nBottom;
pWMF->ReadInt32(nLeft);
pWMF->ReadInt32(nTop);
pWMF->ReadInt32(nRight);
pWMF->ReadInt32(nBottom);
- return Rectangle(nLeft, nTop, nRight, nBottom);
+ return tools::Rectangle(nLeft, nTop, nRight, nBottom);
}
-Rectangle EnhWMFReader::ReadRectangle( sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 )
+tools::Rectangle EnhWMFReader::ReadRectangle( sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 )
{
Point aTL ( Point( x1, y1 ) );
Point aBR( Point( --x2, --y2 ) );
- return Rectangle( aTL, aBR );
+ return tools::Rectangle( aTL, aBR );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index cb53a11135d0..cf88ff61736d 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -41,13 +41,13 @@
#define EMFP_DEBUG(x)
#endif
-void WinMtfClipPath::intersectClipRect( const Rectangle& rRect )
+void WinMtfClipPath::intersectClipRect( const tools::Rectangle& rRect )
{
maClip.intersectRange(
vcl::unotools::b2DRectangleFromRectangle(rRect));
}
-void WinMtfClipPath::excludeClipRect( const Rectangle& rRect )
+void WinMtfClipPath::excludeClipRect( const tools::Rectangle& rRect )
{
maClip.subtractRange(
vcl::unotools::b2DRectangleFromRectangle(rRect));
@@ -488,9 +488,9 @@ Size WinMtfOutput::ImplMap(const Size& rSz, bool bDoWorldTransform)
return Size();
}
-Rectangle WinMtfOutput::ImplMap( const Rectangle& rRect )
+tools::Rectangle WinMtfOutput::ImplMap( const tools::Rectangle& rRect )
{
- return Rectangle( ImplMap( rRect.TopLeft() ), ImplMap( rRect.GetSize() ) );
+ return tools::Rectangle( ImplMap( rRect.TopLeft() ), ImplMap( rRect.GetSize() ) );
}
void WinMtfOutput::ImplMap( vcl::Font& rFont )
@@ -769,7 +769,7 @@ void WinMtfOutput::DeleteObject( sal_Int32 nIndex )
}
}
-void WinMtfOutput::IntersectClipRect( const Rectangle& rRect )
+void WinMtfOutput::IntersectClipRect( const tools::Rectangle& rRect )
{
mbClipNeedsUpdate=true;
if ((rRect.Left()-rRect.Right()==0) && (rRect.Top()-rRect.Bottom()==0))
@@ -779,7 +779,7 @@ void WinMtfOutput::IntersectClipRect( const Rectangle& rRect )
aClipPath.intersectClipRect( ImplMap( rRect ) );
}
-void WinMtfOutput::ExcludeClipRect( const Rectangle& rRect )
+void WinMtfOutput::ExcludeClipRect( const tools::Rectangle& rRect )
{
mbClipNeedsUpdate=true;
aClipPath.excludeClipRect( ImplMap( rRect ) );
@@ -1069,7 +1069,7 @@ void WinMtfOutput::LineTo( const Point& rPoint, bool bRecordPath )
maActPos = aDest;
}
-void WinMtfOutput::DrawRect( const Rectangle& rRect, bool bEdge )
+void WinMtfOutput::DrawRect( const tools::Rectangle& rRect, bool bEdge )
{
UpdateClipRegion();
UpdateFillStyle();
@@ -1107,7 +1107,7 @@ void WinMtfOutput::DrawRect( const Rectangle& rRect, bool bEdge )
}
}
-void WinMtfOutput::DrawRoundRect( const Rectangle& rRect, const Size& rSize )
+void WinMtfOutput::DrawRoundRect( const tools::Rectangle& rRect, const Size& rSize )
{
UpdateClipRegion();
UpdateLineStyle();
@@ -1115,7 +1115,7 @@ void WinMtfOutput::DrawRoundRect( const Rectangle& rRect, const Size& rSize )
mpGDIMetaFile->AddAction( new MetaRoundRectAction( ImplMap( rRect ), labs( ImplMap( rSize ).Width() ), labs( ImplMap( rSize ).Height() ) ) );
}
-void WinMtfOutput::DrawEllipse( const Rectangle& rRect )
+void WinMtfOutput::DrawEllipse( const tools::Rectangle& rRect )
{
UpdateClipRegion();
UpdateFillStyle();
@@ -1137,13 +1137,13 @@ void WinMtfOutput::DrawEllipse( const Rectangle& rRect )
}
}
-void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, bool bTo )
+void WinMtfOutput::DrawArc( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd, bool bTo )
{
UpdateClipRegion();
UpdateLineStyle();
UpdateFillStyle();
- Rectangle aRect( ImplMap( rRect ) );
+ tools::Rectangle aRect( ImplMap( rRect ) );
Point aStart( ImplMap( rStart ) );
Point aEnd( ImplMap( rEnd ) );
@@ -1166,12 +1166,12 @@ void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const P
maActPos = aEnd;
}
-void WinMtfOutput::DrawPie( const Rectangle& rRect, const Point& rStart, const Point& rEnd )
+void WinMtfOutput::DrawPie( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd )
{
UpdateClipRegion();
UpdateFillStyle();
- Rectangle aRect( ImplMap( rRect ) );
+ tools::Rectangle aRect( ImplMap( rRect ) );
Point aStart( ImplMap( rStart ) );
Point aEnd( ImplMap( rEnd ) );
@@ -1189,12 +1189,12 @@ void WinMtfOutput::DrawPie( const Rectangle& rRect, const Point& rStart, const P
}
}
-void WinMtfOutput::DrawChord( const Rectangle& rRect, const Point& rStart, const Point& rEnd )
+void WinMtfOutput::DrawChord( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd )
{
UpdateClipRegion();
UpdateFillStyle();
- Rectangle aRect( ImplMap( rRect ) );
+ tools::Rectangle aRect( ImplMap( rRect ) );
Point aStart( ImplMap( rStart ) );
Point aEnd( ImplMap( rEnd ) );
@@ -1670,7 +1670,7 @@ void WinMtfOutput::ResolveBitmapActions( std::vector<std::unique_ptr<BSaveStruct
size_t nObjectStartIndex = nObjects - nObjectsLeft;
BSaveStruct* pSave = rSaveList[nObjectStartIndex].get();
- Rectangle aRect( pSave->aOutRect );
+ tools::Rectangle aRect( pSave->aOutRect );
for ( i = nObjectStartIndex; i < nObjects; )
{
@@ -1992,12 +1992,12 @@ void WinMtfOutput::ScaleWinExt( double fX, double fY )
mnWinExtY = FRound( mnWinExtY * fY );
}
-void WinMtfOutput::SetrclBounds( const Rectangle& rRect )
+void WinMtfOutput::SetrclBounds( const tools::Rectangle& rRect )
{
mrclBounds = rRect;
}
-void WinMtfOutput::SetrclFrame( const Rectangle& rRect )
+void WinMtfOutput::SetrclFrame( const tools::Rectangle& rRect )
{
mrclFrame = rRect;
}
diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx
index d6e161d9e6a8..c7402f50ff95 100644
--- a/vcl/source/filter/wmf/winmtf.hxx
+++ b/vcl/source/filter/wmf/winmtf.hxx
@@ -249,8 +249,8 @@ public:
WinMtfClipPath(): maClip() {};
void setClipPath( const tools::PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode );
- void intersectClipRect( const Rectangle& rRect );
- void excludeClipRect( const Rectangle& rRect );
+ void intersectClipRect( const tools::Rectangle& rRect );
+ void excludeClipRect( const tools::Rectangle& rRect );
void moveClipRegion( const Size& rSize );
void setDefaultClipPath();
@@ -416,16 +416,16 @@ struct SaveStruct
struct BSaveStruct
{
BitmapEx aBmpEx;
- Rectangle aOutRect;
+ tools::Rectangle aOutRect;
sal_uInt32 nWinRop;
- BSaveStruct(const Bitmap& rBmp, const Rectangle& rOutRect, sal_uInt32 nRop)
+ BSaveStruct(const Bitmap& rBmp, const tools::Rectangle& rOutRect, sal_uInt32 nRop)
: aBmpEx(rBmp)
, aOutRect(rOutRect)
, nWinRop(nRop)
{}
- BSaveStruct(const BitmapEx& rBmpEx, const Rectangle& rOutRect, sal_uInt32 nRop)
+ BSaveStruct(const BitmapEx& rBmpEx, const tools::Rectangle& rOutRect, sal_uInt32 nRop)
: aBmpEx(rBmpEx)
, aOutRect(rOutRect)
, nWinRop(nRop)
@@ -484,8 +484,8 @@ class WinMtfOutput final
sal_Int32 mnPixX, mnPixY; // Reference Device in pixel
sal_Int32 mnMillX, mnMillY; // Reference Device in Mill
- Rectangle mrclFrame; // rectangle in logical units 1/100th mm
- Rectangle mrclBounds;
+ tools::Rectangle mrclFrame; // rectangle in logical units 1/100th mm
+ tools::Rectangle mrclBounds;
GDIMetaFile* mpGDIMetaFile;
@@ -495,7 +495,7 @@ class WinMtfOutput final
Point ImplMap( const Point& rPt );
Point ImplScale( const Point& rPt );
Size ImplMap( const Size& rSize, bool bDoWorldTransform = true);
- Rectangle ImplMap( const Rectangle& rRectangle );
+ tools::Rectangle ImplMap( const tools::Rectangle& rRectangle );
void ImplMap( vcl::Font& rFont );
tools::Polygon& ImplMap( tools::Polygon& rPolygon );
tools::PolyPolygon& ImplMap( tools::PolyPolygon& rPolyPolygon );
@@ -519,8 +519,8 @@ public:
void SetWinExt( const Size& rSize , bool bIsEMF = false);
void ScaleWinExt( double fX, double fY );
- void SetrclBounds( const Rectangle& rRect );
- void SetrclFrame( const Rectangle& rRect );
+ void SetrclBounds( const tools::Rectangle& rRect );
+ void SetrclFrame( const tools::Rectangle& rRect );
void SetRefPix( const Size& rSize );
void SetRefMill( const Size& rSize );
@@ -562,22 +562,22 @@ public:
void MoveTo( const Point& rPoint, bool bRecordPath = false );
void LineTo( const Point& rPoint, bool bRecordPath = false );
void DrawPixel( const Point& rSource, const Color& rColor );
- void DrawRect( const Rectangle& rRect, bool bEdge = true );
- void DrawRoundRect( const Rectangle& rRect, const Size& rSize );
- void DrawEllipse( const Rectangle& rRect );
+ void DrawRect( const tools::Rectangle& rRect, bool bEdge = true );
+ void DrawRoundRect( const tools::Rectangle& rRect, const Size& rSize );
+ void DrawEllipse( const tools::Rectangle& rRect );
void DrawArc(
- const Rectangle& rRect,
+ const tools::Rectangle& rRect,
const Point& rStartAngle,
const Point& rEndAngle,
bool bDrawTo = false
);
void DrawPie(
- const Rectangle& rRect,
+ const tools::Rectangle& rRect,
const Point& rStartAngle,
const Point& rEndAngle
);
void DrawChord(
- const Rectangle& rRect,
+ const tools::Rectangle& rRect,
const Point& rStartAngle,
const Point& rEndAngle
);
@@ -605,8 +605,8 @@ public:
void ResolveBitmapActions( std::vector<std::unique_ptr<BSaveStruct>>& rSaveList );
- void IntersectClipRect( const Rectangle& rRect );
- void ExcludeClipRect( const Rectangle& rRect );
+ void IntersectClipRect( const tools::Rectangle& rRect );
+ void ExcludeClipRect( const tools::Rectangle& rRect );
void MoveClipRegion( const Size& rSize );
void SetClipPath(
const tools::PolyPolygon& rPolyPoly,
@@ -659,7 +659,7 @@ class EnhWMFReader : public WinMtf
bool ReadHeader();
// reads and converts the rectangle
- static Rectangle ReadRectangle( sal_Int32, sal_Int32, sal_Int32, sal_Int32 );
+ static tools::Rectangle ReadRectangle( sal_Int32, sal_Int32, sal_Int32, sal_Int32 );
public:
EnhWMFReader(SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = nullptr);
@@ -672,7 +672,7 @@ private:
template <class T> tools::Polygon ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoints);
template <class T, class Drawer> void ReadAndDrawPolygon(Drawer drawer, const bool skipFirst);
- Rectangle ReadRectangle();
+ tools::Rectangle ReadRectangle();
void ReadEMFPlusComment(sal_uInt32 length, bool& bHaveDC);
};
@@ -708,9 +708,9 @@ private:
Point ReadPoint(); // reads and converts a point (first X then Y)
Point ReadYX(); // reads and converts a point (first Y then X)
- Rectangle ReadRectangle(); // reads and converts a rectangle
+ tools::Rectangle ReadRectangle(); // reads and converts a rectangle
Size ReadYXExt();
- void GetPlaceableBound( Rectangle& rSize, SvStream* pStrm );
+ void GetPlaceableBound( tools::Rectangle& rSize, SvStream* pStrm );
public:
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index a03781ff3568..94783f8879d4 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -112,7 +112,7 @@
#define W_META_CREATEBITMAP 0x06FE
#define W_META_CREATEREGION 0x06FF
-static void GetWinExtMax( const Point& rSource, Rectangle& rPlaceableBound, const sal_Int16 nMapMode )
+static void GetWinExtMax( const Point& rSource, tools::Rectangle& rPlaceableBound, const sal_Int16 nMapMode )
{
Point aSource( rSource );
if ( nMapMode == MM_HIMETRIC )
@@ -127,7 +127,7 @@ static void GetWinExtMax( const Point& rSource, Rectangle& rPlaceableBound, cons
rPlaceableBound.Bottom() = aSource.Y();
}
-static void GetWinExtMax( const Rectangle& rSource, Rectangle& rPlaceableBound, const sal_Int16 nMapMode )
+static void GetWinExtMax( const tools::Rectangle& rSource, tools::Rectangle& rPlaceableBound, const sal_Int16 nMapMode )
{
GetWinExtMax( rSource.TopLeft(), rPlaceableBound, nMapMode );
GetWinExtMax( rSource.BottomRight(), rPlaceableBound, nMapMode );
@@ -147,14 +147,14 @@ inline Point WMFReader::ReadYX()
return Point( nX, nY );
}
-Rectangle WMFReader::ReadRectangle()
+tools::Rectangle WMFReader::ReadRectangle()
{
Point aBR, aTL;
aBR = ReadYX();
aTL = ReadYX();
aBR.X()--;
aBR.Y()--;
- return Rectangle( aTL, aBR );
+ return tools::Rectangle( aTL, aBR );
}
Size WMFReader::ReadYXExt()
@@ -306,7 +306,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
{
Point aEnd( ReadYX() );
Point aStart( ReadYX() );
- Rectangle aRect( ReadRectangle() );
+ tools::Rectangle aRect( ReadRectangle() );
aRect.Justify();
pOut->DrawArc( aRect, aStart, aEnd );
}
@@ -316,7 +316,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
{
Point aEnd( ReadYX() );
Point aStart( ReadYX() );
- Rectangle aRect( ReadRectangle() );
+ tools::Rectangle aRect( ReadRectangle() );
aRect.Justify();
// #i73608# OutputDevice deviates from WMF
@@ -332,7 +332,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
{
Point aEnd( ReadYX() );
Point aStart( ReadYX() );
- Rectangle aRect( ReadRectangle() );
+ tools::Rectangle aRect( ReadRectangle() );
aRect.Justify();
pOut->DrawChord( aRect, aStart, aEnd );
}
@@ -538,12 +538,12 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
{
sal_Int32 nOriginalTextLen = nLen;
sal_Int32 nOriginalBlockLen = ( nOriginalTextLen + 1 ) &~ 1;
- Rectangle aRect;
+ tools::Rectangle aRect;
if( nOptions & ETO_CLIPPED )
{
const Point aPt1( ReadPoint() );
const Point aPt2( ReadPoint() );
- aRect = Rectangle( aPt1, aPt2 );
+ aRect = tools::Rectangle( aPt1, aPt2 );
}
auto nRemainingSize = pWMF->remainingSize();
@@ -699,10 +699,10 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
( ( nSx + nSxe ) <= aBmp.GetSizePixel().Width() ) &&
( ( nSy + nSye <= aBmp.GetSizePixel().Height() ) ) )
{
- Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) );
+ tools::Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) );
aBmp.Crop( aCropRect );
}
- Rectangle aDestRect( aPoint, Size( nSxe, nSye ) );
+ tools::Rectangle aDestRect( aPoint, Size( nSxe, nSye ) );
aBmpSaveList.emplace_back(new BSaveStruct(aBmp, aDestRect, nWinROP));
}
}
@@ -741,7 +741,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
Size aDestSize( ReadYXExt() );
if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps
{
- Rectangle aDestRect( ReadYX(), aDestSize );
+ tools::Rectangle aDestRect( ReadYX(), aDestSize );
if ( nWinROP != PATCOPY )
ReadDIB(aBmp, *pWMF, false);
@@ -750,7 +750,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
( ( nSx + nSxe ) <= aBmp.GetSizePixel().Width() ) &&
( ( nSy + nSye <= aBmp.GetSizePixel().Height() ) ) )
{
- Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) );
+ tools::Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) );
aBmp.Crop( aCropRect );
}
aBmpSaveList.emplace_back(new BSaveStruct(aBmp, aDestRect, nWinROP));
@@ -978,7 +978,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
pWMF->ReadUInt32( nROP );
Size aSize = ReadYXExt();
nOldROP = pOut->SetRasterOp( (WMFRasterOp)nROP );
- pOut->DrawRect( Rectangle( ReadYX(), aSize ), false );
+ pOut->DrawRect( tools::Rectangle( ReadYX(), aSize ), false );
pOut->SetRasterOp( nOldROP );
}
break;
@@ -1192,7 +1192,7 @@ bool WMFReader::ReadHeader()
if (!pWMF->good())
return false;
- Rectangle aPlaceableBound;
+ tools::Rectangle aPlaceableBound;
bool bPlaceable = nPlaceableMetaKey == 0x9ac6cdd7L;
@@ -1236,7 +1236,7 @@ bool WMFReader::ReadHeader()
&& (pExternalHeader->mapMode == MM_ISOTROPIC || pExternalHeader->mapMode == MM_ANISOTROPIC))
{
// #n417818#: If we have an external header then overwrite the bounds!
- Rectangle aExtRect(0, 0,
+ tools::Rectangle aExtRect(0, 0,
(double) pExternalHeader->xExt * 567 * nUnitsPerInch / 1440000,
(double) pExternalHeader->yExt * 567 * nUnitsPerInch / 1440000);
aPlaceableBound = aExtRect;
@@ -1259,7 +1259,7 @@ bool WMFReader::ReadHeader()
{
double fRatio = aPlaceableBound.GetWidth() / fMaxWidth;
- aPlaceableBound = Rectangle(
+ aPlaceableBound = tools::Rectangle(
aPlaceableBound.Left() / fRatio,
aPlaceableBound.Top() / fRatio,
aPlaceableBound.Right() / fRatio,
@@ -1398,7 +1398,7 @@ void WMFReader::ReadWMF()
if( bEMFAvailable )
{
pOut->AddFromGDIMetaFile( aMeta );
- pOut->SetrclFrame( Rectangle( Point(0, 0), aMeta.GetPrefSize()));
+ pOut->SetrclFrame( tools::Rectangle( Point(0, 0), aMeta.GetPrefSize()));
// the stream needs to be set to the wmf end position,
// otherwise the GfxLink that is created will be incorrect
@@ -1435,11 +1435,11 @@ void WMFReader::ReadWMF()
pWMF->Seek( nStartPos );
}
-void WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm )
+void WMFReader::GetPlaceableBound( tools::Rectangle& rPlaceableBound, SvStream* pStm )
{
bool bRet = true;
- Rectangle aBound;
+ tools::Rectangle aBound;
aBound.Left() = RECT_MAX;
aBound.Top() = RECT_MAX;
aBound.Right() = RECT_MIN;
@@ -1738,7 +1738,7 @@ void WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm )
Size aDestSize( ReadYXExt() );
if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps
{
- Rectangle aDestRect( ReadYX(), aDestSize );
+ tools::Rectangle aDestRect( ReadYX(), aDestSize );
GetWinExtMax( aDestRect, aBound, nMapMode );
bBoundsDetermined = true;
}
@@ -1751,7 +1751,7 @@ void WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm )
sal_uInt32 nROP;
pStm->ReadUInt32( nROP );
Size aSize = ReadYXExt();
- GetWinExtMax( Rectangle( ReadYX(), aSize ), aBound, nMapMode );
+ GetWinExtMax( tools::Rectangle( ReadYX(), aSize ), aBound, nMapMode );
bBoundsDetermined = true;
}
break;
@@ -1781,14 +1781,14 @@ void WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm )
{
if (aWinExt)
{
- rPlaceableBound = Rectangle(aWinOrg, *aWinExt);
+ rPlaceableBound = tools::Rectangle(aWinOrg, *aWinExt);
SAL_INFO("vcl.wmf", "Window dimension "
" t: " << rPlaceableBound.Left() << " l: " << rPlaceableBound.Top()
<< " b: " << rPlaceableBound.Right() << " r: " << rPlaceableBound.Bottom());
}
else if (aViewportExt)
{
- rPlaceableBound = Rectangle(aViewportOrg, *aViewportExt);
+ rPlaceableBound = tools::Rectangle(aViewportOrg, *aViewportExt);
SAL_INFO("vcl.wmf", "Viewport dimension "
" t: " << rPlaceableBound.Left() << " l: " << rPlaceableBound.Top()
<< " b: " << rPlaceableBound.Right() << " r: " << rPlaceableBound.Bottom());
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 969a6f74d5a0..7950f105ee20 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -243,7 +243,7 @@ void WMFWriter::WriteHeightWidth(const Size & rSize)
pWMF->WriteInt16( aSz.Height() ).WriteInt16( aSz.Width() );
}
-void WMFWriter::WriteRectangle(const Rectangle & rRect)
+void WMFWriter::WriteRectangle(const tools::Rectangle & rRect)
{
WritePointYX(Point(rRect.Right()+1,rRect.Bottom()+1));
WritePointYX(rRect.TopLeft());
@@ -278,7 +278,7 @@ void WMFWriter::UpdateRecordHeader()
pWMF->Seek(nPos);
}
-void WMFWriter::WMFRecord_Arc(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt)
+void WMFWriter::WMFRecord_Arc(const tools::Rectangle & rRect, const Point & rStartPt, const Point & rEndPt)
{
WriteRecordHeader(0x0000000b,W_META_ARC);
WritePointYX(rEndPt);
@@ -286,7 +286,7 @@ void WMFWriter::WMFRecord_Arc(const Rectangle & rRect, const Point & rStartPt, c
WriteRectangle(rRect);
}
-void WMFWriter::WMFRecord_Chord(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt)
+void WMFWriter::WMFRecord_Chord(const tools::Rectangle & rRect, const Point & rStartPt, const Point & rEndPt)
{
WriteRecordHeader(0x0000000b,W_META_CHORD);
WritePointYX(rEndPt);
@@ -411,7 +411,7 @@ void WMFWriter::WMFRecord_DeleteObject(sal_uInt16 nObjectHandle)
pWMF->WriteUInt16( nObjectHandle );
}
-void WMFWriter::WMFRecord_Ellipse(const Rectangle & rRect)
+void WMFWriter::WMFRecord_Ellipse(const tools::Rectangle & rRect)
{
WriteRecordHeader(0x00000007,W_META_ELLIPSE);
WriteRectangle(rRect);
@@ -605,7 +605,7 @@ void WMFWriter::WMFRecord_MoveTo(const Point & rPoint)
WritePointYX(rPoint);
}
-void WMFWriter::WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt)
+void WMFWriter::WMFRecord_Pie(const tools::Rectangle & rRect, const Point & rStartPt, const Point & rEndPt)
{
WriteRecordHeader(0x0000000b,W_META_PIE);
WritePointYX(rEndPt);
@@ -668,7 +668,7 @@ void WMFWriter::WMFRecord_PolyPolygon(const tools::PolyPolygon & rPolyPoly)
UpdateRecordHeader();
}
-void WMFWriter::WMFRecord_Rectangle(const Rectangle & rRect)
+void WMFWriter::WMFRecord_Rectangle(const tools::Rectangle & rRect)
{
WriteRecordHeader( 0x00000007,W_META_RECTANGLE );
WriteRectangle( rRect );
@@ -680,7 +680,7 @@ void WMFWriter::WMFRecord_RestoreDC()
pWMF->WriteInt16( -1 );
}
-void WMFWriter::WMFRecord_RoundRect(const Rectangle & rRect, long nHorzRound, long nVertRound)
+void WMFWriter::WMFRecord_RoundRect(const tools::Rectangle & rRect, long nHorzRound, long nVertRound)
{
WriteRecordHeader(0x00000009,W_META_ROUNDRECT);
WriteHeightWidth(Size(nHorzRound,nVertRound));
@@ -838,7 +838,7 @@ void WMFWriter::TrueTextOut(const Point & rPoint, const OString& rString)
UpdateRecordHeader();
}
-void WMFWriter::WMFRecord_IntersectClipRect( const Rectangle& rRect )
+void WMFWriter::WMFRecord_IntersectClipRect( const tools::Rectangle& rRect )
{
WriteRecordHeader( 0x00000007, W_META_INTERSECTCLIPRECT );
WriteRectangle(rRect);
@@ -1238,7 +1238,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
const MetaBmpScalePartAction* pA = static_cast<const MetaBmpScalePartAction*>(pMA);
Bitmap aTmp( pA->GetBitmap() );
- if( aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) )
+ if( aTmp.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) )
WMFRecord_StretchDIB( pA->GetDestPoint(), pA->GetDestSize(), aTmp );
}
break;
@@ -1283,7 +1283,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
{
const MetaBmpExScalePartAction* pA = static_cast<const MetaBmpExScalePartAction*>(pMA);
BitmapEx aBmpEx( pA->GetBitmapEx() );
- aBmpEx.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
+ aBmpEx.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
Bitmap aBmp( aBmpEx.GetBitmap() );
Bitmap aMsk( aBmpEx.GetMask() );
diff --git a/vcl/source/filter/wmf/wmfwr.hxx b/vcl/source/filter/wmf/wmfwr.hxx
index c7d130e4020e..8410275c5466 100644
--- a/vcl/source/filter/wmf/wmfwr.hxx
+++ b/vcl/source/filter/wmf/wmfwr.hxx
@@ -123,7 +123,7 @@ private:
sal_Int32 ScaleWidth( sal_Int32 nDX );
void WriteSize(const Size & rSize);
void WriteHeightWidth(const Size & rSize);
- void WriteRectangle(const Rectangle & rRect);
+ void WriteRectangle(const tools::Rectangle & rRect);
void WriteColor(const Color & rColor);
void WriteRecordHeader(sal_uInt32 nSizeWords, sal_uInt16 nType);
@@ -135,13 +135,13 @@ private:
// nSizeWords was unknown upon calling WriteRecordHeader(..)
// if needed it inserts a BYTE 0 to make number of bytes even
- void WMFRecord_Arc(const Rectangle& rRect, const Point& rStartPt, const Point& rEndPt);
- void WMFRecord_Chord(const Rectangle& rRect, const Point& rStartPt, const Point& rEndPt);
+ void WMFRecord_Arc(const tools::Rectangle& rRect, const Point& rStartPt, const Point& rEndPt);
+ void WMFRecord_Chord(const tools::Rectangle& rRect, const Point& rStartPt, const Point& rEndPt);
void WMFRecord_CreateBrushIndirect(const Color& rColor);
void WMFRecord_CreateFontIndirect(const vcl::Font& rFont);
void WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo& rLineInfo );
void WMFRecord_DeleteObject(sal_uInt16 nObjectHandle);
- void WMFRecord_Ellipse(const Rectangle& rRect);
+ void WMFRecord_Ellipse(const tools::Rectangle& rRect);
void WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_Int8* pData );
bool WMFRecord_Escape_Unicode( const Point& rPoint, const OUString& rStr, const long* pDXAry );
void WMFRecord_ExtTextOut(const Point& rPoint, const OUString& rString, const long* pDXAry);
@@ -151,13 +151,13 @@ private:
void TrueTextOut(const Point& rPoint, const OString& rString);
void WMFRecord_LineTo(const Point & rPoint);
void WMFRecord_MoveTo(const Point & rPoint);
- void WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
+ void WMFRecord_Pie(const tools::Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
void WMFRecord_Polygon(const tools::Polygon & rPoly);
void WMFRecord_PolyLine(const tools::Polygon & rPoly);
void WMFRecord_PolyPolygon(const tools::PolyPolygon & rPolyPoly);
- void WMFRecord_Rectangle(const Rectangle & rRect);
+ void WMFRecord_Rectangle(const tools::Rectangle & rRect);
void WMFRecord_RestoreDC();
- void WMFRecord_RoundRect(const Rectangle & rRect, long nHorzRound, long nVertRound);
+ void WMFRecord_RoundRect(const tools::Rectangle & rRect, long nHorzRound, long nVertRound);
void WMFRecord_SaveDC();
void WMFRecord_SelectObject(sal_uInt16 nObjectHandle);
void WMFRecord_SetBkMode(bool bTransparent);
@@ -170,7 +170,7 @@ private:
void WMFRecord_SetWindowOrg(const Point & rPoint);
void WMFRecord_StretchDIB(const Point & rPoint, const Size & rSize, const Bitmap & rBitmap, sal_uInt32 nROP = 0UL );
void WMFRecord_TextOut(const Point & rPoint, const OUString & rString);
- void WMFRecord_IntersectClipRect( const Rectangle& rRect);
+ void WMFRecord_IntersectClipRect( const tools::Rectangle& rRect);
sal_uInt16 AllocHandle();
void FreeHandle(sal_uInt16 nObjectHandle);