diff options
-rw-r--r-- | desktop/source/lib/init.cxx | 6 | ||||
-rw-r--r-- | include/vcl/tabctrl.hxx | 3 | ||||
-rw-r--r-- | vcl/source/control/tabctrl.cxx | 18 |
3 files changed, 27 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 451f3149d67f..c8fc49c94bf8 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3607,6 +3607,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 8e8315bbff8e..d35f0d76aa8e 100644 --- a/include/vcl/tabctrl.hxx +++ b/include/vcl/tabctrl.hxx @@ -26,6 +26,7 @@ #include <vcl/toolbox.hxx> #include <vcl/EnumContext.hxx> #include <vcl/NotebookbarContextControl.hxx> +#include <boost/property_tree/json_parser.hpp> class ImplTabItem; struct ImplTabCtrlData; @@ -185,6 +186,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 e5d990f041de..4c7ee7b964d0 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -2161,6 +2161,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) |