[Libreoffice-commits] core.git: 2 commits - sc/source svtools/source

Markus Mohrhard markus.mohrhard at googlemail.com
Sun Mar 26 02:57:26 UTC 2017


 sc/source/ui/cctrl/checklistmenu.cxx |    4 ++++
 sc/source/ui/inc/checklistmenu.hxx   |    1 +
 svtools/source/uitest/uiobject.cxx   |   10 ++++++++++
 3 files changed, 15 insertions(+)

New commits:
commit bc054e18712eb1a560ef27d0f2b0a62fc47bf962
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Mar 26 00:20:29 2017 +0100

    uitest: add more IDs to autofilter elements
    
    Change-Id: I6b22409403cf9ab39c9a120c712976316bf3a22a
    Reviewed-on: https://gerrit.libreoffice.org/35696
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 3b882f7e998f..ce637818191c 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -906,6 +906,9 @@ ScCheckListMenuWindow::ScCheckListMenuWindow(vcl::Window* pParent, ScDocument* p
     maChecks->SetTabStopsContainer( &maTabStops );
 
     set_id("check_list_menu");
+    maChkToggleAll->set_id("toggle_all");
+    maBtnSelectSingle->set_id("select_current");
+    maBtnUnselectSingle->set_id("unselect_current");
 }
 
 ScCheckListMenuWindow::~ScCheckListMenuWindow()
@@ -1610,6 +1613,7 @@ ScCheckListBox::ScCheckListBox( vcl::Window* pParent )
     :  SvTreeListBox( pParent, 0 ), mpCheckButton( nullptr ), mbSeenMouseButtonDown( false )
 {
     Init();
+    set_id("check_list_box");
 }
 
 SvTreeListEntry* ScCheckListBox::FindEntry( SvTreeListEntry* pParent, const OUString& sNode )
diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx
index 1723c9b0863b..f2e208ad4f6b 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -257,6 +257,7 @@ public:
         : Edit(pParent)
         , mpTabStops(nullptr)
     {
+        set_id("search_edit");
     }
 
     virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
commit 3df98c595f1b9c4bd0705578a15252a4d194293c
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Mar 26 00:21:04 2017 +0100

    uitest: add info whether a tree list box contains check boxes
    
    Change-Id: Id214928de2e74ac7ec707eaf2276e4e808b630a4
    Reviewed-on: https://gerrit.libreoffice.org/35697
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/svtools/source/uitest/uiobject.cxx b/svtools/source/uitest/uiobject.cxx
index 94da23aa6a54..aed862b0acbe 100644
--- a/svtools/source/uitest/uiobject.cxx
+++ b/svtools/source/uitest/uiobject.cxx
@@ -18,6 +18,15 @@ TreeListUIObject::TreeListUIObject(VclPtr<SvTreeListBox> xTreeList):
 {
 }
 
+namespace {
+
+bool isCheckBoxList(VclPtr<SvTreeListBox> xTreeList)
+{
+    return (xTreeList->GetTreeFlags() & SvTreeFlags::CHKBTN) == SvTreeFlags::CHKBTN;
+}
+
+}
+
 StringMap TreeListUIObject::get_state()
 {
     StringMap aMap = WindowUIObject::get_state();
@@ -26,6 +35,7 @@ StringMap TreeListUIObject::get_state()
     aMap["VisibleCount"] = OUString::number(mxTreeList->GetVisibleCount());
     aMap["Children"] = OUString::number(mxTreeList->GetChildCount(nullptr));
     aMap["LevelChildren"] = OUString::number(mxTreeList->GetLevelChildCount(nullptr));
+    aMap["CheckBoxList"] = OUString::boolean(isCheckBoxList(mxTreeList));
     return aMap;
 }
 


More information about the Libreoffice-commits mailing list