[Libreoffice-commits] core.git: dbaccess/source include/vcl sc/source sd/source starmath/source svtools/inc svtools/source svx/source vcl/inc vcl/source

Noel Grandin noel at peralex.com
Fri May 13 07:52:57 UTC 2016


 dbaccess/source/ui/querydesign/JoinTableView.cxx |    4 +--
 include/vcl/window.hxx                           |   27 ++++++++++++++---------
 sc/source/ui/dbgui/csvgrid.cxx                   |    2 -
 sc/source/ui/dbgui/csvruler.cxx                  |    2 -
 sc/source/ui/view/olinewin.cxx                   |    4 +--
 sd/source/ui/view/viewshe2.cxx                   |    2 -
 starmath/source/view.cxx                         |    2 -
 svtools/inc/table/tablecontrolinterface.hxx      |    2 -
 svtools/source/brwbox/brwbox2.cxx                |    2 -
 svtools/source/contnr/simptabl.cxx               |    4 +--
 svtools/source/control/headbar.cxx               |    4 +--
 svtools/source/table/mousefunction.cxx           |    2 -
 svtools/source/table/tablecontrol_impl.cxx       |    2 -
 svtools/source/table/tablecontrol_impl.hxx       |    2 -
 svx/source/dialog/frmsel.cxx                     |    2 -
 svx/source/dialog/svxruler.cxx                   |    8 +++---
 vcl/inc/window.h                                 |    2 -
 vcl/source/window/brdwin.cxx                     |    4 +--
 vcl/source/window/dockmgr.cxx                    |   10 ++++----
 vcl/source/window/dockwin.cxx                    |   10 ++++----
 vcl/source/window/mouse.cxx                      |    2 -
 vcl/source/window/paint.cxx                      |    6 ++---
 vcl/source/window/split.cxx                      |    2 -
 vcl/source/window/splitwin.cxx                   |    2 -
 vcl/source/window/window.cxx                     |    2 -
 vcl/source/window/window2.cxx                    |   26 +++++++++++-----------
 26 files changed, 72 insertions(+), 65 deletions(-)

New commits:
commit b3d5da663ff09c72455a8d3bf9be7c00220271bb
Author: Noel Grandin <noel at peralex.com>
Date:   Wed May 11 16:57:46 2016 +0200

    convert SHOWTRACK to scoped enum
    
    Change-Id: Ibf06f6c79f80d7265ae3239c1ea0088118e92e21
    Reviewed-on: https://gerrit.libreoffice.org/24894
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index c57676d..4dd4fff 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -807,7 +807,7 @@ void OJoinTableView::Tracking( const TrackingEvent& rTEvt )
             Point aMousePos = rTEvt.GetMouseEvent().GetPosPixel();
             m_aSizingRect = m_pSizingWin->getSizingRect(aMousePos,m_aOutputSize);
             Update();
-            ShowTracking( m_aSizingRect, SHOWTRACK_SMALL | SHOWTRACK_WINDOW );
+            ShowTracking( m_aSizingRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow );
         }
     }
 }
@@ -1072,7 +1072,7 @@ void OJoinTableView::ScrollWhileDragging()
     // redraw DraggingRect
     m_aDragRect = Rectangle(m_ptPrevDraggingPos - m_aDragOffset, m_pDragWin->GetSizePixel());
     Update();
-    ShowTracking( m_aDragRect, SHOWTRACK_SMALL | SHOWTRACK_WINDOW );
+    ShowTracking( m_aDragRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow );
 }
 
 IMPL_LINK_NOARG_TYPED(OJoinTableView, OnDragScrollTimer, Idle *, void)
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 50d15e8..f55eb08 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -277,13 +277,20 @@ namespace o3tl
 }
 
 // Flags for ShowTracking()
