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 /sw/source/uibase/docvw | |
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 'sw/source/uibase/docvw')
-rw-r--r-- | sw/source/uibase/docvw/AnnotationMenuButton.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/docvw/AnnotationMenuButton.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/DashedLine.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/docvw/FrameControlsManager.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/HeaderFooterWin.cxx | 14 | ||||
-rw-r--r-- | sw/source/uibase/docvw/PageBreakWin.cxx | 16 | ||||
-rw-r--r-- | sw/source/uibase/docvw/PostItMgr.cxx | 30 | ||||
-rw-r--r-- | sw/source/uibase/docvw/SidebarScrollBar.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/docvw/SidebarScrollBar.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/SidebarTxtControl.cxx | 18 | ||||
-rw-r--r-- | sw/source/uibase/docvw/SidebarTxtControl.hxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/docvw/SidebarWin.cxx | 32 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtdd.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 24 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin2.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/docvw/srcedtw.cxx | 2 |
16 files changed, 88 insertions, 88 deletions
diff --git a/sw/source/uibase/docvw/AnnotationMenuButton.cxx b/sw/source/uibase/docvw/AnnotationMenuButton.cxx index ddaae9d1b8e2..38fe8def1a86 100644 --- a/sw/source/uibase/docvw/AnnotationMenuButton.cxx +++ b/sw/source/uibase/docvw/AnnotationMenuButton.cxx @@ -118,7 +118,7 @@ void AnnotationMenuButton::MouseButtonDown( const MouseEvent& rMEvt ) MenuButton::MouseButtonDown(rMEvt); } -void AnnotationMenuButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void AnnotationMenuButton::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { bool bHighContrast = rRenderContext.GetSettings().GetStyleSettings().GetHighContrastMode(); @@ -127,7 +127,7 @@ void AnnotationMenuButton::Paint(vcl::RenderContext& rRenderContext, const Recta else rRenderContext.SetFillColor(mrSidebarWin.ColorDark()); rRenderContext.SetLineColor(); - const Rectangle aRect(Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel()))); + const tools::Rectangle aRect(tools::Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel()))); rRenderContext.DrawRect(aRect); if (bHighContrast) @@ -170,7 +170,7 @@ void AnnotationMenuButton::Paint(vcl::RenderContext& rRenderContext, const Recta } else { - Rectangle aSymbolRect(aRect); + tools::Rectangle aSymbolRect(aRect); // 25% distance to the left and right button border const long nBorderDistanceLeftAndRight = ((aSymbolRect.GetWidth() * 250) + 500) / 1000; aSymbolRect.Left() += nBorderDistanceLeftAndRight; diff --git a/sw/source/uibase/docvw/AnnotationMenuButton.hxx b/sw/source/uibase/docvw/AnnotationMenuButton.hxx index 82b4a5f5d088..6a7694d4caae 100644 --- a/sw/source/uibase/docvw/AnnotationMenuButton.hxx +++ b/sw/source/uibase/docvw/AnnotationMenuButton.hxx @@ -40,7 +40,7 @@ class AnnotationMenuButton : public MenuButton // override vcl::Window methods 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; virtual void KeyInput( const KeyEvent& rKeyEvt ) override; private: diff --git a/sw/source/uibase/docvw/DashedLine.cxx b/sw/source/uibase/docvw/DashedLine.cxx index 7da108fb6dcc..b5a641d84672 100644 --- a/sw/source/uibase/docvw/DashedLine.cxx +++ b/sw/source/uibase/docvw/DashedLine.cxx @@ -29,14 +29,14 @@ SwDashedLine::~SwDashedLine( ) { } -void SwDashedLine::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SwDashedLine::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { const drawinglayer::geometry::ViewInformation2D aNewViewInfos; std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor( drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(rRenderContext, aNewViewInfos)); // Compute the start and end points - const Rectangle aRect(Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel()))); + const tools::Rectangle aRect(tools::Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel()))); double nHalfWidth = double(aRect.Top() + aRect.Bottom()) / 2.0; basegfx::B2DPoint aStart(double(aRect.Left()), nHalfWidth); diff --git a/sw/source/uibase/docvw/FrameControlsManager.cxx b/sw/source/uibase/docvw/FrameControlsManager.cxx index 15d663361d37..a16193227b1d 100644 --- a/sw/source/uibase/docvw/FrameControlsManager.cxx +++ b/sw/source/uibase/docvw/FrameControlsManager.cxx @@ -126,7 +126,7 @@ void SwFrameControlsManager::SetHeaderFooterControl( const SwPageFrame* pPageFra pControl.swap( pNewControl ); } - Rectangle aPageRect = m_pEditWin->LogicToPixel( pPageFrame->Frame().SVRect() ); + tools::Rectangle aPageRect = m_pEditWin->LogicToPixel( pPageFrame->Frame().SVRect() ); SwHeaderFooterWin* pWin = dynamic_cast<SwHeaderFooterWin *>(pControl->GetWindow()); assert( pWin != nullptr) ; diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index b7c7fecf02c3..f686d8c4fc04 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -80,7 +80,7 @@ namespace return basegfx::tools::hsl2rgb( aHslDark ); } - B2DPolygon lcl_GetPolygon( const Rectangle& rRect, bool bHeader ) + B2DPolygon lcl_GetPolygon( const ::tools::Rectangle& rRect, bool bHeader ) { const double nRadius = 3; const double nKappa((M_SQRT2 - 1.0) * 4.0 / 3.0); @@ -199,9 +199,9 @@ void SwHeaderFooterWin::SetOffset(Point aOffset, long nXLineStart, long nXLineEn m_sLabel = m_sLabel.replaceAt(nPos, 2, pDesc->GetName()); // Compute the text size and get the box position & size from it - Rectangle aTextRect; + ::tools::Rectangle aTextRect; GetTextBoundRect(aTextRect, OUString(m_sLabel)); - Rectangle aTextPxRect = LogicToPixel(aTextRect); + ::tools::Rectangle aTextPxRect = LogicToPixel(aTextRect); FontMetric aFontMetric = GetFontMetric(GetFont()); Size aBoxSize (aTextPxRect.GetWidth() + BUTTON_WIDTH + TEXT_PADDING * 2, aFontMetric.GetLineHeight() + TEXT_PADDING * 2 ); @@ -243,23 +243,23 @@ void SwHeaderFooterWin::ShowAll(bool bShow) bool SwHeaderFooterWin::Contains( const Point &rDocPt ) const { - Rectangle aRect(GetPosPixel(), GetSizePixel()); + ::tools::Rectangle aRect(GetPosPixel(), GetSizePixel()); if (aRect.IsInside(rDocPt)) return true; - Rectangle aLineRect(m_pLine->GetPosPixel(), m_pLine->GetSizePixel()); + ::tools::Rectangle aLineRect(m_pLine->GetPosPixel(), m_pLine->GetSizePixel()); if (aLineRect.IsInside(rDocPt)) return true; return false; } -void SwHeaderFooterWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SwHeaderFooterWin::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { // Use pixels for the rest of the drawing SetMapMode(MapMode(MapUnit::MapPixel)); - const Rectangle aRect(Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel()))); + const ::tools::Rectangle aRect(::tools::Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel()))); drawinglayer::primitive2d::Primitive2DContainer aSeq(3); B2DPolygon aPolygon = lcl_GetPolygon(aRect, m_bIsHeader); diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx index 2ec1f3f0dae1..dcf4b0801088 100644 --- a/sw/source/uibase/docvw/PageBreakWin.cxx +++ b/sw/source/uibase/docvw/PageBreakWin.cxx @@ -134,9 +134,9 @@ void SwPageBreakWin::dispose() SwFrameMenuButtonBase::dispose(); } -void SwPageBreakWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SwPageBreakWin::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { - const Rectangle aRect(Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel()))); + const ::tools::Rectangle aRect(::tools::Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel()))); // Properly paint the control BColor aColor = SwViewOption::GetPageBreakColor().getBColor(); @@ -342,13 +342,13 @@ void SwPageBreakWin::UpdatePosition( const Point* pEvtPt ) while ( pPrevPage && ( ( pPrevPage->Frame().Top( ) == pPageFrame->Frame().Top( ) ) || static_cast< const SwPageFrame* >( pPrevPage )->IsEmptyPage( ) ) ); - Rectangle aBoundRect = GetEditWin()->LogicToPixel( pPageFrame->GetBoundRect(GetEditWin()).SVRect() ); - Rectangle aFrameRect = GetEditWin()->LogicToPixel( pPageFrame->Frame().SVRect() ); + ::tools::Rectangle aBoundRect = GetEditWin()->LogicToPixel( pPageFrame->GetBoundRect(GetEditWin()).SVRect() ); + ::tools::Rectangle aFrameRect = GetEditWin()->LogicToPixel( pPageFrame->Frame().SVRect() ); long nYLineOffset = ( aBoundRect.Top() + aFrameRect.Top() ) / 2; if ( pPrevPage ) { - Rectangle aPrevFrameRect = GetEditWin()->LogicToPixel( pPrevPage->Frame().SVRect() ); + ::tools::Rectangle aPrevFrameRect = GetEditWin()->LogicToPixel( pPrevPage->Frame().SVRect() ); nYLineOffset = ( aPrevFrameRect.Bottom() + aFrameRect.Top() ) / 2; } @@ -369,7 +369,7 @@ void SwPageBreakWin::UpdatePosition( const Point* pEvtPt ) Size aBtnSize( BUTTON_WIDTH + ARROW_WIDTH, BUTTON_HEIGHT ); // Place the button on the left or right? - Rectangle aVisArea = GetEditWin()->LogicToPixel( GetEditWin()->GetView().GetVisArea() ); + ::tools::Rectangle aVisArea = GetEditWin()->LogicToPixel( GetEditWin()->GetView().GetVisArea() ); long nLineLeft = std::max( nPgLeft, aVisArea.Left() ); long nLineRight = std::min( nPgRight, aVisArea.Right() ); @@ -402,11 +402,11 @@ void SwPageBreakWin::ShowAll( bool bShow ) bool SwPageBreakWin::Contains( const Point &rDocPt ) const { - Rectangle aRect( GetPosPixel(), GetSizePixel() ); + ::tools::Rectangle aRect( GetPosPixel(), GetSizePixel() ); if ( aRect.IsInside( rDocPt ) ) return true; - Rectangle aLineRect( m_pLine->GetPosPixel(), m_pLine->GetSizePixel() ); + ::tools::Rectangle aLineRect( m_pLine->GetPosPixel(), m_pLine->GetSizePixel() ); if ( aLineRect.IsInside( rDocPt ) ) return true; diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index dae084be2eec..c5e3b99d5f1c 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -153,7 +153,7 @@ namespace { const SwPostItField* pField = pWin->GetPostItField(); const SwRect& aRect = pWin->GetAnchorRect(); - const Rectangle aSVRect(aRect.Pos().getX(), + const tools::Rectangle aSVRect(aRect.Pos().getX(), aRect.Pos().getY(), aRect.Pos().getX() + aRect.SSize().Width(), aRect.Pos().getY() + aRect.SSize().Height()); @@ -971,7 +971,7 @@ void SwPostItMgr::DrawNotesForPage(OutputDevice *pOutDev, sal_uInt32 nPage) } } -void SwPostItMgr::PaintTile(OutputDevice& rRenderContext, const Rectangle& /*rRect*/) +void SwPostItMgr::PaintTile(OutputDevice& rRenderContext, const tools::Rectangle& /*rRect*/) { for (SwSidebarItem* pItem : mvPostItFields) { @@ -987,7 +987,7 @@ void SwPostItMgr::PaintTile(OutputDevice& rRenderContext, const Rectangle& /*rRe aMapMode.SetOrigin(aMapMode.GetOrigin() + aOffset); rRenderContext.SetMapMode(aMapMode); Size aSize(rRenderContext.PixelToLogic(pPostIt->GetSizePixel())); - Rectangle aRectangle(Point(0, 0), aSize); + tools::Rectangle aRectangle(Point(0, 0), aSize); pPostIt->PaintTile(rRenderContext, aRectangle); @@ -1089,7 +1089,7 @@ void SwPostItMgr::MakeVisible(const SwSidebarWin* pPostIt ) } if (aPage!=-1) AutoScroll(pPostIt,aPage); - Rectangle aNoteRect (Point(pPostIt->GetPosPixel().X(),pPostIt->GetPosPixel().Y()-5),pPostIt->GetSizePixel()); + tools::Rectangle aNoteRect (Point(pPostIt->GetPosPixel().X(),pPostIt->GetPosPixel().Y()-5),pPostIt->GetSizePixel()); if (!aNoteRect.IsEmpty()) mpWrtShell->MakeVisible(SwRect(mpEditWin->PixelToLogic(aNoteRect))); } @@ -1125,7 +1125,7 @@ Color SwPostItMgr::GetArrowColor(sal_uInt16 aDirection,unsigned long aPage) cons } } -bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList, const Rectangle& rBorder, long lNeededHeight) +bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList, const tools::Rectangle& rBorder, long lNeededHeight) { /*** General layout idea:***/ // - if we have space left, we always move the current one up, @@ -1134,7 +1134,7 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList, con // - then the real layout starts //rBorder is the page rect - const Rectangle aBorder = mpEditWin->LogicToPixel(rBorder); + const tools::Rectangle aBorder = mpEditWin->LogicToPixel(rBorder); long lTopBorder = aBorder.Top() + 5; long lBottomBorder = aBorder.Bottom() - 5; const long lVisibleHeight = lBottomBorder - lTopBorder; //aBorder.GetHeight() ; @@ -1847,11 +1847,11 @@ bool SwPostItMgr::IsHit(const Point &aPointPixel) const unsigned long nPageNum = SwPostItHelper::getPageInfo( aPageFrame, pLayout, aPoint ); if( nPageNum ) { - Rectangle aRect; + tools::Rectangle aRect; OSL_ENSURE(mPages.size()>nPageNum-1,"SwPostitMgr:: page container size wrong"); aRect = mPages[nPageNum-1]->eSidebarPosition == sw::sidebarwindows::SidebarPosition::LEFT - ? Rectangle(Point(aPageFrame.Left()-GetSidebarWidth()-GetSidebarBorderWidth(),aPageFrame.Top()),Size(GetSidebarWidth(),aPageFrame.Height())) - : Rectangle( Point(aPageFrame.Right()+GetSidebarBorderWidth(),aPageFrame.Top()) , Size(GetSidebarWidth(),aPageFrame.Height())); + ? tools::Rectangle(Point(aPageFrame.Left()-GetSidebarWidth()-GetSidebarBorderWidth(),aPageFrame.Top()),Size(GetSidebarWidth(),aPageFrame.Height())) + : tools::Rectangle( Point(aPageFrame.Right()+GetSidebarBorderWidth(),aPageFrame.Top()) , Size(GetSidebarWidth(),aPageFrame.Height())); if (aRect.IsInside(aPoint)) { // we hit the note's sidebar @@ -1896,24 +1896,24 @@ vcl::Window* SwPostItMgr::IsHitSidebarWindow(const Point& rPointLogic) return pRet; } -Rectangle SwPostItMgr::GetBottomScrollRect(const unsigned long aPage) const +tools::Rectangle SwPostItMgr::GetBottomScrollRect(const unsigned long aPage) const { SwRect aPageRect = mPages[aPage-1]->mPageRect; Point aPointBottom = mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SidebarPosition::LEFT ? Point(aPageRect.Left() - GetSidebarWidth() - GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height()) : Point(aPageRect.Right() + GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height()); Size aSize(GetSidebarWidth() - mpEditWin->PixelToLogic(Size(4,0)).Width(), mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height()) ; - return Rectangle(aPointBottom,aSize); + return tools::Rectangle(aPointBottom,aSize); } -Rectangle SwPostItMgr::GetTopScrollRect(const unsigned long aPage) const +tools::Rectangle SwPostItMgr::GetTopScrollRect(const unsigned long aPage) const { SwRect aPageRect = mPages[aPage-1]->mPageRect; Point aPointTop = mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SidebarPosition::LEFT ? Point(aPageRect.Left() - GetSidebarWidth() -GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height()) : Point(aPageRect.Right() + GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height()); Size aSize(GetSidebarWidth() - mpEditWin->PixelToLogic(Size(4,0)).Width(), mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height()) ; - return Rectangle(aPointTop,aSize); + return tools::Rectangle(aPointTop,aSize); } //IMPORTANT: if you change the rects here, also change SwPageFrame::PaintNotesSidebar() @@ -1928,8 +1928,8 @@ bool SwPostItMgr::ScrollbarHit(const unsigned long aPage,const Point &aPoint) ? Point(aPageRect.Left() - GetSidebarWidth()-GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height()) : Point(aPageRect.Right()+GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height()); - Rectangle aRectBottom(GetBottomScrollRect(aPage)); - Rectangle aRectTop(GetTopScrollRect(aPage)); + tools::Rectangle aRectBottom(GetBottomScrollRect(aPage)); + tools::Rectangle aRectTop(GetTopScrollRect(aPage)); if (aRectBottom.IsInside(aPoint)) { diff --git a/sw/source/uibase/docvw/SidebarScrollBar.cxx b/sw/source/uibase/docvw/SidebarScrollBar.cxx index 45e2732b0e62..bb23abe47369 100644 --- a/sw/source/uibase/docvw/SidebarScrollBar.cxx +++ b/sw/source/uibase/docvw/SidebarScrollBar.cxx @@ -30,9 +30,9 @@ SidebarScrollBar::SidebarScrollBar(SwSidebarWin& rSidebarWin, WinBits nStyle, Sw { } -void SidebarScrollBar::LogicInvalidate(const Rectangle* pRectangle) +void SidebarScrollBar::LogicInvalidate(const tools::Rectangle* pRectangle) { - Rectangle aRectangle; + tools::Rectangle aRectangle; if (!pRectangle) { @@ -41,7 +41,7 @@ void SidebarScrollBar::LogicInvalidate(const Rectangle* pRectangle) MapMode aMapMode = GetMapMode(); aMapMode.SetMapUnit(MapUnit::MapTwip); SetMapMode(aMapMode); - aRectangle = Rectangle(Point(0, 0), PixelToLogic(GetSizePixel())); + aRectangle = tools::Rectangle(Point(0, 0), PixelToLogic(GetSizePixel())); Pop(); } else diff --git a/sw/source/uibase/docvw/SidebarScrollBar.hxx b/sw/source/uibase/docvw/SidebarScrollBar.hxx index dabb6e0c508a..19dae0a8b782 100644 --- a/sw/source/uibase/docvw/SidebarScrollBar.hxx +++ b/sw/source/uibase/docvw/SidebarScrollBar.hxx @@ -29,7 +29,7 @@ class SidebarScrollBar : public ScrollBar protected: /// @see OutputDevice::LogicInvalidate(). - void LogicInvalidate(const Rectangle* pRectangle) override; + void LogicInvalidate(const tools::Rectangle* pRectangle) override; void MouseMove(const MouseEvent& rMouseEvent) override; void MouseButtonUp(const MouseEvent& rMouseEvent) override; public: diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index 5180568227cf..32d43744524e 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -126,7 +126,7 @@ void SidebarTextControl::RequestHelp(const HelpEvent &rEvt) OUString sText = SW_RESSTR( nResId ) + ": " + aContentAtPos.aFnd.pRedl->GetAuthorString() + " - " + GetAppLangDateTimeString( aContentAtPos.aFnd.pRedl->GetTimeStamp() ); - Help::ShowQuickHelp( this,PixelToLogic(Rectangle(rEvt.GetMousePosPixel(),Size(50,10))),sText); + Help::ShowQuickHelp( this,PixelToLogic(tools::Rectangle(rEvt.GetMousePosPixel(),Size(50,10))),sText); } } @@ -138,7 +138,7 @@ void SidebarTextControl::Draw(OutputDevice* pDev, const Point& rPt, const Size& if ( GetTextView() ) { - GetTextView()->GetOutliner()->Draw(pDev, Rectangle(rPt, aSize)); + GetTextView()->GetOutliner()->Draw(pDev, tools::Rectangle(rPt, aSize)); } if ( mrSidebarWin.GetLayoutStatus()==SwPostItHelper::DELETED ) @@ -155,18 +155,18 @@ void SidebarTextControl::Draw(OutputDevice* pDev, const Point& rPt, const Size& } } -void SidebarTextControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SidebarTextControl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if (!rRenderContext.GetSettings().GetStyleSettings().GetHighContrastMode()) { if (mrSidebarWin.IsMouseOverSidebarWin() || HasFocus()) { - rRenderContext.DrawGradient(Rectangle(Point(0,0), rRenderContext.PixelToLogic(GetSizePixel())), + rRenderContext.DrawGradient(tools::Rectangle(Point(0,0), rRenderContext.PixelToLogic(GetSizePixel())), Gradient(GradientStyle::Linear, mrSidebarWin.ColorDark(), mrSidebarWin.ColorDark())); } else { - rRenderContext.DrawGradient(Rectangle(Point(0,0), rRenderContext.PixelToLogic(GetSizePixel())), + rRenderContext.DrawGradient(tools::Rectangle(Point(0,0), rRenderContext.PixelToLogic(GetSizePixel())), Gradient(GradientStyle::Linear, mrSidebarWin.ColorLight(), mrSidebarWin.ColorDark())); } } @@ -189,15 +189,15 @@ void SidebarTextControl::Paint(vcl::RenderContext& rRenderContext, const Rectang } } -void SidebarTextControl::LogicInvalidate(const Rectangle* pRectangle) +void SidebarTextControl::LogicInvalidate(const tools::Rectangle* pRectangle) { - Rectangle aRectangle; + tools::Rectangle aRectangle; if (!pRectangle) { Push(PushFlags::MAPMODE); EnableMapMode(); - aRectangle = Rectangle(Point(0, 0), PixelToLogic(GetSizePixel())); + aRectangle = tools::Rectangle(Point(0, 0), PixelToLogic(GetSizePixel())); Pop(); } else @@ -314,7 +314,7 @@ void SidebarTextControl::MouseMove( const MouseEvent& rMEvt ) sURL = SwViewShell::GetShellRes()->aLinkCtrlClick + ": " + sURL; else sURL = SwViewShell::GetShellRes()->aLinkClick + ": " + sURL; - Help::ShowQuickHelp( this,PixelToLogic(Rectangle(GetPosPixel(),Size(50,10))),sURL); + Help::ShowQuickHelp( this,PixelToLogic(tools::Rectangle(GetPosPixel(),Size(50,10))),sURL); } } } diff --git a/sw/source/uibase/docvw/SidebarTxtControl.hxx b/sw/source/uibase/docvw/SidebarTxtControl.hxx index f6e49a4d508a..daf9ab54fba6 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.hxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.hxx @@ -39,9 +39,9 @@ class SidebarTextControl : public Control SwPostItMgr& mrPostItMgr; protected: - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; /// @see OutputDevice::LogicInvalidate(). - void LogicInvalidate(const Rectangle* pRectangle) override; + void LogicInvalidate(const tools::Rectangle* pRectangle) override; virtual void Command( const CommandEvent& rCEvt ) override; virtual void LoseFocus() override; virtual void RequestHelp(const HelpEvent &rEvt) override; diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx index 330f0094a007..594a66d41c1d 100644 --- a/sw/source/uibase/docvw/SidebarWin.cxx +++ b/sw/source/uibase/docvw/SidebarWin.cxx @@ -135,7 +135,7 @@ vcl::Window* lcl_getHitWindow(sw::sidebarwindows::SwSidebarWin& rParent, const M Point aPosition(rParent.GetPosPixel()); aPosition.Move(pChild->GetPosPixel().getX(), pChild->GetPosPixel().getY()); Size aSize(rParent.GetSizePixel()); - Rectangle aRectangleLogic(rParent.EditWin().PixelToLogic(aPosition), rParent.EditWin().PixelToLogic(aSize)); + tools::Rectangle aRectangleLogic(rParent.EditWin().PixelToLogic(aPosition), rParent.EditWin().PixelToLogic(aSize)); if (aRectangleLogic.IsInside(rMouseEvent.GetPosPixel())) { pRet = pChild; @@ -276,7 +276,7 @@ void SwSidebarWin::dispose() vcl::Window::dispose(); } -void SwSidebarWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SwSidebarWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Window::Paint(rRenderContext, rRect); @@ -293,7 +293,7 @@ void SwSidebarWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rR } rRenderContext.SetLineColor(); - Rectangle aRectangle(Point(mpMetadataAuthor->GetPosPixel().X() + mpMetadataAuthor->GetSizePixel().Width(), + tools::Rectangle aRectangle(Point(mpMetadataAuthor->GetPosPixel().X() + mpMetadataAuthor->GetSizePixel().Width(), mpMetadataAuthor->GetPosPixel().Y()), Size(GetMetaButtonAreaWidth(), mpMetadataAuthor->GetSizePixel().Height() + mpMetadataDate->GetSizePixel().Height())); @@ -306,7 +306,7 @@ void SwSidebarWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rR } } -void SwSidebarWin::PaintTile(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SwSidebarWin::PaintTile(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Paint(rRenderContext, rRect); @@ -367,7 +367,7 @@ void SwSidebarWin::PaintTile(vcl::RenderContext& rRenderContext, const Rectangle bool SwSidebarWin::IsHitWindow(const Point& rPointLogic) { - Rectangle aRectangleLogic(EditWin().PixelToLogic(GetPosPixel()), EditWin().PixelToLogic(GetSizePixel())); + tools::Rectangle aRectangleLogic(EditWin().PixelToLogic(GetPosPixel()), EditWin().PixelToLogic(GetSizePixel())); return aRectangleLogic.IsInside(rPointLogic); } @@ -390,7 +390,7 @@ void SwSidebarWin::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, D { pDev->SetFillColor(mColorDark); pDev->SetLineColor(); - pDev->DrawRect( Rectangle( rPt, rSz ) ); + pDev->DrawRect( tools::Rectangle( rPt, rSz ) ); } if (mpMetadataAuthor->IsVisible()) @@ -510,7 +510,7 @@ void SwSidebarWin::MouseButtonUp(const MouseEvent& rMouseEvent) void SwSidebarWin::SetPosSizePixelRect(long nX, long nY, long nWidth, long nHeight, const SwRect& aAnchorRect, const long aPageBorder) { - mPosSize = Rectangle(Point(nX,nY),Size(nWidth,nHeight)); + mPosSize = tools::Rectangle(Point(nX,nY),Size(nWidth,nHeight)); if (!mAnchorRect.IsEmpty() && mAnchorRect != aAnchorRect) mbAnchorRectChanged = true; mAnchorRect = aAnchorRect; @@ -524,7 +524,7 @@ void SwSidebarWin::SetSize( const Size& rNewSize ) void SwSidebarWin::SetVirtualPosSize( const Point& aPoint, const Size& aSize) { - mPosSize = Rectangle(aPoint,aSize); + mPosSize = tools::Rectangle(aPoint,aSize); } void SwSidebarWin::TranslateTopPosition(const long aAmount) @@ -613,7 +613,7 @@ void SwSidebarWin::InitControls() mpOutlinerView = new OutlinerView ( mpOutliner, mpSidebarTextControl ); mpOutlinerView->SetBackgroundColor(COL_TRANSPARENT); mpOutliner->InsertView(mpOutlinerView ); - mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,1,1) ) ); + mpOutlinerView->SetOutputArea( PixelToLogic( tools::Rectangle(0,0,1,1) ) ); mpOutlinerView->SetAttribs(DefaultItem()); @@ -927,7 +927,7 @@ void SwSidebarWin::SetPosAndSize() SwRects* pRects(pTmpCursorForAnnotationTextRange.get()); for(SwRect & rNextRect : *pRects) { - const Rectangle aPntRect(rNextRect.SVRect()); + const tools::Rectangle aPntRect(rNextRect.SVRect()); maAnnotationTextRanges.push_back(basegfx::B2DRange( aPntRect.Left(), aPntRect.Top(), aPntRect.Right() + 1, aPntRect.Bottom() + 1)); @@ -1004,9 +1004,9 @@ void SwSidebarWin::DoResize() mpOutliner->SetPaperSize( PixelToLogic( Size(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) ) ); } - mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,aWidth,aHeight) ) ); + mpOutlinerView->SetOutputArea( PixelToLogic( tools::Rectangle(0,0,aWidth,aHeight) ) ); if (!AllSettings::GetLayoutRTL()) { @@ -1032,11 +1032,11 @@ void SwSidebarWin::DoResize() const Fraction& fy( GetMapMode().GetScaleY() ); const Point aPos( mpMetadataAuthor->GetPosPixel()); - Rectangle aRectMetaButton; + tools::Rectangle aRectMetaButton; if (IsPreview()) { aRectMetaButton = PixelToLogic( - Rectangle( Point( aPos.X()+GetSizePixel().Width()-(METABUTTON_WIDTH*4+10)*fx.GetNumerator()/fx.GetDenominator(), + tools::Rectangle( Point( aPos.X()+GetSizePixel().Width()-(METABUTTON_WIDTH*4+10)*fx.GetNumerator()/fx.GetDenominator(), aPos.Y()+5*fy.GetNumerator()/fy.GetDenominator() ), Size( METABUTTON_WIDTH*4*fx.GetNumerator()/fx.GetDenominator(), METABUTTON_HEIGHT*fy.GetNumerator()/fy.GetDenominator() ) ) ); @@ -1044,14 +1044,14 @@ void SwSidebarWin::DoResize() else { aRectMetaButton = PixelToLogic( - Rectangle( Point( aPos.X()+GetSizePixel().Width()-(METABUTTON_WIDTH+10)*fx.GetNumerator()/fx.GetDenominator(), + tools::Rectangle( Point( aPos.X()+GetSizePixel().Width()-(METABUTTON_WIDTH+10)*fx.GetNumerator()/fx.GetDenominator(), aPos.Y()+5*fy.GetNumerator()/fy.GetDenominator() ), Size( METABUTTON_WIDTH*fx.GetNumerator()/fx.GetDenominator(), METABUTTON_HEIGHT*fy.GetNumerator()/fy.GetDenominator() ) ) ); } { - const Rectangle aRectMetaButtonPixel( LogicToPixel( aRectMetaButton ) ); + const tools::Rectangle aRectMetaButtonPixel( LogicToPixel( aRectMetaButton ) ); mpMenuButton->setPosSizePixel( aRectMetaButtonPixel.Left(), aRectMetaButtonPixel.Top(), aRectMetaButtonPixel.GetWidth(), diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx index fa6c3caf8370..59badc65b7ca 100644 --- a/sw/source/uibase/docvw/edtdd.cxx +++ b/sw/source/uibase/docvw/edtdd.cxx @@ -198,7 +198,7 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt ) if( pObj && nullptr != ( pOLV = rSh.GetDrawView()->GetTextEditOutlinerView() )) { - Rectangle aRect( pOLV->GetOutputArea() ); + tools::Rectangle aRect( pOLV->GetOutputArea() ); aRect.Union( pObj->GetLogicRect() ); const Point aPos = pOLV->GetWindow()->PixelToLogic(rEvt.maPosPixel); if ( aRect.IsInside(aPos) ) @@ -258,7 +258,7 @@ SotExchangeDest SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject * OutlinerView* pOLV = rSh.GetDrawView()->GetTextEditOutlinerView(); if ( pOLV ) { - Rectangle aRect( pOLV->GetOutputArea() ); + tools::Rectangle aRect( pOLV->GetOutputArea() ); aRect.Union( pObj->GetLogicRect() ); const Point aPos = pOLV->GetWindow()->PixelToLogic( rPixPnt ); if( aRect.IsInside( aPos ) ) @@ -335,7 +335,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) // If the cursor is near the inner boundary // we attempt to scroll towards the desired direction. Point aPoint; - Rectangle aWin(aPoint,GetOutputSizePixel()); + tools::Rectangle aWin(aPoint,GetOutputSizePixel()); const int nMargin = 10; aWin.Left() += nMargin; aWin.Top() += nMargin; diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 48be93a38f96..208530981e44 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -369,7 +369,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) dynamic_cast<const SwFlyFrameFormat*>( pFormat) ) { //turn on highlight for frame - Rectangle aTmp( pRect->SVRect() ); + tools::Rectangle aTmp( pRect->SVRect() ); if ( !m_pUserMarker ) { @@ -401,7 +401,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) ? PointerStyle::ChainNotAllowed : PointerStyle::Chain; if ( nChainable == SwChainRet::OK ) { - Rectangle aTmp( aRect.SVRect() ); + tools::Rectangle aTmp( aRect.SVRect() ); if ( !m_pUserMarker ) { @@ -626,7 +626,7 @@ IMPL_LINK_NOARG(SwEditWin, TimerHandler, Timer *, void) if ( m_bInsDraw ) { const int nMaxScroll = 40; - m_rView.Scroll( Rectangle(aModPt,Size(1,1)), nMaxScroll, nMaxScroll); + m_rView.Scroll( tools::Rectangle(aModPt,Size(1,1)), nMaxScroll, nMaxScroll); bDone = true; } else if ( g_bFrameDrag ) @@ -667,7 +667,7 @@ IMPL_LINK_NOARG(SwEditWin, TimerHandler, Timer *, void) void SwEditWin::JustifyAreaTimer() { - const Rectangle &rVisArea = GetView().GetVisArea(); + const tools::Rectangle &rVisArea = GetView().GetVisArea(); #ifdef UNX const long coMinLen = 100; #else @@ -3825,7 +3825,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) { Point aDD( SwEditWin::m_nDDStartPosX, SwEditWin::m_nDDStartPosY ); aDD = LogicToPixel( aDD ); - Rectangle aRect( aDD.X()-3, aDD.Y()-3, aDD.X()+3, aDD.Y()+3 ); + tools::Rectangle aRect( aDD.X()-3, aDD.Y()-3, aDD.X()+3, aDD.Y()+3 ); if ( !aRect.IsInside( aPixPt ) ) StopDDTimer( &rSh, aDocPt ); } @@ -4456,7 +4456,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if ( rMEvt.IsMod1() ) // copy and don't move. { // abort drag, use internal Copy instead - Rectangle aRect; + tools::Rectangle aRect; rSh.GetDrawView()->TakeActionRect( aRect ); if (!aRect.IsEmpty()) { @@ -5595,19 +5595,19 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) { // When the composition does not exist, use Caret rect instead. SwRect aCaretRect ( rSh.GetCharRect() ); - Rectangle aRect( aCaretRect.Left(), aCaretRect.Top(), aCaretRect.Right(), aCaretRect.Bottom() ); + tools::Rectangle aRect( aCaretRect.Left(), aCaretRect.Top(), aCaretRect.Right(), aCaretRect.Bottom() ); rWin.SetCompositionCharRect( &aRect, 1, bVertical ); } else { - std::unique_ptr<Rectangle[]> aRects(new Rectangle[ nSize ]); + std::unique_ptr<tools::Rectangle[]> aRects(new tools::Rectangle[ nSize ]); int nRectIndex = 0; for ( SwIndex nIndex = rStart.nContent; nIndex < rEnd.nContent; ++nIndex ) { const SwPosition aPos( rStart.nNode, nIndex ); SwRect aRect ( rSh.GetCharRect() ); rSh.GetCharRectAt( aRect, &aPos ); - aRects[ nRectIndex ] = Rectangle( aRect.Left(), aRect.Top(), aRect.Right(), aRect.Bottom() ); + aRects[ nRectIndex ] = tools::Rectangle( aRect.Left(), aRect.Top(), aRect.Right(), aRect.Bottom() ); ++nRectIndex; } rWin.SetCompositionCharRect( aRects.get(), nSize, bVertical ); @@ -5662,7 +5662,7 @@ void SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) bool bVertical = pOutliner->IsVertical(); const EditEngine& rEditEng = pOutliner->GetEditEngine(); Point aEEPos(aDocPos); - const Rectangle& rOutputArea = pOLV->GetOutputArea(); + const tools::Rectangle& rOutputArea = pOLV->GetOutputArea(); // regard vertical mode if(bVertical) { @@ -5955,7 +5955,7 @@ void QuickHelpData::Start( SwWrtShell& rSh, sal_uInt16 nWrdLen ) Point aPt( rWin.OutputToScreenPixel( rWin.LogicToPixel( rSh.GetCharRect().Pos() ))); aPt.Y() -= 3; - nTipId = Help::ShowPopover(&rWin, Rectangle( aPt, Size( 1, 1 )), + nTipId = Help::ShowPopover(&rWin, tools::Rectangle( aPt, Size( 1, 1 )), m_aHelpStrings[ nCurArrPos ], QuickHelpFlags::Left | QuickHelpFlags::Bottom); } @@ -6344,7 +6344,7 @@ Selection SwEditWin::GetSurroundingTextSelection() const } } -void SwEditWin::LogicInvalidate(const Rectangle* pRectangle) +void SwEditWin::LogicInvalidate(const tools::Rectangle* pRectangle) { OString sRectangle; if (!pRectangle) diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index 598bf0d8ba66..21b5d2484011 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -365,7 +365,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) } if (!sText.isEmpty()) { - Rectangle aRect( aFieldRect.SVRect() ); + tools::Rectangle aRect( aFieldRect.SVRect() ); Point aPt( OutputToScreenPixel( LogicToPixel( aRect.TopLeft() ))); aRect.Left() = aPt.X(); aRect.Top() = aPt.Y(); @@ -420,7 +420,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) { sText = SW_RESSTR(nTabRes); Size aTextSize( GetTextWidth(sText), GetTextHeight()); - Rectangle aRect(rEvt.GetMousePosPixel(), aTextSize); + tools::Rectangle aRect(rEvt.GetMousePosPixel(), aTextSize); OUString sDisplayText(ClipLongToolTip(sText)); Help::ShowQuickHelp(this, aRect, sDisplayText); } @@ -442,7 +442,7 @@ void SwEditWin::PrePaint(vcl::RenderContext& /*rRenderContext*/) } } -void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { SwWrtShell* pWrtShell = GetView().GetWrtShellPtr(); if(!pWrtShell) @@ -450,7 +450,7 @@ void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect bool bPaintShadowCursor = false; if( m_pShadCursor ) { - Rectangle aRect( m_pShadCursor->GetRect()); + tools::Rectangle aRect( m_pShadCursor->GetRect()); // fully resides inside? if( rRect.IsInside( aRect ) ) { diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx index 71922d57bfe8..26c6d5bcde8d 100644 --- a/sw/source/uibase/docvw/srcedtw.cxx +++ b/sw/source/uibase/docvw/srcedtw.cxx @@ -490,7 +490,7 @@ void TextViewOutWin::KeyInput( const KeyEvent& rKEvt ) } } -void TextViewOutWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void TextViewOutWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { pTextView->Paint(rRenderContext, rRect); } |