diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-03-30 20:27:55 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-03-31 06:27:11 +0000 |
commit | a5a571307fb3306b74ab46b085cde6388270a770 (patch) | |
tree | 66d4ce12bb5236c50ab6a5d253bc8c6d8b5d292d /extensions/source/scanner | |
parent | 17d821af6bb9df93569836a92f6bed975587fc6c (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 'extensions/source/scanner')
-rw-r--r-- | extensions/source/scanner/grid.cxx | 8 | ||||
-rw-r--r-- | extensions/source/scanner/sanedlg.cxx | 32 |
2 files changed, 20 insertions, 20 deletions
diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx index f7d08a96a28a..fac5f706ca10 100644 --- a/extensions/source/scanner/grid.cxx +++ b/extensions/source/scanner/grid.cxx @@ -60,12 +60,12 @@ class GridWindow : public vcl::Window bool isHit(vcl::Window& rWin, const Point& rPos) { const Point aOffset(rWin.PixelToLogic(Point(mnOffX, mnOffY))); - const Rectangle aTarget(maPos - aOffset, maPos + aOffset); + const tools::Rectangle aTarget(maPos - aOffset, maPos + aOffset); return aTarget.IsInside(rPos); } }; - Rectangle m_aGridArea; + tools::Rectangle m_aGridArea; double m_fMinX; double m_fMinY; @@ -132,7 +132,7 @@ public: void ChangeMode(ResetType nType); - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) override; }; GridWindow::GridWindow(vcl::Window* pParent) @@ -528,7 +528,7 @@ void GridWindow::drawHandles(vcl::RenderContext& rRenderContext) } } -void GridWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void GridWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Window::Paint(rRenderContext, rRect); drawGrid(rRenderContext); diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 50033df310a9..cc712b24ccd3 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -52,14 +52,14 @@ void DrawRectangles(vcl::RenderContext& rRenderContext, Point& rUL, Point& rBR) rRenderContext.DrawLine(aBL, rBR); rRenderContext.DrawLine(rBR, aUR); rRenderContext.DrawLine(aUR, rUL); - rRenderContext.DrawRect(Rectangle(rUL, Size(RECT_SIZE_PIX,RECT_SIZE_PIX))); - rRenderContext.DrawRect(Rectangle(aBL, Size(RECT_SIZE_PIX, -RECT_SIZE_PIX))); - rRenderContext.DrawRect(Rectangle(rBR, Size(-RECT_SIZE_PIX, -RECT_SIZE_PIX))); - rRenderContext.DrawRect(Rectangle(aUR, Size(-RECT_SIZE_PIX, RECT_SIZE_PIX ))); - rRenderContext.DrawRect(Rectangle(Point(nMiddleX - RECT_SIZE_PIX / 2, rUL.Y()), Size(RECT_SIZE_PIX, RECT_SIZE_PIX))); - rRenderContext.DrawRect(Rectangle(Point(nMiddleX - RECT_SIZE_PIX / 2, rBR.Y()), Size(RECT_SIZE_PIX, -RECT_SIZE_PIX))); - rRenderContext.DrawRect(Rectangle(Point(rUL.X(), nMiddleY - RECT_SIZE_PIX / 2), Size(RECT_SIZE_PIX, RECT_SIZE_PIX))); - rRenderContext.DrawRect(Rectangle(Point(rBR.X(), nMiddleY - RECT_SIZE_PIX / 2), Size(-RECT_SIZE_PIX, RECT_SIZE_PIX))); + rRenderContext.DrawRect(tools::Rectangle(rUL, Size(RECT_SIZE_PIX,RECT_SIZE_PIX))); + rRenderContext.DrawRect(tools::Rectangle(aBL, Size(RECT_SIZE_PIX, -RECT_SIZE_PIX))); + rRenderContext.DrawRect(tools::Rectangle(rBR, Size(-RECT_SIZE_PIX, -RECT_SIZE_PIX))); + rRenderContext.DrawRect(tools::Rectangle(aUR, Size(-RECT_SIZE_PIX, RECT_SIZE_PIX ))); + rRenderContext.DrawRect(tools::Rectangle(Point(nMiddleX - RECT_SIZE_PIX / 2, rUL.Y()), Size(RECT_SIZE_PIX, RECT_SIZE_PIX))); + rRenderContext.DrawRect(tools::Rectangle(Point(nMiddleX - RECT_SIZE_PIX / 2, rBR.Y()), Size(RECT_SIZE_PIX, -RECT_SIZE_PIX))); + rRenderContext.DrawRect(tools::Rectangle(Point(rUL.X(), nMiddleY - RECT_SIZE_PIX / 2), Size(RECT_SIZE_PIX, RECT_SIZE_PIX))); + rRenderContext.DrawRect(tools::Rectangle(Point(rBR.X(), nMiddleY - RECT_SIZE_PIX / 2), Size(-RECT_SIZE_PIX, RECT_SIZE_PIX))); } } @@ -71,7 +71,7 @@ private: BottomLeft, Left }; Bitmap maPreviewBitmap; - Rectangle maPreviewRect; + tools::Rectangle maPreviewRect; Point maTopLeft, maBottomRight; Point maMinTopLeft, maMaxBottomRight; VclPtr<SaneDlg> mpParentDialog; @@ -129,7 +129,7 @@ public: return mbDragEnable; } - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void MouseButtonDown(const MouseEvent& rMEvt) override; virtual void MouseMove(const MouseEvent& rMEvt) override; virtual void MouseButtonUp(const MouseEvent& rMEvt) override; @@ -175,7 +175,7 @@ public: { maTopLeft = GetPixelPos(rTopLeft); maBottomRight = GetPixelPos(rBottomRight); - maPreviewRect = Rectangle(maTopLeft, + maPreviewRect = tools::Rectangle(maTopLeft, Size(maBottomRight.X() - maTopLeft.X(), maBottomRight.Y() - maTopLeft.Y())); } @@ -918,7 +918,7 @@ void ScanPreview::UpdatePreviewBounds() { if( mbDragEnable ) { - maPreviewRect = Rectangle( maTopLeft, + maPreviewRect = tools::Rectangle( maTopLeft, Size( maBottomRight.X() - maTopLeft.X(), maBottomRight.Y() - maTopLeft.Y() ) ); @@ -929,27 +929,27 @@ void ScanPreview::UpdatePreviewBounds() if( aBMSize.Width() > aBMSize.Height() && aBMSize.Width() ) { int nVHeight = (maBottomRight.X() - maTopLeft.X()) * aBMSize.Height() / aBMSize.Width(); - maPreviewRect = Rectangle( Point( maTopLeft.X(), ( maTopLeft.Y() + maBottomRight.Y() )/2 - nVHeight/2 ), + maPreviewRect = tools::Rectangle( Point( maTopLeft.X(), ( maTopLeft.Y() + maBottomRight.Y() )/2 - nVHeight/2 ), Size( maBottomRight.X() - maTopLeft.X(), nVHeight ) ); } else if (aBMSize.Height()) { int nVWidth = (maBottomRight.Y() - maTopLeft.Y()) * aBMSize.Width() / aBMSize.Height(); - maPreviewRect = Rectangle( Point( ( maTopLeft.X() + maBottomRight.X() )/2 - nVWidth/2, maTopLeft.Y() ), + maPreviewRect = tools::Rectangle( Point( ( maTopLeft.X() + maBottomRight.X() )/2 - nVWidth/2, maTopLeft.Y() ), Size( nVWidth, maBottomRight.Y() - maTopLeft.Y() ) ); } } } -void ScanPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ScanPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Window::Paint(rRenderContext, rRect); rRenderContext.SetMapMode(MapUnit::MapAppFont); rRenderContext.SetFillColor(Color(COL_WHITE)); rRenderContext.SetLineColor(Color(COL_WHITE)); - rRenderContext.DrawRect(Rectangle(Point(0, 0), + rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), Size(PREVIEW_WIDTH, PREVIEW_HEIGHT))); rRenderContext.SetMapMode(MapMode(MapUnit::MapPixel)); // check for sane values |