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 | |
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')
-rw-r--r-- | extensions/source/propctrlr/browserlistbox.cxx | 6 | ||||
-rw-r--r-- | extensions/source/propctrlr/inspectorhelpwindow.cxx | 8 | ||||
-rw-r--r-- | extensions/source/propctrlr/propertyeditor.cxx | 6 | ||||
-rw-r--r-- | extensions/source/propctrlr/standardcontrol.cxx | 2 | ||||
-rw-r--r-- | extensions/source/scanner/grid.cxx | 8 | ||||
-rw-r--r-- | extensions/source/scanner/sanedlg.cxx | 32 | ||||
-rw-r--r-- | extensions/source/update/ui/updatecheckui.cxx | 22 |
7 files changed, 42 insertions, 42 deletions
diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 0e8055b436a0..269b14d033dc 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -417,13 +417,13 @@ namespace pcr void OBrowserListBox::Resize() { - Rectangle aPlayground( Point( 0, 0 ), GetOutputSizePixel() ); + tools::Rectangle aPlayground( Point( 0, 0 ), GetOutputSizePixel() ); Size aHelpWindowDistance( LogicToPixel( Size( 0, LAYOUT_HELP_WINDOW_DISTANCE_APPFONT ), MapUnit::MapAppFont ) ); long nHelpWindowHeight = m_nCurrentPreferredHelpHeight = impl_getPrefererredHelpHeight(); bool bPositionHelpWindow = ( nHelpWindowHeight != 0 ); - Rectangle aLinesArea( aPlayground ); + tools::Rectangle aLinesArea( aPlayground ); if ( bPositionHelpWindow ) { aLinesArea.Bottom() -= nHelpWindowHeight; @@ -471,7 +471,7 @@ namespace pcr // position the help window if ( bPositionHelpWindow ) { - Rectangle aHelpArea( aPlayground ); + tools::Rectangle aHelpArea( aPlayground ); aHelpArea.Top() = aLinesArea.Bottom() + aHelpWindowDistance.Height(); m_pHelpWindow->SetPosSizePixel( aHelpArea.TopLeft(), aHelpArea.GetSize() ); } diff --git a/extensions/source/propctrlr/inspectorhelpwindow.cxx b/extensions/source/propctrlr/inspectorhelpwindow.cxx index 5641015f5461..bb4edca2a414 100644 --- a/extensions/source/propctrlr/inspectorhelpwindow.cxx +++ b/extensions/source/propctrlr/inspectorhelpwindow.cxx @@ -111,7 +111,7 @@ namespace pcr long nMinTextWindowHeight = impl_getMinimalTextWindowHeight(); long nMaxTextWindowHeight = impl_getMaximalTextWindowHeight(); - Rectangle aTextRect( Point( 0, 0 ), m_aHelpText->GetOutputSizePixel() ); + tools::Rectangle aTextRect( Point( 0, 0 ), m_aHelpText->GetOutputSizePixel() ); aTextRect = m_aHelpText->GetTextRect( aTextRect, m_aHelpText->GetText(), DrawTextFlags::Left | DrawTextFlags::Top | DrawTextFlags::MultiLine | DrawTextFlags::WordBreak ); long nActTextWindowHeight = impl_getHelpTextBorderHeight() + aTextRect.GetHeight(); @@ -127,13 +127,13 @@ namespace pcr { Size a3AppFont( LogicToPixel( Size( 3, 3 ), MapUnit::MapAppFont ) ); - Rectangle aPlayground( Point( 0, 0 ), GetOutputSizePixel() ); + tools::Rectangle aPlayground( Point( 0, 0 ), GetOutputSizePixel() ); - Rectangle aSeparatorArea( aPlayground ); + tools::Rectangle aSeparatorArea( aPlayground ); aSeparatorArea.Bottom() = aSeparatorArea.Top() + LogicToPixel( Size( 0, 8 ), MapUnit::MapAppFont ).Height(); m_aSeparator->SetPosSizePixel( aSeparatorArea.TopLeft(), aSeparatorArea.GetSize() ); - Rectangle aTextArea( aPlayground ); + tools::Rectangle aTextArea( aPlayground ); aTextArea.Top() = aSeparatorArea.Bottom() + a3AppFont.Height(); m_aHelpText->SetPosSizePixel( aTextArea.TopLeft(), aTextArea.GetSize() ); } diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx index 2da1083025f0..714e640cc0ec 100644 --- a/extensions/source/propctrlr/propertyeditor.cxx +++ b/extensions/source/propctrlr/propertyeditor.cxx @@ -114,7 +114,7 @@ namespace pcr sal_uInt16 nFirstID = m_aTabControl->GetPageId( 0 ); // reserve space for the tabs themself - Rectangle aTabArea( m_aTabControl->GetTabBounds( nFirstID ) ); + tools::Rectangle aTabArea( m_aTabControl->GetTabBounds( nFirstID ) ); nMinHeight += aTabArea.GetHeight(); // ask the page how much it requires @@ -201,7 +201,7 @@ namespace pcr void OPropertyEditor::Resize() { - Rectangle aPlayground( + tools::Rectangle aPlayground( Point( LAYOUT_BORDER_LEFT, LAYOUT_BORDER_TOP ), Size( GetOutputSizePixel().Width() - LAYOUT_BORDER_LEFT - LAYOUT_BORDER_RIGHT, @@ -209,7 +209,7 @@ namespace pcr ) ); - Rectangle aTabArea( aPlayground ); + tools::Rectangle aTabArea( aPlayground ); m_aTabControl->SetPosSizePixel( aTabArea.TopLeft(), aTabArea.GetSize() ); } diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index 1b60b7f57a7c..556435ad829e 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -1120,7 +1120,7 @@ namespace pcr ::Point aMePos= GetPosPixel(); aMePos = GetParent()->OutputToScreenPixel( aMePos ); ::Size aSize=GetSizePixel(); - ::Rectangle aRect(aMePos,aSize); + ::tools::Rectangle aRect(aMePos,aSize); aSize.Height() = STD_HEIGHT; m_pFloatingEdit->SetOutputSizePixel(aSize); m_pFloatingEdit->StartPopupMode( aRect, FloatWinPopupFlags::Down ); 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 diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index 1f40751a423c..710e4256965e 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -93,8 +93,8 @@ class BubbleWindow : public FloatingWindow OUString maBubbleText; Image maBubbleImage; Size maMaxTextSize; - Rectangle maTitleRect; - Rectangle maTextRect; + tools::Rectangle maTitleRect; + tools::Rectangle maTextRect; long mnTipOffset; private: @@ -105,7 +105,7 @@ public: const OUString& rText, const Image& rImage ); virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; void Resize() override; void Show( bool bVisible = true, ShowFlags nFlags = ShowFlags::NoActivate ); void SetTipPosPixel( const Point& rTipPos ) { maTipPos = rTipPos; } @@ -487,7 +487,7 @@ VclPtr<BubbleWindow> UpdateCheckUI::GetBubbleWindow() if ( !mpIconSysWin ) return nullptr; - Rectangle aIconRect = mpIconMBar->GetMenuBarButtonRectPixel( mnIconID ); + tools::Rectangle aIconRect = mpIconMBar->GetMenuBarButtonRectPixel( mnIconID ); if( aIconRect.IsEmpty() ) return nullptr; @@ -668,7 +668,7 @@ IMPL_LINK( UpdateCheckUI, WindowEventHdl, VclWindowEvent&, rEvent, void ) if ( ( mpIconSysWin == rEvent.GetWindow() ) && mpBubbleWin && ( mpIconMBar != nullptr ) ) { - Rectangle aIconRect = mpIconMBar->GetMenuBarButtonRectPixel( mnIconID ); + tools::Rectangle aIconRect = mpIconMBar->GetMenuBarButtonRectPixel( mnIconID ); Point aWinPos = aIconRect.BottomCenter(); mpBubbleWin->SetTipPosPixel( aWinPos ); if ( mpBubbleWin->IsVisible() ) @@ -738,7 +738,7 @@ void BubbleWindow::Resize() if ( ( aSize.Height() < 20 ) || ( aSize.Width() < 60 ) ) return; - Rectangle aRect( 0, TIP_HEIGHT, aSize.Width(), aSize.Height() - TIP_HEIGHT ); + tools::Rectangle aRect( 0, TIP_HEIGHT, aSize.Width(), aSize.Height() - TIP_HEIGHT ); maRectPoly = tools::Polygon( aRect, 6, 6 ); vcl::Region aRegion( maRectPoly ); long nTipOffset = aSize.Width() - TIP_RIGHT_OFFSET + mnTipOffset; @@ -770,7 +770,7 @@ void BubbleWindow::SetTitleAndText( const OUString& rTitle, } -void BubbleWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle& /*rRect*/) +void BubbleWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& /*rRect*/) { SolarMutexGuard aGuard; @@ -799,12 +799,12 @@ void BubbleWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle aBoldFont.SetWeight( WEIGHT_BOLD ); SetFont( aBoldFont ); - Rectangle aTitleRect = maTitleRect; + tools::Rectangle aTitleRect = maTitleRect; aTitleRect.Move( aImgSize.Width(), 0 ); DrawText( aTitleRect, maBubbleTitle, DrawTextFlags::MultiLine | DrawTextFlags::WordBreak ); SetFont( aOldFont ); - Rectangle aTextRect = maTextRect; + tools::Rectangle aTextRect = maTextRect; aTextRect.Move( aImgSize.Width(), 0 ); DrawText( aTextRect, maBubbleText, DrawTextFlags::MultiLine | DrawTextFlags::WordBreak ); } @@ -878,12 +878,12 @@ void BubbleWindow::RecalcTextRects() { SetFont( aBoldFont ); - maTitleRect = GetTextRect( Rectangle( Point( 0, 0 ), maMaxTextSize ), + maTitleRect = GetTextRect( tools::Rectangle( Point( 0, 0 ), maMaxTextSize ), maBubbleTitle, DrawTextFlags::MultiLine | DrawTextFlags::WordBreak ); SetFont( aOldFont ); - maTextRect = GetTextRect( Rectangle( Point( 0, 0 ), maMaxTextSize ), + maTextRect = GetTextRect( tools::Rectangle( Point( 0, 0 ), maMaxTextSize ), maBubbleText, DrawTextFlags::MultiLine | DrawTextFlags::WordBreak ); |