xref: /AOO41X/main/offapi/com/sun/star/xml/dom/XCharacterData.idl (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27
28#ifndef __com_sun_star_xml_dom_XCharacterData_idl__
29#define __com_sun_star_xml_dom_XCharacterData_idl__
30
31#ifndef __com_sun_star_xml_dom_XNode_idl__
32#include <com/sun/star/xml/dom/XNode.idl>
33#endif
34
35module com { module sun { module star { module xml { module dom {
36
37interface XCharacterData: XNode
38{
39    /**
40    Append the string to the end of the character data of the node.
41    Throws:
42        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
43    */
44    void appendData([in] string arg) raises (DOMException);
45
46    /**
47    Remove a range of 16-bit units from the node.
48    Throws:
49        DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater
50            than the number of 16-bit units in data, or if the specified count is negative.
51        NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
52    */
53    void deleteData([in] long offset, [in] long count) raises (DOMException);
54
55    /**
56    Return the character data of the node that implements this interface.
57    Throws:
58        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
59        DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters
60            than fit in a DOMString variable on the implementation platform.
61
62
63    */
64    string getData() raises (DOMException);
65
66    /**
67    The number of 16-bit units that are available through data and the
68    substringData method below.
69    */
70    long getLength();
71
72    /**
73    Insert a string at the specified 16-bit unit offset.
74    Throws:
75    DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than
76                                   the number of 16-bit units in data.
77                   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
78    */
79    void insertData([in] long offset, [in] string arg) raises (DOMException);
80
81    /**
82    Replace the characters starting at the specified 16-bit unit offset
83    with the specified string.
84    Throws;
85    DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than
86                      the number of 16-bit units in data, or if the specified count is negative.
87                   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
88    */
89    void replaceData([in] long offset, [in] long count, [in] string arg) raises (DOMException);
90
91    /**
92    Set the character data of the node that implements this interface.
93    Throws:
94        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
95        DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than
96            fit in a DOMString variable on the implementation platform.
97    */
98    void setData([in] string data) raises (DOMException);
99
100    /**
101    Extracts a range of data from the node.
102    Throws:
103        DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater
104            than the number of 16-bit units in data, or if the specified count is negative.
105        DOMSTRING_SIZE_ERR: Raised if the specified range of text does not fit into a DOMString.
106    */
107    string subStringData([in] long offset, [in] long count) raises (DOMException);
108
109};
110};};};};};
111
112#endif
113