From b71ff0db856c7fbc3505f2663aee568fa47fc067 Mon Sep 17 00:00:00 2001
From: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Fri, 18 Aug 2017 12:14:33 +0200
Subject: convert ExtendedWinBits to a single bool flag

Change-Id: I2ff15a7f485ffdfb78eaabd529d19065faeb4c53
Reviewed-on: https://gerrit.libreoffice.org/41277
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
---
 svtools/source/contnr/iconviewimpl.cxx | 2 +-
 svtools/source/contnr/svimpbox.cxx     | 8 ++++----
 svtools/source/contnr/treelistbox.cxx  | 4 ++--
 svtools/source/inc/svimpbox.hxx        | 4 ++--
 4 files changed, 9 insertions(+), 9 deletions(-)

(limited to 'svtools')

diff --git a/svtools/source/contnr/iconviewimpl.cxx b/svtools/source/contnr/iconviewimpl.cxx
index 78b5148b264a..d1221169afb4 100644
--- a/svtools/source/contnr/iconviewimpl.cxx
+++ b/svtools/source/contnr/iconviewimpl.cxx
@@ -413,7 +413,7 @@ void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan
 
     vcl::Region aClipRegion(GetClipRegionRect());
 
-    if (!pCursor && ((nExtendedWinBits & EWB_NO_AUTO_CURENTRY) == 0))
+    if (!pCursor && !mbNoAutoCurEntry)
     {
         // do not select if multiselection or explicit set
         bool bNotSelect = (aSelEng.GetSelectionMode() == SelectionMode::Multiple ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index b0e3132596ff..de8a49889e5c 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -55,7 +55,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS
     , m_pStringSorter(nullptr)
     , aVerSBar(VclPtr<ScrollBar>::Create(pLBView, WB_DRAG | WB_VSCROLL))
     , aOutputSize(0, 0)
-    , nExtendedWinBits(0)
+    , mbNoAutoCurEntry(false)
     , aSelEng(pLBView, nullptr)
     , nNextVerVisSize(0)
 {
@@ -244,9 +244,9 @@ void SvImpLBox::SetStyle( WinBits i_nWinStyle )
         aSelEng.AddAlways( true );
 }
 
-void SvImpLBox::SetExtendedWindowBits( ExtendedWinBits _nBits )
+void SvImpLBox::SetNoAutoCurEntry( bool b )
 {
-    nExtendedWinBits = _nBits;
+    mbNoAutoCurEntry = b;
 }
 
 // don't touch the model any more
@@ -924,7 +924,7 @@ void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle
 
     rRenderContext.SetClipRegion(aClipRegion);
 
-    if (!pCursor && ((nExtendedWinBits & EWB_NO_AUTO_CURENTRY) == 0))
+    if (!pCursor && !mbNoAutoCurEntry)
     {
         // do not select if multiselection or explicit set
         bool bNotSelect = (aSelEng.GetSelectionMode() == SelectionMode::Multiple ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 0b216898002e..2ca55b745920 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -1429,9 +1429,9 @@ void SvTreeListBox::dispose()
     Control::dispose();
 }
 
-void SvTreeListBox::SetExtendedWinBits( ExtendedWinBits _nBits )
+void SvTreeListBox::SetNoAutoCurEntry( bool b )
 {
-    pImpl->SetExtendedWindowBits( _nBits );
+    pImpl->SetNoAutoCurEntry( b );
 }
 
 void SvTreeListBox::SetModel( SvTreeList* pNewModel )
diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx
index 26e9794f6648..cb1ad90dc93e 100644
--- a/svtools/source/inc/svimpbox.hxx
+++ b/svtools/source/inc/svimpbox.hxx
@@ -208,7 +208,7 @@ protected:
     Size                    aOutputSize;
     LBoxFlags               nFlags;
     WinBits                 m_nStyle;
-    ExtendedWinBits         nExtendedWinBits;
+    bool                    mbNoAutoCurEntry; // disable the behavior of automatically selecting a "CurEntry" upon painting the control
     SelectionEngine         aSelEng;
     sal_uLong               nVisibleCount;  // Number of lines in control
     bool                    bInVScrollHdl : 1;
@@ -244,7 +244,7 @@ public:
 
     void                Clear();
     void                SetStyle( WinBits i_nWinStyle );
-    void                SetExtendedWindowBits( ExtendedWinBits _nBits );
+    void                SetNoAutoCurEntry( bool b );
     void                SetModel( SvTreeList* pModel ) { pTree = pModel;}
 
     void                EntryInserted( SvTreeListEntry*);
-- 
cgit