sc/qa/uitest/calc_tests8/navigator.py |    7 +++++--
 sc/source/ui/inc/navipi.hxx           |    3 ---
 sc/source/ui/inc/uiobject.hxx         |   17 -----------------
 sc/source/ui/navipi/navipi.cxx        |    5 -----
 sc/source/ui/uitest/uiobject.cxx      |   28 ----------------------------
 5 files changed, 5 insertions(+), 55 deletions(-)

New commits:
commit 6b0e1986a7c446cb6862f645e45c377c2a309065
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sun Mar 7 20:46:20 2021 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Mar 9 10:07:24 2021 +0100

    decompose ScNavigatorDlgUIObject and use sub components directly
    
    Change-Id: I817d0e201804dce3e83d204702ff236f5689ebb8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112148
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sc/qa/uitest/calc_tests8/navigator.py 
b/sc/qa/uitest/calc_tests8/navigator.py
index abbb8ce1cf73..5e8cb99e01e3 100644
--- a/sc/qa/uitest/calc_tests8/navigator.py
+++ b/sc/qa/uitest/calc_tests8/navigator.py
@@ -91,7 +91,9 @@ class navigator(UITestCase):
 
         xCalcDoc = self.xUITest.getTopFocusWindow()
         xNavigatorPanel = xCalcDoc.getChild("NavigatorPanelParent")
-        xNavigatorPanel.executeAction("ROOT", tuple())
+        xToolBar = xNavigatorPanel.getChild("toolbox2")
+        xToolBar.executeAction("CLICK", mkPropertyValues({"POS": "0"})) # 
'toggle' button
+
         xContentBox = xNavigatorPanel.getChild('contentbox')
 
         # tdf#133079, without the fix in place, it would be 8
@@ -123,7 +125,8 @@ class navigator(UITestCase):
 
         xCalcDoc = self.xUITest.getTopFocusWindow()
         xNavigatorPanel = xCalcDoc.getChild("NavigatorPanelParent")
-        xNavigatorPanel.executeAction("ROOT", tuple())
+        xToolBar = xNavigatorPanel.getChild("toolbox2")
+        xToolBar.executeAction("CLICK", mkPropertyValues({"POS": "0"})) # 
'toggle' button
 
         xRow = xNavigatorPanel.getChild('row')
         xColumn = xNavigatorPanel.getChild('column')
diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx
index 988822a69ee8..fae782112f7c 100644
--- a/sc/source/ui/inc/navipi.hxx
+++ b/sc/source/ui/inc/navipi.hxx
@@ -88,7 +88,6 @@ class ScNavigatorDlg : public PanelLayout, public SfxListener
 friend class ScNavigatorControllerItem;
 friend class ScNavigatorDialogWrapper;
 friend class ScContentTree;
-friend class ScNavigatorDlgUIObject;
 
 private:
     static constexpr int CTRL_ITEMS = 4;
@@ -178,8 +177,6 @@ public:
     virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
 
     virtual void StateChanged(StateChangedType nStateChange) override;
-
-    FactoryFunction GetUITestFactory() const override;
 };
 
 class ScNavigatorDialogWrapper: public SfxChildWindowContext
diff --git a/sc/source/ui/inc/uiobject.hxx b/sc/source/ui/inc/uiobject.hxx
index ae3583fff154..01ebdcdc6e89 100644
--- a/sc/source/ui/inc/uiobject.hxx
+++ b/sc/source/ui/inc/uiobject.hxx
@@ -45,21 +45,4 @@ private:
     ScViewFunc* getViewFunc();
 };
 
-class ScNavigatorDlg;
-
-class ScNavigatorDlgUIObject : public WindowUIObject
-{
-    VclPtr<ScNavigatorDlg> mxScNavigatorDlg;
-
-public:
-    ScNavigatorDlgUIObject(const VclPtr<ScNavigatorDlg>& xScNavigatorDlg);
-
-    virtual void execute(const OUString& rAction, const StringMap& 
rParameters) override;
-
-    static std::unique_ptr<UIObject> create(vcl::Window* pWindow);
-
-protected:
-    virtual OUString get_name() const override;
-};
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 6fea222a7938..d8fa920f2385 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -442,11 +442,6 @@ void ScNavigatorDlg::StateChanged(StateChangedType 
nStateChange)
     }
 }
 
-FactoryFunction ScNavigatorDlg::GetUITestFactory() const
-{
-    return ScNavigatorDlgUIObject::create;
-}
-
 ScNavigatorDlg::~ScNavigatorDlg()
 {
     disposeOnce();
diff --git a/sc/source/ui/uitest/uiobject.cxx b/sc/source/ui/uitest/uiobject.cxx
index 1e17f9301a58..d93da2619a77 100644
--- a/sc/source/ui/uitest/uiobject.cxx
+++ b/sc/source/ui/uitest/uiobject.cxx
@@ -381,32 +381,4 @@ OUString ScGridWinUIObject::get_name() const
     return "ScGridWinUIObject";
 }
 
-ScNavigatorDlgUIObject::ScNavigatorDlgUIObject(const VclPtr<ScNavigatorDlg>& 
xScNavigatorDlg):
-    WindowUIObject(xScNavigatorDlg),
-    mxScNavigatorDlg(xScNavigatorDlg)
-{
-}
-
-void ScNavigatorDlgUIObject::execute(const OUString& rAction,
-        const StringMap& rParameters)
-{
-    if (rAction == "ROOT")
-    {
-        mxScNavigatorDlg->ToolBoxSelectHdl("toggle");
-    }
-    else
-        WindowUIObject::execute(rAction, rParameters);
-}
-
-std::unique_ptr<UIObject> ScNavigatorDlgUIObject::create(vcl::Window* pWindow)
-{
-    ScNavigatorDlg* pScNavigatorDlg = dynamic_cast<ScNavigatorDlg*>(pWindow);
-    assert(pScNavigatorDlg);
-    return std::unique_ptr<UIObject>(new 
ScNavigatorDlgUIObject(pScNavigatorDlg));
-}
-
-OUString ScNavigatorDlgUIObject::get_name() const
-{
-    return "ScNavigatorDlgUIObject";
-}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to