summaryrefslogtreecommitdiffstats
path: root/src/xml
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2007-01-21 19:03:03 +0000
committermental <mental@users.sourceforge.net>2007-01-21 19:03:03 +0000
commit63731301866e7b9cb231a43658a7c51ec2d70690 (patch)
tree91b475a32308003e60e40ac0f318dc00be019a6e /src/xml
parentDeprecate sp_repr_new* functions (diff)
downloadinkscape-63731301866e7b9cb231a43658a7c51ec2d70690.tar.gz
inkscape-63731301866e7b9cb231a43658a7c51ec2d70690.zip
start switching sp_repr_new* over to XML::Document::create*, and rename create methods to match DOM
(bzr r2253)
Diffstat (limited to 'src/xml')
-rw-r--r--src/xml/document.h4
-rw-r--r--src/xml/repr-action-test.cpp6
-rw-r--r--src/xml/simple-document.cpp4
-rw-r--r--src/xml/simple-document.h4
4 files changed, 9 insertions, 9 deletions
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);