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 /cui/source/tabpages | |
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 'cui/source/tabpages')
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 8 | ||||
-rw-r--r-- | cui/source/tabpages/grfpage.cxx | 6 | ||||
-rw-r--r-- | cui/source/tabpages/numfmt.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 8 | ||||
-rw-r--r-- | cui/source/tabpages/tabstpge.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/transfrm.cxx | 22 |
6 files changed, 25 insertions, 25 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index f781f0c7e715..23b9b4cba00b 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -157,7 +157,7 @@ public: void NotifyChange( const Bitmap* pBitmap ); protected: - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect ) override; virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; virtual void Resize() override; @@ -169,7 +169,7 @@ private: Bitmap* pBitmap; Point aDrawPos; Size aDrawSize; - Rectangle aDrawRect; + ::tools::Rectangle aDrawRect; sal_uInt8 nTransparency; }; @@ -282,11 +282,11 @@ void BackgroundPreviewImpl::recalcDrawPos() void BackgroundPreviewImpl::Resize() { Window::Resize(); - aDrawRect = Rectangle(Point(0,0), GetOutputSizePixel()); + aDrawRect = ::tools::Rectangle(Point(0,0), GetOutputSizePixel()); recalcDrawPos(); } -void BackgroundPreviewImpl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void BackgroundPreviewImpl::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); rRenderContext.SetBackground(Wallpaper(rStyleSettings.GetWindowColor())); diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 363c56af80c2..cd4bc8a97ba8 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -779,16 +779,16 @@ Size SvxCropExample::GetOptimalSize() const VCL_BUILDER_FACTORY_CONSTRUCTOR(SvxCropExample, 0) -void SvxCropExample::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxCropExample::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { Size aWinSize(rRenderContext.PixelToLogic(GetOutputSizePixel())); rRenderContext.SetLineColor(); rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor()); rRenderContext.SetRasterOp(RasterOp::OverPaint); - rRenderContext.DrawRect(Rectangle(Point(), aWinSize)); + rRenderContext.DrawRect(::tools::Rectangle(Point(), aWinSize)); rRenderContext.SetLineColor(Color(COL_WHITE)); - Rectangle aRect(Point((aWinSize.Width() - aFrameSize.Width())/2, + ::tools::Rectangle aRect(Point((aWinSize.Width() - aFrameSize.Width())/2, (aWinSize.Height() - aFrameSize.Height())/2), aFrameSize); aGrf.Draw(&rRenderContext, aRect.TopLeft(), aRect.GetSize()); diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 9b3e0e580892..d28fdbff8267 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -145,7 +145,7 @@ void SvxNumberPreview::NotifyChange( const OUString& rPrevStr, #* #************************************************************************/ -void SvxNumberPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxNumberPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { vcl::Font aDrawFont = rRenderContext.GetFont(); Size aSzWnd(GetOutputSizePixel()); diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 063e265ca04f..3da5e1033da7 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -2349,7 +2349,7 @@ SvxNumberingPreview::SvxNumberingPreview(vcl::Window* pParent, WinBits nWinBits) VCL_BUILDER_FACTORY_ARGS(SvxNumberingPreview, WB_BORDER) // paint preview of numeration -void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& /*rRect*/) { Size aSize(rRenderContext.PixelToLogic(GetOutputSizePixel())); @@ -2521,11 +2521,11 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectan nXStart = static_cast<sal_uInt16>(rFmt.GetIndentAt() / nWidthRelation); } - Rectangle aRect1(Point(nTextXPos, nYStart + nFontHeight / 2), Size(aSize.Width() / 2, 2)); + ::tools::Rectangle aRect1(Point(nTextXPos, nYStart + nFontHeight / 2), Size(aSize.Width() / 2, 2)); pVDev->SetFillColor(aBackColor); pVDev->DrawRect(aRect1); - Rectangle aRect2(Point(nXStart, nYStart + nLineHeight + nFontHeight / 2 ), Size(aSize.Width() / 2, 2)); + ::tools::Rectangle aRect2(Point(nXStart, nYStart + nLineHeight + nFontHeight / 2 ), Size(aSize.Width() / 2, 2)); pVDev->DrawRect(aRect2); nYStart += 2 * nLineHeight; } @@ -2616,7 +2616,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectan pVDev->SetFillColor( aLineColor ); pVDev->SetLineColor( aLineColor ); } - Rectangle aRect1(Point(nXStart + nTextOffset, nYStart + nTopOffset), Size(nWidth, nRectHeight)); + ::tools::Rectangle aRect1(Point(nXStart + nTextOffset, nYStart + nTopOffset), Size(nWidth, nRectHeight)); pVDev->DrawRect(aRect1); } } diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index f6f42f4312fd..25870806419f 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -54,7 +54,7 @@ public: virtual ~TabWin_Impl() override { disposeOnce(); } virtual void dispose() override { mpPage.clear(); vcl::Window::dispose(); } - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override; void SetTabulatorTabPage(SvxTabulatorTabPage* pPage) { mpPage = pPage; } void SetTabStyle(sal_uInt16 nStyle) {nTabStyle = nStyle; } @@ -79,7 +79,7 @@ void FillUpWithDefTabs_Impl( long nDefDist, SvxTabStopItem& rTabs ) } } -void TabWin_Impl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void TabWin_Impl::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { // Paint tabulators Point aPoint; diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index d8916301c142..e990af8fcd2e 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -228,7 +228,7 @@ void SvxAngleTabPage::Construct() } { // #i75273# - Rectangle aTempRect(pView->GetAllMarkedRect()); + ::tools::Rectangle aTempRect(pView->GetAllMarkedRect()); pView->GetSdrPageView()->LogicToPagePos(aTempRect); maRange = basegfx::B2DRange(aTempRect.Left(), aTempRect.Top(), aTempRect.Right(), aTempRect.Bottom()); } @@ -473,7 +473,7 @@ void SvxSlantTabPage::Construct() SetFieldUnit(*m_pMtrRadius, eDlgUnit, true); { // #i75273# - Rectangle aTempRect(pView->GetAllMarkedRect()); + ::tools::Rectangle aTempRect(pView->GetAllMarkedRect()); pView->GetSdrPageView()->LogicToPagePos(aTempRect); maRange = basegfx::B2DRange(aTempRect.Left(), aTempRect.Top(), aTempRect.Right(), aTempRect.Bottom()); } @@ -507,7 +507,7 @@ bool SvxSlantTabPage::FillItemSet(SfxItemSet* rAttrs) if( bModified ) { // set reference points - Rectangle aObjectRect(pView->GetAllMarkedRect()); + ::tools::Rectangle aObjectRect(pView->GetAllMarkedRect()); pView->GetSdrPageView()->LogicToPagePos(aObjectRect); Point aPt = aObjectRect.Center(); @@ -536,7 +536,7 @@ bool SvxSlantTabPage::FillItemSet(SfxItemSet* rAttrs) pModel->BegUndo(pUndo->GetComment()); EnhancedCustomShape2d aShape(pObj); - Rectangle aLogicRect = aShape.GetLogicRect(); + ::tools::Rectangle aLogicRect = aShape.GetLogicRect(); for (int i = 0; i < 2; ++i) { @@ -651,7 +651,7 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs) Point aMinPosition; aShape.GetHandlePosition(i, aMinPosition); - Rectangle aLogicRect = aShape.GetLogicRect(); + ::tools::Rectangle aLogicRect = aShape.GetLogicRect(); aInitialPosition.Move(-aLogicRect.Left(), -aLogicRect.Top()); aMaxPosition.Move(-aLogicRect.Left(), -aLogicRect.Top()); aMinPosition.Move(-aLogicRect.Left(), -aLogicRect.Top()); @@ -697,7 +697,7 @@ void SvxSlantTabPage::ActivatePage( const SfxItemSet& rSet ) if( SfxItemState::SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , false, reinterpret_cast<SfxPoolItem const **>(&pRectItem) ) ) { - const Rectangle aTempRect(pRectItem->GetValue()); + const ::tools::Rectangle aTempRect(pRectItem->GetValue()); maRange = basegfx::B2DRange(aTempRect.Left(), aTempRect.Top(), aTempRect.Right(), aTempRect.Bottom()); } } @@ -829,13 +829,13 @@ void SvxPositionSizeTabPage::Construct() } { // #i75273# - Rectangle aTempRect(mpView->GetAllMarkedRect()); + ::tools::Rectangle aTempRect(mpView->GetAllMarkedRect()); mpView->GetSdrPageView()->LogicToPagePos(aTempRect); maRange = basegfx::B2DRange(aTempRect.Left(), aTempRect.Top(), aTempRect.Right(), aTempRect.Bottom()); } { // #i75273# - Rectangle aTempRect(mpView->GetWorkArea()); + ::tools::Rectangle aTempRect(mpView->GetWorkArea()); mpView->GetSdrPageView()->LogicToPagePos(aTempRect); maWorkRange = basegfx::B2DRange(aTempRect.Left(), aTempRect.Top(), aTempRect.Right(), aTempRect.Bottom()); } @@ -930,7 +930,7 @@ bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet* rOutAttrs ) double fY((GetCoreValue( *m_pMtrPosY, mePoolUnit ) + maAnchor.getY()) * fUIScale); { // #i75273# - Rectangle aTempRect(mpView->GetAllMarkedRect()); + ::tools::Rectangle aTempRect(mpView->GetAllMarkedRect()); mpView->GetSdrPageView()->LogicToPagePos(aTempRect); maRange = basegfx::B2DRange(aTempRect.Left(), aTempRect.Top(), aTempRect.Right(), aTempRect.Bottom()); } @@ -1149,7 +1149,7 @@ void SvxPositionSizeTabPage::ActivatePage( const SfxItemSet& rSet ) if( SfxItemState::SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , false, reinterpret_cast<SfxPoolItem const **>(&pRectItem) ) ) { { // #i75273# - const Rectangle aTempRect(pRectItem->GetValue()); + const ::tools::Rectangle aTempRect(pRectItem->GetValue()); maRange = basegfx::B2DRange(aTempRect.Left(), aTempRect.Top(), aTempRect.Right(), aTempRect.Bottom()); } @@ -1166,7 +1166,7 @@ DeactivateRC SvxPositionSizeTabPage::DeactivatePage( SfxItemSet* _pSet ) double fY((double)m_pMtrPosY->GetValue()); GetTopLeftPosition(fX, fY, maRange); - const Rectangle aOutRectangle( + const ::tools::Rectangle aOutRectangle( basegfx::fround(fX), basegfx::fround(fY), basegfx::fround(fX + maRange.getWidth()), basegfx::fround(fY + maRange.getHeight())); _pSet->Put(SfxRectangleItem(SID_ATTR_TRANSFORM_INTERN, aOutRectangle)); |