-#define SHOWTRACK_SMALL                 ((sal_uInt16)0x0001)
-#define SHOWTRACK_BIG                   ((sal_uInt16)0x0002)
-#define SHOWTRACK_SPLIT                 ((sal_uInt16)0x0003)
-#define SHOWTRACK_OBJECT                ((sal_uInt16)0x0004)
-#define SHOWTRACK_WINDOW                ((sal_uInt16)0x1000)
-#define SHOWTRACK_CLIP                  ((sal_uInt16)0x2000)
-#define SHOWTRACK_STYLE                 ((sal_uInt16)0x000F)
+enum class ShowTrackFlags {
+    NONE                  = 0x0000,
+    Small                 = 0x0001,
+    Big                   = 0x0002,
+    Split                 = 0x0003,
+    Object                = 0x0004,
+    StyleMask             = 0x000F,
+    TrackWindow           = 0x1000,
+    Clip                  = 0x2000,
+};
+namespace o3tl
+{
+    template<> struct typed_flags<ShowTrackFlags> : is_typed_flags<ShowTrackFlags, 0x300a> {};
+}
 
 // Flags for StartTracking()
 enum class StartTrackingFlags
@@ -1187,11 +1194,11 @@ public:
     void                                DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, Color* pSelectionTextColor, Color* pPaintColor );
 
     void                                ShowTracking( const Rectangle& rRect,
-                                                      sal_uInt16 nFlags = SHOWTRACK_SMALL );
+                                                      ShowTrackFlags nFlags = ShowTrackFlags::Small );
     void                                HideTracking();
     void                                InvertTracking( const Rectangle& rRect,
-                                                        sal_uInt16 nFlags = SHOWTRACK_SMALL );
-    void                                InvertTracking( const tools::Polygon& rPoly, sal_uInt16 nFlags = 0 );
+                                                        ShowTrackFlags nFlags = ShowTrackFlags::Small );
+    void                                InvertTracking( const tools::Polygon& rPoly, ShowTrackFlags nFlags = ShowTrackFlags::NONE );
 
     void                                StartTracking( StartTrackingFlags nFlags = StartTrackingFlags::NONE );
     void                                EndTracking( TrackingEventFlags nFlags = TrackingEventFlags::NONE );
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index 514cd46..10ac546 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -1351,7 +1351,7 @@ void ScCsvGrid::ImplDrawTrackingRect( sal_uInt32 nColIndex )
         sal_Int32 nX1 = std::max( GetColumnX( nColIndex ), GetFirstX() ) + 1;
         sal_Int32 nX2 = std::min( GetColumnX( nColIndex + 1 ) - sal_Int32( 1 ), GetLastX() );
         sal_Int32 nY2 = std::min( GetY( GetLastVisLine() + 1 ), GetHeight() ) - 1;
-        InvertTracking( Rectangle( nX1, 0, nX2, nY2 ), SHOWTRACK_SMALL | SHOWTRACK_WINDOW );
+        InvertTracking( Rectangle( nX1, 0, nX2, nY2 ), ShowTrackFlags::Small | ShowTrackFlags::TrackWindow );
     }
 }
 
diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx
index f268274..17ac609 100644
--- a/sc/source/ui/dbgui/csvruler.cxx
+++ b/sc/source/ui/dbgui/csvruler.cxx
@@ -640,7 +640,7 @@ void ScCsvRuler::ImplDrawTrackingRect()
 {
     if( HasFocus() )
         InvertTracking( Rectangle( 0, 0, GetWidth() - 1, GetHeight() - 2 ),
-            SHOWTRACK_SMALL | SHOWTRACK_WINDOW );
+            ShowTrackFlags::Small | ShowTrackFlags::TrackWindow );
 }
 
 void ScCsvRuler::ImplSetMousePointer( sal_Int32 nPos )
diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx
index 721f728..57b1fea 100644
--- a/sc/source/ui/view/olinewin.cxx
+++ b/sc/source/ui/view/olinewin.cxx
@@ -578,7 +578,7 @@ void ScOutlineWindow::ShowFocus()
                 bool bClip = (mnFocusEntry != SC_OL_HEADERENTRY);
                 if ( bClip )
                     SetEntryAreaClipRegion();
