From df7828a7a8ba0b7e6c2dd892ca5f0a62ef718bf0 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Tue, 24 Feb 2015 19:22:08 -0500 Subject: create SPObject factory (bzr r13939.1.1) --- src/sp-tref.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src/sp-tref.cpp') diff --git a/src/sp-tref.cpp b/src/sp-tref.cpp index 6a229e170..aef18462a 100644 --- a/src/sp-tref.cpp +++ b/src/sp-tref.cpp @@ -16,10 +16,6 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - #include #include "attributes.h" @@ -35,14 +31,6 @@ #include "xml/node.h" #include "xml/repr.h" -namespace { - SPObject* createTRef() { - return new SPTRef(); - } - - bool trefRegistered = SPFactory::instance().registerObject("svg:tref", createTRef); -} - //#define DEBUG_TREF #ifdef DEBUG_TREF # define debug(f, a...) { g_message("%s(%d) %s:", \ @@ -413,7 +401,7 @@ void sp_tref_update_text(SPTRef *tref) Inkscape::XML::Document *xml_doc = tref->document->getReprDoc(); Inkscape::XML::Node *newStringRepr = xml_doc->createTextNode(charData.c_str()); - tref->stringChild = SPFactory::instance().createObject(NodeTraits::get_type_string(*newStringRepr)); + tref->stringChild = SPFactory::createObject(NodeTraits::get_type_string(*newStringRepr)); // Add this SPString as a child of the tref tref->attach(tref->stringChild, tref->lastChild()); -- cgit v1.2.3