From a5a571307fb3306b74ab46b085cde6388270a770 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 30 Mar 2017 20:27:55 +0200 Subject: 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 Tested-by: Jenkins --- sd/source/ui/annotations/annotationwindow.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'sd/source/ui/annotations/annotationwindow.cxx') diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 4e7dfc1fa6f1..18bca50855a1 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -126,12 +126,12 @@ void AnnotationTextWindow::dispose() Control::dispose(); } -void AnnotationTextWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) +void AnnotationTextWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect) { const bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); if ( !bHighContrast ) { - DrawGradient(Rectangle(Point(0,0),PixelToLogic(GetSizePixel())), + DrawGradient(::tools::Rectangle(Point(0,0),PixelToLogic(GetSizePixel())), Gradient(GradientStyle::Linear,mpAnnotationWindow->maColorLight,mpAnnotationWindow->maColor)); } @@ -331,7 +331,7 @@ void AnnotationWindow::InitControls() mpOutlinerView = new OutlinerView ( mpOutliner, mpTextWindow ); mpOutliner->InsertView(mpOutlinerView ); mpTextWindow->SetOutlinerView(mpOutlinerView); - mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,1,1) ) ); + mpOutlinerView->SetOutputArea( PixelToLogic( ::tools::Rectangle(0,0,1,1) ) ); //create Scrollbars mpVScrollbar = VclPtr::Create(this, WB_3DLOOK |WB_VSCROLL|WB_DRAG); @@ -409,10 +409,10 @@ void AnnotationWindow::DoResize() mpMeta->setPosSizePixel(0,aHeight,GetSizePixel().Width()-METABUTTON_AREA_WIDTH,POSTIT_META_HEIGHT); mpOutliner->SetPaperSize( PixelToLogic( Size(aWidth,aHeight) ) ) ; - mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,aWidth,aHeight) ) ); + mpOutlinerView->SetOutputArea( PixelToLogic( ::tools::Rectangle(0,0,aWidth,aHeight) ) ); if (!mpVScrollbar->IsVisible()) { // if we do not have a scrollbar anymore, we want to see the complete text - mpOutlinerView->SetVisArea( PixelToLogic( Rectangle(0,0,aWidth,aHeight) ) ); + mpOutlinerView->SetVisArea( PixelToLogic( ::tools::Rectangle(0,0,aWidth,aHeight) ) ); } mpVScrollbar->setPosSizePixel( 0 + aWidth, 0, GetScrollbarWidth(), aHeight ); mpVScrollbar->SetVisibleSize( PixelToLogic(Size(0,aHeight)).Height() ); @@ -432,7 +432,7 @@ void AnnotationWindow::DoResize() maPopupTriangle.append(basegfx::B2DPoint(aRight.X(),aRight.Y())); maPopupTriangle.append(basegfx::B2DPoint(aBottom.X(),aBottom.Y())); maPopupTriangle.setClosed(true); - maRectMetaButton = PixelToLogic( Rectangle( Point( + maRectMetaButton = PixelToLogic( ::tools::Rectangle( Point( aPos.X()+GetSizePixel().Width()-(METABUTTON_WIDTH+10), aPos.Y()+5 ), Size( METABUTTON_WIDTH, METABUTTON_HEIGHT ) ) ); @@ -632,7 +632,7 @@ void AnnotationWindow::Deactivate() Engine()->GetUndoManager().Clear(); } -void AnnotationWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void AnnotationWindow::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) { FloatingWindow::Paint(rRenderContext, rRect); @@ -645,7 +645,7 @@ void AnnotationWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle else SetFillColor(maColor); SetLineColor(); - DrawRect(PixelToLogic(Rectangle(Point(mpMeta->GetPosPixel().X()+mpMeta->GetSizePixel().Width(),mpMeta->GetPosPixel().Y()),Size(METABUTTON_AREA_WIDTH,mpMeta->GetSizePixel().Height())))); + DrawRect(PixelToLogic(::tools::Rectangle(Point(mpMeta->GetPosPixel().X()+mpMeta->GetSizePixel().Width(),mpMeta->GetPosPixel().Y()),Size(METABUTTON_AREA_WIDTH,mpMeta->GetSizePixel().Height())))); if ( bHighContrast ) { @@ -706,7 +706,7 @@ void AnnotationWindow::MouseButtonDown( const MouseEvent& rMEvt ) if (!mbReadonly && maRectMetaButton.IsInside(PixelToLogic(rMEvt.GetPosPixel())) && rMEvt.IsLeft()) { // context menu - Rectangle aRect(LogicToPixel(maRectMetaButton.BottomLeft()),LogicToPixel(maRectMetaButton.BottomLeft())); + ::tools::Rectangle aRect(LogicToPixel(maRectMetaButton.BottomLeft()),LogicToPixel(maRectMetaButton.BottomLeft())); mrManager.ExecuteAnnotationContextMenu( mxAnnotation, static_cast(this), aRect, true ); } } @@ -717,7 +717,7 @@ void AnnotationWindow::Command( const CommandEvent& rCEvt ) { if( mpMeta->IsVisible() &&(mpMeta->GetPosPixel().Y() < rCEvt.GetMousePosPixel().Y()) ) return; - mrManager.ExecuteAnnotationContextMenu( mxAnnotation, this, Rectangle(rCEvt.GetMousePosPixel(),Size(1,1)) ); + mrManager.ExecuteAnnotationContextMenu( mxAnnotation, this, ::tools::Rectangle(rCEvt.GetMousePosPixel(),Size(1,1)) ); } else { -- cgit