summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-21 09:31:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-22 08:31:55 +0200
commita2736303fea5ad2305ca8d38b90f5a21a8ab6a67 (patch)
tree9661b4756f8d1c5c9c4046312c44973024ee6796 /svtools
parent2d1fe7fb67ec1ff1b96912c0945d17d54aecb12e (diff)
convert WB_QUICK_SEARCH/WB_FORCE_MAKEVISIBLE to bool fields
Change-Id: Ic297d97911a6c0356d24ffe4b58442dfe866139f Reviewed-on: https://gerrit.libreoffice.org/41407 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/svimpbox.cxx5
-rw-r--r--svtools/source/contnr/treelistbox.cxx8
-rw-r--r--svtools/source/inc/svimpbox.hxx3
3 files changed, 12 insertions, 4 deletions
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index f849ee96a8c6..5e36b36f385d 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -52,6 +52,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS
, aScrBarBox(VclPtr<ScrollBarBox>::Create(pLBView))
, aFctSet(this, pLBView)
, bAreChildrenTransient(true)
+ , mbForceMakeVisible (false)
, m_pStringSorter(nullptr)
, aVerSBar(VclPtr<ScrollBar>::Create(pLBView, WB_DRAG | WB_VSCROLL))
, aOutputSize(0, 0)
@@ -954,7 +955,7 @@ void SvImpLBox::MakeVisible( SvTreeListEntry* pEntry, bool bMoveToTop )
if( bInView && (!bMoveToTop || pStartEntry == pEntry) )
return; // is already visible
- if( pStartEntry || (m_nStyle & WB_FORCE_MAKEVISIBLE) )
+ if( pStartEntry || mbForceMakeVisible )
nFlags &= (~LBoxFlags::Filling);
if( !bInView )
{
@@ -999,7 +1000,7 @@ void SvImpLBox::ScrollToAbsPos( long nPos )
if( !pEntry || pEntry == pStartEntry )
return;
- if( pStartEntry || (m_nStyle & WB_FORCE_MAKEVISIBLE) )
+ if( pStartEntry || mbForceMakeVisible )
nFlags &= (~LBoxFlags::Filling);
if( pView->IsEntryVisible(pEntry) )
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 06b1def0df44..fb6c31630a75 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -337,6 +337,7 @@ SvTreeListBox::SvTreeListBox(vcl::Window* pParent, WinBits nWinStyle) :
mbContextBmpExpanded(false),
mbAlternatingRowColors(false),
mbUpdateAlternatingRows(false),
+ mbQuickSearch(false),
eSelMode(SelectionMode::NONE),
nMinWidthInChars(0),
mbCenterAndClipText(false)
@@ -1033,7 +1034,7 @@ bool SvTreeListBox::HandleKeyInput( const KeyEvent& _rKEvt )
)
return true;
- if ( ( GetStyle() & WB_QUICK_SEARCH ) != 0 )
+ if (mbQuickSearch)
{
mpImpl->m_bDoingQuickSelection = true;
const bool bHandled = mpImpl->m_aQuickSelectionEngine.HandleKeyEvent( _rKEvt );
@@ -3233,6 +3234,11 @@ void SvTreeListBox::SetAlternatingRowColors( bool bEnable )
pImpl->UpdateAll(true);
}
+void SvTreeListBox::SetForceMakeVisible( bool bEnable )
+{
+ pImpl->SetForceMakeVisible(bEnable);
+}
+
SvLBoxItem* SvTreeListBox::GetItem(SvTreeListEntry* pEntry,long nX,SvLBoxTab** ppTab)
{
return GetItem_Impl( pEntry, nX, ppTab );
diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx
index 10d8287d4fdb..1c56643c11ee 100644
--- a/svtools/source/inc/svimpbox.hxx
+++ b/svtools/source/inc/svimpbox.hxx
@@ -136,8 +136,8 @@ private:
bool bSubLstOpLR : 1; // open/close sublist with cursor left/right, defaulted with false
bool bContextMenuHandling : 1;
bool bIsCellFocusEnabled : 1;
-
bool bAreChildrenTransient;
+ bool mbForceMakeVisible;
Point aEditClickPos;
Idle aEditIdle;
@@ -336,6 +336,7 @@ public:
sal_uInt16 GetCurrentTabPos() const { return nCurTabPos; }
bool IsSelectable( const SvTreeListEntry* pEntry );
+ void SetForceMakeVisible(bool bEnable) { mbForceMakeVisible = bEnable; }
};
inline Image& SvImpLBox::implGetImageLocation( const ImageType _eType )