-                InvertTracking( maFocusRect, SHOWTRACK_SMALL | SHOWTRACK_WINDOW );
+                InvertTracking( maFocusRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow );
                 if ( bClip )
                     SetClipRegion();
             }
@@ -593,7 +593,7 @@ void ScOutlineWindow::HideFocus()
         bool bClip = (mnFocusEntry != SC_OL_HEADERENTRY);
         if ( bClip )
             SetEntryAreaClipRegion();
-        InvertTracking( maFocusRect, SHOWTRACK_SMALL | SHOWTRACK_WINDOW );
+        InvertTracking( maFocusRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow );
         if ( bClip )
             SetClipRegion();
         maFocusRect.SetEmpty();
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index c4b9f57..917daa2 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -451,7 +451,7 @@ void ViewShell::DrawMarkRect(const Rectangle& rRect) const
 {
     if (mpContentWindow.get() != nullptr)
     {
-        mpContentWindow->InvertTracking(rRect, SHOWTRACK_OBJECT | SHOWTRACK_WINDOW);
+        mpContentWindow->InvertTracking(rRect, ShowTrackFlags::Object | ShowTrackFlags::TrackWindow);
     }
 }
 
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index e9a6fc5..1b7fe46 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -304,7 +304,7 @@ void SmGraphicWindow::ShowCursor(bool bShow)
     bool  bInvert = bShow != IsCursorVisible();
 
     if (bInvert)
-        InvertTracking(aCursorRect, SHOWTRACK_SMALL | SHOWTRACK_WINDOW);
+        InvertTracking(aCursorRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow);
 
     SetIsCursorVisible(bShow);
 }
diff --git a/svtools/inc/table/tablecontrolinterface.hxx b/svtools/inc/table/tablecontrolinterface.hxx
index c3729d7..5f957b9 100644
--- a/svtools/inc/table/tablecontrolinterface.hxx
+++ b/svtools/inc/table/tablecontrolinterface.hxx
@@ -230,7 +230,7 @@ namespace svt { namespace table
         virtual long    pixelWidthToAppFont( long const i_pixels ) const = 0;
 
         /// shows a tracking rectangle
-        virtual void    showTracking( Rectangle const & i_location, sal_uInt16 const i_flags ) = 0;
+        virtual void    showTracking( Rectangle const & i_location, ShowTrackFlags const i_flags ) = 0;
 
         /// hides a prviously shown tracking rectangle
         virtual void    hideTracking() = 0;
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index 3625d24..45fa1c4 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -1422,7 +1422,7 @@ void BrowseBox::MouseMove( const MouseEvent& rEvt )
                     // draw new auxiliary line
                     pDataWin->ShowTracking( Rectangle( Point( nDragX, 0 ),
                             Size( 1, pDataWin->GetSizePixel().Height() ) ),
-                            SHOWTRACK_SPLIT|SHOWTRACK_WINDOW );
+                            ShowTrackFlags::Split|ShowTrackFlags::TrackWindow );
                 }
 
             }
diff --git a/svtools/source/contnr/simptabl.cxx b/svtools/source/contnr/simptabl.cxx
index e22acfe..68c7d94 100644
--- a/svtools/source/contnr/simptabl.cxx
+++ b/svtools/source/contnr/simptabl.cxx
@@ -341,7 +341,7 @@ void SvSimpleTable::HBarStartDrag()
             SvHeaderTabListBox::GetOutputSizePixel());
         aSizeRect.Left()=-GetXOffset()+aHeaderBar->GetDragPos();
         aSizeRect.Right()=-GetXOffset()+aHeaderBar->GetDragPos();
-        ShowTracking( aSizeRect, SHOWTRACK_SPLIT );
+        ShowTracking( aSizeRect, ShowTrackFlags::Split );
     }
 }
 void SvSimpleTable::HBarDrag()
