summaryrefslogtreecommitdiff
path: root/sc/source/ui/cctrl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-09-29 10:09:02 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-09-29 10:14:22 +0100
commit17f749afd75c407bf7adae9b8e15276de14ef5d5 (patch)
treef70b90eb598651921cfdda12fac3c09f0b776375 /sc/source/ui/cctrl
parentb052acce562373675209fa9b0b85bbd02fc50999 (diff)
only date autofilter menus need the space for the tree expanders
so for lists that don't include dates then drop the tree view bits to save space to the left of the entries Change-Id: I44f624d8a06d578674806813239a408466c87d70
Diffstat (limited to 'sc/source/ui/cctrl')
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index a017cdaf2e39..0b5174e49c54 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -877,7 +877,7 @@ void ScCheckListMenuWindow::CancelButton::Click()
ScCheckListMenuWindow::ScCheckListMenuWindow(vcl::Window* pParent, ScDocument* pDoc) :
ScMenuFloatingWindow(pParent, pDoc),
maEdSearch(VclPtr<ScSearchEdit>::Create(this)),
- maChecks(VclPtr<ScCheckListBox>::Create(this, WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT) ),
+ maChecks(VclPtr<ScCheckListBox>::Create(this)),
maChkToggleAll(VclPtr<TriStateBox>::Create(this, 0)),
maBtnSelectSingle(VclPtr<ImageButton>::Create(this, 0)),
maBtnUnselectSingle(VclPtr<ImageButton>::Create(this, 0)),
@@ -905,9 +905,6 @@ ScCheckListMenuWindow::ScCheckListMenuWindow(vcl::Window* pParent, ScDocument* p
maEdSearch->SetTabStopsContainer( &maTabStops );
maChecks->SetTabStopsContainer( &maTabStops );
-
- // Enable type-ahead search in the check list box.
- maChecks->SetStyle(maChecks->GetStyle() | WB_QUICK_SEARCH);
}
ScCheckListMenuWindow::~ScCheckListMenuWindow()
@@ -1831,6 +1828,15 @@ void ScSearchEdit::MouseButtonDown(const MouseEvent& rMEvt)
mpTabStops->SetTabStop( this );
}
+void ScCheckListMenuWindow::setHasDates(bool bHasDates)
+{
+ // WB_QUICK_SEARCH Enables type-ahead search in the check list box.
+ if (bHasDates)
+ maChecks->SetStyle(WB_QUICK_SEARCH | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT);
+ else
+ maChecks->SetStyle(WB_QUICK_SEARCH | WB_HASBUTTONS);
+}
+
void ScCheckListMenuWindow::initMembers()
{
size_t n = maMembers.size();