23 #include "dom/dom_exception.h"
24 #include "dom/dom_text.h"
25 #include "xml/dom_textimpl.h"
29 CharacterData::CharacterData() :
Node()
39 NodeImpl* ohandle = other.handle();
40 if ( impl != ohandle ) {
42 ( ohandle->nodeType() != CDATA_SECTION_NODE &&
43 ohandle->nodeType() != TEXT_NODE &&
44 ohandle->nodeType() != COMMENT_NODE )) {
45 if ( impl ) impl->deref();
48 Node::operator =(other);
56 Node::operator =(other);
60 CharacterData::~CharacterData()
67 return ((CharacterDataImpl *)impl)->data();
75 int exceptioncode = 0;
76 ((CharacterDataImpl *)impl)->setData(str, exceptioncode);
85 return ((CharacterDataImpl *)impl)->length();
94 int exceptioncode = 0;
95 DOMString str = ((CharacterDataImpl *)impl)->substringData(offset, count, exceptioncode);
106 int exceptioncode = 0;
107 ((CharacterDataImpl *)impl)->appendData(arg, exceptioncode);
117 int exceptioncode = 0;
118 ((CharacterDataImpl *)impl)->insertData(offset, arg, exceptioncode);
128 int exceptioncode = 0;
129 ((CharacterDataImpl *)impl)->deleteData(offset, count, exceptioncode);
139 int exceptioncode = 0;
140 ((CharacterDataImpl *)impl)->replaceData(offset, count, arg, exceptioncode);
145 CharacterData::CharacterData(CharacterDataImpl *i) :
Node(i)
161 NodeImpl* ohandle = other.handle();
162 if ( impl != ohandle ) {
163 if (!ohandle || ohandle->nodeType() != COMMENT_NODE) {
164 if ( impl ) impl->deref();
167 Node::operator =(other);
175 CharacterData::operator =(other);
197 Text &Text::operator = (
const Node &other)
199 NodeImpl* ohandle = other.handle();
200 if ( impl != ohandle ) {
202 (ohandle->nodeType() != TEXT_NODE &&
203 ohandle->nodeType() != CDATA_SECTION_NODE)) {
204 if ( impl ) impl->deref();
207 Node::operator =(other);
213 Text &Text::operator = (
const Text &other)
215 Node::operator =(other);
228 int exceptioncode = 0;
229 TextImpl *newText =
static_cast<TextImpl *
>(impl)->
splitText(offset, exceptioncode );