summaryrefslogtreecommitdiffstats
path: root/src/sp-object.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2015-02-25 00:22:08 +0000
committerLiam P. White <inkscapebrony@gmail.com>2015-02-25 00:22:08 +0000
commitdf7828a7a8ba0b7e6c2dd892ca5f0a62ef718bf0 (patch)
tree8e03cc5b9c89749e73a1281ee997da90b40694fc /src/sp-object.cpp
parentTranslations. Hungarian translation update. (diff)
downloadinkscape-df7828a7a8ba0b7e6c2dd892ca5f0a62ef718bf0.tar.gz
inkscape-df7828a7a8ba0b7e6c2dd892ca5f0a62ef718bf0.zip
create SPObject factory
(bzr r13939.1.1)
Diffstat (limited to '')
-rw-r--r--src/sp-object.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index 1094b88a7..343db435e 100644
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
@@ -61,14 +61,6 @@ using std::strstr;
# define debug(f, a...) /* */
#endif
-namespace {
- SPObject* createObject() {
- return new SPObject();
- }
-
- bool gridRegistered = SPFactory::instance().registerObject("inkscape:grid", createObject);
-}
-
guint update_in_progress = 0; // guard against update-during-update
Inkscape::XML::NodeEventVector object_event_vector = {
@@ -629,7 +621,7 @@ void SPObject::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref)
const std::string type_string = NodeTraits::get_type_string(*child);
- SPObject* ochild = SPFactory::instance().createObject(type_string);
+ SPObject* ochild = SPFactory::createObject(type_string);
if (ochild == NULL) {
// Currenty, there are many node types that do not have
// corresponding classes in the SPObject tree.
@@ -688,7 +680,7 @@ void SPObject::build(SPDocument *document, Inkscape::XML::Node *repr) {
for (Inkscape::XML::Node *rchild = repr->firstChild() ; rchild != NULL; rchild = rchild->next()) {
const std::string typeString = NodeTraits::get_type_string(*rchild);
- SPObject* child = SPFactory::instance().createObject(typeString);
+ SPObject* child = SPFactory::createObject(typeString);
if (child == NULL) {
// Currenty, there are many node types that do not have
// corresponding classes in the SPObject tree.