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 /desktop/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 'desktop/source')
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 18 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_extlistbox.hxx | 6 | ||||
-rw-r--r-- | desktop/source/lib/init.cxx | 18 | ||||
-rw-r--r-- | desktop/source/splash/splash.cxx | 18 |
4 files changed, 30 insertions, 30 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 44fa43e614b6..2e8e8094932c 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -310,7 +310,7 @@ void ExtensionBox_Impl::CalcActiveHeight( const long nPos ) aText += "\n"; aText += m_vEntries[ nPos ]->m_sDescription; - Rectangle aRect = GetTextRect( Rectangle( Point(), aSize ), aText, + tools::Rectangle aRect = GetTextRect( tools::Rectangle( Point(), aSize ), aText, DrawTextFlags::MultiLine | DrawTextFlags::WordBreak ); aTextHeight += aRect.GetHeight(); @@ -323,7 +323,7 @@ void ExtensionBox_Impl::CalcActiveHeight( const long nPos ) m_nActiveHeight = aTextHeight + 2; } -Rectangle ExtensionBox_Impl::GetEntryRect( const long nPos ) const +tools::Rectangle ExtensionBox_Impl::GetEntryRect( const long nPos ) const { const ::osl::MutexGuard aGuard( m_entriesMutex ); @@ -341,7 +341,7 @@ Rectangle ExtensionBox_Impl::GetEntryRect( const long nPos ) const if ( m_bHasActive && ( nPos < m_nActive ) ) aPos.Y() += m_nActiveHeight - m_nStdHeight; - return Rectangle( aPos, aSize ); + return tools::Rectangle( aPos, aSize ); } @@ -419,7 +419,7 @@ void ExtensionBox_Impl::selectEntry( const long nPos ) } -void ExtensionBox_Impl::DrawRow(vcl::RenderContext& rRenderContext, const Rectangle& rRect, const TEntry_Impl& rEntry) +void ExtensionBox_Impl::DrawRow(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, const TEntry_Impl& rEntry) { const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); @@ -537,7 +537,7 @@ void ExtensionBox_Impl::DrawRow(vcl::RenderContext& rRenderContext, const Rectan if (rEntry->m_bHasButtons) nExtraHeight = m_nExtraHeight; - rRenderContext.DrawText(Rectangle(aPos.X(), aPos.Y(), rRect.Right(), rRect.Bottom() - nExtraHeight), + rRenderContext.DrawText(tools::Rectangle(aPos.X(), aPos.Y(), rRect.Right(), rRect.Bottom() - nExtraHeight), sDescription, DrawTextFlags::MultiLine | DrawTextFlags::WordBreak ); } else @@ -587,7 +587,7 @@ void ExtensionBox_Impl::RecalcAll() if ( m_bHasActive ) { - Rectangle aEntryRect = GetEntryRect( m_nActive ); + tools::Rectangle aEntryRect = GetEntryRect( m_nActive ); if ( m_bAdjustActive ) { @@ -674,7 +674,7 @@ bool ExtensionBox_Impl::HandleCursorKey( sal_uInt16 nKeyCode ) } -void ExtensionBox_Impl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rPaintRect*/) +void ExtensionBox_Impl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rPaintRect*/) { if ( !m_bInDelete ) DeleteRemoved(); @@ -694,7 +694,7 @@ void ExtensionBox_Impl::Paint(vcl::RenderContext& rRenderContext, const Rectangl for (ITER iIndex = m_vEntries.begin(); iIndex < m_vEntries.end(); ++iIndex) { aSize.Height() = (*iIndex)->m_bActive ? m_nActiveHeight : m_nStdHeight; - Rectangle aEntryRect( aStart, aSize ); + tools::Rectangle aEntryRect( aStart, aSize ); DrawRow(rRenderContext, aEntryRect, *iIndex); aStart.Y() += aSize.Height(); } @@ -1170,7 +1170,7 @@ void ExtensionBox_Impl::DoScroll( long nDelta ) m_nTopIndex += nDelta; Point aNewSBPt( m_pScrollBar->GetPosPixel() ); - Rectangle aScrRect( Point(), GetOutputSizePixel() ); + tools::Rectangle aScrRect( Point(), GetOutputSizePixel() ); aScrRect.Right() -= m_pScrollBar->GetSizePixel().Width(); Scroll( 0, -nDelta, aScrRect ); diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx index 1f60db9e7cfa..0f61526cb97a 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx @@ -153,7 +153,7 @@ class ExtensionBox_Impl : public ::svt::IExtensionListBox void CalcActiveHeight( const long nPos ); long GetTotalHeight() const; void SetupScrollBar(); - void DrawRow(vcl::RenderContext& rRenderContext, const Rectangle& rRect, const TEntry_Impl& rEntry); + void DrawRow(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, const TEntry_Impl& rEntry); bool HandleCursorKey( sal_uInt16 nKeyCode ); bool FindEntryPos( const TEntry_Impl& rEntry, long nStart, long nEnd, long &nFound ); void DeleteRemoved(); @@ -168,14 +168,14 @@ public: virtual void dispose() override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle &rPaintRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle &rPaintRect ) override; virtual void Resize() override; virtual bool EventNotify( NotifyEvent& rNEvt ) override; virtual Size GetOptimalSize() const override; TEntry_Impl GetEntryData( long nPos ) { return m_vEntries[ nPos ]; } long GetEntryCount() { return (long) m_vEntries.size(); } - Rectangle GetEntryRect( const long nPos ) const; + tools::Rectangle GetEntryRect( const long nPos ) const; bool HasActive() { return m_bHasActive; } long PointToPos( const Point& rPos ); void DoScroll( long nDelta ); diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 1a01253e70fe..e7aa186873f0 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -346,7 +346,7 @@ namespace { /// Represents an invalidated rectangle inside a given document part. struct RectangleAndPart { - Rectangle m_aRectangle; + tools::Rectangle m_aRectangle; int m_nPart; RectangleAndPart() @@ -382,7 +382,7 @@ struct RectangleAndPart RectangleAndPart aRet; if (rPayload.compare(0, 5, "EMPTY") == 0) // payload starts with "EMPTY" { - aRet.m_aRectangle = Rectangle(0, 0, SfxLokHelper::MaxTwips, SfxLokHelper::MaxTwips); + aRet.m_aRectangle = tools::Rectangle(0, 0, SfxLokHelper::MaxTwips, SfxLokHelper::MaxTwips); if (comphelper::LibreOfficeKit::isPartInInvalidation()) aRet.m_nPart = std::stol(rPayload.substr(6)); @@ -420,7 +420,7 @@ struct RectangleAndPart if (nWidth > 0 && nHeight > 0) { - aRet.m_aRectangle = Rectangle(nLeft, nTop, nLeft + nWidth, nTop + nHeight); + aRet.m_aRectangle = tools::Rectangle(nLeft, nTop, nLeft + nWidth, nTop + nHeight); } } // else leave empty rect. @@ -940,7 +940,7 @@ void CallbackFlushHandler::queue(const int type, const char* data) } else { - const Rectangle rcOverlap = rcNew.m_aRectangle.GetIntersection(rcOld.m_aRectangle); + const tools::Rectangle rcOverlap = rcNew.m_aRectangle.GetIntersection(rcOld.m_aRectangle); const bool bOverlap = !rcOverlap.IsEmpty(); SAL_WARN("lok", "Merging " << rcNew.toString() << " & " << rcOld.toString() << " => " << rcOverlap.toString() << " Overlap: " << bOverlap); @@ -1846,7 +1846,7 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, if (bDebug) { // Draw a small red rectangle in the top left corner so that it's easy to see where a new tile begins. - Rectangle aRect(0, 0, 5, 5); + tools::Rectangle aRect(0, 0, 5, 5); aRect = pDevice->PixelToLogic(aRect); pDevice->Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR); pDevice->SetFillColor(COL_LIGHTRED); @@ -2675,7 +2675,7 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo return nullptr; } - Rectangle aRectangle; + tools::Rectangle aRectangle; if (aCommand.getLength() > aViewRowColumnHeaders.getLength()) { // Command has parameters. @@ -2710,7 +2710,7 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo nHeight = aValue.toInt32(); } while (nParamIndex >= 0); - aRectangle = Rectangle(nX, nY, nX + nWidth, nY + nHeight); + aRectangle = tools::Rectangle(nX, nY, nX + nWidth, nY + nHeight); } OUString aHeaders = pDoc->getRowColumnHeaders(aRectangle); @@ -2808,7 +2808,7 @@ static void doc_setClientVisibleArea(LibreOfficeKitDocument* pThis, int nX, int return; } - Rectangle aRectangle(Point(nX, nY), Size(nWidth, nHeight)); + tools::Rectangle aRectangle(Point(nX, nY), Size(nWidth, nHeight)); pDoc->setClientVisibleArea(aRectangle); } @@ -2885,7 +2885,7 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/, auto aDevice( VclPtr<VirtualDevice>::Create( nullptr, Size(1, 1), DeviceFormat::DEFAULT)); - ::Rectangle aRect; + ::tools::Rectangle aRect; vcl::Font aFont(rFontMetric); aFont.SetFontSize(Size(0, 25)); aDevice->SetFont(aFont); diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx index 7b3bb7930ac6..74d1d56fe42a 100644 --- a/desktop/source/splash/splash.cxx +++ b/desktop/source/splash/splash.cxx @@ -58,7 +58,7 @@ public: virtual ~SplashScreenWindow() override { disposeOnce(); } virtual void dispose() override; // workwindow - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; void Redraw(); }; @@ -142,7 +142,7 @@ void SplashScreenWindow::Redraw() Invalidate(); // Trigger direct painting too - otherwise the splash screen won't be // shown in some cases (when the idle timer won't be hit). - Paint(*this, Rectangle()); + Paint(*this, tools::Rectangle()); Flush(); } @@ -473,7 +473,7 @@ void SplashScreen::SetScreenBitmap(BitmapEx &rBitmap) if ( nCount > 0 ) { // retrieve size from first screen - Rectangle aScreenArea = Application::GetScreenPosSizePixel((unsigned int)0); + tools::Rectangle aScreenArea = Application::GetScreenPosSizePixel((unsigned int)0); nWidth = aScreenArea.GetWidth(); nHeight = aScreenArea.GetHeight(); } @@ -516,7 +516,7 @@ void SplashScreen::determineProgressRatioValues( if ( nCount > 0 ) { // retrieve size from first screen - Rectangle aScreenArea = Application::GetScreenPosSizePixel((unsigned int)0); + tools::Rectangle aScreenArea = Application::GetScreenPosSizePixel((unsigned int)0); nWidth = aScreenArea.GetWidth(); nHeight = aScreenArea.GetHeight(); nScreenRatio = nHeight ? sal_Int32( rtl::math::round( double( nWidth ) / double( nHeight ), 2 ) * 100 ) : 0; @@ -574,7 +574,7 @@ void SplashScreen::determineProgressRatioValues( } } -void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { if (!pSpl || !pSpl->_bVisible) return; @@ -586,8 +586,8 @@ void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const Rectang rRenderContext.DrawBitmapEx(Point(), pSpl->_aIntroBmp); ImplControlValue aValue( pSpl->_iProgress * pSpl->_barwidth / pSpl->_iMax); - Rectangle aDrawRect( Point(pSpl->_tlx, pSpl->_tly), Size( pSpl->_barwidth, pSpl->_barheight)); - Rectangle aNativeControlRegion, aNativeContentRegion; + tools::Rectangle aDrawRect( Point(pSpl->_tlx, pSpl->_tly), Size( pSpl->_barwidth, pSpl->_barheight)); + tools::Rectangle aNativeControlRegion, aNativeContentRegion; if (rRenderContext.GetNativeControlRegion(ControlType::IntroProgress, ControlPart::Entire, aDrawRect, ControlState::ENABLED, aValue, OUString(), @@ -617,10 +617,10 @@ void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const Rectang // border _vdev->SetFillColor(); _vdev->SetLineColor( pSpl->_cProgressFrameColor ); - _vdev->DrawRect(Rectangle(pSpl->_tlx, pSpl->_tly, pSpl->_tlx+pSpl->_barwidth, pSpl->_tly+pSpl->_barheight)); + _vdev->DrawRect(tools::Rectangle(pSpl->_tlx, pSpl->_tly, pSpl->_tlx+pSpl->_barwidth, pSpl->_tly+pSpl->_barheight)); _vdev->SetFillColor( pSpl->_cProgressBarColor ); _vdev->SetLineColor(); - _vdev->DrawRect(Rectangle(pSpl->_tlx+pSpl->_barspace, pSpl->_tly+pSpl->_barspace, pSpl->_tlx+pSpl->_barspace+length, pSpl->_tly+pSpl->_barheight-pSpl->_barspace)); + _vdev->DrawRect(tools::Rectangle(pSpl->_tlx+pSpl->_barspace, pSpl->_tly+pSpl->_barspace, pSpl->_tlx+pSpl->_barspace+length, pSpl->_tly+pSpl->_barheight-pSpl->_barspace)); vcl::Font aFont; aFont.SetFontSize(Size(0, 12)); aFont.SetAlignment(ALIGN_BASELINE); |