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 /toolkit | |
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 'toolkit')
-rw-r--r-- | toolkit/source/awt/scrollabledialog.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/awt/vclxaccessiblecomponent.cxx | 8 | ||||
-rw-r--r-- | toolkit/source/awt/vclxgraphics.cxx | 18 | ||||
-rw-r--r-- | toolkit/source/awt/vclxtoolkit.cxx | 4 | ||||
-rw-r--r-- | toolkit/source/awt/vclxwindow.cxx | 4 | ||||
-rw-r--r-- | toolkit/source/controls/dialogcontrol.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/helper/vclunohelper.cxx | 6 |
7 files changed, 22 insertions, 22 deletions
diff --git a/toolkit/source/awt/scrollabledialog.cxx b/toolkit/source/awt/scrollabledialog.cxx index af8c9283d504..2db5c6f2cd17 100644 --- a/toolkit/source/awt/scrollabledialog.cxx +++ b/toolkit/source/awt/scrollabledialog.cxx @@ -95,7 +95,7 @@ void ScrollableDialog::lcl_Scroll( long nX, long nY ) long nYScroll = mnScrollPos.Y() - nY; mnScrollPos = Point( nX, nY ); - Rectangle aScrollableArea( 0, 0, maScrollArea.Width(), maScrollArea.Height() ); + tools::Rectangle aScrollableArea( 0, 0, maScrollArea.Width(), maScrollArea.Height() ); Scroll(nXScroll, nYScroll, aScrollableArea ); // Manually scroll all children ( except the scrollbars ) for ( int index = 0; index < GetChildCount(); ++index ) diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx index 1f8aeb8195a0..ba5c170faa0d 100644 --- a/toolkit/source/awt/vclxaccessiblecomponent.cxx +++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx @@ -679,7 +679,7 @@ uno::Reference< accessibility::XAccessible > VCLXAccessibleComponent::getAccessi uno::Reference< accessibility::XAccessibleComponent > xComp( xAcc->getAccessibleContext(), uno::UNO_QUERY ); if ( xComp.is() ) { - Rectangle aRect = VCLRectangle( xComp->getBounds() ); + tools::Rectangle aRect = VCLRectangle( xComp->getBounds() ); Point aPos = VCLPoint( rPoint ); if ( aRect.IsInside( aPos ) ) { @@ -701,12 +701,12 @@ awt::Rectangle VCLXAccessibleComponent::implGetBounds() VclPtr<vcl::Window> pWindow = GetWindow(); if ( pWindow ) { - Rectangle aRect = pWindow->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative( nullptr ); aBounds = AWTRectangle( aRect ); vcl::Window* pParent = pWindow->GetAccessibleParentWindow(); if ( pParent ) { - Rectangle aParentRect = pParent->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aParentRect = pParent->GetWindowExtentsRelative( nullptr ); awt::Point aParentScreenLoc = AWTPoint( aParentRect.TopLeft() ); aBounds.X -= aParentScreenLoc.X; aBounds.Y -= aParentScreenLoc.Y; @@ -753,7 +753,7 @@ awt::Point VCLXAccessibleComponent::getLocationOnScreen( ) awt::Point aPos; if ( GetWindow() ) { - Rectangle aRect = GetWindow()->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aRect = GetWindow()->GetWindowExtentsRelative( nullptr ); aPos.X = aRect.Left(); aPos.Y = aRect.Top(); } diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx index 22f026f838c5..dcc587c6c536 100644 --- a/toolkit/source/awt/vclxgraphics.cxx +++ b/toolkit/source/awt/vclxgraphics.cxx @@ -278,7 +278,7 @@ void VCLXGraphics::clear( if( mpOutputDevice ) { - const ::Rectangle aVCLRect = VCLUnoHelper::ConvertToVCLRect( aRect ); + const ::tools::Rectangle aVCLRect = VCLUnoHelper::ConvertToVCLRect( aRect ); mpOutputDevice->Erase( aVCLRect ); } } @@ -326,7 +326,7 @@ void VCLXGraphics::draw( const uno::Reference< awt::XDisplayBitmap >& rxBitmapHa } if(nSourceX || nSourceY || aSz.Width() != nSourceWidth || aSz.Height() != nSourceHeight) - mpOutputDevice->IntersectClipRegion(vcl::Region(Rectangle(nDestX, nDestY, nDestX + nDestWidth - 1, nDestY + nDestHeight - 1))); + mpOutputDevice->IntersectClipRegion(vcl::Region(tools::Rectangle(nDestX, nDestY, nDestX + nDestWidth - 1, nDestY + nDestHeight - 1))); mpOutputDevice->DrawBitmapEx( aPos, aSz, aBmpEx ); } @@ -361,7 +361,7 @@ void VCLXGraphics::drawRect( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int3 if( mpOutputDevice ) { InitOutputDevice( InitOutDevFlags::CLIPREGION|InitOutDevFlags::RASTEROP|InitOutDevFlags::COLORS ); - mpOutputDevice->DrawRect( Rectangle( Point( x, y ), Size( width, height ) ) ); + mpOutputDevice->DrawRect( tools::Rectangle( Point( x, y ), Size( width, height ) ) ); } } @@ -372,7 +372,7 @@ void VCLXGraphics::drawRoundedRect( sal_Int32 x, sal_Int32 y, sal_Int32 width, s if( mpOutputDevice ) { InitOutputDevice( InitOutDevFlags::CLIPREGION|InitOutDevFlags::RASTEROP|InitOutDevFlags::COLORS ); - mpOutputDevice->DrawRect( Rectangle( Point( x, y ), Size( width, height ) ), nHorzRound, nVertRound ); + mpOutputDevice->DrawRect( tools::Rectangle( Point( x, y ), Size( width, height ) ), nHorzRound, nVertRound ); } } @@ -421,7 +421,7 @@ void VCLXGraphics::drawEllipse( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_I if( mpOutputDevice ) { InitOutputDevice( InitOutDevFlags::CLIPREGION|InitOutDevFlags::RASTEROP|InitOutDevFlags::COLORS ); - mpOutputDevice->DrawEllipse( Rectangle( Point( x, y ), Size( width, height ) ) ); + mpOutputDevice->DrawEllipse( tools::Rectangle( Point( x, y ), Size( width, height ) ) ); } } @@ -432,7 +432,7 @@ void VCLXGraphics::drawArc( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 if( mpOutputDevice ) { InitOutputDevice( InitOutDevFlags::CLIPREGION|InitOutDevFlags::RASTEROP|InitOutDevFlags::COLORS ); - mpOutputDevice->DrawArc( Rectangle( Point( x, y ), Size( width, height ) ), Point( x1, y1 ), Point( x2, y2 ) ); + mpOutputDevice->DrawArc( tools::Rectangle( Point( x, y ), Size( width, height ) ), Point( x1, y1 ), Point( x2, y2 ) ); } } @@ -443,7 +443,7 @@ void VCLXGraphics::drawPie( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 if( mpOutputDevice ) { InitOutputDevice( InitOutDevFlags::CLIPREGION|InitOutDevFlags::RASTEROP|InitOutDevFlags::COLORS ); - mpOutputDevice->DrawPie( Rectangle( Point( x, y ), Size( width, height ) ), Point( x1, y1 ), Point( x2, y2 ) ); + mpOutputDevice->DrawPie( tools::Rectangle( Point( x, y ), Size( width, height ) ), Point( x1, y1 ), Point( x2, y2 ) ); } } @@ -454,7 +454,7 @@ void VCLXGraphics::drawChord( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int if( mpOutputDevice ) { InitOutputDevice( InitOutDevFlags::CLIPREGION|InitOutDevFlags::RASTEROP|InitOutDevFlags::COLORS ); - mpOutputDevice->DrawChord( Rectangle( Point( x, y ), Size( width, height ) ), Point( x1, y1 ), Point( x2, y2 ) ); + mpOutputDevice->DrawChord( tools::Rectangle( Point( x, y ), Size( width, height ) ), Point( x1, y1 ), Point( x2, y2 ) ); } } @@ -473,7 +473,7 @@ void VCLXGraphics::drawGradient( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_ aGradient.SetStartIntensity(rGradient.StartIntensity); aGradient.SetEndIntensity(rGradient.EndIntensity); aGradient.SetSteps(rGradient.StepCount); - mpOutputDevice->DrawGradient( Rectangle( Point( x, y ), Size( width, height ) ), aGradient ); + mpOutputDevice->DrawGradient( tools::Rectangle( Point( x, y ), Size( width, height ) ), aGradient ); } } diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index e35fd383f5c1..97eba0fde320 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -743,7 +743,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::getDesktopWindow( ) css::awt::Rectangle VCLXToolkit::getWorkArea( ) { sal_Int32 nDisplay = Application::GetDisplayBuiltInScreen(); - Rectangle aWorkRect = Application::GetScreenPosSizePixel( nDisplay ); + tools::Rectangle aWorkRect = Application::GetScreenPosSizePixel( nDisplay ); css::awt::Rectangle aNotherRect; aNotherRect.X = aWorkRect.getX(); aNotherRect.Y = aWorkRect.getY(); @@ -1282,7 +1282,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( } else if ( !VCLUnoHelper::IsZero( rDescriptor.Bounds ) ) { - Rectangle aRect = VCLRectangle( rDescriptor.Bounds ); + tools::Rectangle aRect = VCLRectangle( rDescriptor.Bounds ); pNewWindow->SetPosSizePixel( aRect.TopLeft(), aRect.GetSize() ); } diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index 1fcbc5d536b7..bc68c5eee713 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -449,7 +449,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { css::awt::PaintEvent aEvent; aEvent.Source = static_cast<cppu::OWeakObject*>(this); - aEvent.UpdateRect = AWTRectangle( *static_cast<Rectangle*>(rVclWindowEvent.GetData()) ); + aEvent.UpdateRect = AWTRectangle( *static_cast<tools::Rectangle*>(rVclWindowEvent.GetData()) ); aEvent.Count = 0; mpImpl->getPaintListeners().windowPaint( aEvent ); } @@ -984,7 +984,7 @@ css::awt::Rectangle VCLXWindow::getPosSize( ) if( vcl::Window::GetDockingManager()->IsDockable( GetWindow() ) ) aBounds = AWTRectangle( vcl::Window::GetDockingManager()->GetPosSizePixel( GetWindow() ) ); else - aBounds = AWTRectangle( Rectangle( GetWindow()->GetPosPixel(), GetWindow()->GetSizePixel() ) ); + aBounds = AWTRectangle( tools::Rectangle( GetWindow()->GetPosPixel(), GetWindow()->GetSizePixel() ) ); } return aBounds; diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index 382cf55c0941..6861e8732ecf 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -1093,7 +1093,7 @@ void UnoFrameControl::ImplSetPosSize( Reference< XControl >& rxCtrl ) if ( !bOwnCtrl && !sTitle.isEmpty() ) { // Adjust Y based on height of Title - ::Rectangle aRect; + ::tools::Rectangle aRect; aRect = pOutDev->GetTextRect( aRect, sTitle ); nY = nY + ( aRect.GetHeight() / 2 ); } diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index bd3430c980d6..0c2004234bff 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -671,12 +671,12 @@ css::awt::Point VCLUnoHelper::ConvertToAWTPoint(::Point /* VCLPoint */ const& _a return aAWTPoint; } -::Rectangle VCLUnoHelper::ConvertToVCLRect( css::awt::Rectangle const & _rRect ) +::tools::Rectangle VCLUnoHelper::ConvertToVCLRect( css::awt::Rectangle const & _rRect ) { - return ::Rectangle( _rRect.X, _rRect.Y, _rRect.X + _rRect.Width - 1, _rRect.Y + _rRect.Height - 1 ); + return ::tools::Rectangle( _rRect.X, _rRect.Y, _rRect.X + _rRect.Width - 1, _rRect.Y + _rRect.Height - 1 ); } -css::awt::Rectangle VCLUnoHelper::ConvertToAWTRect( ::Rectangle const & _rRect ) +css::awt::Rectangle VCLUnoHelper::ConvertToAWTRect( ::tools::Rectangle const & _rRect ) { return css::awt::Rectangle( _rRect.Left(), _rRect.Top(), _rRect.GetWidth(), _rRect.GetHeight() ); } |