summaryrefslogtreecommitdiff
path: root/filter/source/svg
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-03-30 20:27:55 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-03-31 06:27:11 +0000
commita5a571307fb3306b74ab46b085cde6388270a770 (patch)
tree66d4ce12bb5236c50ab6a5d253bc8c6d8b5d292d /filter/source/svg
parent17d821af6bb9df93569836a92f6bed975587fc6c (diff)
tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'filter/source/svg')
-rw-r--r--filter/source/svg/svgfontexport.cxx8
-rw-r--r--filter/source/svg/svgwriter.cxx28
-rw-r--r--filter/source/svg/svgwriter.hxx8
3 files changed, 22 insertions, 22 deletions
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 );