@@ -353,7 +353,7 @@ void SvSimpleTable::HBarDrag()
             SvHeaderTabListBox::GetOutputSizePixel());
         aSizeRect.Left()=-GetXOffset()+aHeaderBar->GetDragPos();
         aSizeRect.Right()=-GetXOffset()+aHeaderBar->GetDragPos();
-        ShowTracking( aSizeRect, SHOWTRACK_SPLIT );
+        ShowTracking( aSizeRect, ShowTrackFlags::Split );
     }
 }
 void SvSimpleTable::HBarEndDrag()
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx
index b328124..c7ffa20 100644
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -690,7 +690,7 @@ void HeaderBar::ImplStartDrag( const Point& rMousePos, bool bCommand )
             else
             {
                 Rectangle aSizeRect( mnDragPos, 0, mnDragPos, mnDragSize+mnDY );
-                ShowTracking( aSizeRect, SHOWTRACK_SPLIT );
+                ShowTracking( aSizeRect, ShowTrackFlags::Split );
             }
         }
         else
@@ -797,7 +797,7 @@ void HeaderBar::ImplDrag( const Point& rMousePos )
         else
         {
             Rectangle aSizeRect( mnDragPos, 0, mnDragPos, mnDragSize+mnDY );
-            ShowTracking( aSizeRect, SHOWTRACK_SPLIT );
+            ShowTracking( aSizeRect, ShowTrackFlags::Split );
         }
     }
 
diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx
index 3d88c15..676b979 100644
--- a/svtools/source/table/mousefunction.cxx
+++ b/svtools/source/table/mousefunction.cxx
@@ -74,7 +74,7 @@ namespace svt { namespace table
                 Point( aPoint.X(), 0 ),
                 Size( 1, tableSize.Height() )
             ),
-            SHOWTRACK_SPLIT | SHOWTRACK_WINDOW
+            ShowTrackFlags::Split | ShowTrackFlags::TrackWindow
         );
 
         (void)i_event;
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index f2efd75..b8eb95c 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -1826,7 +1826,7 @@ namespace svt { namespace table
     }
 
 
-    void TableControl_Impl::showTracking( Rectangle const & i_location, sal_uInt16 const i_flags )
+    void TableControl_Impl::showTracking( Rectangle const & i_location, ShowTrackFlags const i_flags )
     {
         m_pDataWindow->ShowTracking( i_location, i_flags );
     }
diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx
index 28ddc6b..cecbe4a 100644
--- a/svtools/source/table/tablecontrol_impl.hxx
+++ b/svtools/source/table/tablecontrol_impl.hxx
@@ -258,7 +258,7 @@ namespace svt { namespace table
         virtual void                invalidate( TableArea const i_what ) override;
         virtual long                pixelWidthToAppFont( long const i_pixels ) const override;
         virtual void                hideTracking() override;
-        virtual void                showTracking( Rectangle const & i_location, sal_uInt16 const i_flags ) override;
+        virtual void                showTracking( Rectangle const & i_location, ShowTrackFlags const i_flags ) override;
         RowPos                      getRowAtPoint( const Point& rPoint ) const;
         ColPos                      getColAtPoint( const Point& rPoint ) const;
         virtual TableCell           hitTest( const Point& rPoint ) const override;
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index ecd0ebf..9f5e9cf 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -689,7 +689,7 @@ void FrameSelectorImpl::DrawAllTrackingRects()
 
     aPPoly.Optimize(PolyOptimizeFlags::CLOSE);
     for(sal_uInt16 nIdx = 0, nCount = aPPoly.Count(); nIdx < nCount; ++nIdx)
-        mrFrameSel.InvertTracking(aPPoly.GetObject(nIdx), SHOWTRACK_SMALL | SHOWTRACK_WINDOW);
+        mrFrameSel.InvertTracking(aPPoly.GetObject(nIdx), ShowTrackFlags::Small | ShowTrackFlags::TrackWindow);
 }
 
 Point FrameSelectorImpl::GetDevPosFromMousePos( const Point& rMousePos ) const
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 38d5941..efe4de3 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -1587,7 +1587,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal)
             pEditWin->InvertTracking(
                 Rectangle( Point(lTabPosition, -aZero.Y()),
                            Point(lTabPosition, -aZero.Y() + nHeight)),
-                SHOWTRACK_SPLIT | SHOWTRACK_CLIP );
+                ShowTrackFlags::Split | ShowTrackFlags::Clip );
         }
         if( nNew & 1 )
         {
@@ -1599,7 +1599,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal)
             pEditWin->InvertTracking(
                 Rectangle( Point(lTabPosition, -aZero.Y()),
                            Point(lTabPosition, -aZero.Y() + nHeight) ),
-                SHOWTRACK_CLIP | SHOWTRACK_SPLIT );
+                ShowTrackFlags::Clip | ShowTrackFlags::Split );
         }
     }
     else
