summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2021-01-18 08:17:01 +0900
committerTomaž Vajngerl <quikee@gmail.com>2021-01-18 07:09:18 +0100
commit36b17f030777219e69412733feb250b8de5af9ef (patch)
treea6818988037ed0321e5b463b37bf8b8b9b3045f2 /include
parentcf98f078b0a4e8c36cf0579042442e5583013608 (diff)
devtools: handle the doc. model tree with attached obects
Instead of filling the document model tree with fill* methods, refactor that to use objects that are attached (via get_id) to the tree nodes directly. For this introduce DocumentModelTreeEntry and subclasses, which implement what the current UNO object is that is being shown for a tree node and a "fill" virtual method, which is used to fill the child nodes of the tree when expanding a tree node. This makes the code much easier to work with and in addition it makes it possible to have all the tree nodes to fill the content on demand when expanded. Change-Id: Id5a027e060af90e483181439568f17d0172d1b35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109500 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/svx/devtools/DocumentModelTreeHandler.hxx21
1 files changed, 3 insertions, 18 deletions
diff --git a/include/svx/devtools/DocumentModelTreeHandler.hxx b/include/svx/devtools/DocumentModelTreeHandler.hxx
index d85716562419..ca7cab62b0b2 100644
--- a/include/svx/devtools/DocumentModelTreeHandler.hxx
+++ b/include/svx/devtools/DocumentModelTreeHandler.hxx
@@ -24,25 +24,8 @@ private:
std::unique_ptr<weld::TreeView>& mpDocumentModelTree;
css::uno::Reference<css::uno::XInterface> mxDocument;
- std::unordered_map<OUString, css::uno::Reference<css::uno::XInterface>> maUnoObjectMap;
-
void clearChildren(weld::TreeIter const& rParent);
- void fillSheets(weld::TreeIter const& rParent);
- void fillPages(weld::TreeIter const& rParent);
- void fillSlides(weld::TreeIter const& rParent);
- void fillMasterSlides(weld::TreeIter const& rParent);
- void fillParagraphs(weld::TreeIter const& rParent);
- void fillShapes(weld::TreeIter const& rParent);
- void fillTables(weld::TreeIter const& rParent);
- void fillFrames(weld::TreeIter const& rParent);
- void fillGraphicObjects(weld::TreeIter const& rParent);
- void fillOLEObjects(weld::TreeIter const& rParent);
- void fillStyleFamilies(weld::TreeIter const& rParent);
-
- void insertDocModelToParent(weld::TreeIter const& rParent, OUString const& rName,
- css::uno::Reference<css::uno::XInterface> const& rInterface);
-
public:
DocumentModelTreeHandler(std::unique_ptr<weld::TreeView>& pDocumentModelTree,
css::uno::Reference<css::uno::XInterface> const& xDocument)
@@ -56,7 +39,9 @@ public:
DECL_LINK(ExpandingHandler, const weld::TreeIter&, bool);
void inspectDocument();
- css::uno::Reference<css::uno::XInterface> getObjectByID(OUString const& rID);
+ static css::uno::Reference<css::uno::XInterface> getObjectByID(OUString const& rID);
+
+ void dispose();
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */