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/HeaderFooterWin.cxx | |
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/HeaderFooterWin.cxx')
-rw-r--r-- | sw/source/uibase/docvw/HeaderFooterWin.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
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); |