@@ -1611,7 +1611,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal)
             pEditWin->InvertTracking(
                 Rectangle( Point(-aZero.X(),          lTabPosition),
                            Point(-aZero.X() + nWidth, lTabPosition)),
-                SHOWTRACK_SPLIT | SHOWTRACK_CLIP );
+                ShowTrackFlags::Split | ShowTrackFlags::Clip );
         }
 
         if(nNew & 1)
@@ -1624,7 +1624,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal)
             pEditWin->InvertTracking(
                 Rectangle( Point(-aZero.X(),        lTabPosition),
                            Point(-aZero.X()+nWidth, lTabPosition)),
-                SHOWTRACK_CLIP | SHOWTRACK_SPLIT );
+                ShowTrackFlags::Clip | ShowTrackFlags::Split );
         }
     }
 }
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index a883f7c..701ad43 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -94,7 +94,7 @@ struct ImplWinData
     long                mnCompositionCharRects;
     Rectangle*          mpFocusRect;
     Rectangle*          mpTrackRect;
-    sal_uInt16          mnTrackFlags;
+    ShowTrackFlags      mnTrackFlags;
     sal_uInt16          mnIsTopWindow;
     bool                mbMouseOver;            //< tracks mouse over for native widget paint effect
     bool                mbEnableNativeWidget;   //< toggle native widget rendering
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 006b375..57f7e0c 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1251,7 +1251,7 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt )
                 {
                     maFrameData.mnTrackX = aPos.X();
                     maFrameData.mnTrackY = aPos.Y();
-                    pBorderWindow->ShowTracking( Rectangle( pBorderWindow->ScreenToOutputPixel( aPos ), pBorderWindow->GetOutputSizePixel() ), SHOWTRACK_BIG );
+                    pBorderWindow->ShowTracking( Rectangle( pBorderWindow->ScreenToOutputPixel( aPos ), pBorderWindow->GetOutputSizePixel() ), ShowTrackFlags::Big );
                 }
             }
             else
@@ -1362,7 +1362,7 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt )
                     maFrameData.mnTrackY        = aNewRect.Top();
                     maFrameData.mnTrackWidth    = aNewRect.GetWidth();
                     maFrameData.mnTrackHeight   = aNewRect.GetHeight();
-                    pBorderWindow->ShowTracking( Rectangle( pBorderWindow->ScreenToOutputPixel( aNewRect.TopLeft() ), aNewRect.GetSize() ), SHOWTRACK_BIG );
+                    pBorderWindow->ShowTracking( Rectangle( pBorderWindow->ScreenToOutputPixel( aNewRect.TopLeft() ), aNewRect.GetSize() ), ShowTrackFlags::Big );
                 }
             }
         }
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 7e9172f..1b8ef13 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -129,7 +129,7 @@ IMPL_LINK_NOARG_TYPED(ImplDockFloatWin2, DockTimerHdl, Idle *, void)
     }
     else
     {
-        mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_BIG | SHOWTRACK_WINDOW );
+        mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, ShowTrackFlags::Big | ShowTrackFlags::TrackWindow );
         maDockIdle.Start();
     }
 }
