summaryrefslogtreecommitdiffstats
path: root/src/xml/text-node.h
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2011-09-08 14:27:40 +0000
committertavmjong-free <tavmjong@free.fr>2011-09-08 14:27:40 +0000
commit8a73582fd88bffa4e219dfce758a930b43c06a98 (patch)
tree625d3418f77eb5db1aa913f522773ed0f4bd4f55 /src/xml/text-node.h
parentObey to dont-scale-strokewidth preference, even when scaling one dimension to... (diff)
downloadinkscape-8a73582fd88bffa4e219dfce758a930b43c06a98.tar.gz
inkscape-8a73582fd88bffa4e219dfce758a930b43c06a98.zip
Preserve CDATA sections on output.
(bzr r10625)
Diffstat (limited to 'src/xml/text-node.h')
-rw-r--r--src/xml/text-node.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/xml/text-node.h b/src/xml/text-node.h
index b0b7c884b..2fabd6953 100644
--- a/src/xml/text-node.h
+++ b/src/xml/text-node.h
@@ -30,14 +30,25 @@ struct TextNode : public SimpleNode {
: SimpleNode(g_quark_from_static_string("string"), doc)
{
setContent(content);
+ _is_CData = false;
+ }
+ TextNode(Util::ptr_shared<char> content, Document *doc, bool is_CData)
+ : SimpleNode(g_quark_from_static_string("string"), doc)
+ {
+ setContent(content);
+ _is_CData = is_CData;
}
TextNode(TextNode const &other, Document *doc)
- : SimpleNode(other, doc) {}
+ : SimpleNode(other, doc) {
+ _is_CData = other._is_CData;
+ }
Inkscape::XML::NodeType type() const { return Inkscape::XML::TEXT_NODE; }
+ bool is_CData() const { return _is_CData; }
protected:
SimpleNode *_duplicate(Document* doc) const { return new TextNode(*this, doc); }
+ bool _is_CData;
};
}