[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - desktop/source include/vcl vcl/source

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Thu May 14 11:46:42 UTC 2020


 desktop/source/lib/init.cxx    |    6 ++++++
 include/vcl/tabctrl.hxx        |    2 ++
 vcl/source/control/tabctrl.cxx |   18 ++++++++++++++++++
 3 files changed, 26 insertions(+)

New commits:
commit eaddcdf4fe79e9a1c393bd0ed737c898a7113844
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Mar 4 16:04:08 2020 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu May 14 13:46:09 2020 +0200

    jsdialog: send tab names
    
    Change-Id: Iaae09ec6fc1af0de7f052b89a09ea184a023be70
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94182
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 5d5e41ee09b5..42850f58dca2 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3649,6 +3649,12 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin
                         aMap["VALUE"] = aMap["data"];
                         pUIWindow->execute(sValue, aMap);
                     }
+                    else if (aMap["cmd"] == "selecttab")
+                    {
+                        aMap["POS"] = aMap["data"];
+
+                        pUIWindow->execute(sSelectAction, aMap);
+                    }
                     else
                         bIsClickAction = true;
                 }
diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx
index 39b45b1b423b..8e094020231b 100644
--- a/include/vcl/tabctrl.hxx
+++ b/include/vcl/tabctrl.hxx
@@ -187,6 +187,8 @@ public:
     virtual FactoryFunction GetUITestFactory() const override;
 
     virtual void queue_resize(StateChangedType eReason = StateChangedType::Layout) override;
+
+    virtual boost::property_tree::ptree DumpAsPropertyTree() override;
 };
 
 class NotebookBar;
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 6f284f8e042f..cab39a8feb94 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -2184,6 +2184,24 @@ FactoryFunction TabControl::GetUITestFactory() const
     return TabControlUIObject::create;
 }
 
+boost::property_tree::ptree TabControl::DumpAsPropertyTree()
+{
+    boost::property_tree::ptree aTree = Control::DumpAsPropertyTree();
+
+    boost::property_tree::ptree aTabs;
+    for(auto id : GetPageIDs())
+    {
+        boost::property_tree::ptree aTab;
+        aTab.put("text", GetPageText(id));
+        aTab.put("id", id);
+        aTabs.push_back(std::make_pair("", aTab));
+    }
+
+    aTree.add_child("tabs", aTabs);
+
+    return aTree;
+}
+
 sal_uInt16 NotebookbarTabControlBase::m_nHeaderHeight = 0;
 
 IMPL_LINK_NOARG(NotebookbarTabControlBase, OpenMenu, Button*, void)


More information about the Libreoffice-commits mailing list