@@ -209,7 +209,7 @@ IMPL_LINK_NOARG_TYPED(ImplDockFloatWin2, DockingHdl, void*, void)
             // indicates that the window could be docked at maDockRect
             maDockRect.SetPos( mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ScreenToOutputPixel(
                  maDockRect.TopLeft() ) );
-            mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_BIG | SHOWTRACK_WINDOW );
+            mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, ShowTrackFlags::Big | ShowTrackFlags::TrackWindow );
             maEndDockIdle.Stop();
             DockTimerHdl( nullptr );
         }
@@ -949,11 +949,11 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt )
                 mbLastFloatMode = bFloatMode;
             }
 
-            sal_uInt16 nTrackStyle;
+            ShowTrackFlags nTrackStyle;
             if ( bFloatMode )
-                nTrackStyle = SHOWTRACK_OBJECT;
+                nTrackStyle = ShowTrackFlags::Object;
             else
-                nTrackStyle = SHOWTRACK_BIG;
+                nTrackStyle = ShowTrackFlags::Big;
             Rectangle aShowTrackRect = aTrackRect;
             aShowTrackRect.SetPos( GetWindow()->ImplFrameToOutput( aShowTrackRect.TopLeft() ) );
 
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index aad8795..984d713 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -148,7 +148,7 @@ IMPL_LINK_NOARG_TYPED(ImplDockFloatWin, DockTimerHdl, Idle *, void)
     }
     else
     {
-        mpDockWin->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_BIG | SHOWTRACK_WINDOW );
+        mpDockWin->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, ShowTrackFlags::Big | ShowTrackFlags::TrackWindow );
         maDockIdle.Start();
     }
 }
@@ -176,7 +176,7 @@ IMPL_LINK_NOARG_TYPED(ImplDockFloatWin, DockingHdl, void*, void)
         bool bFloatMode = mpDockWin->Docking( aMousePos, maDockRect );
         if( ! bFloatMode )
         {
-            mpDockWin->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_OBJECT | SHOWTRACK_WINDOW );
+            mpDockWin->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, ShowTrackFlags::Object | ShowTrackFlags::TrackWindow );
             DockTimerHdl( nullptr );
         }
         else
@@ -583,11 +583,11 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt )
             }
             else
             {
-                sal_uInt16 nTrackStyle;
+                ShowTrackFlags nTrackStyle;
                 if ( bFloatMode )
-                    nTrackStyle = SHOWTRACK_BIG;
+                    nTrackStyle = ShowTrackFlags::Big;
                 else
-                    nTrackStyle = SHOWTRACK_OBJECT;
+                    nTrackStyle = ShowTrackFlags::Object;
                 Rectangle aShowTrackRect = aTrackRect;
                 aShowTrackRect.SetPos( ImplFrameToOutput( aShowTrackRect.TopLeft() ) );
                 ShowTracking( aShowTrackRect, nTrackStyle );
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 516b6ed..19cdc73 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -178,7 +178,7 @@ IMPL_LINK_NOARG_TYPED(Window, ImplGenerateMouseMoveHdl, void*, void)
 
 void Window::ImplInvertFocus( const Rectangle& rRect )
 {
-    InvertTracking( rRect, SHOWTRACK_SMALL | SHOWTRACK_WINDOW );
+    InvertTracking( rRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow );
 }
 
 static bool IsWindowFocused(const WindowImpl& rWinImpl)
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index fc94b76..789dac6 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -551,7 +551,7 @@ PaintHelper::~PaintHelper()
         }
     }
 
-    if ( pWindowImpl->mpWinData && pWindowImpl->mbTrackVisible && (pWindowImpl->mpWinData->mnTrackFlags & SHOWTRACK_WINDOW) )
+    if ( pWindowImpl->mpWinData && pWindowImpl->mbTrackVisible && (pWindowImpl->mpWinData->mnTrackFlags & ShowTrackFlags::TrackWindow) )
         /* #98602# need to invert the tracking rect AFTER
         * the children have painted
         */
