mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-29 08:36:45 +01:00
CDATASection constructor fixes
This commit is contained in:
parent
7b9f9999cb
commit
a395a7e20e
2 changed files with 6 additions and 3 deletions
|
@ -21,10 +21,10 @@ class CDATASection : public Text<stringT>
|
|||
CDATASection() : Text<stringT>() { }
|
||||
explicit CDATASection(CDATASection_impl<stringT>* impl) : Text<stringT>(impl) { }
|
||||
CDATASection(const CDATASection& rhs) : Text<stringT>(rhs) { }
|
||||
explicit CDATASection(const Node<stringT>& rhs) : Text<stringT>(rhs)
|
||||
explicit CDATASection(const Node<stringT>& rhs) : Text<stringT>(rhs, 0)
|
||||
{
|
||||
if(dynamic_cast<CDATASection_impl<stringT>*>(rhs.impl()) == 0)
|
||||
throw std::bad_cast();
|
||||
if(rhs.getNodeType() != CDATA_SECTION_NODE)
|
||||
throw std::bad_cast("Cannot convert Node to CDATA section");
|
||||
} // CDATASection
|
||||
|
||||
CDATASection<stringT> splitText(int offset)
|
||||
|
|
|
@ -28,6 +28,9 @@ class Text : public CharacterData<stringT>
|
|||
throw std::bad_cast("Cannot cast Node to Text");
|
||||
} // Text
|
||||
|
||||
protected:
|
||||
Text(const Node<stringT>& rhs, int dummy) : CharacterData<stringT>(rhs, 0) { }
|
||||
|
||||
Text splitText(int offset)
|
||||
{
|
||||
return tImpl()->splitText(offset);
|
||||
|
|
Loading…
Add table
Reference in a new issue