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/dialogs/hangulhanjadlg.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 'cui/source/dialogs/hangulhanjadlg.cxx')
-rw-r--r-- | cui/source/dialogs/hangulhanjadlg.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 9b4eb01f2b61..fb766aba1653 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -101,8 +101,8 @@ namespace svx const OUString& getSecondaryText() const { return m_sSecondaryText; } public: - void Paint( OutputDevice& _rDevice, const Rectangle& _rRect, DrawTextFlags _nTextStyle, - Rectangle* _pPrimaryLocation, Rectangle* _pSecondaryLocation ); + void Paint( OutputDevice& _rDevice, const ::tools::Rectangle& _rRect, DrawTextFlags _nTextStyle, + ::tools::Rectangle* _pPrimaryLocation, ::tools::Rectangle* _pSecondaryLocation ); }; PseudoRubyText::PseudoRubyText() @@ -118,8 +118,8 @@ namespace svx } - void PseudoRubyText::Paint(vcl::RenderContext& rRenderContext, const Rectangle& _rRect, DrawTextFlags _nTextStyle, - Rectangle* _pPrimaryLocation, Rectangle* _pSecondaryLocation ) + void PseudoRubyText::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& _rRect, DrawTextFlags _nTextStyle, + ::tools::Rectangle* _pPrimaryLocation, ::tools::Rectangle* _pSecondaryLocation ) { Size aPlaygroundSize(_rRect.GetSize()); @@ -129,8 +129,8 @@ namespace svx aSmallerFont.SetFontHeight( (long)( 0.8 * aSmallerFont.GetFontHeight() ) ); // let's calculate the size of our two texts - Rectangle aPrimaryRect = rRenderContext.GetTextRect( _rRect, m_sPrimaryText, _nTextStyle ); - Rectangle aSecondaryRect; + ::tools::Rectangle aPrimaryRect = rRenderContext.GetTextRect( _rRect, m_sPrimaryText, _nTextStyle ); + ::tools::Rectangle aSecondaryRect; { FontSwitch aFontRestore(rRenderContext, aSmallerFont); aSecondaryRect = rRenderContext.GetTextRect(_rRect, m_sSecondaryText, _nTextStyle); @@ -212,7 +212,7 @@ namespace svx virtual Size GetOptimalSize() const override; protected: - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& _rRect ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& _rRect ) override; private: PseudoRubyText m_aRubyText; @@ -229,7 +229,7 @@ namespace svx } - void RubyRadioButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) + void RubyRadioButton::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { HideFocus(); @@ -239,10 +239,10 @@ namespace svx aImageSize.Width() = CalcZoom( aImageSize.Width() ) + 2; // + 2 because otherwise the radiobuttons aImageSize.Height() = CalcZoom( aImageSize.Height() ) + 2; // appear a bit cut from right and top. - Rectangle aOverallRect( Point( 0, 0 ), GetOutputSizePixel() ); + ::tools::Rectangle aOverallRect( Point( 0, 0 ), GetOutputSizePixel() ); aOverallRect.Left() += aImageSize.Width() + 4; // 4 is the separator between the image and the text // inflate the rect a little bit (because the VCL radio button does the same) - Rectangle aTextRect( aOverallRect ); + ::tools::Rectangle aTextRect( aOverallRect ); ++aTextRect.Left(); --aTextRect.Right(); ++aTextRect.Top(); --aTextRect.Bottom(); @@ -269,19 +269,19 @@ namespace svx nTextStyle |= DrawTextFlags::Mnemonic; // paint the ruby text - Rectangle aPrimaryTextLocation; - Rectangle aSecondaryTextLocation; + ::tools::Rectangle aPrimaryTextLocation; + ::tools::Rectangle aSecondaryTextLocation; m_aRubyText.Paint(rRenderContext, aTextRect, nTextStyle, &aPrimaryTextLocation, &aSecondaryTextLocation); // the focus rectangle is to be painted around both texts - Rectangle aCombinedRect(aPrimaryTextLocation); + ::tools::Rectangle aCombinedRect(aPrimaryTextLocation); aCombinedRect.Union(aSecondaryTextLocation); SetFocusRect(aCombinedRect); // let the base class paint the radio button // for this, give it the proper location to paint the image (vertically centered, relative to our text) - Rectangle aImageLocation( Point( 0, 0 ), aImageSize ); + ::tools::Rectangle aImageLocation( Point( 0, 0 ), aImageSize ); sal_Int32 nTextHeight = aSecondaryTextLocation.Bottom() - aPrimaryTextLocation.Top(); aImageLocation.Top() = aPrimaryTextLocation.Top() + ( nTextHeight - aImageSize.Height() ) / 2; aImageLocation.Bottom() = aImageLocation.Top() + aImageSize.Height(); @@ -306,7 +306,7 @@ namespace svx { vcl::Font aSmallerFont( GetFont() ); aSmallerFont.SetFontHeight( static_cast<long>( 0.8 * aSmallerFont.GetFontHeight() ) ); - Rectangle rect( Point(), Size( SAL_MAX_INT32, SAL_MAX_INT32 ) ); + ::tools::Rectangle rect( Point(), Size( SAL_MAX_INT32, SAL_MAX_INT32 ) ); Size aPrimarySize = GetTextRect( rect, m_aRubyText.getPrimaryText() ).GetSize(); Size aSecondarySize; @@ -343,7 +343,7 @@ namespace svx void SuggestionSet::UserDraw( const UserDrawEvent& rUDEvt ) { vcl::RenderContext* pDev = rUDEvt.GetRenderContext(); - Rectangle aRect = rUDEvt.GetRect(); + ::tools::Rectangle aRect = rUDEvt.GetRect(); sal_uInt16 nItemId = rUDEvt.GetItemId(); OUString sText = *static_cast< OUString* >( GetItemData( nItemId ) ); |