@@ -1618,7 +1618,7 @@ void Window::ImplScroll( const Rectangle& rRect,
         {
             if ( mpWindowImpl->mbFocusVisible )
                 ImplInvertFocus( *(mpWindowImpl->mpWinData->mpFocusRect) );
-            if ( mpWindowImpl->mbTrackVisible && (mpWindowImpl->mpWinData->mnTrackFlags & SHOWTRACK_WINDOW) )
+            if ( mpWindowImpl->mbTrackVisible && (mpWindowImpl->mpWinData->mnTrackFlags & ShowTrackFlags::TrackWindow) )
                 InvertTracking( *(mpWindowImpl->mpWinData->mpTrackRect), mpWindowImpl->mpWinData->mnTrackFlags );
         }
 #ifndef IOS
@@ -1654,7 +1654,7 @@ void Window::ImplScroll( const Rectangle& rRect,
         {
             if ( mpWindowImpl->mbFocusVisible )
                 ImplInvertFocus( *(mpWindowImpl->mpWinData->mpFocusRect) );
-            if ( mpWindowImpl->mbTrackVisible && (mpWindowImpl->mpWinData->mnTrackFlags & SHOWTRACK_WINDOW) )
+            if ( mpWindowImpl->mbTrackVisible && (mpWindowImpl->mpWinData->mnTrackFlags & ShowTrackFlags::TrackWindow) )
                 InvertTracking( *(mpWindowImpl->mpWinData->mpTrackRect), mpWindowImpl->mpWinData->mnTrackFlags );
         }
     }
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index a39f30b..d2590ca 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -136,7 +136,7 @@ void Splitter::ImplDrawSplitter()
         aInvRect.Bottom()   = maDragPos.Y() + 1;
     }
 
-    mpRefWin->InvertTracking( mpRefWin->PixelToLogic(aInvRect), SHOWTRACK_SPLIT );
+    mpRefWin->InvertTracking( mpRefWin->PixelToLogic(aInvRect), ShowTrackFlags::Split );
 }
 
 Splitter::Splitter( vcl::Window* pParent, WinBits nStyle ) :
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index b19c625..108251c 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -1295,7 +1295,7 @@ void SplitWindow::ImplDrawSplitTracking(const Point& rPos)
             aRect.Bottom() += SPLITWIN_SPLITSIZEEXLN;
         }
     }
-    ShowTracking(aRect, SHOWTRACK_SPLIT);
+    ShowTracking(aRect, ShowTrackFlags::Split);
 }
 
 void SplitWindow::ImplInit( vcl::Window* pParent, WinBits nStyle )
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index de678c5..695967a 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -749,7 +749,7 @@ ImplWinData::ImplWinData() :
     mpCompositionCharRects(nullptr),
     mpFocusRect(nullptr),
     mpTrackRect(nullptr),
-    mnTrackFlags(0),
+    mnTrackFlags(ShowTrackFlags::NONE),
     mnIsTopWindow((sal_uInt16) ~0), // not initialized yet, 0/1 will indicate TopWindow (see IsTopWindow())
     mbMouseOver(false)
 {
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index d38603f..2b9b5e6e 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -127,11 +127,11 @@ void Window::HideFocus()
     mpWindowImpl->mbInHideFocus = false;
 }
 
