tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / offapi / com / sun / star / xml / wrapper / XXMLDocumentWrapper.idl
blobc23b76a48b80694f9350042f8c2b0f2ba9892d22
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 module com { module sun { module star { module xml { module wrapper {
22 interface XXMLElementWrapper;
24 /**
25 * Interface of XML Document Wrapper.
26 * <p>
27 * When converting SAX events into a DOM tree, this interface is
28 * used to manipulate the DOM data in UNO perspective.
29 * <p>
30 * Every language has its own methods to manipulate its native DOM
31 * data structure, this interface provides a common method set which
32 * each language have to implement.
33 * <p>
34 * In another word, this interface wraps language dependent methods,
35 * then other component can manipulate DOM data through UNO methods.
37 interface XXMLDocumentWrapper : com::sun::star::uno::XInterface
39 /**
40 * Gets the current element.
42 * @return the current element in the SAX event stream
44 XXMLElementWrapper getCurrentElement();
46 /**
47 * Sets the current element.
48 * <p>
49 * When the current element is replaced outside of this interface, then
50 * uses this method can update the current element pointer.
52 * @param element the new current element
54 void setCurrentElement([in] XXMLElementWrapper element);
56 /**
57 * Removes the current element.
58 * <p>
59 * When the current element is removed, then its parent element becomes
60 * the new current element.
62 void removeCurrentElement();
64 /**
65 * Checks whether an element is the current element.
67 * @param node the element to be checked
68 * @return <code>true</code> if the node is the current element,
69 * <code>false</code> otherwise
71 boolean isCurrent([in] XXMLElementWrapper node);
73 /**
74 * Checks whether the current element is empty.
76 * @return <code>true</code> if the current element is empty,
77 * <code>false</code> otherwise
79 boolean isCurrentElementEmpty();
81 /**
82 * Gets the name of the element.
84 * @param node the element whose name will be gotten
85 * @return the name of the element
87 string getNodeName([in] XXMLElementWrapper node);
89 /**
90 * Clears all useless element in a branch of the DOM tree along the
91 * tree order.
93 * @param node the start point of the branch to clear
94 * @param reservedDescendants an array including all elements that
95 * need to be reserved (along their
96 * ancestor path)
97 * @param stopAtNode the stop element. The operation have
98 * to interrupt when this element is met
99 * during clearing
101 void clearUselessData(
102 [in] XXMLElementWrapper node,
103 [in] sequence< XXMLElementWrapper > reservedDescendants,
104 [in] XXMLElementWrapper stopAtNode);
107 * Collapses a tree path
108 * <p>
109 * Each element in the ancestor path of the node will be checked,
110 * if this element is empty, then deletes it.
112 * @param node the start point of the path from where the tree
113 * path will be collapsed
115 void collapse([in] XXMLElementWrapper node);
118 * Converts a part of the DOM tree into SAX events.
120 * @param handler the document handler which will receive
121 * generated SAX events
122 * @param saxEventKeeperHandler the SAXEventKeeper connecting with
123 * this XMLDocumentHandler
124 * @param startNode the start point to generate SAX events
125 * @param endNode the end point where to stop generating
127 void generateSAXEvents(
128 [in] com::sun::star::xml::sax::XDocumentHandler handler,
129 [in] com::sun::star::xml::sax::XDocumentHandler saxEventKeeperHandler,
130 [in] XXMLElementWrapper startNode,
131 [in] XXMLElementWrapper endNode)
132 raises( com::sun::star::xml::sax::SAXException );
135 * Converts the whole DOM tree into a SAX event stream.
137 * @param handler the document handler which will receive the SAX event
138 * stream
140 void getTree([in] com::sun::star::xml::sax::XDocumentHandler handler)
141 raises( com::sun::star::xml::sax::SAXException );
144 * Rebuild the ID attribute in the branch starting from the particular
145 * element.
147 * @param node the root element of the branch whose ID link will be
148 * built
150 void rebuildIDLink([in] XXMLElementWrapper node);
153 } ; } ; } ; } ; } ;
155 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */