summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-10 13:34:35 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-11-11 06:17:36 +0000
commita52f29216d2a70ea4a0a0347d71273cdbf8830e3 (patch)
tree3884a4aedca33777c43a18b40313ab125b1b4c30 /vcl/source
parentb7c4c78a097f76314982d8c1a9f2e58df95080a1 (diff)
fdo#84938: replace HELPMODE_ constants with enum
Change-Id: I44be5567e84cdabd8b10771ea37e28b8a88cc23e Reviewed-on: https://gerrit.libreoffice.org/12333 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/dbggui.cxx2
-rw-r--r--vcl/source/control/button.cxx2
-rw-r--r--vcl/source/control/tabctrl.cxx10
-rw-r--r--vcl/source/window/brdwin.cxx4
-rw-r--r--vcl/source/window/menubarwindow.cxx2
-rw-r--r--vcl/source/window/menufloatingwindow.cxx2
-rw-r--r--vcl/source/window/menuwindow.cxx6
-rw-r--r--vcl/source/window/splitwin.cxx4
-rw-r--r--vcl/source/window/status.cxx6
-rw-r--r--vcl/source/window/toolbox.cxx6
-rw-r--r--vcl/source/window/window.cxx4
-rw-r--r--vcl/source/window/winproc.cxx12
12 files changed, 30 insertions, 30 deletions
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index 90b5280d03a7..1e2270f07ed9 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -362,7 +362,7 @@ IMPL_LINK( DbgDialog, ClickHdl, Button*, pButton )
void DbgDialog::RequestHelp( const HelpEvent& rHEvt )
{
- if ( rHEvt.GetMode() & HELPMODE_CONTEXT )
+ if ( rHEvt.GetMode() & HelpEventMode::CONTEXT )
{
DbgInfoDialog aInfoDialog( this, true );
OUString aHelpText;
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index e39c00d8a795..8712c22a14fe 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1815,7 +1815,7 @@ void HelpButton::Click()
if ( !pFocusWin )
pFocusWin = this;
- HelpEvent aEvt( pFocusWin->GetPointerPosPixel(), HELPMODE_CONTEXT );
+ HelpEvent aEvt( pFocusWin->GetPointerPosPixel(), HelpEventMode::CONTEXT );
pFocusWin->RequestHelp( aEvt );
}
PushButton::Click();
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 8c58442ba063..2fb87dc3948f 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -1348,7 +1348,7 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt )
if ( nItemId )
{
- if ( rHEvt.GetMode() & HELPMODE_BALLOON )
+ if ( rHEvt.GetMode() & HelpEventMode::BALLOON )
{
OUString aStr = GetHelpText( nItemId );
if ( !aStr.isEmpty() )
@@ -1364,7 +1364,7 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt )
return;
}
}
- else if ( rHEvt.GetMode() & HELPMODE_EXTENDED )
+ else if ( rHEvt.GetMode() & HelpEventMode::EXTENDED )
{
OUString aHelpId( OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) );
if ( !aHelpId.isEmpty() )
@@ -1378,7 +1378,7 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt )
}
// for Quick or Ballon Help, we show the text, if it is cut
- if ( rHEvt.GetMode() & (HELPMODE_QUICK | HELPMODE_BALLOON) )
+ if ( rHEvt.GetMode() & (HelpEventMode::QUICK | HelpEventMode::BALLOON) )
{
ImplTabItem* pItem = ImplGetItem( nItemId );
const OUString& rStr = pItem->maText;
@@ -1393,7 +1393,7 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt )
aItemRect.Bottom() = aPt.Y();
if ( !rStr.isEmpty() )
{
- if ( rHEvt.GetMode() & HELPMODE_BALLOON )
+ if ( rHEvt.GetMode() & HelpEventMode::BALLOON )
Help::ShowBalloon( this, aItemRect.Center(), aItemRect, rStr );
else
Help::ShowQuickHelp( this, aItemRect, rStr );
@@ -1402,7 +1402,7 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt )
}
}
- if ( rHEvt.GetMode() & HELPMODE_QUICK )
+ if ( rHEvt.GetMode() & HelpEventMode::QUICK )
{
ImplTabItem* pItem = ImplGetItem( nItemId );
const OUString& rHelpText = pItem->maHelpText;
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 182302dd6679..e861af551129 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1892,7 +1892,7 @@ void ImplBorderWindow::Deactivate()
void ImplBorderWindow::RequestHelp( const HelpEvent& rHEvt )
{
// no keyboard help for border window
- if ( rHEvt.GetMode() & (HELPMODE_BALLOON | HELPMODE_QUICK) && !rHEvt.KeyboardActivated() )
+ if ( rHEvt.GetMode() & (HelpEventMode::BALLOON | HelpEventMode::QUICK) && !rHEvt.KeyboardActivated() )
{
Point aMousePosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
Rectangle aHelpRect;
@@ -1902,7 +1902,7 @@ void ImplBorderWindow::RequestHelp( const HelpEvent& rHEvt )
if ( !aHelpStr.isEmpty() )
{
aHelpRect.SetPos( OutputToScreenPixel( aHelpRect.TopLeft() ) );
- if ( rHEvt.GetMode() & HELPMODE_BALLOON )
+ if ( rHEvt.GetMode() & HelpEventMode::BALLOON )
Help::ShowBalloon( this, aHelpRect.Center(), aHelpRect, aHelpStr );
else
Help::ShowQuickHelp( this, aHelpRect, aHelpStr );
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index ebbfeecc6881..d878ea12758a 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -967,7 +967,7 @@ sal_uInt16 MenuBarWindow::ImplFindEntry( const Point& rMousePos ) const
void MenuBarWindow::RequestHelp( const HelpEvent& rHEvt )
{
sal_uInt16 nId = nHighlightedItem;
- if ( rHEvt.GetMode() & (HELPMODE_CONTEXT | HELPMODE_EXTENDED) )
+ if ( rHEvt.GetMode() & (HelpEventMode::CONTEXT | HelpEventMode::EXTENDED) )
ChangeHighlightItem( ITEMPOS_INVALID, true );
Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) );
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index c83eddebf577..3a4904c4a8ff 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -1144,7 +1144,7 @@ void MenuFloatingWindow::RequestHelp( const HelpEvent& rHEvt )
// #102618# Get item rect before destroying the window in EndExecute() call
Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) );
- if ( rHEvt.GetMode() & (HELPMODE_CONTEXT | HELPMODE_EXTENDED) )
+ if ( rHEvt.GetMode() & (HelpEventMode::CONTEXT | HelpEventMode::EXTENDED) )
{
nHighlightedItem = ITEMPOS_INVALID;
EndExecute();
diff --git a/vcl/source/window/menuwindow.cxx b/vcl/source/window/menuwindow.cxx
index ddfe6bffbc97..b7680e5abb8a 100644
--- a/vcl/source/window/menuwindow.cxx
+++ b/vcl/source/window/menuwindow.cxx
@@ -103,7 +103,7 @@ bool MenuWindow::ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_
nId = pItemData->nId;
}
- if ( ( rHEvt.GetMode() & HELPMODE_BALLOON ) && pMenuWindow )
+ if ( ( rHEvt.GetMode() & HelpEventMode::BALLOON ) && pMenuWindow )
{
Point aPos;
if( rHEvt.KeyboardActivated() )
@@ -124,7 +124,7 @@ bool MenuWindow::ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_
}
bDone = true;
}
- else if ( ( rHEvt.GetMode() & HELPMODE_QUICK ) && pMenuWindow )
+ else if ( ( rHEvt.GetMode() &HelpEventMode::QUICK ) && pMenuWindow )
{
Point aPos = rHEvt.GetMousePosPixel();
Rectangle aRect( aPos, Size() );
@@ -135,7 +135,7 @@ bool MenuWindow::ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_
ImplChangeTipTimeout( oldTimeout, pMenuWindow );
bDone = true;
}
- else if ( rHEvt.GetMode() & (HELPMODE_CONTEXT | HELPMODE_EXTENDED) )
+ else if ( rHEvt.GetMode() & (HelpEventMode::CONTEXT | HelpEventMode::EXTENDED) )
{
// is help in the application selected
Help* pHelp = Application::GetHelp();
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 368f7cbe6ac8..c4dcdd171b96 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -2545,7 +2545,7 @@ void SplitWindow::Resize()
void SplitWindow::RequestHelp( const HelpEvent& rHEvt )
{
// no keyboard help for splitwin
- if ( rHEvt.GetMode() & (HELPMODE_BALLOON | HELPMODE_QUICK) && !rHEvt.KeyboardActivated() )
+ if ( rHEvt.GetMode() & (HelpEventMode::BALLOON | HelpEventMode::QUICK) && !rHEvt.KeyboardActivated() )
{
Point aMousePosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
Rectangle aHelpRect;
@@ -2587,7 +2587,7 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt )
ResMgr* pResMgr = ImplGetResMgr();
if( pResMgr )
aStr = ResId( nHelpResId, *pResMgr ).toString();
- if ( rHEvt.GetMode() & HELPMODE_BALLOON )
+ if ( rHEvt.GetMode() & HelpEventMode::BALLOON )
Help::ShowBalloon( this, aHelpRect.Center(), aHelpRect, aStr );
else
Help::ShowQuickHelp( this, aHelpRect, aStr );
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index c4ccf055f433..acde64a85e67 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -763,13 +763,13 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt )
aItemRect.Right() = aPt.X();
aItemRect.Bottom() = aPt.Y();
- if ( rHEvt.GetMode() & HELPMODE_BALLOON )
+ if ( rHEvt.GetMode() & HelpEventMode::BALLOON )
{
OUString aStr = GetHelpText( nItemId );
Help::ShowBalloon( this, aItemRect.Center(), aItemRect, aStr );
return;
}
- else if ( rHEvt.GetMode() & HELPMODE_QUICK )
+ else if ( rHEvt.GetMode() & HelpEventMode::QUICK )
{
OUString aStr(GetQuickHelpText(nItemId));
// show quickhelp if available
@@ -786,7 +786,7 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt )
return;
}
}
- else if ( rHEvt.GetMode() & HELPMODE_EXTENDED )
+ else if ( rHEvt.GetMode() & HelpEventMode::EXTENDED )
{
OUString aCommand = GetItemCommand( nItemId );
OString aHelpId( GetHelpId( nItemId ) );
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 90fe5799009f..4bb6d2bb5b1d 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -4214,7 +4214,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
if ( nItemId )
{
- if ( rHEvt.GetMode() & (HELPMODE_BALLOON | HELPMODE_QUICK) )
+ if ( rHEvt.GetMode() & (HelpEventMode::BALLOON | HelpEventMode::QUICK) )
{
// get rectangle
Rectangle aTempRect = GetItemRect( nItemId );
@@ -4230,7 +4230,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
const OUString& rHelpStr = GetHelpText( nItemId );
if (aStr.isEmpty())
aStr = MnemonicGenerator::EraseAllMnemonicChars( GetItemText( nItemId ) );
- if ( rHEvt.GetMode() & HELPMODE_BALLOON )
+ if ( rHEvt.GetMode() & HelpEventMode::BALLOON )
{
if (!rHelpStr.isEmpty())
aStr = rHelpStr;
@@ -4240,7 +4240,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
Help::ShowQuickHelp( this, aTempRect, aStr, rHelpStr, QUICKHELP_CTRLTEXT );
return;
}
- else if ( rHEvt.GetMode() & HELPMODE_EXTENDED )
+ else if ( rHEvt.GetMode() & HelpEventMode::EXTENDED )
{
OUString aCommand = GetItemCommand( nItemId );
OString aHelpId( GetHelpId( nItemId ) );
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 737eeb9ee504..c6086dabaebd 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1925,7 +1925,7 @@ void Window::RequestHelp( const HelpEvent& rHEvt )
{
// if Balloon-Help is requested, show the balloon
// with help text set
- if ( rHEvt.GetMode() & HELPMODE_BALLOON )
+ if ( rHEvt.GetMode() & HelpEventMode::BALLOON )
{
OUString rStr = GetHelpText();
if ( rStr.isEmpty() )
@@ -1935,7 +1935,7 @@ void Window::RequestHelp( const HelpEvent& rHEvt )
else
Help::ShowBalloon( this, rHEvt.GetMousePosPixel(), rStr );
}
- else if ( rHEvt.GetMode() & HELPMODE_QUICK )
+ else if ( rHEvt.GetMode() & HelpEventMode::QUICK )
{
const OUString& rStr = GetQuickHelpText();
if ( rStr.isEmpty() && ImplGetParent() && !ImplIsOverlapWindow() )
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index eba9491e28d7..6934ed233703 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -169,12 +169,12 @@ static void ImplHandleMouseHelpRequest( vcl::Window* pChild, const Point& rMouse
!( pSVData->maHelpData.mpHelpWin->IsWindowOrChild( pChild ) ||
pChild->IsWindowOrChild( pSVData->maHelpData.mpHelpWin ) ) )
{
- sal_uInt16 nHelpMode = 0;
+ HelpEventMode nHelpMode = HelpEventMode::NONE;
if ( pSVData->maHelpData.mbQuickHelp )
- nHelpMode = HELPMODE_QUICK;
+ nHelpMode = HelpEventMode::QUICK;
if ( pSVData->maHelpData.mbBalloonHelp )
- nHelpMode |= HELPMODE_BALLOON;
- if ( nHelpMode )
+ nHelpMode |= HelpEventMode::BALLOON;
+ if ( bool(nHelpMode) )
{
if ( pChild->IsInputEnabled() && !pChild->IsInModalNonRefMode() )
{
@@ -1084,7 +1084,7 @@ static bool ImplHandleKey( vcl::Window* pWindow, sal_uInt16 nSVEvent,
Point aPos = Point( aSize.getWidth()/2, aSize.getHeight()/2 );
aPos = pChild->OutputToScreenPixel( aPos );
- HelpEvent aHelpEvent( aPos, HELPMODE_BALLOON );
+ HelpEvent aHelpEvent( aPos, HelpEventMode::BALLOON );
aHelpEvent.SetKeyboardActivated( true );
pSVData->maHelpData.mbSetKeyboardHelp = true;
pChild->RequestHelp( aHelpEvent );
@@ -1097,7 +1097,7 @@ static bool ImplHandleKey( vcl::Window* pWindow, sal_uInt16 nSVEvent,
if ( pSVData->maHelpData.mbContextHelp )
{
Point aMousePos = pChild->OutputToScreenPixel( pChild->GetPointerPosPixel() );
- HelpEvent aHelpEvent( aMousePos, HELPMODE_CONTEXT );
+ HelpEvent aHelpEvent( aMousePos, HelpEventMode::CONTEXT );
pChild->RequestHelp( aHelpEvent );
}
else