summaryrefslogtreecommitdiff
path: root/vcl/source/window/menubarwindow.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-03-30 20:27:55 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-03-31 06:27:11 +0000
commita5a571307fb3306b74ab46b085cde6388270a770 (patch)
tree66d4ce12bb5236c50ab6a5d253bc8c6d8b5d292d /vcl/source/window/menubarwindow.cxx
parent17d821af6bb9df93569836a92f6bed975587fc6c (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 'vcl/source/window/menubarwindow.cxx')
-rw-r--r--vcl/source/window/menubarwindow.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 876edcdc51d7..e1f50c0b5632 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -102,8 +102,8 @@ void DecoToolBox::SetImages( long nMaxHeight, bool bForce )
aBmpExDst.Erase( aEraseColor );
aBmpExDst.SetSizePixel( Size( lastSize, lastSize ) );
- Rectangle aSrcRect( Point(0,0), maImage.GetSizePixel() );
- Rectangle aDestRect( Point((lastSize - maImage.GetSizePixel().Width())/2,
+ tools::Rectangle aSrcRect( Point(0,0), maImage.GetSizePixel() );
+ tools::Rectangle aDestRect( Point((lastSize - maImage.GetSizePixel().Width())/2,
(lastSize - maImage.GetSizePixel().Height())/2 ),
maImage.GetSizePixel() );
@@ -320,7 +320,7 @@ void MenuBarWindow::ImplCreatePopup( bool bPreSelectFirst )
// #99071# do not grab the focus, otherwise it will be restored to the menubar
// when the frame is reactivated later
//GrabFocus();
- pActivePopup->ImplExecute( this, Rectangle( aItemTopLeft, aItemBottomRight ), FloatWinPopupFlags::Down | FloatWinPopupFlags::NoHorzPlacement, pMenu, bPreSelectFirst );
+ pActivePopup->ImplExecute( this, tools::Rectangle( aItemTopLeft, aItemBottomRight ), FloatWinPopupFlags::Down | FloatWinPopupFlags::NoHorzPlacement, pMenu, bPreSelectFirst );
// does not have a window, if aborted before or if there are no entries
if ( pActivePopup->ImplGetFloatingWindow() )
pActivePopup->ImplGetFloatingWindow()->AddPopupModeWindow( this );
@@ -569,7 +569,7 @@ static void ImplAddNWFSeparator(vcl::RenderContext& rRenderContext, const Size&
rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetSeparatorColor());
Point aPt;
- Rectangle aRect(aPt, rSize);
+ tools::Rectangle aRect(aPt, rSize);
rRenderContext.DrawLine(aRect.BottomLeft(), aRect.BottomRight());
}
}
@@ -589,7 +589,7 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16
if (pData->eType != MenuItemType::SEPARATOR)
{
// #107747# give menuitems the height of the menubar
- Rectangle aRect = Rectangle(Point(nX, 1), Size(pData->aSz.Width(), GetOutputSizePixel().Height() - 2));
+ tools::Rectangle aRect = tools::Rectangle(Point(nX, 1), Size(pData->aSz.Width(), GetOutputSizePixel().Height() - 2));
rRenderContext.Push(PushFlags::CLIPREGION);
rRenderContext.IntersectClipRegion(aRect);
bool bRollover, bHighlight;
@@ -614,7 +614,7 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16
Erase(rRenderContext);
else
{
- Rectangle aBgRegion(Point(), GetOutputSizePixel());
+ tools::Rectangle aBgRegion(Point(), GetOutputSizePixel());
rRenderContext.DrawNativeControl(ControlType::Menubar, ControlPart::Entire, aBgRegion,
ControlState::ENABLED, aControlValue, OUString());
}
@@ -649,9 +649,9 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16
}
}
-Rectangle MenuBarWindow::ImplGetItemRect( sal_uInt16 nPos )
+tools::Rectangle MenuBarWindow::ImplGetItemRect( sal_uInt16 nPos )
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if( pMenu )
{
long nX = 0;
@@ -663,7 +663,7 @@ Rectangle MenuBarWindow::ImplGetItemRect( sal_uInt16 nPos )
{
if ( pData->eType != MenuItemType::SEPARATOR )
// #107747# give menuitems the height of the menubar
- aRect = Rectangle( Point( nX, 1 ), Size( pData->aSz.Width(), GetOutputSizePixel().Height()-2 ) );
+ aRect = tools::Rectangle( Point( nX, 1 ), Size( pData->aSz.Width(), GetOutputSizePixel().Height()-2 ) );
break;
}
@@ -848,7 +848,7 @@ bool MenuBarWindow::HandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu )
return bDone;
}
-void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
if (!pMenu)
return;
@@ -872,7 +872,7 @@ void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
else
{
Point aPt;
- Rectangle aCtrlRegion( aPt, GetOutputSizePixel() );
+ tools::Rectangle aCtrlRegion( aPt, GetOutputSizePixel() );
rRenderContext.DrawNativeControl(ControlType::Menubar, ControlPart::Entire, aCtrlRegion,
ControlState::ENABLED, aMenubarValue, OUString());
@@ -963,7 +963,7 @@ void MenuBarWindow::RequestHelp( const HelpEvent& rHEvt )
if ( rHEvt.GetMode() & (HelpEventMode::CONTEXT | HelpEventMode::EXTENDED) )
ChangeHighlightItem( ITEMPOS_INVALID, true );
- Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) );
+ tools::Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) );
if( !ImplHandleHelpEvent( this, pMenu, nId, rHEvt, aHighlightRect ) )
Window::RequestHelp( rHEvt );
}
@@ -1143,18 +1143,18 @@ void MenuBarWindow::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link<Men
it->second.m_aHighlightLink = rLink;
}
-Rectangle MenuBarWindow::GetMenuBarButtonRectPixel( sal_uInt16 nId )
+tools::Rectangle MenuBarWindow::GetMenuBarButtonRectPixel( sal_uInt16 nId )
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if( m_aAddButtons.find( nId ) != m_aAddButtons.end() )
{
if( pMenu->mpSalMenu )
{
aRect = pMenu->mpSalMenu->GetMenuBarButtonRectPixel( nId, ImplGetWindowImpl()->mpFrame );
- if( aRect == Rectangle( Point( -1, -1 ), Size( 1, 1 ) ) )
+ if( aRect == tools::Rectangle( Point( -1, -1 ), Size( 1, 1 ) ) )
{
// system menu button is somewhere but location cannot be determined
- return Rectangle();
+ return tools::Rectangle();
}
}