[Libreoffice-commits] core.git: basctl/source chart2/source cui/source dbaccess/source include/vcl reportdesign/source sc/source sd/source sfx2/source svtools/source svx/source sw/source vcl/source

Noel Grandin noel at peralex.com
Mon Nov 10 22:18:06 PST 2014


 basctl/source/basicide/baside2b.cxx                 |    4 +-
 chart2/source/controller/main/ChartWindow.cxx       |    2 -
 cui/source/options/optinet2.cxx                     |    2 -
 dbaccess/source/ui/control/dbtreelistbox.cxx        |    2 -
 dbaccess/source/ui/control/opendoccontrols.cxx      |    2 -
 dbaccess/source/ui/querydesign/TableWindowTitle.cxx |    2 -
 include/vcl/event.hxx                               |   35 ++++++++++++--------
 reportdesign/source/ui/report/StartMarker.cxx       |    2 -
 sc/source/ui/navipi/content.cxx                     |    2 -
 sc/source/ui/view/gridwin5.cxx                      |    6 +--
 sd/source/ui/view/viewshe2.cxx                      |    2 -
 sfx2/source/dialog/dinfdlg.cxx                      |    2 -
 svtools/source/contnr/imivctl1.cxx                  |    2 -
 svtools/source/contnr/svimpbox.cxx                  |    2 -
 svtools/source/control/calendar.cxx                 |    4 +-
 svtools/source/control/headbar.cxx                  |    8 ++--
 svtools/source/control/tabbar.cxx                   |    8 ++--
 svtools/source/control/valueset.cxx                 |    2 -
 svtools/source/table/tabledatawindow.cxx            |    6 +--
 svtools/source/toolpanel/paneltabbar.cxx            |    2 -
 svx/source/fmcomp/fmgridcl.cxx                      |    4 +-
 svx/source/form/fmpage.cxx                          |    2 -
 sw/source/core/draw/dpage.cxx                       |    4 +-
 sw/source/ui/fldui/FldRefTreeListBox.cxx            |    2 -
 sw/source/ui/index/cnttab.cxx                       |    4 +-
 sw/source/uibase/docvw/edtwin2.cxx                  |    4 +-
 sw/source/uibase/utlui/content.cxx                  |    2 -
 sw/source/uibase/utlui/glbltree.cxx                 |    2 -
 vcl/source/app/dbggui.cxx                           |    2 -
 vcl/source/control/button.cxx                       |    2 -
 vcl/source/control/tabctrl.cxx                      |   10 ++---
 vcl/source/window/brdwin.cxx                        |    4 +-
 vcl/source/window/menubarwindow.cxx                 |    2 -
 vcl/source/window/menufloatingwindow.cxx            |    2 -
 vcl/source/window/menuwindow.cxx                    |    6 +--
 vcl/source/window/splitwin.cxx                      |    4 +-
 vcl/source/window/status.cxx                        |    6 +--
 vcl/source/window/toolbox.cxx                       |    6 +--
 vcl/source/window/window.cxx                        |    4 +-
 vcl/source/window/winproc.cxx                       |   12 +++---
 40 files changed, 94 insertions(+), 87 deletions(-)

New commits:
commit a52f29216d2a70ea4a0a0347d71273cdbf8830e3
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Nov 10 13:34:35 2014 +0200

    fdo#84938: replace HELPMODE_ constants with enum
    
    Change-Id: I44be5567e84cdabd8b10771ea37e28b8a88cc23e
    Reviewed-on: https://gerrit.libreoffice.org/12333
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 134a5c0..f8fb47f 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 d54441b..a0c9784 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 49e6ff0..d1b3b5c 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 8c6978a..69a70c4 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 f808ae9..539d9de 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 4ff6e20..648e777 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 76e609d..14181cc 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 a1a3f30..37a1e7c 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 50fa044..dea7d21 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 8bdd989..9e964c3 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 ebe69a15..3c72e31 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 b69a9d6..850cb9c 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 bee6011..cbcfb74 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 aed04d3..3a16820 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 acb7b029..3a27921 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 490ad89..c26beda 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 10fb757..3c6b7f7 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 f0d6457..10552e5 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 5bb9fb1..80a0557 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 3dc3751..302d58e 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 f7e6e56..6213eff 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 3c31af0..365dfd3 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 78d3366..0ae7f16 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 2a0d93f..c04603c 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 9d26b38..74e6563 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 9b887b1..a0e87aa 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 d00b0b9..f1f96e0 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 e3ac3aa..5730f82 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 90b5280..1e2270f 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 e39c00d..8712c22 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 8c58442..2fb87dc 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 182302d..e861af5 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 ebbfeec..d878ea1 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 c83edde..3a4904c 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 ddfe6bf..b7680e5 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 368f7cb..c4dcdd1 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 c4ccf05..acde64a 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 90fe579..4bb6d2b 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 737eeb9..c6086da 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 eba9491..6934ed2 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


More information about the Libreoffice-commits mailing list