LibreOffice Module sfx2 (master) 1
DocumentModelTreeHandler.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 */
10
11#pragma once
12
13#include <vcl/weld.hxx>
14
15#include <com/sun/star/uno/XInterface.hpp>
16#include <com/sun/star/uno/Reference.hxx>
17
24{
25private:
26 std::unique_ptr<weld::TreeView>& mpDocumentModelTree;
27 css::uno::Reference<css::uno::XInterface> mxDocument;
28
29 // Clears all children of a tree node, where the parent is
30 // identified by the input tree iter.
31 void clearChildren(weld::TreeIter const& rParent);
32
33 // Clear all tree view nodes.
34 void clearAll();
35
36public:
37 DocumentModelTreeHandler(std::unique_ptr<weld::TreeView>& pDocumentModelTree,
38 css::uno::Reference<css::uno::XInterface> xDocument);
39
40 DECL_LINK(ExpandingHandler, const weld::TreeIter&, bool);
41
42 void inspectDocument();
43
44 static css::uno::Reference<css::uno::XInterface> getObjectByID(OUString const& rID);
45
46 void dispose();
47
48 // selects the input object if it exists in the DOM tree view
49 void selectObject(css::uno::Reference<css::uno::XInterface> const& xInterface);
50};
51
52/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Document model tree handler.
std::unique_ptr< weld::TreeView > & mpDocumentModelTree
DECL_LINK(ExpandingHandler, const weld::TreeIter &, bool)
static css::uno::Reference< css::uno::XInterface > getObjectByID(OUString const &rID)
void selectObject(css::uno::Reference< css::uno::XInterface > const &xInterface)
void clearChildren(weld::TreeIter const &rParent)
css::uno::Reference< css::uno::XInterface > mxDocument
DocumentModelTreeHandler(std::unique_ptr< weld::TreeView > &pDocumentModelTree, css::uno::Reference< css::uno::XInterface > xDocument)