[Libreoffice-commits] core.git: cui/source dbaccess/source include/svtools include/tools sc/source sd/source sfx2/source svtools/source sw/source
Noel Grandin
noel.grandin at collabora.co.uk
Tue Aug 22 06:34:16 UTC 2017
cui/source/dialogs/hangulhanjadlg.cxx | 3 ++-
cui/source/dialogs/thesdlg.cxx | 3 ++-
cui/source/options/optlingu.cxx | 12 ++++++++----
cui/source/options/treeopt.cxx | 4 +++-
dbaccess/source/ui/control/dbtreelistbox.cxx | 2 +-
dbaccess/source/ui/misc/WNameMatch.cxx | 4 ++--
include/svtools/treelistbox.hxx | 8 ++++++--
include/tools/wintypes.hxx | 2 --
sc/source/ui/cctrl/checklistmenu.cxx | 7 ++++---
sc/source/ui/dbgui/PivotLayoutTreeList.cxx | 7 ++++---
sc/source/ui/dbgui/PivotLayoutTreeListData.cxx | 7 ++++---
sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx | 4 ++--
sc/source/ui/miscdlgs/solveroptions.cxx | 3 ++-
sc/source/ui/navipi/content.cxx | 3 ++-
sd/source/ui/dlg/sdtreelb.cxx | 4 ++--
sfx2/source/dialog/templdlg.cxx | 7 ++++---
svtools/source/contnr/svimpbox.cxx | 5 +++--
svtools/source/contnr/treelistbox.cxx | 8 +++++++-
svtools/source/inc/svimpbox.hxx | 3 ++-
sw/source/uibase/utlui/content.cxx | 2 +-
sw/source/uibase/utlui/navipi.cxx | 3 ++-
21 files changed, 63 insertions(+), 38 deletions(-)
New commits:
commit a2736303fea5ad2305ca8d38b90f5a21a8ab6a67
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Aug 21 09:31:14 2017 +0200
convert WB_QUICK_SEARCH/WB_FORCE_MAKEVISIBLE to bool fields
Change-Id: Ic297d97911a6c0356d24ffe4b58442dfe866139f
Reviewed-on: https://gerrit.libreoffice.org/41407
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index ab6578f40d8e..bdb39041ea75 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -1109,7 +1109,8 @@ namespace svx
m_pDictsLB->set_height_request(m_pDictsLB->GetTextHeight() * 5);
m_pDictsLB->set_width_request(m_pDictsLB->approximate_char_width() * 32);
- m_pDictsLB->SetStyle( m_pDictsLB->GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_FORCE_MAKEVISIBLE );
+ m_pDictsLB->SetStyle( m_pDictsLB->GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL );
+ m_pDictsLB->SetForceMakeVisible(true);
m_pDictsLB->SetSelectionMode( SelectionMode::Single );
m_pDictsLB->SetHighlightRange();
m_pDictsLB->SetSelectHdl( LINK( this, HangulHanjaOptionsDialog, DictsLB_SelectHdl ) );
diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx
index 5299fbde0d44..4fce88395494 100644
--- a/cui/source/dialogs/thesdlg.cxx
+++ b/cui/source/dialogs/thesdlg.cxx
@@ -167,7 +167,8 @@ ThesaurusAlternativesCtrl::ThesaurusAlternativesCtrl(vcl::Window* pParent)
: SvxCheckListBox(pParent)
, m_pDialog(nullptr)
{
- SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_FORCE_MAKEVISIBLE );
+ SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL );
+ SetForceMakeVisible(true);
SetHighlightRange();
}
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 76609fa4413e..c0c96f5c5ca6 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1013,7 +1013,8 @@ SvxLinguTabPage::SvxLinguTabPage( vcl::Window* pParent, const SfxItemSet& rSet )
pCheckButtonData = nullptr;
- m_pLinguModulesCLB->SetStyle( m_pLinguModulesCLB->GetStyle()|WB_CLIPCHILDREN|WB_HSCROLL|WB_FORCE_MAKEVISIBLE );
+ m_pLinguModulesCLB->SetStyle( m_pLinguModulesCLB->GetStyle()|WB_CLIPCHILDREN|WB_HSCROLL );
+ m_pLinguModulesCLB->SetForceMakeVisible(true);
m_pLinguModulesCLB->SetHighlightRange();
m_pLinguModulesCLB->SetSelectHdl( LINK( this, SvxLinguTabPage, SelectHdl_Impl ));
m_pLinguModulesCLB->SetDoubleClickHdl(LINK(this, SvxLinguTabPage, BoxDoubleClickHdl_Impl));
@@ -1022,7 +1023,8 @@ SvxLinguTabPage::SvxLinguTabPage( vcl::Window* pParent, const SfxItemSet& rSet )
m_pLinguModulesEditPB->SetClickHdl( LINK( this, SvxLinguTabPage, ClickHdl_Impl ));
m_pLinguOptionsEditPB->SetClickHdl( LINK( this, SvxLinguTabPage, ClickHdl_Impl ));
- m_pLinguDicsCLB->SetStyle( m_pLinguDicsCLB->GetStyle()|WB_CLIPCHILDREN|WB_HSCROLL|WB_FORCE_MAKEVISIBLE );
+ m_pLinguDicsCLB->SetStyle( m_pLinguDicsCLB->GetStyle()|WB_CLIPCHILDREN|WB_HSCROLL );
+ m_pLinguDicsCLB->SetForceMakeVisible(true);
m_pLinguDicsCLB->SetHighlightRange();
m_pLinguDicsCLB->SetSelectHdl( LINK( this, SvxLinguTabPage, SelectHdl_Impl ));
m_pLinguDicsCLB->SetCheckButtonHdl(LINK(this, SvxLinguTabPage, BoxCheckButtonHdl_Impl));
@@ -1031,7 +1033,8 @@ SvxLinguTabPage::SvxLinguTabPage( vcl::Window* pParent, const SfxItemSet& rSet )
m_pLinguDicsEditPB->SetClickHdl( LINK( this, SvxLinguTabPage, ClickHdl_Impl ));
m_pLinguDicsDelPB->SetClickHdl( LINK( this, SvxLinguTabPage, ClickHdl_Impl ));
- m_pLinguOptionsCLB->SetStyle( m_pLinguOptionsCLB->GetStyle()|WB_CLIPCHILDREN|WB_HSCROLL|WB_FORCE_MAKEVISIBLE );
+ m_pLinguOptionsCLB->SetStyle( m_pLinguOptionsCLB->GetStyle()|WB_CLIPCHILDREN|WB_HSCROLL );
+ m_pLinguOptionsCLB->SetForceMakeVisible(true);
m_pLinguOptionsCLB->SetHighlightRange();
m_pLinguOptionsCLB->SetSelectHdl( LINK( this, SvxLinguTabPage, SelectHdl_Impl ));
m_pLinguOptionsCLB->SetDoubleClickHdl(LINK(this, SvxLinguTabPage, BoxDoubleClickHdl_Impl));
@@ -1769,7 +1772,8 @@ SvxEditModulesDlg::SvxEditModulesDlg(vcl::Window* pParent, SvxLinguData_Impl& rD
pDefaultLinguData = new SvxLinguData_Impl( rLinguData );
- m_pModulesCLB->SetStyle( m_pModulesCLB->GetStyle()|WB_CLIPCHILDREN|WB_HSCROLL|WB_FORCE_MAKEVISIBLE );
+ m_pModulesCLB->SetStyle( m_pModulesCLB->GetStyle()|WB_CLIPCHILDREN|WB_HSCROLL );
+ m_pModulesCLB->SetForceMakeVisible(true);
m_pModulesCLB->SetHighlightRange();
m_pModulesCLB->SetSelectHdl( LINK( this, SvxEditModulesDlg, SelectHdl_Impl ));
m_pModulesCLB->SetCheckButtonHdl( LINK( this, SvxEditModulesDlg, BoxCheckButtonHdl_Impl) );
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 0cdfcbde2a95..9d55bd91c81e 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -759,7 +759,9 @@ void OfaTreeOptionsDialog::InitTreeAndHandler()
pTreeLB->SetHelpId( HID_OFADLG_TREELISTBOX );
pTreeLB->SetStyle( pTreeLB->GetStyle()|WB_HASBUTTONS | WB_HASBUTTONSATROOT |
WB_HASLINES | WB_HASLINESATROOT |
- WB_CLIPCHILDREN | WB_HSCROLL | WB_FORCE_MAKEVISIBLE | WB_QUICK_SEARCH );
+ WB_CLIPCHILDREN | WB_HSCROLL );
+ pTreeLB->SetForceMakeVisible(true);
+ pTreeLB->SetQuickSearch(true);
pTreeLB->SetSpaceBetweenEntries( 0 );
pTreeLB->SetSelectionMode( SelectionMode::Single );
pTreeLB->SetSublistOpenWithLeftRight();
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 1d0b31fc5601..3e87504bee13 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -77,7 +77,7 @@ void DBTreeListBox::init()
EnableContextMenuHandling();
- SetStyle( GetStyle() | WB_QUICK_SEARCH );
+ SetQuickSearch( true );
}
DBTreeListBox::~DBTreeListBox()
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index 1090938aafff..eda3d24611fa 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -68,8 +68,8 @@ OWizNameMatching::OWizNameMatching(vcl::Window* pParent)
m_pCTRL_RIGHT->SetSelectHdl(LINK(this,OWizNameMatching,TableListRightSelectHdl));
m_pCTRL_RIGHT->EnableCheckButton( nullptr );
- m_pCTRL_LEFT->SetStyle( m_pCTRL_LEFT->GetStyle() | WB_FORCE_MAKEVISIBLE );
- m_pCTRL_RIGHT->SetStyle( m_pCTRL_RIGHT->GetStyle() | WB_FORCE_MAKEVISIBLE );
+ m_pCTRL_LEFT->SetForceMakeVisible( true );
+ m_pCTRL_RIGHT->SetForceMakeVisible( true );
m_sSourceText = m_pTABLE_LEFT->GetText() + "\n";
m_sDestText = m_pTABLE_RIGHT->GetText() + "\n";
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 72f98265fc4b..987a7c85ae19 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -229,6 +229,7 @@ class SVT_DLLPUBLIC SvTreeListBox
bool mbContextBmpExpanded;
bool mbAlternatingRowColors;
bool mbUpdateAlternatingRows;
+ bool mbQuickSearch; // Enables type-ahead search in the check list box.
SvTreeListEntry* pHdlEntry;
@@ -537,8 +538,6 @@ protected:
SVT_DLLPRIVATE SvLBoxItem* GetItem_Impl( SvTreeListEntry*, long nX, SvLBoxTab** ppTab );
SVT_DLLPRIVATE void ImplInitStyle();
-protected:
-
void SetupDragOrigin();
void EditItemText( SvTreeListEntry* pEntry, SvLBoxString* pItem,
const Selection& );
@@ -766,6 +765,11 @@ public:
void SetAlternatingRowColors( const bool bEnable );
+ // Enables type-ahead search in the check list box.
+ void SetQuickSearch(bool bEnable) { mbQuickSearch = bEnable; }
+
+ void SetForceMakeVisible(bool bEnable);
+
virtual FactoryFunction GetUITestFactory() const override;
};
diff --git a/include/tools/wintypes.hxx b/include/tools/wintypes.hxx
index 5e2e6b5cf8c7..f4b2c9256874 100644
--- a/include/tools/wintypes.hxx
+++ b/include/tools/wintypes.hxx
@@ -251,9 +251,7 @@ WinBits const WB_HASLINESATROOT = SAL_CONST_INT64(0x000400000000);
WinBits const WB_HASBUTTONSATROOT = SAL_CONST_INT64(0x000800000000);
WinBits const WB_NOINITIALSELECTION = SAL_CONST_INT64(0x001000000000);
WinBits const WB_HIDESELECTION = SAL_CONST_INT64(0x002000000000);
-WinBits const WB_FORCE_MAKEVISIBLE = SAL_CONST_INT64(0x004000000000);
// DO NOT USE: 0x008000000000, that's WB_SYSTEMCHILDWINDOW
-WinBits const WB_QUICK_SEARCH = SAL_CONST_INT64(0x010000000000);
enum class WindowAlign { Left, Top, Right, Bottom };
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index b5729dc4b47d..96604b6aeffe 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1862,11 +1862,12 @@ void ScSearchEdit::MouseButtonDown(const MouseEvent& rMEvt)
void ScCheckListMenuWindow::setHasDates(bool bHasDates)
{
- // WB_QUICK_SEARCH Enables type-ahead search in the check list box.
+ // Enables type-ahead search in the check list box.
+ maChecks->SetQuickSearch(true);
if (bHasDates)
- maChecks->SetStyle(WB_QUICK_SEARCH | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT);
+ maChecks->SetStyle(WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT);
else
- maChecks->SetStyle(WB_QUICK_SEARCH | WB_HASBUTTONS);
+ maChecks->SetStyle(WB_HASBUTTONS);
}
void ScCheckListMenuWindow::initMembers()
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeList.cxx b/sc/source/ui/dbgui/PivotLayoutTreeList.cxx
index 717b07565f49..9e54339cc1ab 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeList.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeList.cxx
@@ -19,12 +19,13 @@
#include "scabstdlg.hxx"
VCL_BUILDER_FACTORY_ARGS(ScPivotLayoutTreeList,
- WB_BORDER | WB_TABSTOP | WB_CLIPCHILDREN |
- WB_FORCE_MAKEVISIBLE)
+ WB_BORDER | WB_TABSTOP | WB_CLIPCHILDREN)
ScPivotLayoutTreeList::ScPivotLayoutTreeList(vcl::Window* pParent, WinBits nBits) :
ScPivotLayoutTreeListBase(pParent, nBits)
-{}
+{
+ SetForceMakeVisible(true);
+}
ScPivotLayoutTreeList::~ScPivotLayoutTreeList()
{}
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
index 9a15b12bdb30..b5a5c4a16ee6 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
@@ -20,8 +20,7 @@
#include "globstr.hrc"
VCL_BUILDER_FACTORY_ARGS(ScPivotLayoutTreeListData,
- WB_BORDER | WB_TABSTOP | WB_CLIPCHILDREN |
- WB_FORCE_MAKEVISIBLE)
+ WB_BORDER | WB_TABSTOP | WB_CLIPCHILDREN)
namespace
{
@@ -67,7 +66,9 @@ OUString lclCreateDataItemName(const PivotFunc nFunctionMask, const OUString& rN
ScPivotLayoutTreeListData::ScPivotLayoutTreeListData(vcl::Window* pParent, WinBits nBits) :
ScPivotLayoutTreeListBase(pParent, nBits, DATA_LIST)
-{}
+{
+ SetForceMakeVisible(true);
+}
ScPivotLayoutTreeListData::~ScPivotLayoutTreeListData()
{}
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx
index 7b80c9fc0aac..1b3d09e9fabe 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx
@@ -19,13 +19,13 @@
#include "scabstdlg.hxx"
VCL_BUILDER_FACTORY_ARGS(ScPivotLayoutTreeListLabel,
- WB_BORDER | WB_TABSTOP | WB_CLIPCHILDREN |
- WB_FORCE_MAKEVISIBLE);
+ WB_BORDER | WB_TABSTOP | WB_CLIPCHILDREN);
ScPivotLayoutTreeListLabel::ScPivotLayoutTreeListLabel(vcl::Window* pParent, WinBits nBits)
: ScPivotLayoutTreeListBase(pParent, nBits, LABEL_LIST)
, maDataItem(0)
{
+ SetForceMakeVisible(true);
}
ScPivotLayoutTreeListLabel::~ScPivotLayoutTreeListLabel()
diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx
index 0fa302070af6..52e8db05f0cd 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -129,7 +129,8 @@ ScSolverOptionsDialog::ScSolverOptionsDialog( vcl::Window* pParent,
m_pBtnEdit->SetClickHdl( LINK( this, ScSolverOptionsDialog, ButtonHdl ) );
- m_pLbSettings->SetStyle( m_pLbSettings->GetStyle()|WB_CLIPCHILDREN|WB_FORCE_MAKEVISIBLE );
+ m_pLbSettings->SetStyle( m_pLbSettings->GetStyle()|WB_CLIPCHILDREN );
+ m_pLbSettings->SetForceMakeVisible(true);
m_pLbSettings->SetHighlightRange();
m_pLbSettings->SetSelectHdl( LINK( this, ScSolverOptionsDialog, SettingsSelHdl ) );
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 380f18084913..a715cf38181e 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -124,13 +124,14 @@ ScDocShell* ScContentTree::GetManualOrCurrent()
// ScContentTree
ScContentTree::ScContentTree(vcl::Window* pParent, ScNavigatorDlg* pNavigatorDlg)
- : SvTreeListBox(pParent, WB_BORDER | WB_QUICK_SEARCH)
+ : SvTreeListBox(pParent, WB_BORDER)
, pParentWindow(pNavigatorDlg)
, nRootType(ScContentId::ROOT)
, bHiddenDoc(false)
, pHiddenDocument(nullptr)
, bisInNavigatoeDlg(false)
{
+ SetQuickSearch(true);
for (sal_uInt16 i = 0; i <= (int)ScContentId::LAST; ++i)
pPosList[pTypeList[i]] = i; // inverse for searching
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 695f148c8010..db86c1409ed7 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -210,8 +210,8 @@ SdPageObjsTLB::SdPageObjsTLB( vcl::Window* pParentWin, WinBits nStyle )
SetStyle( GetStyle() | WB_TABSTOP | WB_BORDER | WB_HASLINES |
WB_HASBUTTONS | // WB_HASLINESATROOT |
WB_HSCROLL |
- WB_HASBUTTONSATROOT |
- WB_QUICK_SEARCH /* i31275 */ );
+ WB_HASBUTTONSATROOT );
+ SetQuickSearch(true); /* i31275 */;
SetNodeBitmaps(Image(BitmapEx(BMP_EXPAND)), Image(BitmapEx(BMP_COLLAPSE)));
SetDragDropMode(
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 4f74c2b46424..5be340533e22 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -642,7 +642,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, vcl
, xModuleManager(frame::ModuleManager::create(::comphelper::getProcessComponentContext()))
, m_pDeletionWatcher(nullptr)
- , aFmtLb( VclPtr<SfxActionListBox>::Create(this, WB_BORDER | WB_TABSTOP | WB_SORT | WB_QUICK_SEARCH) )
+ , aFmtLb( VclPtr<SfxActionListBox>::Create(this, WB_BORDER | WB_TABSTOP | WB_SORT) )
, aPreviewCheckbox( VclPtr<CheckBox>::Create( pW, WB_VCENTER ))
, aFilterLb( VclPtr<ListBox>::Create(pW, WB_BORDER | WB_DROPDOWN | WB_TABSTOP) )
@@ -667,6 +667,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, vcl
, m_bWantHierarchical(false)
, bBindingUpdate(true)
{
+ aFmtLb->SetQuickSearch(true);
aFmtLb->SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST));
aFmtLb->SetHelpId( HID_TEMPLATE_FMT );
aFilterLb->SetHelpId( HID_TEMPLATE_FILTER );
@@ -1593,10 +1594,10 @@ void SfxCommonTemplateDialog_Impl::EnableHierarchical(bool const bEnable)
aFmtLb->Hide();
pTreeBox = VclPtr<StyleTreeListBox_Impl>::Create(
-
this, WB_HASBUTTONS | WB_HASLINES |
WB_BORDER | WB_TABSTOP | WB_HASLINESATROOT |
- WB_HASBUTTONSATROOT | WB_HIDESELECTION | WB_QUICK_SEARCH );
+ WB_HASBUTTONSATROOT | WB_HIDESELECTION );
+ pTreeBox->SetQuickSearch(true);
pTreeBox->SetFont( aFmtLb->GetFont() );
pTreeBox->SetPosSizePixel(aFmtLb->GetPosPixel(), aFmtLb->GetSizePixel());
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 )
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 82625c6f2864..2c9301d212eb 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -879,7 +879,7 @@ SwContentTree::SwContentTree(vcl::Window* pParent, SwNavigationPI* pDialog)
m_aUpdTimer.SetTimeout(1000);
Clear();
EnableContextMenuHandling();
- SetStyle( GetStyle() | WB_QUICK_SEARCH );
+ SetQuickSearch(true);
}
SwContentTree::~SwContentTree()
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 9765031357ed..8d014f8b9826 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -682,7 +682,8 @@ SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings,
m_aStatusArr[3] = SwResId(STR_ACTIVE_VIEW);
m_aContentTree->SetStyle(m_aContentTree->GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT|
- WB_CLIPCHILDREN|WB_HSCROLL|WB_FORCE_MAKEVISIBLE );
+ WB_CLIPCHILDREN|WB_HSCROLL );
+ m_aContentTree->SetForceMakeVisible(true);
m_aContentTree->SetSpaceBetweenEntries(3);
m_aContentTree->SetSelectionMode(SelectionMode::Single);
m_aContentTree->SetDragDropMode(DragDropMode::CTRL_MOVE |
More information about the Libreoffice-commits
mailing list