diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2021-01-29 14:51:56 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-02-05 10:36:39 +0100 |
commit | 650b1718b25f3446c1e1ff487534ae18156d9c0a (patch) | |
tree | c520862618a70f9cdc78470239034a815621caf8 /include/svx | |
parent | 47448aaff96536fa76588ee6de4164109df5d420 (diff) |
devtools: change "Current Selection" tree item to a toggle button
It is a bit awkward that the selection is a tree item so this
changes it to be a toogle button, which when enabled, shows the
object in the right-hand side object inspector and disables the
left-hand side DOM object tree view in this case.
Change-Id: I4ebd03a39c72109f0545206354aa7dbe85e9649a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110119
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/svx')
-rw-r--r-- | include/svx/devtools/DevelopmentToolDockingWindow.hxx | 5 | ||||
-rw-r--r-- | include/svx/devtools/DocumentModelTreeHandler.hxx | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/include/svx/devtools/DevelopmentToolDockingWindow.hxx b/include/svx/devtools/DevelopmentToolDockingWindow.hxx index 98a805a22716..5d917516c195 100644 --- a/include/svx/devtools/DevelopmentToolDockingWindow.hxx +++ b/include/svx/devtools/DevelopmentToolDockingWindow.hxx @@ -27,17 +27,20 @@ class SVX_DLLPUBLIC DevelopmentToolDockingWindow final : public SfxDockingWindow private: std::unique_ptr<weld::Label> mpClassNameLabel; std::unique_ptr<weld::TreeView> mpClassListBox; - std::unique_ptr<weld::TreeView> mpLeftSideTreeView; + std::unique_ptr<weld::ToggleButton> mpSelectionToggle; css::uno::Reference<css::uno::XInterface> mxRoot; + css::uno::Reference<css::uno::XInterface> mxCurrentSelection; OUString msDocumentType; DocumentModelTreeHandler maDocumentModelTreeHandler; DECL_LINK(LeftSideSelected, weld::TreeView&, void); + DECL_LINK(SelectionToggled, weld::ToggleButton&, void); void inspectDocument(); + void updateSelection(); public: DevelopmentToolDockingWindow(SfxBindings* pBindings, SfxChildWindow* pChildWindow, diff --git a/include/svx/devtools/DocumentModelTreeHandler.hxx b/include/svx/devtools/DocumentModelTreeHandler.hxx index 731c733015e0..3b57ec1aca34 100644 --- a/include/svx/devtools/DocumentModelTreeHandler.hxx +++ b/include/svx/devtools/DocumentModelTreeHandler.hxx @@ -23,7 +23,6 @@ class DocumentModelTreeHandler private: std::unique_ptr<weld::TreeView>& mpDocumentModelTree; css::uno::Reference<css::uno::XInterface> mxDocument; - OUString msCurrentSelectionID; void clearChildren(weld::TreeIter const& rParent); @@ -40,7 +39,7 @@ public: DECL_LINK(ExpandingHandler, const weld::TreeIter&, bool); void inspectDocument(); - void setCurrentSelectedObject(css::uno::Reference<css::uno::XInterface> xObject); + static css::uno::Reference<css::uno::XInterface> getObjectByID(OUString const& rID); void dispose(); |