[Libreoffice-commits] core.git: sfx2/source

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Sun Mar 21 08:20:16 UTC 2021


 sfx2/source/devtools/DevelopmentToolDockingWindow.cxx |    2 ++
 sfx2/source/devtools/DocumentModelTreeHandler.cxx     |    5 +++--
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx   |    1 +
 3 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit dd49d1985d3293095fa6e6ce3b2b0d57d5da8c27
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Mar 17 20:37:26 2021 +0900
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Sun Mar 21 09:19:29 2021 +0100

    devtools: add some more comments
    
    Change-Id: I12e0154b0286967283bf0157bb29249472159185
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112640
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx b/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
index 69711cc32b0c..30bbbed72942 100644
--- a/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
+++ b/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
@@ -86,6 +86,7 @@ DevelopmentToolDockingWindow::~DevelopmentToolDockingWindow() { disposeOnce(); }
 
 void DevelopmentToolDockingWindow::dispose()
 {
+    // Stop and remove the listener
     auto* pSelectionChangeHandler
         = dynamic_cast<SelectionChangeHandler*>(mxSelectionListener.get());
     if (pSelectionChangeHandler)
@@ -93,6 +94,7 @@ void DevelopmentToolDockingWindow::dispose()
 
     mxSelectionListener = uno::Reference<view::XSelectionChangeListener>();
 
+    // dispose DOM and object inspector handlers
     maDocumentModelTreeHandler.dispose();
     maObjectInspectorTreeHandler.dispose();
 
diff --git a/sfx2/source/devtools/DocumentModelTreeHandler.cxx b/sfx2/source/devtools/DocumentModelTreeHandler.cxx
index 7645fc327686..c77dc02a5236 100644
--- a/sfx2/source/devtools/DocumentModelTreeHandler.cxx
+++ b/sfx2/source/devtools/DocumentModelTreeHandler.cxx
@@ -64,8 +64,6 @@ protected:
     css::uno::Reference<css::uno::XInterface> mxObject;
 
 public:
-    DocumentModelTreeEntry() = default;
-
     DocumentModelTreeEntry(OUString const& rString,
                            css::uno::Reference<css::uno::XInterface> const& xObject)
         : maString(rString)
@@ -91,6 +89,7 @@ public:
     }
 };
 
+// append an entry to a input TreeView to a parent
 void lclAppendToParentEntry(std::unique_ptr<weld::TreeView>& rTree, weld::TreeIter const& rParent,
                             DocumentModelTreeEntry* pEntry)
 {
@@ -100,6 +99,7 @@ void lclAppendToParentEntry(std::unique_ptr<weld::TreeView>& rTree, weld::TreeIt
                   nullptr);
 }
 
+// append a root entry to a input TreeView
 OUString lclAppend(std::unique_ptr<weld::TreeView>& rTree, DocumentModelTreeEntry* pEntry)
 {
     OUString sId(OUString::number(reinterpret_cast<sal_Int64>(pEntry)));
@@ -109,6 +109,7 @@ OUString lclAppend(std::unique_ptr<weld::TreeView>& rTree, DocumentModelTreeEntr
     return sId;
 }
 
+/** Entry that represents a object, which implements a XNameAccess */
 class NameAccessTreeEntry : public DocumentModelTreeEntry
 {
 protected:
diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index 4d6e00e2dc7e..7884bdb4b88a 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -1241,6 +1241,7 @@ void ObjectInspectorTreeHandler::appendMethods(uno::Reference<uno::XInterface> c
     }
 }
 
+// Update the back button state depending if there are objects in the stack
 void ObjectInspectorTreeHandler::updateBackButtonState()
 {
     mpObjectInspectorWidgets->mpToolbar->set_item_sensitive("back", maInspectionStack.size() > 1);


More information about the Libreoffice-commits mailing list