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 /editeng/source/accessibility | |
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 'editeng/source/accessibility')
4 files changed, 22 insertions, 22 deletions
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index 11a212b02f41..993f906d5b05 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -544,10 +544,10 @@ namespace accessibility return GetTextForwarder().HaveImageBullet( GetParagraphIndex() ); } - Rectangle AccessibleEditableTextPara::LogicToPixel( const Rectangle& rRect, const MapMode& rMapMode, SvxViewForwarder& rForwarder ) + tools::Rectangle AccessibleEditableTextPara::LogicToPixel( const tools::Rectangle& rRect, const MapMode& rMapMode, SvxViewForwarder& rForwarder ) { // convert to screen coordinates - return Rectangle( rForwarder.LogicToPixel( rRect.TopLeft(), rMapMode ), + return tools::Rectangle( rForwarder.LogicToPixel( rRect.TopLeft(), rMapMode ), rForwarder.LogicToPixel( rRect.BottomRight(), rMapMode ) ); } @@ -1001,7 +1001,7 @@ namespace accessibility "AccessibleEditableTextPara::contains: index value overflow"); awt::Rectangle aTmpRect = getBounds(); - Rectangle aRect( Point(aTmpRect.X, aTmpRect.Y), Size(aTmpRect.Width, aTmpRect.Height) ); + tools::Rectangle aRect( Point(aTmpRect.X, aTmpRect.Y), Size(aTmpRect.Width, aTmpRect.Height) ); Point aPoint( aTmpPoint.X, aTmpPoint.Y ); return aRect.IsInside( aPoint ); @@ -1029,7 +1029,7 @@ namespace accessibility aBulletInfo.bVisible && aBulletInfo.nType == SVX_NUM_BITMAP ) { - Rectangle aRect = aBulletInfo.aBounds; + tools::Rectangle aRect = aBulletInfo.aBounds; if( aRect.IsInside( aLogPoint ) ) return getAccessibleChild(0); @@ -1048,10 +1048,10 @@ namespace accessibility "AccessibleEditableTextPara::getBounds: index value overflow"); SvxTextForwarder& rCacheTF = GetTextForwarder(); - Rectangle aRect = rCacheTF.GetParaBounds( GetParagraphIndex() ); + tools::Rectangle aRect = rCacheTF.GetParaBounds( GetParagraphIndex() ); // convert to screen coordinates - Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect, + tools::Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect, rCacheTF.GetMapMode(), GetViewForwarder() ); @@ -1311,10 +1311,10 @@ namespace accessibility CheckPosition( nIndex ); SvxTextForwarder& rCacheTF = GetTextForwarder(); - Rectangle aRect = rCacheTF.GetCharBounds(GetParagraphIndex(), nIndex); + tools::Rectangle aRect = rCacheTF.GetCharBounds(GetParagraphIndex(), nIndex); // convert to screen - Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect, + tools::Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect, rCacheTF.GetMapMode(), GetViewForwarder() ); // #109864# offset from parent (paragraph), but in screen @@ -1358,7 +1358,7 @@ namespace accessibility Point aLogPoint( GetViewForwarder().PixelToLogic( aPoint, rCacheTF.GetMapMode() ) ); // re-offset to parent (paragraph) - Rectangle aParaRect = rCacheTF.GetParaBounds( GetParagraphIndex() ); + tools::Rectangle aParaRect = rCacheTF.GetParaBounds( GetParagraphIndex() ); aLogPoint.Move( aParaRect.Left(), aParaRect.Top() ); if( rCacheTF.GetIndexAtPoint( aLogPoint, nPara, nIndex ) && @@ -1368,7 +1368,7 @@ namespace accessibility try { awt::Rectangle aRect1( getCharacterBounds(nIndex) ); - Rectangle aRect2( aRect1.X, aRect1.Y, + tools::Rectangle aRect2( aRect1.X, aRect1.Y, aRect1.Width + aRect1.X, aRect1.Height + aRect1.Y ); if( aRect2.IsInside( Point( rPoint.X, rPoint.Y ) ) ) return nIndex; diff --git a/editeng/source/accessibility/AccessibleImageBullet.cxx b/editeng/source/accessibility/AccessibleImageBullet.cxx index c287c5d6235d..4015d7e08e4d 100644 --- a/editeng/source/accessibility/AccessibleImageBullet.cxx +++ b/editeng/source/accessibility/AccessibleImageBullet.cxx @@ -219,7 +219,7 @@ namespace accessibility "AccessibleEditableTextPara::contains: index value overflow"); awt::Rectangle aTmpRect = getBounds(); - Rectangle aRect( Point(aTmpRect.X, aTmpRect.Y), Size(aTmpRect.Width, aTmpRect.Height) ); + tools::Rectangle aRect( Point(aTmpRect.X, aTmpRect.Y), Size(aTmpRect.Width, aTmpRect.Height) ); Point aPoint( rPoint.X, rPoint.Y ); return aRect.IsInside( aPoint ); @@ -242,19 +242,19 @@ namespace accessibility SvxTextForwarder& rCacheTF = GetTextForwarder(); EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( GetParagraphIndex() ); - Rectangle aParentRect = rCacheTF.GetParaBounds( GetParagraphIndex() ); + tools::Rectangle aParentRect = rCacheTF.GetParaBounds( GetParagraphIndex() ); if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND && aBulletInfo.bVisible && aBulletInfo.nType == SVX_NUM_BITMAP ) { - Rectangle aRect = aBulletInfo.aBounds; + tools::Rectangle aRect = aBulletInfo.aBounds; // subtract paragraph position (bullet pos is absolute in EditEngine/Outliner) aRect.Move( -aParentRect.Left(), -aParentRect.Top() ); // convert to screen coordinates - Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect, + tools::Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect, rCacheTF.GetMapMode(), GetViewForwarder() ); diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx index 6700b1402a43..c75af4633b90 100644 --- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx +++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx @@ -148,7 +148,7 @@ namespace accessibility bool CopyText( sal_Int32 nStartPara, sal_Int32 nStartIndex, sal_Int32 nEndPara, sal_Int32 nEndIndex ); - Rectangle GetParagraphBoundingBox() const; + tools::Rectangle GetParagraphBoundingBox() const; bool RemoveLineBreakCount( sal_Int32& rIndex ); private: @@ -367,13 +367,13 @@ namespace accessibility } } - Rectangle AccessibleStaticTextBase_Impl::GetParagraphBoundingBox() const + tools::Rectangle AccessibleStaticTextBase_Impl::GetParagraphBoundingBox() const { - Rectangle aRect; + tools::Rectangle aRect; if( mxTextParagraph.is() ) { awt::Rectangle aAwtRect = mxTextParagraph->getBounds(); - aRect = Rectangle( Point( aAwtRect.X, aAwtRect.Y ), Size( aAwtRect.Width, aAwtRect.Height ) ); + aRect = tools::Rectangle( Point( aAwtRect.X, aAwtRect.Y ), Size( aAwtRect.Width, aAwtRect.Height ) ); } else { @@ -962,7 +962,7 @@ namespace accessibility return ::comphelper::concatSequences( aRunAttrSeq, comphelper::containerToSequence(aDiffVec) ); } - Rectangle AccessibleStaticTextBase::GetParagraphBoundingBox() const + tools::Rectangle AccessibleStaticTextBase::GetParagraphBoundingBox() const { return mpImpl->GetParagraphBoundingBox(); } diff --git a/editeng/source/accessibility/AccessibleStringWrap.cxx b/editeng/source/accessibility/AccessibleStringWrap.cxx index f5589f703854..af55049458f0 100644 --- a/editeng/source/accessibility/AccessibleStringWrap.cxx +++ b/editeng/source/accessibility/AccessibleStringWrap.cxx @@ -36,7 +36,7 @@ AccessibleStringWrap::AccessibleStringWrap( OutputDevice& rDev, SvxFont& rFont, { } -void AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRect ) +void AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, tools::Rectangle& rRect ) { DBG_ASSERT(nIndex >= 0 && nIndex <= USHRT_MAX, "SvxAccessibleStringWrap::GetCharacterBounds: index value overflow"); @@ -65,7 +65,7 @@ void AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRec if( mrFont.IsVertical() ) { // #101701# Rotate to vertical - rRect = Rectangle( Point(-rRect.Top(), rRect.Left()), + rRect = tools::Rectangle( Point(-rRect.Top(), rRect.Left()), Point(-rRect.Bottom(), rRect.Right())); } } @@ -73,7 +73,7 @@ void AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRec sal_Int32 AccessibleStringWrap::GetIndexAtPoint( const Point& rPoint ) { // search for character bounding box containing given point - Rectangle aRect; + tools::Rectangle aRect; sal_Int32 i, nLen = maText.getLength(); for( i=0; i<nLen; ++i ) { |