-void Window::ShowTracking( const Rectangle& rRect, sal_uInt16 nFlags )
+void Window::ShowTracking( const Rectangle& rRect, ShowTrackFlags nFlags )
 {
     ImplWinData* pWinData = ImplGetWinData();
 
-    if ( !mpWindowImpl->mbInPaint || !(nFlags & SHOWTRACK_WINDOW) )
+    if ( !mpWindowImpl->mbInPaint || !(nFlags & ShowTrackFlags::TrackWindow) )
     {
         if ( mpWindowImpl->mbTrackVisible )
         {
@@ -158,13 +158,13 @@ void Window::HideTracking()
     if ( mpWindowImpl->mbTrackVisible )
     {
         ImplWinData* pWinData = ImplGetWinData();
-        if ( !mpWindowImpl->mbInPaint || !(pWinData->mnTrackFlags & SHOWTRACK_WINDOW) )
+        if ( !mpWindowImpl->mbInPaint || !(pWinData->mnTrackFlags & ShowTrackFlags::TrackWindow) )
             InvertTracking( *(pWinData->mpTrackRect), pWinData->mnTrackFlags );
         mpWindowImpl->mbTrackVisible = false;
     }
 }
 
-void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags )
+void Window::InvertTracking( const Rectangle& rRect, ShowTrackFlags nFlags )
 {
     OutputDevice *pOutDev = GetOutDev();
     Rectangle aRect( pOutDev->ImplLogicToDevicePixel( rRect ) );
@@ -175,7 +175,7 @@ void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags )
 
     SalGraphics* pGraphics;
 
-    if ( nFlags & SHOWTRACK_WINDOW )
+    if ( nFlags & ShowTrackFlags::TrackWindow )
     {
         if ( !IsDeviceOutputNecessary() )
             return;
@@ -199,7 +199,7 @@ void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags )
     {
         pGraphics = ImplGetFrameGraphics();
 
-        if ( nFlags & SHOWTRACK_CLIP )
+        if ( nFlags & ShowTrackFlags::Clip )
         {
             Point aPoint( mnOutOffX, mnOutOffY );
             vcl::Region aRegion( Rectangle( aPoint,
@@ -209,15 +209,15 @@ void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags )
         }
     }
 
-    sal_uInt16 nStyle = nFlags & SHOWTRACK_STYLE;
-    if ( nStyle == SHOWTRACK_OBJECT )
+    ShowTrackFlags nStyle = nFlags & ShowTrackFlags::StyleMask;
+    if ( nStyle == ShowTrackFlags::Object )
         pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), SalInvert::TrackFrame, this );
-    else if ( nStyle == SHOWTRACK_SPLIT )
+    else if ( nStyle == ShowTrackFlags::Split )
         pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), SalInvert::N50, this );
     else
     {
         long nBorder = 1;
-        if ( nStyle == SHOWTRACK_BIG )
+        if ( nStyle == ShowTrackFlags::Big )
             nBorder = 5;
         pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), nBorder, SalInvert::N50, this );
         pGraphics->Invert( aRect.Left(), aRect.Bottom()-nBorder+1, aRect.GetWidth(), nBorder, SalInvert::N50, this );
@@ -226,7 +226,7 @@ void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags )
     }
 }
 
-void Window::InvertTracking( const tools::Polygon& rPoly, sal_uInt16 nFlags )
+void Window::InvertTracking( const tools::Polygon& rPoly, ShowTrackFlags nFlags )
 {
     sal_uInt16 nPoints = rPoly.GetSize();
 
@@ -239,7 +239,7 @@ void Window::InvertTracking( const tools::Polygon& rPoly, sal_uInt16 nFlags )
 
     SalGraphics* pGraphics;
 
-    if ( nFlags & SHOWTRACK_WINDOW )
+    if ( nFlags & ShowTrackFlags::TrackWindow )
     {
         if ( !IsDeviceOutputNecessary() )
             return;
@@ -263,7 +263,7 @@ void Window::InvertTracking( const tools::Polygon& rPoly, sal_uInt16 nFlags )
     {
         pGraphics = ImplGetFrameGraphics();
 
-        if ( nFlags & SHOWTRACK_CLIP )
+        if ( nFlags & ShowTrackFlags::Clip )
         {
             Point aPoint( mnOutOffX, mnOutOffY );
             vcl::Region aRegion( Rectangle( aPoint,


More information about the Libreoffice-commits mailing list