summaryrefslogtreecommitdiff
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
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>
-rw-r--r--basctl/source/basicide/baside2b.cxx4
-rw-r--r--chart2/source/controller/main/ChartWindow.cxx2
-rw-r--r--cui/source/options/optinet2.cxx2
-rw-r--r--dbaccess/source/ui/control/dbtreelistbox.cxx2
-rw-r--r--dbaccess/source/ui/control/opendoccontrols.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowTitle.cxx2
-rw-r--r--include/vcl/event.hxx35
-rw-r--r--reportdesign/source/ui/report/StartMarker.cxx2
-rw-r--r--sc/source/ui/navipi/content.cxx2
-rw-r--r--sc/source/ui/view/gridwin5.cxx6
-rw-r--r--sd/source/ui/view/viewshe2.cxx2
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx2
-rw-r--r--svtools/source/contnr/imivctl1.cxx2
-rw-r--r--svtools/source/contnr/svimpbox.cxx2
-rw-r--r--svtools/source/control/calendar.cxx4
-rw-r--r--svtools/source/control/headbar.cxx8
-rw-r--r--svtools/source/control/tabbar.cxx8
-rw-r--r--svtools/source/control/valueset.cxx2
-rw-r--r--svtools/source/table/tabledatawindow.cxx6
-rw-r--r--svtools/source/toolpanel/paneltabbar.cxx2
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx4
-rw-r--r--svx/source/form/fmpage.cxx2
-rw-r--r--sw/source/core/draw/dpage.cxx4
-rw-r--r--sw/source/ui/fldui/FldRefTreeListBox.cxx2
-rw-r--r--sw/source/ui/index/cnttab.cxx4
-rw-r--r--sw/source/uibase/docvw/edtwin2.cxx4
-rw-r--r--sw/source/uibase/utlui/content.cxx2
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx2
-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
40 files changed, 94 insertions, 87 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 134a5c067a06..f8fb47f0a918 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -335,13 +335,13 @@ void EditorWindow::RequestHelp( const HelpEvent& rHEvt )
// Should have been activated at some point
if ( pEditEngine )
{
- if ( rHEvt.GetMode() & HELPMODE_CONTEXT )
+ if ( rHEvt.GetMode() & HelpEventMode::CONTEXT )
{
OUString aKeyword = GetWordAtCursor();
Application::GetHelp()->SearchKeyword( aKeyword );
bDone = true;
}
- else if ( rHEvt.GetMode() & HELPMODE_QUICK )
+ else if ( rHEvt.GetMode() & HelpEventMode::QUICK )
{
OUString aHelpText;
Point aTopLeft;
diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx
index d54441be729b..a0c9784764d9 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -227,7 +227,7 @@ void ChartWindow::DataChanged( const DataChangedEvent& rDCEvt )
void ChartWindow::RequestHelp( const HelpEvent& rHEvt )
{
bool bHelpHandled = false;
- if( ( rHEvt.GetMode() & HELPMODE_QUICK ) &&
+ if( ( rHEvt.GetMode() & HelpEventMode::QUICK ) &&
m_pWindowController )
{
// Point aLogicHitPos = PixelToLogic( rHEvt.GetMousePosPixel()); // old chart: GetPointerPosPixel()
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 49e6ff064f51..d1b3b5c3fb2c 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -562,7 +562,7 @@ void SvxScriptExecListBox::RequestHelp( const HelpEvent& rHEvt )
aPt = OutputToScreenPixel( aItemRect.BottomRight() );
aItemRect.Right() = aPt.X();
aItemRect.Bottom() = aPt.Y();
- if( rHEvt.GetMode() == HELPMODE_BALLOON )
+ if( rHEvt.GetMode() == HelpEventMode::BALLOON )
Help::ShowBalloon( this, aItemRect.Center(), aItemRect, aHelpText);
else
Help::ShowQuickHelp( this, aItemRect, aHelpText );
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 8c6978a599fd..69a70c4c74d3 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -283,7 +283,7 @@ void DBTreeListBox::RequestHelp( const HelpEvent& rHEvt )
return;
}
- if( rHEvt.GetMode() & HELPMODE_QUICK )
+ if( rHEvt.GetMode() & HelpEventMode::QUICK )
{
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
SvTreeListEntry* pEntry = GetEntry( aPos );
diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx
index f808ae9ae2e6..539d9ded484c 100644
--- a/dbaccess/source/ui/control/opendoccontrols.cxx
+++ b/dbaccess/source/ui/control/opendoccontrols.cxx
@@ -289,7 +289,7 @@ namespace dbaui
void OpenDocumentListBox::RequestHelp( const HelpEvent& _rHEvt )
{
- if( !( _rHEvt.GetMode() & HELPMODE_QUICK ) )
+ if( !( _rHEvt.GetMode() & HelpEventMode::QUICK ) )
return;
if ( !IsEnabled() )
return;
diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
index 4ff6e20b985c..648e77736d17 100644
--- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
@@ -85,7 +85,7 @@ void OTableWindowTitle::RequestHelp( const HelpEvent& rHEvt )
aPt = OutputToScreenPixel( aItemRect.BottomRight() );
aItemRect.Right() = aPt.X();
aItemRect.Bottom() = aPt.Y();
- if( rHEvt.GetMode() == HELPMODE_BALLOON )
+ if( rHEvt.GetMode() == HelpEventMode::BALLOON )
Help::ShowBalloon( this, aItemRect.Center(), aItemRect, aHelpText);
else
Help::ShowQuickHelp( this, aItemRect, aHelpText );
diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx
index 76e609dd0211..14181cc4e2f9 100644
--- a/include/vcl/event.hxx
+++ b/include/vcl/event.hxx
@@ -244,44 +244,51 @@ public:
// - HelpEvent -
-
-#define HELPMODE_CONTEXT ((sal_uInt16)0x0001)
-#define HELPMODE_EXTENDED ((sal_uInt16)0x0002)
-#define HELPMODE_BALLOON ((sal_uInt16)0x0004)
-#define HELPMODE_QUICK ((sal_uInt16)0x0008)
+enum class HelpEventMode
+{
+ NONE = 0x0000,
+ CONTEXT = 0x0001,
+ EXTENDED = 0x0002,
+ BALLOON = 0x0004,
+ QUICK = 0x0008
+};
+namespace o3tl
+{
+ template<> struct typed_flags<HelpEventMode> : is_typed_flags<HelpEventMode, 0x0f> {};
+}
class VCL_DLLPUBLIC HelpEvent
{
private:
Point maPos;
- sal_uInt16 mnMode;
+ HelpEventMode mnMode;
bool mbKeyboardActivated;
public:
explicit HelpEvent();
- explicit HelpEvent( sal_uInt16 nHelpMode );
- explicit HelpEvent( const Point& rMousePos, sal_uInt16 nHelpMode );
+ explicit HelpEvent( HelpEventMode nHelpMode );
+ explicit HelpEvent( const Point& rMousePos, HelpEventMode nHelpMode );
const Point& GetMousePosPixel() const { return maPos; }
- sal_uInt16 GetMode() const { return mnMode; }
+ HelpEventMode GetMode() const { return mnMode; }
bool KeyboardActivated() const { return mbKeyboardActivated; }
void SetKeyboardActivated( bool bKeyboard ) { mbKeyboardActivated = bKeyboard; }
};
inline HelpEvent::HelpEvent()
{
- mnMode = HELPMODE_CONTEXT;
+ mnMode = HelpEventMode::CONTEXT;
mbKeyboardActivated = true;
}
-inline HelpEvent::HelpEvent( const Point& rMousePos, sal_uInt16 nHelpMode ) :
+inline HelpEvent::HelpEvent( const Point& rMousePos, HelpEventMode nHelpMode ) :
maPos( rMousePos )
{
mnMode = nHelpMode;
mbKeyboardActivated = false;
}
-inline HelpEvent::HelpEvent( sal_uInt16 nHelpMode )
+inline HelpEvent::HelpEvent( HelpEventMode nHelpMode )
{
mnMode = nHelpMode;
mbKeyboardActivated = true;
@@ -296,8 +303,8 @@ class VCL_DLLPUBLIC UserDrawEvent
private:
OutputDevice* mpOutDev;
Rectangle maOutRect;
- sal_uInt16 mnItemId;
- sal_uInt16 mnStyle;
+ sal_uInt16 mnItemId;
+ sal_uInt16 mnStyle;
public:
UserDrawEvent();
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index a1a3f30944d2..37a1e7ce4608 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -267,7 +267,7 @@ void OStartMarker::RequestHelp( const HelpEvent& rHEvt )
aPt = OutputToScreenPixel( aItemRect.BottomRight() );
aItemRect.Right() = aPt.X();
aItemRect.Bottom() = aPt.Y();
- if( rHEvt.GetMode() == HELPMODE_BALLOON )
+ if( rHEvt.GetMode() == HelpEventMode::BALLOON )
Help::ShowBalloon( this, aItemRect.Center(), aItemRect, m_aText.GetText());
else
Help::ShowQuickHelp( this, aItemRect, m_aText.GetText() );
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 50fa044963ee..dea7d21e3e9a 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -650,7 +650,7 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
void ScContentTree::RequestHelp( const HelpEvent& rHEvt )
{
bool bDone = false;
- if( rHEvt.GetMode() & HELPMODE_QUICK )
+ if( rHEvt.GetMode() & HelpEventMode::QUICK )
{
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
SvTreeListEntry* pEntry = GetEntry( aPos );
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index 8bdd9892519a..9e964c360bea 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -247,7 +247,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
//Global string STR_CLICKHYPERLINK i.e, "click to open hyperlink"
OUString aClickHlinkStr = ScGlobal::GetRscString( STR_CLICKHYPERLINK );
bool bDone = false;
- bool bHelpEnabled = ( rHEvt.GetMode() & ( HELPMODE_BALLOON | HELPMODE_QUICK ) ) != 0;
+ bool bHelpEnabled = bool(rHEvt.GetMode() & ( HelpEventMode::BALLOON | HelpEventMode::QUICK ));
SdrView* pDrView = pViewData->GetScDrawView();
bool bDrawTextEdit = false;
if (pDrView)
@@ -399,9 +399,9 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
Rectangle aScreenRect(OutputToScreenPixel(aPixRect.TopLeft()),
OutputToScreenPixel(aPixRect.BottomRight()));
- if ( rHEvt.GetMode() & HELPMODE_BALLOON )
+ if ( rHEvt.GetMode() & HelpEventMode::BALLOON )
Help::ShowBalloon(this,rHEvt.GetMousePosPixel(), aScreenRect, aHelpText);
- else if ( rHEvt.GetMode() & HELPMODE_QUICK )
+ else if ( rHEvt.GetMode() & HelpEventMode::QUICK )
Help::ShowQuickHelp(this,aScreenRect, aHelpText);
bDone = true;
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index ebe69a158524..3c72e3105302 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -668,7 +668,7 @@ bool ViewShell::RequestHelp(const HelpEvent& rHEvt, ::sd::Window*)
{
bool bReturn = false;
- if (rHEvt.GetMode())
+ if (bool(rHEvt.GetMode()))
{
if( GetView() )
bReturn = GetView()->getSmartTags().RequestHelp(rHEvt);
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index b69a9d62f9d9..850cb9c0dcdb 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1307,7 +1307,7 @@ CustomPropertiesDurationField::~CustomPropertiesDurationField()
void CustomPropertiesDurationField::RequestHelp( const HelpEvent& rHEvt )
{
- if ( rHEvt.GetMode() & HELPMODE_QUICK )
+ if ( rHEvt.GetMode() & HelpEventMode::QUICK )
{
Size aSize( GetSizePixel() );
Rectangle aItemRect( rHEvt.GetMousePosPixel(), aSize );
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index bee601135c16..cbcfb74d4924 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -3628,7 +3628,7 @@ sal_uLong SvxIconChoiceCtrl_Impl::GetPredecessorGrid( const Point& rPos) const
bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt )
{
- if ( !(rHEvt.GetMode() & HELPMODE_QUICK ) )
+ if ( !(rHEvt.GetMode() & HelpEventMode::QUICK ) )
return false;
Point aPos( pView->ScreenToOutputPixel(rHEvt.GetMousePosPixel() ) );
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index aed04d3751ab..3a16820e7579 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -3181,7 +3181,7 @@ IMPL_LINK_NOARG(SvImpLBox, EditTimerCall)
bool SvImpLBox::RequestHelp( const HelpEvent& rHEvt )
{
- if( rHEvt.GetMode() & HELPMODE_QUICK )
+ if( rHEvt.GetMode() & HelpEventMode::QUICK )
{
Point aPos( pView->ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
if( !GetVisibleArea().IsInside( aPos ))
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index acb7b0299ed7..3a27921ea1d7 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -1661,7 +1661,7 @@ void Calendar::Resize()
void Calendar::RequestHelp( const HelpEvent& rHEvt )
{
- if ( rHEvt.GetMode() & (HELPMODE_QUICK | HELPMODE_BALLOON) )
+ if ( rHEvt.GetMode() & (HelpEventMode::QUICK | HelpEventMode::BALLOON) )
{
Date aDate = maCurDate;
if ( GetDate( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ), aDate ) )
@@ -1674,7 +1674,7 @@ void Calendar::RequestHelp( const HelpEvent& rHEvt )
aDateRect.Right() = aPt.X();
aDateRect.Bottom() = aPt.Y();
- if ( rHEvt.GetMode() & HELPMODE_QUICK )
+ if ( rHEvt.GetMode() & HelpEventMode::QUICK )
{
maCalendarWrapper.setGregorianDateTime( aDate);
sal_uInt16 nWeek = (sal_uInt16) maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR);
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx
index 490ad89bcbf0..c26beda45b00 100644
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -1112,7 +1112,7 @@ void HeaderBar::RequestHelp( const HelpEvent& rHEvt )
sal_uInt16 nItemId = GetItemId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
if ( nItemId )
{
- if ( rHEvt.GetMode() & (HELPMODE_QUICK | HELPMODE_BALLOON) )
+ if ( rHEvt.GetMode() & (HelpEventMode::QUICK | HelpEventMode::BALLOON) )
{
Rectangle aItemRect = GetItemRect( nItemId );
Point aPt = OutputToScreenPixel( aItemRect.TopLeft() );
@@ -1123,7 +1123,7 @@ void HeaderBar::RequestHelp( const HelpEvent& rHEvt )
aItemRect.Bottom() = aPt.Y();
OUString aStr = GetHelpText( nItemId );
- if ( aStr.isEmpty() || !(rHEvt.GetMode() & HELPMODE_BALLOON) )
+ if ( aStr.isEmpty() || !(rHEvt.GetMode() & HelpEventMode::BALLOON) )
{
ImplHeadItem* pItem = (*mpItemList)[ GetItemPos( nItemId ) ];
// Quick-help is only displayed if the text is not fully visible.
@@ -1136,14 +1136,14 @@ void HeaderBar::RequestHelp( const HelpEvent& rHEvt )
if (!aStr.isEmpty())
{
- if ( rHEvt.GetMode() & HELPMODE_BALLOON )
+ if ( rHEvt.GetMode() & HelpEventMode::BALLOON )
Help::ShowBalloon( this, aItemRect.Center(), aItemRect, aStr );
else
Help::ShowQuickHelp( this, aItemRect, aStr );
return;
}
}
- else if ( rHEvt.GetMode() & HELPMODE_EXTENDED )
+ else if ( rHEvt.GetMode() & HelpEventMode::EXTENDED )
{
OUString aHelpId( OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) );
if ( !aHelpId.isEmpty() )
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 10fb75782778..3c6b7f7c716f 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -1491,7 +1491,7 @@ void TabBar::RequestHelp( const HelpEvent& rHEvt )
sal_uInt16 nItemId = GetPageId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
if ( nItemId )
{
- if ( rHEvt.GetMode() & HELPMODE_BALLOON )
+ if ( rHEvt.GetMode() & HelpEventMode::BALLOON )
{
OUString aStr = GetHelpText( nItemId );
if (!aStr.isEmpty())
@@ -1507,7 +1507,7 @@ void TabBar::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() )
@@ -1522,7 +1522,7 @@ void TabBar::RequestHelp( const HelpEvent& rHEvt )
// show text for quick- or balloon-help
// if this is isolated or not fully visible
- if ( rHEvt.GetMode() & (HELPMODE_QUICK | HELPMODE_BALLOON) )
+ if ( rHEvt.GetMode() & (HelpEventMode::QUICK | HelpEventMode::BALLOON) )
{
sal_uInt16 nPos = GetPagePos( nItemId );
ImplTabBarItem* pItem = (*mpItemList)[ nPos ];
@@ -1538,7 +1538,7 @@ void TabBar::RequestHelp( const HelpEvent& rHEvt )
OUString aStr = (*mpItemList)[ nPos ]->maText;
if (!aStr.isEmpty())
{
- if ( rHEvt.GetMode() & HELPMODE_BALLOON )
+ if ( rHEvt.GetMode() & HelpEventMode::BALLOON )
Help::ShowBalloon( this, aItemRect.Center(), aItemRect, aStr );
else
Help::ShowQuickHelp( this, aItemRect, aStr );
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index f0d6457c0f1a..10552e540a46 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -1461,7 +1461,7 @@ void ValueSet::Resize()
void ValueSet::RequestHelp( const HelpEvent& rHelpEvent )
{
- if ( (rHelpEvent.GetMode() & (HELPMODE_QUICK | HELPMODE_BALLOON)) == HELPMODE_QUICK )
+ if ( (rHelpEvent.GetMode() & (HelpEventMode::QUICK | HelpEventMode::BALLOON)) == HelpEventMode::QUICK )
{
Point aPos = ScreenToOutputPixel( rHelpEvent.GetMousePosPixel() );
size_t nItemPos = ImplGetItem( aPos );
diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx
index 5bb9fb1fe2b2..80a0557b1335 100644
--- a/svtools/source/table/tabledatawindow.cxx
+++ b/svtools/source/table/tabledatawindow.cxx
@@ -79,9 +79,9 @@ namespace svt { namespace table
void TableDataWindow::RequestHelp( const HelpEvent& rHEvt )
{
- sal_uInt16 const nHelpMode = rHEvt.GetMode();
- if ( ( IsMouseCaptured() )
- || ( ( nHelpMode & HELPMODE_QUICK ) == 0 )
+ HelpEventMode const nHelpMode = rHEvt.GetMode();
+ if ( IsMouseCaptured()
+ || !( nHelpMode & HelpEventMode::QUICK )
)
{
Window::RequestHelp( rHEvt );
diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx
index 3dc375124bb6..302d58e4c22b 100644
--- a/svtools/source/toolpanel/paneltabbar.cxx
+++ b/svtools/source/toolpanel/paneltabbar.cxx
@@ -1176,7 +1176,7 @@ namespace svt
return;
const OUString sItemText( rItem.pPanel->GetDisplayName() );
- if ( i_rHelpEvent.GetMode() == HELPMODE_BALLOON )
+ if ( i_rHelpEvent.GetMode() == HelpEventMode::BALLOON )
Help::ShowBalloon( this, OutputToScreenPixel( rItem.GetCurrentRect().Center() ), rItem.GetCurrentRect(), sItemText );
else
Help::ShowQuickHelp( this, rItem.GetCurrentRect(), sItemText );
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index f7e6e56a3a8d..6213effb9c6c 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -169,7 +169,7 @@ void FmGridHeader::RequestHelp( const HelpEvent& rHEvt )
sal_uInt16 nItemId = GetItemId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
if ( nItemId )
{
- if ( rHEvt.GetMode() & (HELPMODE_QUICK | HELPMODE_BALLOON) )
+ if ( rHEvt.GetMode() & (HelpEventMode::QUICK | HelpEventMode::BALLOON) )
{
Rectangle aItemRect = GetItemRect( nItemId );
Point aPt = OutputToScreenPixel( aItemRect.TopLeft() );
@@ -190,7 +190,7 @@ void FmGridHeader::RequestHelp( const HelpEvent& rHEvt )
xColumn->getPropertyValue(FM_PROP_DESCRIPTION) >>= aHelpText;
if ( !aHelpText.isEmpty() )
{
- if ( rHEvt.GetMode() & HELPMODE_BALLOON )
+ if ( rHEvt.GetMode() & HelpEventMode::BALLOON )
Help::ShowBalloon( this, aItemRect.Center(), aItemRect, aHelpText );
else
Help::ShowQuickHelp( this, aItemRect, aHelpText );
diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx
index 3c31af00cf1c..365dfd38e325 100644
--- a/svx/source/form/fmpage.cxx
+++ b/svx/source/form/fmpage.cxx
@@ -196,7 +196,7 @@ bool FmFormPage::RequestHelp( vcl::Window* pWindow, SdrView* pView,
aPt = pWindow->OutputToScreenPixel( aItemRect.BottomRight() );
aItemRect.Right() = aPt.X();
aItemRect.Bottom() = aPt.Y();
- if( rEvt.GetMode() == HELPMODE_BALLOON )
+ if( rEvt.GetMode() == HelpEventMode::BALLOON )
Help::ShowBalloon( pWindow, aItemRect.Center(), aItemRect, aHelpText);
else
Help::ShowQuickHelp( pWindow, aItemRect, aHelpText );
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index 78d3366cc7fb..0ae7f16329d6 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -124,7 +124,7 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView* pView,
{
bool bContinue = true;
- if( rEvt.GetMode() & ( HELPMODE_QUICK | HELPMODE_BALLOON ))
+ if( rEvt.GetMode() & ( HelpEventMode::QUICK | HelpEventMode::BALLOON ))
{
Point aPos( rEvt.GetMousePosPixel() );
aPos = pWindow->ScreenToOutputPixel( aPos );
@@ -185,7 +185,7 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView* pView,
sTxt = SwViewShell::GetShellRes()->aLinkClick + ": " + sTxt;
}
- if( rEvt.GetMode() & HELPMODE_BALLOON )
+ if( rEvt.GetMode() & HelpEventMode::BALLOON )
{
Help::ShowBalloon( pWindow, rEvt.GetMousePosPixel(), sTxt );
}
diff --git a/sw/source/ui/fldui/FldRefTreeListBox.cxx b/sw/source/ui/fldui/FldRefTreeListBox.cxx
index 2a0d93f2ec73..c04603c02aa7 100644
--- a/sw/source/ui/fldui/FldRefTreeListBox.cxx
+++ b/sw/source/ui/fldui/FldRefTreeListBox.cxx
@@ -40,7 +40,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSwFldRefTreeListBox(vc
void SwFldRefTreeListBox::RequestHelp( const HelpEvent& rHEvt )
{
bool bCallBase( true );
- if ( rHEvt.GetMode() & HELPMODE_QUICK )
+ if ( rHEvt.GetMode() & HelpEventMode::QUICK )
{
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
SvTreeListEntry* pEntry = GetEntry( aPos );
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 9d26b38d0f42..74e65638caec 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1685,7 +1685,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSwIdxTreeListBox(vcl::
void SwIdxTreeListBox::RequestHelp( const HelpEvent& rHEvt )
{
- if( rHEvt.GetMode() & HELPMODE_QUICK )
+ if( rHEvt.GetMode() & HelpEventMode::QUICK )
{
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
SvTreeListEntry* pEntry = GetEntry( aPos );
@@ -3290,7 +3290,7 @@ bool SwTokenWindow::CreateQuickHelp(Control* pCtrl,
const HelpEvent& rHEvt)
{
bool bRet = false;
- if( rHEvt.GetMode() & HELPMODE_QUICK )
+ if( rHEvt.GetMode() & HelpEventMode::QUICK )
{
bool bBalloon = Help::IsBalloonHelpEnabled();
OUString sEntry;
diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx
index 9b887b17da6c..a0e87aa24fbc 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -108,14 +108,14 @@ OUString SwEditWin::ClipLongToolTip(const OUString& rTxt)
void SwEditWin::RequestHelp(const HelpEvent &rEvt)
{
SwWrtShell &rSh = m_rView.GetWrtShell();
- bool bQuickBalloon = 0 != (rEvt.GetMode() & ( HELPMODE_QUICK | HELPMODE_BALLOON ));
+ bool bQuickBalloon = bool(rEvt.GetMode() & ( HelpEventMode::QUICK | HelpEventMode::BALLOON ));
if(bQuickBalloon && !rSh.GetViewOptions()->IsShowContentTips())
return;
bool bContinue = true;
SET_CURR_SHELL(&rSh);
OUString sTxt;
Point aPos( PixelToLogic( ScreenToOutputPixel( rEvt.GetMousePosPixel() ) ));
- bool bBalloon = static_cast< bool >(rEvt.GetMode() & HELPMODE_BALLOON);
+ bool bBalloon = bool(rEvt.GetMode() & HelpEventMode::BALLOON);
SdrView *pSdrView = rSh.GetDrawView();
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index d00b0b9b360a..f1f96e04952d 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -2753,7 +2753,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
{
bool bCallBase = true;
- if( rHEvt.GetMode() & HELPMODE_QUICK )
+ if( rHEvt.GetMode() & HelpEventMode::QUICK )
{
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
SvTreeListEntry* pEntry = GetEntry( aPos );
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index e3ac3aab85f9..5730f82c9ca4 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -453,7 +453,7 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
bool bParent = true;
Update(true);
Display(true);
- if( rHEvt.GetMode() & HELPMODE_QUICK )
+ if( rHEvt.GetMode() & HelpEventMode::QUICK )
{
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
SvTreeListEntry* pEntry = GetEntry( aPos );
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