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 /sfx2/source | |
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 'sfx2/source')
48 files changed, 181 insertions, 181 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 9364ff5c17c0..061d94622c0a 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -2663,7 +2663,7 @@ void SfxHelpWindow_Impl::MakeLayout() if ( aRect.Width > 0 && aRect.Height > 0 ) { - Rectangle aScreenRect = pScreenWin->GetClientWindowExtentsRelative(); + tools::Rectangle aScreenRect = pScreenWin->GetClientWindowExtentsRelative(); Point aNewPos = aScreenRect.TopLeft(); sal_Int32 nDiffWidth = nOldWidth - nWidth; aNewPos.X() += nDiffWidth; diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index 867e38dcb32c..85683c94d087 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -718,7 +718,7 @@ SvBorder SfxWorkWindow::Arrange_Impl() Point aPos; Size aSize; - Rectangle aTmp( aClientArea ); + tools::Rectangle aTmp( aClientArea ); for (sal_uInt16 n : aSortedList) { @@ -1602,9 +1602,9 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, if (nPos == USHRT_MAX || !pDockWin) return; - Rectangle aOuterRect( GetTopRect_Impl() ); + tools::Rectangle aOuterRect( GetTopRect_Impl() ); aOuterRect.SetPos( pWorkWin->OutputToScreenPixel( aOuterRect.TopLeft() )); - Rectangle aInnerRect( aOuterRect ); + tools::Rectangle aInnerRect( aOuterRect ); // The current affected window is included in the calculation of // the inner rectangle! @@ -2165,7 +2165,7 @@ void SfxWorkWindow::ResetChildWindows_Impl() // returns the size of the area (client area) of the // parent windows, in which the ChildWindow can be fitted. -Rectangle SfxWorkWindow::GetTopRect_Impl() +tools::Rectangle SfxWorkWindow::GetTopRect_Impl() { return pMasterFrame->GetTopOuterRectPixel_Impl(); } @@ -2346,7 +2346,7 @@ void SfxWorkWindow::EndAutoShow_Impl( Point aPos ) { Point aLocalPos = p->ScreenToOutputPixel( aPos ); Point aEmptyPoint; - Rectangle aRect( aEmptyPoint, p->GetSizePixel() ); + tools::Rectangle aRect( aEmptyPoint, p->GetSizePixel() ); if ( !aRect.IsInside( aLocalPos ) ) p->FadeOut(); } @@ -2361,7 +2361,7 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin ) if ( pParent ) pParent->ArrangeAutoHideWindows( pActSplitWin ); - Rectangle aArea( aUpperClientArea ); + tools::Rectangle aArea( aUpperClientArea ); for ( sal_uInt16 n=0; n<SFX_SPLITWINDOWS_MAX; n++ ) { // Either dummy window or window in the auto-show-mode are processed @@ -2481,11 +2481,11 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin ) } } -Rectangle SfxWorkWindow::GetFreeArea( bool bAutoHide ) const +tools::Rectangle SfxWorkWindow::GetFreeArea( bool bAutoHide ) const { if ( bAutoHide ) { - Rectangle aArea( aClientArea ); + tools::Rectangle aArea( aClientArea ); for ( sal_uInt16 n=0; n<SFX_SPLITWINDOWS_MAX; n++ ) { if ( pSplit[n]->IsPinned() || !pSplit[n]->IsVisible() ) diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx index ef9a0661931e..abf417eb5c09 100644 --- a/sfx2/source/bastyp/sfxhtml.cxx +++ b/sfx2/source/bastyp/sfxhtml.cxx @@ -183,7 +183,7 @@ IMAPOBJ_SETEVENT: case IMAP_OBJ_RECTANGLE: if( aCoords.size() >=4 ) { - Rectangle aRect( aCoords[0], aCoords[1], + tools::Rectangle aRect( aCoords[0], aCoords[1], aCoords[2], aCoords[3] ); IMapRectangleObject aMapRObj( aRect, aHRef, aAlt, OUString(), aTarget, aName, !bNoHRef ); diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx index 02c6019e7033..e068c0f3d989 100644 --- a/sfx2/source/control/recentdocsview.cxx +++ b/sfx2/source/control/recentdocsview.cxx @@ -66,7 +66,7 @@ RecentDocsView::RecentDocsView( vcl::Window* pParent ) , maWelcomeLine1(SfxResId(STR_WELCOME_LINE1)) , maWelcomeLine2(SfxResId(STR_WELCOME_LINE2)) { - Rectangle aScreen = Application::GetScreenPosSizePixel(Application::GetDisplayBuiltInScreen()); + tools::Rectangle aScreen = Application::GetScreenPosSizePixel(Application::GetDisplayBuiltInScreen()); mnItemMaxSize = std::min(aScreen.GetWidth(),aScreen.GetHeight()) > 800 ? 256 : 192; SetStyle(GetStyle() | WB_VSCROLL); @@ -264,7 +264,7 @@ void RecentDocsView::OnItemDblClicked(ThumbnailViewItem *pItem) pRecentItem->OpenDocument(); } -void RecentDocsView::Paint(vcl::RenderContext& rRenderContext, const Rectangle &aRect) +void RecentDocsView::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle &aRect) { // Set preferred width if (mFilteredItemList.empty()) diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx index 571ec8e4ad90..5b8080171d93 100644 --- a/sfx2/source/control/recentdocsviewitem.cxx +++ b/sfx2/source/control/recentdocsviewitem.cxx @@ -93,8 +93,8 @@ RecentDocsViewItem::RecentDocsViewItem(ThumbnailView &rView, const OUString &rUR aThumbnail = BitmapEx(Bitmap(aThumbnailSize, 24), AlphaMask(aThumbnailSize, &nAlpha)); aThumbnail.CopyPixel( - Rectangle(Point((aThumbnailSize.Width() - aExtSize.Width()) / 2, (aThumbnailSize.Height() - aExtSize.Height()) / 2), aExtSize), - Rectangle(Point(0, 0), aExtSize), + ::tools::Rectangle(Point((aThumbnailSize.Width() - aExtSize.Width()) / 2, (aThumbnailSize.Height() - aExtSize.Height()) / 2), aExtSize), + ::tools::Rectangle(Point(0, 0), aExtSize), &aExt); } @@ -102,9 +102,9 @@ RecentDocsViewItem::RecentDocsViewItem(ThumbnailView &rView, const OUString &rUR maPreview1 = TemplateLocalView::scaleImg(aThumbnail, nThumbnailSize, nThumbnailSize); } -Rectangle RecentDocsViewItem::updateHighlight(bool bVisible, const Point& rPoint) +::tools::Rectangle RecentDocsViewItem::updateHighlight(bool bVisible, const Point& rPoint) { - Rectangle aRect(ThumbnailViewItem::updateHighlight(bVisible, rPoint)); + ::tools::Rectangle aRect(ThumbnailViewItem::updateHighlight(bVisible, rPoint)); if (bVisible && getRemoveIconArea().IsInside(rPoint)) { @@ -124,12 +124,12 @@ Rectangle RecentDocsViewItem::updateHighlight(bool bVisible, const Point& rPoint return aRect; } -Rectangle RecentDocsViewItem::getRemoveIconArea() const +::tools::Rectangle RecentDocsViewItem::getRemoveIconArea() const { - Rectangle aArea(getDrawArea()); + ::tools::Rectangle aArea(getDrawArea()); Size aSize(m_aRemoveRecentBitmap.GetSizePixel()); - return Rectangle( + return ::tools::Rectangle( Point(aArea.Right() - aSize.Width() - THUMBNAILVIEW_ITEM_CORNER, aArea.Top() + THUMBNAILVIEW_ITEM_CORNER), aSize); } diff --git a/sfx2/source/control/templatedefaultview.cxx b/sfx2/source/control/templatedefaultview.cxx index 26d3f808da27..1520a856f5b4 100644 --- a/sfx2/source/control/templatedefaultview.cxx +++ b/sfx2/source/control/templatedefaultview.cxx @@ -29,7 +29,7 @@ TemplateDefaultView::TemplateDefaultView( Window* pParent) : TemplateLocalView(pParent, WB_TABSTOP) , mnTextHeight(30) { - Rectangle aScreen = Application::GetScreenPosSizePixel(Application::GetDisplayBuiltInScreen()); + tools::Rectangle aScreen = Application::GetScreenPosSizePixel(Application::GetDisplayBuiltInScreen()); mnItemMaxSize = std::min(aScreen.GetWidth(),aScreen.GetHeight()) > 800 ? 256 : 192; ThumbnailView::setItemDimensions( mnItemMaxSize, mnItemMaxSize, mnTextHeight, gnItemPadding ); updateThumbnailDimensions(mnItemMaxSize); @@ -86,7 +86,7 @@ void TemplateDefaultView::createContextMenu() deselectItems(); maSelectedItem->setSelection(true); pItemMenu->SetSelectHdl(LINK(this, TemplateLocalView, ContextMenuSelectHdl)); - pItemMenu->Execute(this, Rectangle(maPosition,Size(1,1)), PopupMenuFlags::ExecuteDown); + pItemMenu->Execute(this, tools::Rectangle(maPosition,Size(1,1)), PopupMenuFlags::ExecuteDown); Invalidate(); } diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx index ffb3eeefc61c..cfbe91cc9b69 100644 --- a/sfx2/source/control/templatelocalview.cxx +++ b/sfx2/source/control/templatelocalview.cxx @@ -250,7 +250,7 @@ void TemplateLocalView::createContextMenu(const bool bIsDefault) maSelectedItem->setSelection(true); maItemStateHdl.Call(maSelectedItem); pItemMenu->SetSelectHdl(LINK(this, TemplateLocalView, ContextMenuSelectHdl)); - pItemMenu->Execute(this, Rectangle(maPosition,Size(1,1)), PopupMenuFlags::ExecuteDown); + pItemMenu->Execute(this, tools::Rectangle(maPosition,Size(1,1)), PopupMenuFlags::ExecuteDown); Invalidate(); } @@ -840,7 +840,7 @@ void TemplateLocalView::RequestHelp( const HelpEvent& rHEvt ) { if ( rHEvt.GetMode() & HelpEventMode::QUICK ) { - Rectangle aRect( OutputToScreenPixel( GetPosPixel() ), GetSizePixel() ); + tools::Rectangle aRect( OutputToScreenPixel( GetPosPixel() ), GetSizePixel() ); Help::ShowQuickHelp( this, aRect, GetQuickHelpText(), QuickHelpFlags::CtrlText | QuickHelpFlags::TipStyleBalloon ); return; @@ -878,7 +878,7 @@ void TemplateLocalView::Command( const CommandEvent& rCEvt ) deselectItems(); pItem->setSelection(true); maItemStateHdl.Call(pItem); - Rectangle aRect = pItem->getDrawArea(); + tools::Rectangle aRect = pItem->getDrawArea(); maPosition = aRect.Center(); maSelectedItem = dynamic_cast<TemplateViewItem*>(pItem); maCreateContextMenuHdl.Call(pItem); diff --git a/sfx2/source/control/templatesearchview.cxx b/sfx2/source/control/templatesearchview.cxx index 0628e0d8b760..1695fa25913f 100644 --- a/sfx2/source/control/templatesearchview.cxx +++ b/sfx2/source/control/templatesearchview.cxx @@ -111,7 +111,7 @@ void TemplateSearchView::Command( const CommandEvent& rCEvt ) deselectItems(); pItem->setSelection(true); maItemStateHdl.Call(pItem); - Rectangle aRect = pItem->getDrawArea(); + tools::Rectangle aRect = pItem->getDrawArea(); maPosition = aRect.Center(); maSelectedItem = dynamic_cast<TemplateViewItem*>(pItem); maCreateContextMenuHdl.Call(pItem); @@ -140,7 +140,7 @@ void TemplateSearchView::createContextMenu( const bool bIsDefault) maSelectedItem->setSelection(true); maItemStateHdl.Call(maSelectedItem); pItemMenu->SetSelectHdl(LINK(this, TemplateSearchView, ContextMenuSelectHdl)); - pItemMenu->Execute(this, Rectangle(maPosition,Size(1,1)), PopupMenuFlags::ExecuteDown); + pItemMenu->Execute(this, tools::Rectangle(maPosition,Size(1,1)), PopupMenuFlags::ExecuteDown); Invalidate(); } diff --git a/sfx2/source/control/templateviewitem.cxx b/sfx2/source/control/templateviewitem.cxx index 2d396b9e640f..9a32bc8efa09 100644 --- a/sfx2/source/control/templateviewitem.cxx +++ b/sfx2/source/control/templateviewitem.cxx @@ -43,12 +43,12 @@ TemplateViewItem::~TemplateViewItem () { } -Rectangle TemplateViewItem::getDefaultIconArea() const +::tools::Rectangle TemplateViewItem::getDefaultIconArea() const { - Rectangle aArea(getDrawArea()); + ::tools::Rectangle aArea(getDrawArea()); Size aSize(maDefaultBitmap.GetSizePixel()); - return Rectangle( + return ::tools::Rectangle( Point(aArea.Left() + THUMBNAILVIEW_ITEM_CORNER, aArea.Top() + THUMBNAILVIEW_ITEM_CORNER), aSize); } diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 5843d79c8a54..8ecb03dad3e8 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -88,7 +88,7 @@ void ThumbnailView::MouseMove(const MouseEvent& rMEvt) aHelp = pItem->getHelpText(); } - Rectangle aToInvalidate(pItem->updateHighlight(pItem->mbVisible && !rMEvt.IsLeaveWindow(), aPoint)); + ::tools::Rectangle aToInvalidate(pItem->updateHighlight(pItem->mbVisible && !rMEvt.IsLeaveWindow(), aPoint)); if (!aToInvalidate.IsEmpty() && IsReallyVisible() && IsUpdateMode()) Invalidate(aToInvalidate); @@ -208,7 +208,7 @@ void ThumbnailView::DrawItem(ThumbnailViewItem *pItem) { if (pItem->isVisible()) { - Rectangle aRect = pItem->getDrawArea(); + ::tools::Rectangle aRect = pItem->getDrawArea(); if ((aRect.GetHeight() > 0) && (aRect.GetWidth() > 0)) Invalidate(aRect); @@ -351,7 +351,7 @@ void ThumbnailView::CalculateItemPositions (bool bScrollBarUsed) maItemStateHdl.Call(pItem); } - pItem->setDrawArea(Rectangle( Point(x,y), Size(mnItemWidth, mnItemHeight) )); + pItem->setDrawArea(::tools::Rectangle( Point(x,y), Size(mnItemWidth, mnItemHeight) )); pItem->calculateItemsPosition(mnThumbnailHeight,mnDisplayHeight,mnItemPadding,mpItemAttrs->nMaxTextLength,mpItemAttrs); if ( !((nCurCount+1) % mnCols) ) @@ -824,7 +824,7 @@ void ThumbnailView::Command( const CommandEvent& rCEvt ) Control::Command( rCEvt ); } -void ThumbnailView::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ThumbnailView::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) { size_t nItemCount = mItemList.size(); @@ -832,7 +832,7 @@ void ThumbnailView::Paint(vcl::RenderContext& rRenderContext, const Rectangle& r drawinglayer::primitive2d::Primitive2DContainer aSeq(1); aSeq[0] = drawinglayer::primitive2d::Primitive2DReference( new PolyPolygonColorPrimitive2D( - B2DPolyPolygon( ::tools::Polygon(Rectangle(Point(), GetOutputSizePixel()), 0, 0).getB2DPolygon()), + B2DPolyPolygon( ::tools::Polygon(::tools::Rectangle(Point(), GetOutputSizePixel()), 0, 0).getB2DPolygon()), maFillColor.getBColor())); // Create the processor and process the primitives diff --git a/sfx2/source/control/thumbnailviewacc.cxx b/sfx2/source/control/thumbnailviewacc.cxx index 7fcf59f19458..aab1ba555b1d 100644 --- a/sfx2/source/control/thumbnailviewacc.cxx +++ b/sfx2/source/control/thumbnailviewacc.cxx @@ -310,7 +310,7 @@ sal_Bool SAL_CALL ThumbnailViewAcc::containsPoint( const awt::Point& aPoint ) const Point aSize( aRect.Width, aRect.Height ); const Point aNullPoint, aTestPoint( aPoint.X, aPoint.Y ); - return Rectangle( aNullPoint, aSize ).IsInside( aTestPoint ); + return tools::Rectangle( aNullPoint, aSize ).IsInside( aTestPoint ); } uno::Reference< accessibility::XAccessible > SAL_CALL ThumbnailViewAcc::getAccessibleAtPoint( const awt::Point& aPoint ) @@ -823,7 +823,7 @@ sal_Bool SAL_CALL ThumbnailViewItemAcc::containsPoint( const awt::Point& aPoint const Point aSize( aRect.Width, aRect.Height ); const Point aNullPoint, aTestPoint( aPoint.X, aPoint.Y ); - return Rectangle( aNullPoint, aSize ).IsInside( aTestPoint ); + return tools::Rectangle( aNullPoint, aSize ).IsInside( aTestPoint ); } uno::Reference< accessibility::XAccessible > SAL_CALL ThumbnailViewItemAcc::getAccessibleAtPoint( const awt::Point& ) @@ -839,9 +839,9 @@ awt::Rectangle SAL_CALL ThumbnailViewItemAcc::getBounds() if( mpParent ) { - Rectangle aRect( mpParent->getDrawArea() ); + tools::Rectangle aRect( mpParent->getDrawArea() ); Point aOrigin; - Rectangle aParentRect( aOrigin, mpParent->mrParent.GetOutputSizePixel() ); + tools::Rectangle aParentRect( aOrigin, mpParent->mrParent.GetOutputSizePixel() ); aRect.Intersection( aParentRect ); diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx index 249e1c4a56f7..b90c88b2d753 100644 --- a/sfx2/source/control/thumbnailviewitem.cxx +++ b/sfx2/source/control/thumbnailviewitem.cxx @@ -78,7 +78,7 @@ void ThumbnailViewItem::setHighlight (bool state) mbHover = state; } -Rectangle ThumbnailViewItem::updateHighlight(bool bVisible, const Point& rPoint) +::tools::Rectangle ThumbnailViewItem::updateHighlight(bool bVisible, const Point& rPoint) { bool bNeedsPaint = false; @@ -98,7 +98,7 @@ Rectangle ThumbnailViewItem::updateHighlight(bool bVisible, const Point& rPoint) if (bNeedsPaint) return getDrawArea(); - return Rectangle(); + return ::tools::Rectangle(); } void ThumbnailViewItem::setTitle (const OUString& rTitle) @@ -115,7 +115,7 @@ uno::Reference< accessibility::XAccessible > const & ThumbnailViewItem::GetAcces return mxAcc; } -void ThumbnailViewItem::setDrawArea (const Rectangle &area) +void ThumbnailViewItem::setDrawArea (const ::tools::Rectangle &area) { maDrawArea = area; } diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 82dc215b778b..966bab0ef268 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -380,25 +380,25 @@ void BackingWindow::checkInstalledModules() mpDBAllButton->Enable(aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::DATABASE )); } -void BackingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void BackingWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { Resize(); Wallpaper aBack(svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor); - vcl::Region aClip(Rectangle(Point(0, 0), GetOutputSizePixel())); + vcl::Region aClip(tools::Rectangle(Point(0, 0), GetOutputSizePixel())); aClip.Exclude(maStartCentButtons); rRenderContext.Push(PushFlags::CLIPREGION); rRenderContext.IntersectClipRegion(aClip); - rRenderContext.DrawWallpaper(Rectangle(Point(0, 0), GetOutputSizePixel()), aBack); + rRenderContext.DrawWallpaper(tools::Rectangle(Point(0, 0), GetOutputSizePixel()), aBack); rRenderContext.Pop(); ScopedVclPtrInstance<VirtualDevice> pVDev(rRenderContext); pVDev->EnableRTL(rRenderContext.IsRTLEnabled()); pVDev->SetOutputSizePixel(maStartCentButtons.GetSize()); Point aOffset(Point(0, 0) - maStartCentButtons.TopLeft()); - pVDev->DrawWallpaper(Rectangle(aOffset, GetOutputSizePixel()), aBack); + pVDev->DrawWallpaper(tools::Rectangle(aOffset, GetOutputSizePixel()), aBack); rRenderContext.DrawOutDev(maStartCentButtons.TopLeft(), maStartCentButtons.GetSize(), Point(0, 0), maStartCentButtons.GetSize(), @@ -512,7 +512,7 @@ void BackingWindow::setOwningFrame( const css::uno::Reference< css::frame::XFram void BackingWindow::Resize() { - maStartCentButtons = Rectangle( Point(0, 0), GetOutputSizePixel() ); + maStartCentButtons = tools::Rectangle( Point(0, 0), GetOutputSizePixel() ); if (isLayoutEnabled(this)) VclContainer::setLayoutAllocation(*GetWindow(GetWindowType::FirstChild), diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx index 5d3259b6f367..31388537f55c 100644 --- a/sfx2/source/dialog/backingwindow.hxx +++ b/sfx2/source/dialog/backingwindow.hxx @@ -86,7 +86,7 @@ class BackingWindow : public vcl::Window, public VclBuilderContainer std::vector< VclPtr<vcl::Window> > maDndWindows; Color maButtonsTextColor; - Rectangle maStartCentButtons; + tools::Rectangle maStartCentButtons; bool mbInitControls; sal_Int32 mnHideExternalLinks; @@ -118,7 +118,7 @@ public: virtual ~BackingWindow() override; virtual void dispose() override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void Resize() override; virtual bool PreNotify(NotifyEvent& rNEvt) override; virtual void GetFocus() override; diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index b58181c9b0e6..7e6c4692553d 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -199,7 +199,7 @@ void SfxModelessDialog::StateChanged( StateChangedType nStateChange ) aPos.Y() += ( aParentSize.Height() - aDlgSize.Height() ) / 2; Point aPoint; - Rectangle aRect = GetDesktopRectPixel(); + tools::Rectangle aRect = GetDesktopRectPixel(); aPoint.X() = aRect.Right() - aDlgSize.Width(); aPoint.Y() = aRect.Bottom() - aDlgSize.Height(); diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 4f71efbd3471..68b5eda251a8 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1348,7 +1348,7 @@ void CustomPropertiesDurationField::RequestHelp( const HelpEvent& rHEvt ) if ( rHEvt.GetMode() & HelpEventMode::QUICK ) { Size aSize( GetSizePixel() ); - Rectangle aItemRect( rHEvt.GetMousePosPixel(), aSize ); + tools::Rectangle aItemRect( rHEvt.GetMousePosPixel(), aSize ); if (Help::IsBalloonHelpEnabled()) Help::ShowBalloon( this, rHEvt.GetMousePosPixel(), aItemRect, GetText() ); else @@ -1719,7 +1719,7 @@ bool CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa sal_uInt16 nPos = 0; while ( *pCurrent ) { - Rectangle aRect = pHeaderBar->GetItemRect( pHeaderBar->GetItemId( nPos++ ) ); + tools::Rectangle aRect = pHeaderBar->GetItemRect( pHeaderBar->GetItemId( nPos++ ) ); Size aOrigSize = (*pCurrent)->GetSizePixel(); Point aOrigPos = (*pCurrent)->GetPosPixel(); Size aSize(aOrigSize); diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 284111783c2c..ec7d0a085fa1 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -652,7 +652,7 @@ void SfxDockingWindow::StartDocking() is used, the behavior can be influenced by the derived classes (see below). This method should if possible not be overwritten. */ -bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) +bool SfxDockingWindow::Docking( const Point& rPos, tools::Rectangle& rRect ) { if ( Application::IsInModalMode() ) return true; @@ -749,7 +749,7 @@ bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) the parent window. If this method is overridden by a derived class, then SfxDockingWindow::EndDocking() must be called first. */ -void SfxDockingWindow::EndDocking( const Rectangle& rRect, bool bFloatMode ) +void SfxDockingWindow::EndDocking( const tools::Rectangle& rRect, bool bFloatMode ) { if ( !pImpl || !pImpl->bConstructed || IsDockingCanceled() || !pMgr ) return; @@ -1152,7 +1152,7 @@ void SfxDockingWindow::ReleaseChildWindow_Impl() is overridden (see below). */ -SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& rRect) +SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, tools::Rectangle& rRect) { // calculate hypothetical sizes for different modes Size aFloatingSize(CalcDockingSize(SfxChildAlignment::NOALIGNMENT)); @@ -1194,7 +1194,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& nTBBorder = MAX_TOGGLEAREA_WIDTH; // shrink area for floating mode if possible - Rectangle aInRect = GetInnerRect(); + tools::Rectangle aInRect = GetInnerRect(); if ( aInRect.GetWidth() > nLRBorder ) aInRect.Left() += nLRBorder/2; if ( aInRect.GetWidth() > nLRBorder ) @@ -1207,7 +1207,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& // calculate alignment resulting from docking rectangle bool bBecomesFloating = false; SfxChildAlignment eDockAlign = pImpl->GetDockAlignment(); - Rectangle aDockingRect( rRect ); + tools::Rectangle aDockingRect( rRect ); if ( !IsFloatingMode() ) { // don't use tracking rectangle for alignment check, because it will be too large @@ -1221,7 +1221,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& } Point aPos = aDockingRect.TopLeft(); - Rectangle aIntersect = GetOuterRect().GetIntersection( aDockingRect ); + tools::Rectangle aIntersect = GetOuterRect().GetIntersection( aDockingRect ); if ( aIntersect.IsEmpty() ) // docking rectangle completely outside docking area -> floating mode bBecomesFloating = true; @@ -1229,13 +1229,13 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& { // create a small test rect around the mouse position and use this one // instead of the passed rRect to not dock too easily or by accident - Rectangle aSmallDockingRect; + tools::Rectangle aSmallDockingRect; aSmallDockingRect.SetSize( Size( MAX_TOGGLEAREA_WIDTH, MAX_TOGGLEAREA_HEIGHT ) ); Point aNewPos(rPos); aNewPos.X() -= aSmallDockingRect.GetWidth()/2; aNewPos.Y() -= aSmallDockingRect.GetHeight()/2; aSmallDockingRect.SetPos(rPos); - Rectangle aIntersectRect = aInRect.GetIntersection( aSmallDockingRect ); + tools::Rectangle aIntersectRect = aInRect.GetIntersection( aSmallDockingRect ); if ( aIntersectRect == aSmallDockingRect ) // docking rectangle completely inside (shrunk) inner area -> floating mode bBecomesFloating = true; @@ -1568,12 +1568,12 @@ bool SfxDockingWindow::Close() /** Returns a boundary line to the docked edge and a frame when the Window is in a docked state. In this way SVLOOK is considered. */ -void SfxDockingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void SfxDockingWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { if (pImpl->bSplitable || IsFloatingMode()) return; - Rectangle aRect(Point(0, 0), GetOutputSizePixel()); + tools::Rectangle aRect(Point(0, 0), GetOutputSizePixel()); switch (GetAlignment()) { case SfxChildAlignment::TOP: diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx index 190759b09305..087913f38cf7 100644 --- a/sfx2/source/dialog/infobar.cxx +++ b/sfx2/source/dialog/infobar.cxx @@ -105,19 +105,19 @@ public: GetInfoBarColors(InfoBarType::Warning,m_aBackgroundColor,m_aForegroundColor,m_aMessageColor); } - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override; void setBackgroundColor(const basegfx::BColor& rColor); void setForegroundColor(const basegfx::BColor& rColor); }; -void SfxCloseButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SfxCloseButton::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { const ViewInformation2D aNewViewInfos; const unique_ptr<BaseProcessor2D> pProcessor( createBaseProcessor2DFromOutputDevice(rRenderContext, aNewViewInfos)); - const Rectangle aRect(Point(0, 0), PixelToLogic(GetSizePixel())); + const ::tools::Rectangle aRect(Point(0, 0), PixelToLogic(GetSizePixel())); drawinglayer::primitive2d::Primitive2DContainer aSeq(2); @@ -230,13 +230,13 @@ void SfxInfoBarWindow::dispose() vcl::Window::dispose(); } -void SfxInfoBarWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rPaintRect) +void SfxInfoBarWindow::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rPaintRect) { const ViewInformation2D aNewViewInfos; const unique_ptr<BaseProcessor2D> pProcessor( createBaseProcessor2DFromOutputDevice(rRenderContext, aNewViewInfos)); - const Rectangle aRect(Point(0, 0), PixelToLogic(GetSizePixel())); + const ::tools::Rectangle aRect(Point(0, 0), PixelToLogic(GetSizePixel())); drawinglayer::primitive2d::Primitive2DContainer aSeq(2); diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index c84314773fd7..a10861ddefaf 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -347,7 +347,7 @@ void SfxSplitWindow::StartSplit() pEmptyWin->bSplit = true; } - Rectangle aRect = pWorkWin->GetFreeArea( !bPinned ); + tools::Rectangle aRect = pWorkWin->GetFreeArea( !bPinned ); switch ( GetAlign() ) { case WindowAlign::Left: @@ -987,7 +987,7 @@ bool SfxSplitWindow::CursorIsOverRect() const Point aPos = pEmptyWin->GetParent()->OutputToScreenPixel( pEmptyWin->GetPosPixel() ); Size aSize = pEmptyWin->GetSizePixel(); - Rectangle aRect( aPos, aSize ); + tools::Rectangle aRect( aPos, aSize ); if ( bVisible ) { @@ -1000,7 +1000,7 @@ bool SfxSplitWindow::CursorIsOverRect() const aVisSize.Width() += 2 * nPixel; aVisSize.Height() += 2 * nPixel; - Rectangle aVisRect( aVisPos, aVisSize ); + tools::Rectangle aVisRect( aVisPos, aVisSize ); aRect = aRect.GetUnion( aVisRect ); } diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 5133d805ec30..49b17f515691 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -145,7 +145,7 @@ void StyleLBoxString::Paint( SvLBoxString::InitViewData( &rDevice, const_cast<SvTreeListEntry*>(&rEntry), mpViewData); } - Rectangle aPaintRectangle = pView->GetPaintRectangle(); + tools::Rectangle aPaintRectangle = pView->GetPaintRectangle(); bPainted = pStylePreviewRenderer->render(aPaintRectangle); } } diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx index 5299973e9705..e917c24a4b98 100644 --- a/sfx2/source/dialog/titledockwin.cxx +++ b/sfx2/source/dialog/titledockwin.cxx @@ -143,7 +143,7 @@ namespace sfx2 rRenderContext.SetTextFillColor(); } - void TitledDockingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& i_rArea) + void TitledDockingWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& i_rArea) { const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); @@ -173,15 +173,15 @@ namespace sfx2 int nInnerBottom = nOuterBottom - m_aBorder.Bottom() + 1; // Paint title bar background. - Rectangle aTitleBarBox(Rectangle(nOuterLeft, 0, nOuterRight, nInnerTop - 1)); + tools::Rectangle aTitleBarBox(tools::Rectangle(nOuterLeft, 0, nOuterRight, nInnerTop - 1)); rRenderContext.DrawRect(aTitleBarBox); if (nInnerLeft > nOuterLeft) - rRenderContext.DrawRect(Rectangle(nOuterLeft, nInnerTop, nInnerLeft, nInnerBottom)); + rRenderContext.DrawRect(tools::Rectangle(nOuterLeft, nInnerTop, nInnerLeft, nInnerBottom)); if (nOuterRight > nInnerRight) - rRenderContext.DrawRect(Rectangle(nInnerRight, nInnerTop, nOuterRight, nInnerBottom)); + rRenderContext.DrawRect(tools::Rectangle(nInnerRight, nInnerTop, nOuterRight, nInnerBottom)); if (nInnerBottom < nOuterBottom) - rRenderContext.DrawRect(Rectangle(nOuterLeft, nInnerBottom, nOuterRight, nOuterBottom)); + rRenderContext.DrawRect(tools::Rectangle(nOuterLeft, nInnerBottom, nOuterRight, nOuterBottom)); // Paint bevel border. rRenderContext.SetFillColor(); @@ -251,7 +251,7 @@ namespace sfx2 SfxDockingWindow::StateChanged( i_nType ); } - void TitledDockingWindow::EndDocking( const Rectangle& i_rRect, bool i_bFloatMode ) + void TitledDockingWindow::EndDocking( const tools::Rectangle& i_rRect, bool i_bFloatMode ) { SfxDockingWindow::EndDocking( i_rRect, i_bFloatMode ); diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index 24c48d569f2b..75caffce5435 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -129,7 +129,7 @@ namespace { class WaitWindow_Impl : public WorkWindow { - Rectangle maRect; + tools::Rectangle maRect; OUString maText; const DrawTextFlags mnTextStyle = DrawTextFlags::Center | DrawTextFlags::VCenter | DrawTextFlags::WordBreak | DrawTextFlags::MultiLine; @@ -137,7 +137,7 @@ public: WaitWindow_Impl(); virtual ~WaitWindow_Impl() override; virtual void dispose() override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; }; #define X_OFFSET 15 @@ -2332,7 +2332,7 @@ void SAL_CALL SfxDocTplService::update() WaitWindow_Impl::WaitWindow_Impl() : WorkWindow(nullptr, WB_BORDER | WB_3DLOOK) { - Rectangle aRect = Rectangle(0, 0, 300, 30000); + tools::Rectangle aRect = tools::Rectangle(0, 0, 300, 30000); maText = SfxResId(RID_CNT_STR_WAITING).toString(); maRect = GetTextRect(aRect, maText, mnTextStyle); aRect = maRect; @@ -2359,7 +2359,7 @@ void WaitWindow_Impl::dispose() } -void WaitWindow_Impl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void WaitWindow_Impl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { rRenderContext.DrawText(maRect, maText, mnTextStyle); } diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index 21399295814b..82c78426603d 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -65,12 +65,12 @@ Size SfxPreviewBase_Impl::GetOptimalSize() const return LogicToPixel(Size(127, 129), MapUnit::MapAppFont); } -void SfxPreviewWin_Impl::ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/, GDIMetaFile* pFile) +void SfxPreviewWin_Impl::ImpPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/, GDIMetaFile* pFile) { rRenderContext.SetLineColor(); Color aLightGrayCol(COL_LIGHTGRAY); rRenderContext.SetFillColor(aLightGrayCol); - rRenderContext.DrawRect(Rectangle(Point(0,0), rRenderContext.GetOutputSize())); + rRenderContext.DrawRect(tools::Rectangle(Point(0,0), rRenderContext.GetOutputSize())); Size aTmpSize = pFile ? pFile->GetPrefSize() : Size(1, 1); DBG_ASSERT(aTmpSize.Height() != 0 && aTmpSize.Width() != 0, "size of first page is 0, override GetFirstPageSize or set visible-area!"); @@ -104,13 +104,13 @@ void SfxPreviewWin_Impl::ImpPaint(vcl::RenderContext& rRenderContext, const Rect Color aWhiteCol(COL_WHITE); rRenderContext.SetLineColor(aBlackCol); rRenderContext.SetFillColor(aWhiteCol); - rRenderContext.DrawRect(Rectangle(aPoint + Point(FRAME, FRAME), bPoint + Point(FRAME, FRAME))); + rRenderContext.DrawRect(tools::Rectangle(aPoint + Point(FRAME, FRAME), bPoint + Point(FRAME, FRAME))); pFile->WindStart(); pFile->Play(&rRenderContext, aPoint + Point(FRAME, FRAME), aSize); } } -void SfxPreviewWin_Impl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SfxPreviewWin_Impl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { ImpPaint(rRenderContext, rRect, xMetaFile.get()); } diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx index ab90ef7fc015..9ebe0078bd16 100644 --- a/sfx2/source/doc/objembed.cxx +++ b/sfx2/source/doc/objembed.cxx @@ -92,29 +92,29 @@ void SfxObjectShell::OnDocumentPrinterChanged( Printer* /*pNewPrinter*/ ) } -Rectangle SfxObjectShell::GetVisArea( sal_uInt16 nAspect ) const +tools::Rectangle SfxObjectShell::GetVisArea( sal_uInt16 nAspect ) const { if( nAspect == ASPECT_CONTENT ) return pImpl->m_aVisArea; else if( nAspect == ASPECT_THUMBNAIL ) { - Rectangle aRect; + tools::Rectangle aRect; aRect.SetSize( OutputDevice::LogicToLogic( Size( 5000, 5000 ), MapUnit::Map100thMM, GetMapUnit() ) ); return aRect; } - return Rectangle(); + return tools::Rectangle(); } -const Rectangle& SfxObjectShell::GetVisArea() const +const tools::Rectangle& SfxObjectShell::GetVisArea() const { pImpl->m_aVisArea = GetVisArea( ASPECT_CONTENT ); return pImpl->m_aVisArea; } -void SfxObjectShell::SetVisArea( const Rectangle & rVisArea ) +void SfxObjectShell::SetVisArea( const tools::Rectangle & rVisArea ) { if( pImpl->m_aVisArea != rVisArea ) { @@ -132,7 +132,7 @@ void SfxObjectShell::SetVisArea( const Rectangle & rVisArea ) void SfxObjectShell::SetVisAreaSize( const Size & rVisSize ) { - SetVisArea( Rectangle( GetVisArea().TopLeft(), rVisSize ) ); + SetVisArea( tools::Rectangle( GetVisArea().TopLeft(), rVisSize ) ); } @@ -195,7 +195,7 @@ void SfxObjectShell::DoDraw_Impl( OutputDevice* pDev, const JobSetup & rSetup, sal_uInt16 nAspect ) { - Rectangle aVisArea = GetVisArea( nAspect ); + tools::Rectangle aVisArea = GetVisArea( nAspect ); // MapUnit des Ziels MapMode aMapMode( GetMapUnit() ); aMapMode.SetScaleX( rScaleX ); diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 75fe7d357dad..36b6be463497 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -870,7 +870,7 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const OUString& Sequence< sal_Int32 > aWinExtent; if ( ( aArgs.get( "WinExtent" ) >>= aWinExtent )&& ( aWinExtent.getLength() == 4 ) ) { - Rectangle aVisArea( aWinExtent[0], aWinExtent[1], aWinExtent[2], aWinExtent[3] ); + tools::Rectangle aVisArea( aWinExtent[0], aWinExtent[1], aWinExtent[2], aWinExtent[3] ); aVisArea = OutputDevice::LogicToLogic( aVisArea, MapUnit::Map100thMM, pObjectShell->GetMapUnit() ); pObjectShell->SetVisArea( aVisArea ); } @@ -961,7 +961,7 @@ Sequence< beans::PropertyValue > SAL_CALL SfxBaseModel::getArgs() // "WinExtent" property should be updated always. // We can store it now to overwrite an old value // since it is not from ItemSet - Rectangle aTmpRect = m_pData->m_pObjectShell->GetVisArea( ASPECT_CONTENT ); + tools::Rectangle aTmpRect = m_pData->m_pObjectShell->GetVisArea( ASPECT_CONTENT ); aTmpRect = OutputDevice::LogicToLogic( aTmpRect, m_pData->m_pObjectShell->GetMapUnit(), MapUnit::Map100thMM ); Sequence< sal_Int32 > aRectSeq(4); @@ -3561,7 +3561,7 @@ void SAL_CALL SfxBaseModel::setVisualAreaSize( sal_Int64 nAspect, const awt::Siz } else { - Rectangle aTmpRect = m_pData->m_pObjectShell->GetVisArea( ASPECT_CONTENT ); + tools::Rectangle aTmpRect = m_pData->m_pObjectShell->GetVisArea( ASPECT_CONTENT ); aTmpRect.SetSize( Size( aSize.Width, aSize.Height ) ); m_pData->m_pObjectShell->SetVisArea( aTmpRect ); } @@ -3574,7 +3574,7 @@ awt::Size SAL_CALL SfxBaseModel::getVisualAreaSize( sal_Int64 /*nAspect*/ ) if ( !m_pData->m_pObjectShell.is() ) throw Exception(); // TODO: error handling - Rectangle aTmpRect = m_pData->m_pObjectShell->GetVisArea( ASPECT_CONTENT ); + tools::Rectangle aTmpRect = m_pData->m_pObjectShell->GetVisArea( ASPECT_CONTENT ); return awt::Size( aTmpRect.GetWidth(), aTmpRect.GetHeight() ); } diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx index dc0624253094..a9348c1cfbbd 100644 --- a/sfx2/source/inc/objshimp.hxx +++ b/sfx2/source/inc/objshimp.hxx @@ -118,7 +118,7 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess bool m_bEnableSetModified; bool m_bIsModified; - Rectangle m_aVisArea; + tools::Rectangle m_aVisArea; MapUnit m_nMapUnit; bool m_bCreateTempStor; diff --git a/sfx2/source/inc/preview.hxx b/sfx2/source/inc/preview.hxx index ecb3a13121fb..86c8f6fc4bf8 100644 --- a/sfx2/source/inc/preview.hxx +++ b/sfx2/source/inc/preview.hxx @@ -39,13 +39,13 @@ public: class SfxPreviewWin_Impl: public SfxPreviewBase_Impl { protected: - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; public: SfxPreviewWin_Impl(vcl::Window* pParent, WinBits nStyle) : SfxPreviewBase_Impl(pParent, nStyle) {} - static void ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect, GDIMetaFile* pFile); + static void ImpPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, GDIMetaFile* pFile); }; #endif diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx index a9a4fbe46e63..d4e229a77464 100644 --- a/sfx2/source/inc/workwin.hxx +++ b/sfx2/source/inc/workwin.hxx @@ -192,8 +192,8 @@ class SfxWorkWindow final std::vector<sal_uInt16> aSortedList; SfxStatBar_Impl aStatBar; std::vector< SfxObjectBar_Impl > aObjBarList; - Rectangle aClientArea; - Rectangle aUpperClientArea; + tools::Rectangle aClientArea; + tools::Rectangle aUpperClientArea; SfxWorkWindow* pParent; VclPtr<SfxSplitWindow> pSplit[SFX_SPLITWINDOWS_MAX]; std::vector<SfxChild_Impl*> @@ -227,7 +227,7 @@ class SfxWorkWindow final void Sort_Impl(); SfxChild_Impl* FindChild_Impl( const vcl::Window& rWindow ) const; bool RequestTopToolSpacePixel_Impl( SvBorder aBorder ); - Rectangle GetTopRect_Impl(); + tools::Rectangle GetTopRect_Impl(); SvBorder Arrange_Impl(); void SaveStatus_Impl(SfxChildWindow*, const SfxChildWinInfo&); static bool IsPluginMode( SfxObjectShell* pObjShell ); @@ -239,7 +239,7 @@ public: { return *pBindings; } vcl::Window* GetWindow() const { return pWorkWin; } - Rectangle GetFreeArea( bool bAutoHide ) const; + tools::Rectangle GetFreeArea( bool bAutoHide ) const; void SetDockingAllowed(bool bSet) { bDockingAllowed = bSet; } void SetInternalDockingAllowed(bool bSet) diff --git a/sfx2/source/notebookbar/DropdownBox.cxx b/sfx2/source/notebookbar/DropdownBox.cxx index 97d63a716ef9..63aba3f33f70 100644 --- a/sfx2/source/notebookbar/DropdownBox.cxx +++ b/sfx2/source/notebookbar/DropdownBox.cxx @@ -188,7 +188,7 @@ IMPL_LINK(DropdownBox, PBClickHdl, Button*, /*pButton*/, void) long x = GetPosPixel().getX(); long y = GetPosPixel().getY() + NOTEBOOK_HEADER_HEIGHT + GetSizePixel().Height(); - Rectangle aRect(x, y, x, y); + tools::Rectangle aRect(x, y, x, y); m_pPopup->StartPopupMode(aRect, FloatWinPopupFlags::Down |FloatWinPopupFlags::GrabFocus diff --git a/sfx2/source/notebookbar/NotebookbarTabControl.cxx b/sfx2/source/notebookbar/NotebookbarTabControl.cxx index a443c045ffa1..e2acfb5ea2c4 100644 --- a/sfx2/source/notebookbar/NotebookbarTabControl.cxx +++ b/sfx2/source/notebookbar/NotebookbarTabControl.cxx @@ -252,7 +252,7 @@ IMPL_LINK(NotebookbarTabControl, OpenNotebookbarPopupMenu, NotebookBar*, pNotebo VCLXMenu* pAwtMenu = VCLXMenu::GetImplementation(xPopupMenu); PopupMenu* pVCLMenu = static_cast<PopupMenu*>(pAwtMenu->GetMenu()); Point aPos(0, NotebookbarTabControl::GetHeaderHeight()); - pVCLMenu->Execute(pNotebookbar, Rectangle(aPos, aPos),PopupMenuFlags::ExecuteDown|PopupMenuFlags::NoMouseUpClose); + pVCLMenu->Execute(pNotebookbar, tools::Rectangle(aPos, aPos),PopupMenuFlags::ExecuteDown|PopupMenuFlags::NoMouseUpClose); Reference<css::lang::XComponent> xComponent(xPopupController, UNO_QUERY); if (xComponent.is()) diff --git a/sfx2/source/notebookbar/PriorityHBox.cxx b/sfx2/source/notebookbar/PriorityHBox.cxx index 596fb5e72912..de2e7b9bb201 100644 --- a/sfx2/source/notebookbar/PriorityHBox.cxx +++ b/sfx2/source/notebookbar/PriorityHBox.cxx @@ -128,7 +128,7 @@ public: VclHBox::Resize(); } - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override { if (!m_bInitialized && SfxViewFrame::Current()) { diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index f8d4bcfe17e1..3b86130bfa59 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -97,12 +97,12 @@ VclPtr<DeckTitleBar> Deck::GetTitleBar() const return mpTitleBar; } -Rectangle Deck::GetContentArea() const +tools::Rectangle Deck::GetContentArea() const { const Size aWindowSize (GetSizePixel()); const int nBorderSize (Theme::GetInteger(Theme::Int_DeckBorderSize)); - return Rectangle( + return tools::Rectangle( Theme::GetInteger(Theme::Int_DeckLeftPadding) + nBorderSize, Theme::GetInteger(Theme::Int_DeckTopPadding) + nBorderSize, aWindowSize.Width() - 1 - Theme::GetInteger(Theme::Int_DeckRightPadding) - nBorderSize, @@ -114,7 +114,7 @@ void Deck::ApplySettings(vcl::RenderContext& rRenderContext) rRenderContext.SetBackground(Wallpaper()); } -void Deck::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rUpdateArea*/) +void Deck::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rUpdateArea*/) { const Size aWindowSize (GetSizePixel()); const SvBorder aPadding(Theme::GetInteger(Theme::Int_DeckLeftPadding), @@ -123,7 +123,7 @@ void Deck::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rUpdateA Theme::GetInteger(Theme::Int_DeckBottomPadding)); // Paint deck background outside the border. - Rectangle aBox(0, 0, aWindowSize.Width() - 1, aWindowSize.Height() - 1); + tools::Rectangle aBox(0, 0, aWindowSize.Width() - 1, aWindowSize.Height() - 1); DrawHelper::DrawBorder(rRenderContext, aBox, aPadding, Theme::GetPaint(Theme::Paint_DeckBackground), Theme::GetPaint(Theme::Paint_DeckBackground)); @@ -314,7 +314,7 @@ Deck::ScrollContainerWindow::ScrollContainerWindow (vcl::Window* pParentWindow) #endif } -void Deck::ScrollContainerWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rUpdateArea*/) +void Deck::ScrollContainerWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rUpdateArea*/) { // Paint the separators. const sal_Int32 nSeparatorHeight(Theme::GetInteger(Theme::Int_DeckSeparatorHeight)); diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx index 5c0d60dde254..ba3ed38293f4 100644 --- a/sfx2/source/sidebar/DeckLayouter.cxx +++ b/sfx2/source/sidebar/DeckLayouter.cxx @@ -54,8 +54,8 @@ namespace { : mpPanel(),maLayoutSize(0,0,0),mnDistributedHeight(0),mnWeight(0),mnPanelIndex(0),mbShowTitleBar(true) {} }; - Rectangle LayoutPanels ( - const Rectangle& rContentArea, + tools::Rectangle LayoutPanels ( + const tools::Rectangle& rContentArea, sal_Int32& rMinimalWidth, ::std::vector<LayoutItem>& rLayoutItems, vcl::Window& rScrollClipWindow, @@ -66,7 +66,7 @@ namespace { ::std::vector<LayoutItem>& rLayoutItem, sal_Int32& rAvailableHeight, sal_Int32& rMinimalWidth, - const Rectangle& rContentBox); + const tools::Rectangle& rContentBox); void DistributeHeights ( ::std::vector<LayoutItem>& rLayoutItems, const sal_Int32 nHeightToDistribute, @@ -77,12 +77,12 @@ namespace { const sal_Int32 nWidth, const LayoutMode eMode, vcl::Window& rScrollContainer); - Rectangle PlaceDeckTitle ( + tools::Rectangle PlaceDeckTitle ( vcl::Window& rTittleBar, - const Rectangle& rAvailableSpace); - Rectangle PlaceVerticalScrollBar ( + const tools::Rectangle& rAvailableSpace); + tools::Rectangle PlaceVerticalScrollBar ( ScrollBar& rVerticalScrollBar, - const Rectangle& rAvailableSpace, + const tools::Rectangle& rAvailableSpace, const bool bShowVerticalScrollBar); void SetupVerticalScrollBar( ScrollBar& rVerticalScrollBar, @@ -90,11 +90,11 @@ namespace { const sal_Int32 nVisibleHeight); void UpdateFiller ( vcl::Window& rFiller, - const Rectangle& rBox); + const tools::Rectangle& rBox); } void DeckLayouter::LayoutDeck ( - const Rectangle& rContentArea, + const tools::Rectangle& rContentArea, sal_Int32& rMinimalWidth, SharedPanelContainer& rPanels, vcl::Window& rDeckTitleBar, @@ -105,7 +105,7 @@ void DeckLayouter::LayoutDeck ( { if (rContentArea.GetWidth()<=0 || rContentArea.GetHeight()<=0) return; - Rectangle aBox (PlaceDeckTitle(rDeckTitleBar, rContentArea)); + tools::Rectangle aBox (PlaceDeckTitle(rDeckTitleBar, rContentArea)); if ( ! rPanels.empty()) { @@ -131,8 +131,8 @@ void DeckLayouter::LayoutDeck ( namespace { -Rectangle LayoutPanels ( - const Rectangle& rContentArea, +tools::Rectangle LayoutPanels ( + const tools::Rectangle& rContentArea, sal_Int32& rMinimalWidth, ::std::vector<LayoutItem>& rLayoutItems, vcl::Window& rScrollClipWindow, @@ -140,7 +140,7 @@ Rectangle LayoutPanels ( ScrollBar& rVerticalScrollBar, const bool bShowVerticalScrollBar) { - Rectangle aBox (PlaceVerticalScrollBar(rVerticalScrollBar, rContentArea, bShowVerticalScrollBar)); + tools::Rectangle aBox (PlaceVerticalScrollBar(rVerticalScrollBar, rContentArea, bShowVerticalScrollBar)); const sal_Int32 nWidth (aBox.GetWidth()); @@ -339,7 +339,7 @@ void GetRequestedSizes ( ::std::vector<LayoutItem>& rLayoutItems, sal_Int32& rAvailableHeight, sal_Int32& rMinimalWidth, - const Rectangle& rContentBox) + const tools::Rectangle& rContentBox) { rAvailableHeight = rContentBox.GetHeight(); @@ -483,9 +483,9 @@ void DistributeHeights ( OSL_ASSERT(nRemainingHeightToDistribute==0); } -Rectangle PlaceDeckTitle ( +tools::Rectangle PlaceDeckTitle ( vcl::Window& rDeckTitleBar, - const Rectangle& rAvailableSpace) + const tools::Rectangle& rAvailableSpace) { if (static_cast<DockingWindow*>(rDeckTitleBar.GetParent()->GetParent())->IsFloatingMode()) { @@ -502,7 +502,7 @@ Rectangle PlaceDeckTitle ( rAvailableSpace.GetWidth(), nDeckTitleBarHeight); rDeckTitleBar.Show(); - return Rectangle( + return tools::Rectangle( rAvailableSpace.Left(), rAvailableSpace.Top() + nDeckTitleBarHeight, rAvailableSpace.Right(), @@ -510,9 +510,9 @@ Rectangle PlaceDeckTitle ( } } -Rectangle PlaceVerticalScrollBar ( +tools::Rectangle PlaceVerticalScrollBar ( ScrollBar& rVerticalScrollBar, - const Rectangle& rAvailableSpace, + const tools::Rectangle& rAvailableSpace, const bool bShowVerticalScrollBar) { if (bShowVerticalScrollBar) @@ -524,7 +524,7 @@ Rectangle PlaceVerticalScrollBar ( nScrollBarWidth, rAvailableSpace.GetHeight()); rVerticalScrollBar.Show(); - return Rectangle( + return tools::Rectangle( rAvailableSpace.Left(), rAvailableSpace.Top(), rAvailableSpace.Right() - nScrollBarWidth, @@ -551,7 +551,7 @@ void SetupVerticalScrollBar( void UpdateFiller ( vcl::Window& rFiller, - const Rectangle& rBox) + const tools::Rectangle& rBox) { if (rBox.GetHeight() > 0) { diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx index 29067d1a02df..fe4d0b2aae6e 100644 --- a/sfx2/source/sidebar/DeckTitleBar.cxx +++ b/sfx2/source/sidebar/DeckTitleBar.cxx @@ -72,17 +72,17 @@ void DeckTitleBar::SetCloserVisible (const bool bIsCloserVisible) } } -Rectangle DeckTitleBar::GetTitleArea (const Rectangle& rTitleBarBox) +tools::Rectangle DeckTitleBar::GetTitleArea (const tools::Rectangle& rTitleBarBox) { Image aGripImage (Theme::GetImage(Theme::Image_Grip)); - return Rectangle( + return tools::Rectangle( aGripImage.GetSizePixel().Width() + gaLeftGripPadding + gaRightGripPadding, rTitleBarBox.Top(), rTitleBarBox.Right(), rTitleBarBox.Bottom()); } -void DeckTitleBar::PaintDecoration(vcl::RenderContext& /*rRenderContext*/, const Rectangle& /*rTitleBarBox*/) +void DeckTitleBar::PaintDecoration(vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& /*rTitleBarBox*/) { } diff --git a/sfx2/source/sidebar/DrawHelper.cxx b/sfx2/source/sidebar/DrawHelper.cxx index 7297fc244b23..be369c776c17 100644 --- a/sfx2/source/sidebar/DrawHelper.cxx +++ b/sfx2/source/sidebar/DrawHelper.cxx @@ -24,7 +24,7 @@ namespace sfx2 { namespace sidebar { -void DrawHelper::DrawBorder(vcl::RenderContext& rRenderContext, const Rectangle& rBox, const SvBorder& rBorderSize, +void DrawHelper::DrawBorder(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBox, const SvBorder& rBorderSize, const Paint& rHorizontalPaint, const Paint& rVerticalPaint) { // Draw top line. @@ -60,7 +60,7 @@ void DrawHelper::DrawHorizontalLine(vcl::RenderContext& rRenderContext, const sa break; } case Paint::GradientPaint: - rRenderContext.DrawGradient(Rectangle(nLeft, nY, nRight, nY + nHeight - 1), + rRenderContext.DrawGradient(tools::Rectangle(nLeft, nY, nRight, nY + nHeight - 1), rPaint.GetGradient()); break; @@ -87,7 +87,7 @@ void DrawHelper::DrawVerticalLine(vcl::RenderContext& rRenderContext, const sal_ break; } case Paint::GradientPaint: - rRenderContext.DrawGradient(Rectangle(nX, nTop, nX + nWidth - 1, nBottom), + rRenderContext.DrawGradient(tools::Rectangle(nX, nTop, nX + nWidth - 1, nBottom), rPaint.GetGradient()); break; @@ -97,7 +97,7 @@ void DrawHelper::DrawVerticalLine(vcl::RenderContext& rRenderContext, const sal_ } } -void DrawHelper::DrawRoundedRectangle(vcl::RenderContext& rRenderContext, const Rectangle& rBox, const sal_Int32 nCornerRadius, +void DrawHelper::DrawRoundedRectangle(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBox, const sal_Int32 nCornerRadius, const Color& rBorderColor, const Paint& rFillPaint) { rRenderContext.SetLineColor(rBorderColor); diff --git a/sfx2/source/sidebar/MenuButton.cxx b/sfx2/source/sidebar/MenuButton.cxx index ef749459bc32..0f7403c35446 100644 --- a/sfx2/source/sidebar/MenuButton.cxx +++ b/sfx2/source/sidebar/MenuButton.cxx @@ -38,13 +38,13 @@ MenuButton::MenuButton (vcl::Window* pParentWindow) #endif } -void MenuButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rUpdateArea*/) +void MenuButton::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rUpdateArea*/) { const bool bIsSelected (IsChecked()); const bool bIsHighlighted (IsMouseOver() || HasFocus()); DrawHelper::DrawRoundedRectangle( rRenderContext, - Rectangle(Point(0,0), GetSizePixel()), + tools::Rectangle(Point(0,0), GetSizePixel()), 3, (bIsHighlighted || bIsSelected ? Theme::GetColor(Theme::Color_TabItemBorder) diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx b/sfx2/source/sidebar/PanelTitleBar.cxx index c52841cc0189..fcb5e8f0ff6a 100644 --- a/sfx2/source/sidebar/PanelTitleBar.cxx +++ b/sfx2/source/sidebar/PanelTitleBar.cxx @@ -101,14 +101,14 @@ void PanelTitleBar::SetMoreOptionsCommand(const OUString& rsCommandName, } } -Rectangle PanelTitleBar::GetTitleArea (const Rectangle& rTitleBarBox) +tools::Rectangle PanelTitleBar::GetTitleArea (const tools::Rectangle& rTitleBarBox) { if (mpPanel != nullptr) { Image aImage (mpPanel->IsExpanded() ? Theme::GetImage(Theme::Image_Expand) : Theme::GetImage(Theme::Image_Collapse)); - return Rectangle( + return tools::Rectangle( aImage.GetSizePixel().Width() + gaLeftIconPadding + gaRightIconPadding, rTitleBarBox.Top(), rTitleBarBox.Right(), @@ -118,7 +118,7 @@ Rectangle PanelTitleBar::GetTitleArea (const Rectangle& rTitleBarBox) return rTitleBarBox; } -void PanelTitleBar::PaintDecoration (vcl::RenderContext& rRenderContext, const Rectangle& /*rTitleBarBox*/) +void PanelTitleBar::PaintDecoration (vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rTitleBarBox*/) { if (mpPanel != nullptr) { diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 869cc89fa21d..b21be2dfbc05 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -94,7 +94,7 @@ SidebarController::SidebarController ( mpParentWindow, rxFrame, [this](const ::rtl::OUString& rsDeckId) { return this->OpenThenToggleDeck(rsDeckId); }, - [this](const Rectangle& rButtonBox,const ::std::vector<TabBar::DeckMenuData>& rMenuData) { return this->ShowPopupMenu(rButtonBox,rMenuData); }, + [this](const tools::Rectangle& rButtonBox,const ::std::vector<TabBar::DeckMenuData>& rMenuData) { return this->ShowPopupMenu(rButtonBox,rMenuData); }, this)), mxFrame(rxFrame), maCurrentContext(OUString(), OUString()), @@ -923,14 +923,14 @@ IMPL_LINK(SidebarController, WindowEventHandler, VclWindowEvent&, rEvent, void) } void SidebarController::ShowPopupMenu ( - const Rectangle& rButtonBox, + const tools::Rectangle& rButtonBox, const ::std::vector<TabBar::DeckMenuData>& rMenuData) const { VclPtr<PopupMenu> pMenu = CreatePopupMenu(rMenuData); pMenu->SetSelectHdl(LINK(const_cast<SidebarController*>(this), SidebarController, OnMenuItemSelected)); // pass toolbox button rect so the menu can stay open on button up - Rectangle aBox (rButtonBox); + tools::Rectangle aBox (rButtonBox); aBox.Move(mpTabBar->GetPosPixel().X(), 0); pMenu->Execute(mpParentWindow, aBox, PopupMenuFlags::ExecuteDown); pMenu.disposeAndClear(); diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index 1bf3847d1a91..7d4ee1419ef0 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -87,7 +87,7 @@ void TabBar::dispose() vcl::Window::dispose(); } -void TabBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rUpdateArea) +void TabBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rUpdateArea) { Window::Paint(rRenderContext, rUpdateArea); @@ -398,7 +398,7 @@ IMPL_LINK_NOARG(TabBar, OnToolboxClicked, Button*, void) } maPopupMenuProvider( - Rectangle( + tools::Rectangle( mpMenuButton->GetPosPixel(), mpMenuButton->GetSizePixel()), aMenuData); diff --git a/sfx2/source/sidebar/TabItem.cxx b/sfx2/source/sidebar/TabItem.cxx index 13bc9914ef12..3e0e5f635f86 100644 --- a/sfx2/source/sidebar/TabItem.cxx +++ b/sfx2/source/sidebar/TabItem.cxx @@ -41,13 +41,13 @@ TabItem::TabItem (vcl::Window* pParentWindow) #endif } -void TabItem::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*UpdateArea*/) +void TabItem::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*UpdateArea*/) { const bool bIsSelected (IsChecked()); const bool bIsHighlighted (IsMouseOver() || HasFocus()); DrawHelper::DrawRoundedRectangle( rRenderContext, - Rectangle(Point(0,0), GetSizePixel()), + tools::Rectangle(Point(0,0), GetSizePixel()), Theme::GetInteger(Theme::Int_ButtonCornerRadius), bIsHighlighted||bIsSelected ? Theme::GetColor(Theme::Color_TabItemBorder) diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx index 1a46180d91c8..7d4e18059b45 100644 --- a/sfx2/source/sidebar/Theme.cxx +++ b/sfx2/source/sidebar/Theme.cxx @@ -1041,7 +1041,7 @@ void Theme::ProcessNewValue ( awt::Rectangle aBox; if (rValue >>= aBox) { - maRectangles[nIndex] = Rectangle( + maRectangles[nIndex] = tools::Rectangle( aBox.X, aBox.Y, aBox.Width, diff --git a/sfx2/source/sidebar/TitleBar.cxx b/sfx2/source/sidebar/TitleBar.cxx index 820764330184..22433123cd4c 100644 --- a/sfx2/source/sidebar/TitleBar.cxx +++ b/sfx2/source/sidebar/TitleBar.cxx @@ -76,14 +76,14 @@ void TitleBar::ApplySettings(vcl::RenderContext& rRenderContext) rRenderContext.SetBackground(maBackgroundPaint.GetWallpaper()); } -void TitleBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rUpdateArea*/) +void TitleBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rUpdateArea*/) { // Paint title bar background. Size aWindowSize (GetSizePixel()); - Rectangle aTitleBarBox(0,0, aWindowSize.Width(), aWindowSize.Height()); + tools::Rectangle aTitleBarBox(0,0, aWindowSize.Width(), aWindowSize.Height()); PaintDecoration(rRenderContext, aTitleBarBox); - const Rectangle aTitleBox(GetTitleArea(aTitleBarBox)); + const tools::Rectangle aTitleBox(GetTitleArea(aTitleBarBox)); PaintTitle(rRenderContext, aTitleBox); PaintFocus(rRenderContext, aTitleBox); } @@ -115,11 +115,11 @@ css::uno::Reference<css::accessibility::XAccessible> TitleBar::CreateAccessible( return AccessibleTitleBar::Create(*this); } -void TitleBar::PaintTitle(vcl::RenderContext& rRenderContext, const Rectangle& rTitleBox) +void TitleBar::PaintTitle(vcl::RenderContext& rRenderContext, const tools::Rectangle& rTitleBox) { rRenderContext.Push(PushFlags::FONT | PushFlags::TEXTCOLOR); - Rectangle aTitleBox(rTitleBox); + tools::Rectangle aTitleBox(rTitleBox); // When there is an icon then paint it at the left of the given // box. @@ -141,7 +141,7 @@ void TitleBar::PaintTitle(vcl::RenderContext& rRenderContext, const Rectangle& r rRenderContext.Pop(); } -void TitleBar::PaintFocus(vcl::RenderContext& rRenderContext, const Rectangle& rFocusBox) +void TitleBar::PaintFocus(vcl::RenderContext& rRenderContext, const tools::Rectangle& rFocusBox) { rRenderContext.Push(PushFlags::FONT | PushFlags::TEXTCOLOR); @@ -149,9 +149,9 @@ void TitleBar::PaintFocus(vcl::RenderContext& rRenderContext, const Rectangle& r aFont.SetWeight(WEIGHT_BOLD); rRenderContext.SetFont(aFont); - const Rectangle aTextBox(rRenderContext.GetTextRect(rFocusBox, msTitle, DrawTextFlags::Left | DrawTextFlags::VCenter)); + const tools::Rectangle aTextBox(rRenderContext.GetTextRect(rFocusBox, msTitle, DrawTextFlags::Left | DrawTextFlags::VCenter)); - const Rectangle aLargerTextBox(aTextBox.Left() - 2, + const tools::Rectangle aLargerTextBox(aTextBox.Left() - 2, aTextBox.Top() - 2, aTextBox.Right() + 2, aTextBox.Bottom() + 2); diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx index db33fb780cb7..5d1cf9c460bd 100644 --- a/sfx2/source/statbar/stbitem.cxx +++ b/sfx2/source/statbar/stbitem.cxx @@ -360,7 +360,7 @@ void SAL_CALL SfxStatusBarControl::paint( OutputDevice* pOutDev = VCLUnoHelper::GetOutputDevice( xGraphics ); if ( pOutDev ) { - ::Rectangle aRect = VCLRectangle( rOutputRectangle ); + ::tools::Rectangle aRect = VCLRectangle( rOutputRectangle ); UserDrawEvent aUserDrawEvent(nullptr, pOutDev, aRect, pBar->GetCurItemId(), static_cast<sal_uInt16>(nStyle)); Paint( aUserDrawEvent ); } diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index c9872924cb58..cda50d95dab9 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -677,11 +677,11 @@ void SfxFrame::SetToolSpaceBorderPixel_Impl( const SvBorder& rBorder ) } } -Rectangle SfxFrame::GetTopOuterRectPixel_Impl() const +tools::Rectangle SfxFrame::GetTopOuterRectPixel_Impl() const { Size aSize( GetWindow().GetOutputSizePixel() ); Point aPoint; - return ( Rectangle ( aPoint, aSize ) ); + return ( tools::Rectangle ( aPoint, aSize ) ); } SfxWorkWindow* SfxFrame::GetWorkWindow_Impl() const diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index f35b41aa379c..9fe365663211 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -100,7 +100,7 @@ class SfxInPlaceClient_Impl : public ::cppu::WeakImplHelper< embed::XEmbeddedCli { public: Timer m_aTimer; // activation timeout, starts after object connection - Rectangle m_aObjArea; // area of object in coordinate system of the container (without scaling) + tools::Rectangle m_aObjArea; // area of object in coordinate system of the container (without scaling) Fraction m_aScaleWidth; // scaling that was applied to the object when it was not active Fraction m_aScaleHeight; SfxInPlaceClient* m_pClient; @@ -390,7 +390,7 @@ awt::Rectangle SAL_CALL SfxInPlaceClient_Impl::getPlacement() throw uno::RuntimeException(); // apply scaling to object area and convert to pixels - Rectangle aRealObjArea( m_aObjArea ); + tools::Rectangle aRealObjArea( m_aObjArea ); aRealObjArea.SetSize( Size( Fraction( aRealObjArea.GetWidth() ) * m_aScaleWidth, Fraction( aRealObjArea.GetHeight() ) * m_aScaleHeight ) ); @@ -405,7 +405,7 @@ awt::Rectangle SAL_CALL SfxInPlaceClient_Impl::getClipRectangle() throw uno::RuntimeException(); // currently(?) same as placement - Rectangle aRealObjArea( m_aObjArea ); + tools::Rectangle aRealObjArea( m_aObjArea ); aRealObjArea.SetSize( Size( Fraction( aRealObjArea.GetWidth() ) * m_aScaleWidth, Fraction( aRealObjArea.GetHeight() ) * m_aScaleHeight ) ); @@ -438,14 +438,14 @@ void SAL_CALL SfxInPlaceClient_Impl::changedPlacement( const awt::Rectangle& aPo // check if the change is at least one pixel in size awt::Rectangle aOldRect = getPlacement(); - Rectangle aNewPixelRect = VCLRectangle( aPosRect ); - Rectangle aOldPixelRect = VCLRectangle( aOldRect ); + tools::Rectangle aNewPixelRect = VCLRectangle( aPosRect ); + tools::Rectangle aOldPixelRect = VCLRectangle( aOldRect ); if ( aOldPixelRect == aNewPixelRect ) // nothing has changed return; // new scaled object area - Rectangle aNewLogicRect = m_pClient->GetEditWin()->PixelToLogic( aNewPixelRect ); + tools::Rectangle aNewLogicRect = m_pClient->GetEditWin()->PixelToLogic( aNewPixelRect ); // all the size changes in this method should happen without scaling // SfxBooleanFlagGuard aGuard( m_bResizeNoScale, sal_True ); @@ -677,7 +677,7 @@ void SfxInPlaceClient::SetObject( const uno::Reference < embed::XEmbeddedObject } -bool SfxInPlaceClient::SetObjArea( const Rectangle& rArea ) +bool SfxInPlaceClient::SetObjArea( const tools::Rectangle& rArea ) { if( rArea != m_xImp->m_aObjArea ) { @@ -692,14 +692,14 @@ bool SfxInPlaceClient::SetObjArea( const Rectangle& rArea ) } -const Rectangle& SfxInPlaceClient::GetObjArea() const +const tools::Rectangle& SfxInPlaceClient::GetObjArea() const { return m_xImp->m_aObjArea; } -Rectangle SfxInPlaceClient::GetScaledObjArea() const +tools::Rectangle SfxInPlaceClient::GetScaledObjArea() const { - Rectangle aRealObjArea( m_xImp->m_aObjArea ); + tools::Rectangle aRealObjArea( m_xImp->m_aObjArea ); aRealObjArea.SetSize( Size( Fraction( aRealObjArea.GetWidth() ) * m_xImp->m_aScaleWidth, Fraction( aRealObjArea.GetHeight() ) * m_xImp->m_aScaleHeight ) ); return aRealObjArea; @@ -722,7 +722,7 @@ void SfxInPlaceClient::SetSizeScale( const Fraction & rScaleWidth, const Fractio } -void SfxInPlaceClient::SetObjAreaAndScale( const Rectangle& rArea, const Fraction& rScaleWidth, const Fraction& rScaleHeight ) +void SfxInPlaceClient::SetObjAreaAndScale( const tools::Rectangle& rArea, const Fraction& rScaleWidth, const Fraction& rScaleHeight ) { if( rArea != m_xImp->m_aObjArea || m_xImp->m_aScaleWidth != rScaleWidth || m_xImp->m_aScaleHeight != rScaleHeight ) { @@ -754,7 +754,7 @@ void SfxInPlaceClient::Invalidate() // TODO/LATER: do we need both? // the object area is provided in logical coordinates of the window but without scaling applied - Rectangle aRealObjArea( m_xImp->m_aObjArea ); + tools::Rectangle aRealObjArea( m_xImp->m_aObjArea ); aRealObjArea.SetSize( Size( Fraction( aRealObjArea.GetWidth() ) * m_xImp->m_aScaleWidth, Fraction( aRealObjArea.GetHeight() ) * m_xImp->m_aScaleHeight ) ); m_pEditWin->Invalidate( aRealObjArea ); @@ -903,7 +903,7 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb ) MapMode aClientMap( GetEditWin()->GetMapMode().GetMapUnit() ); Size aNewSize = GetEditWin()->LogicToLogic( Size( aSize.Width, aSize.Height ), &aObjectMap, &aClientMap ); - Rectangle aScaledArea = GetScaledObjArea(); + tools::Rectangle aScaledArea = GetScaledObjArea(); m_xImp->m_aObjArea.SetSize( aNewSize ); m_xImp->m_aScaleWidth = Fraction( aScaledArea.GetWidth(), aNewSize.Width() ); m_xImp->m_aScaleHeight = Fraction( aScaledArea.GetHeight(), aNewSize.Height() ); @@ -957,7 +957,7 @@ void SfxInPlaceClient::ObjectAreaChanged() // dummy implementation } -void SfxInPlaceClient::RequestNewObjectArea( Rectangle& ) +void SfxInPlaceClient::RequestNewObjectArea( tools::Rectangle& ) { // dummy implementation } diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index d2d06e7788ae..bb03b8ddf036 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -922,7 +922,7 @@ awt::Rectangle SAL_CALL SfxBaseController::queryBorderedArea( const awt::Rectang SolarMutexGuard aGuard; if ( m_pData->m_pViewShell ) { - Rectangle aTmpRect = VCLRectangle( aPreliminaryRectangle ); + tools::Rectangle aTmpRect = VCLRectangle( aPreliminaryRectangle ); m_pData->m_pViewShell->QueryObjAreaPixel( aTmpRect ); return AWTRectangle( aTmpRect ); } diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 28a77a83a8c1..dc3772038758 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1092,7 +1092,7 @@ void SfxViewFrame::SetBorderPixelImpl else { Point aPoint; - Rectangle aEditArea( aPoint, GetWindow().GetOutputSizePixel() ); + tools::Rectangle aEditArea( aPoint, GetWindow().GetOutputSizePixel() ); aEditArea.Left() += rBorder.Left(); aEditArea.Right() -= rBorder.Right(); aEditArea.Top() += rBorder.Top(); diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 86dd7a1c5ece..0ccc006926c3 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1583,12 +1583,12 @@ void SfxViewShell::DisconnectAllClients() } -void SfxViewShell::QueryObjAreaPixel( Rectangle& ) const +void SfxViewShell::QueryObjAreaPixel( tools::Rectangle& ) const { } -void SfxViewShell::VisAreaChanged(const Rectangle& /*rVisArea*/) +void SfxViewShell::VisAreaChanged(const tools::Rectangle& /*rVisArea*/) { SfxInPlaceClientList *pClients = pImpl->GetIPClientList_Impl(false); if ( !pClients ) @@ -1604,7 +1604,7 @@ void SfxViewShell::VisAreaChanged(const Rectangle& /*rVisArea*/) void SfxViewShell::CheckIPClient_Impl( - SfxInPlaceClient *const pIPClient, const Rectangle& rVisArea) + SfxInPlaceClient *const pIPClient, const tools::Rectangle& rVisArea) { if ( GetObjectShell()->IsInClose() ) return; |