From 63731301866e7b9cb231a43658a7c51ec2d70690 Mon Sep 17 00:00:00 2001 From: MenTaLguY Date: Sun, 21 Jan 2007 19:03:03 +0000 Subject: start switching sp_repr_new* over to XML::Document::create*, and rename create methods to match DOM (bzr r2253) --- src/xml/document.h | 4 ++-- src/xml/repr-action-test.cpp | 6 +++--- src/xml/simple-document.cpp | 4 ++-- src/xml/simple-document.h | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/xml') diff --git a/src/xml/document.h b/src/xml/document.h index eeb16e74f..de9164aa2 100644 --- a/src/xml/document.h +++ b/src/xml/document.h @@ -34,9 +34,9 @@ public: virtual void commit()=0; virtual Inkscape::XML::Event *commitUndoable()=0; - virtual Node *createElementNode(char const *name)=0; + virtual Node *createElement(char const *name)=0; virtual Node *createTextNode(char const *content)=0; - virtual Node *createCommentNode(char const *content)=0; + virtual Node *createComment(char const *content)=0; }; } diff --git a/src/xml/repr-action-test.cpp b/src/xml/repr-action-test.cpp index 7f5f27f2d..7ab857f46 100644 --- a/src/xml/repr-action-test.cpp +++ b/src/xml/repr-action-test.cpp @@ -16,9 +16,9 @@ int main(int argc, char *argv[]) { utest_start("XML Transactions"); - a = sp_repr_new("a"); - b = sp_repr_new("b"); - c = sp_repr_new("c"); + a = document->createElement("a"); + b = document->createElement("b"); + c = document->createElement("c"); UTEST_TEST("rollback of node addition") { sp_repr_begin_transaction(document); diff --git a/src/xml/simple-document.cpp b/src/xml/simple-document.cpp index e8c652b2d..4063abde4 100644 --- a/src/xml/simple-document.cpp +++ b/src/xml/simple-document.cpp @@ -51,7 +51,7 @@ Inkscape::XML::Event *SimpleDocument::commitUndoable() { return _log_builder.detach(); } -Node *SimpleDocument::createElementNode(char const *name) { +Node *SimpleDocument::createElement(char const *name) { return new ElementNode(g_quark_from_string(name)); } @@ -59,7 +59,7 @@ Node *SimpleDocument::createTextNode(char const *content) { return new TextNode(Util::share_string(content)); } -Node *SimpleDocument::createCommentNode(char const *content) { +Node *SimpleDocument::createComment(char const *content) { return new CommentNode(Util::share_string(content)); } diff --git a/src/xml/simple-document.h b/src/xml/simple-document.h index ca130e62b..c8ee4d9b4 100644 --- a/src/xml/simple-document.h +++ b/src/xml/simple-document.h @@ -46,9 +46,9 @@ public: void commit(); Inkscape::XML::Event *commitUndoable(); - Node *createElementNode(char const *name); + Node *createElement(char const *name); Node *createTextNode(char const *content); - Node *createCommentNode(char const *content); + Node *createComment(char const *content); void notifyChildAdded(Node &parent, Node &child, Node *prev); -- cgit v1.2.3