summaryrefslogtreecommitdiffstats
path: root/src/sp-symbol.cpp
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-04-02 17:14:36 +0000
committerMarkus Engel <markus.engel@tum.de>2013-04-02 17:14:36 +0000
commitd1af3566872dfff2aeec84859c87f1f8d13f79df (patch)
treef52de634baaf9cce333012b29437979881c7ac22 /src/sp-symbol.cpp
parentAdded new factory for SPObject tree objects. (diff)
downloadinkscape-d1af3566872dfff2aeec84859c87f1f8d13f79df.tar.gz
inkscape-d1af3566872dfff2aeec84859c87f1f8d13f79df.zip
Registered classes with new factory. Hkern, Vkern and FeFuncX have to be rewritten, as they aren't real classes.
(bzr r11608.1.69)
Diffstat (limited to 'src/sp-symbol.cpp')
-rw-r--r--src/sp-symbol.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sp-symbol.cpp b/src/sp-symbol.cpp
index 6c1212d71..4e5b53e48 100644
--- a/src/sp-symbol.cpp
+++ b/src/sp-symbol.cpp
@@ -26,6 +26,16 @@
#include "sp-symbol.h"
#include "document.h"
+#include "sp-factory.h"
+
+namespace {
+ SPObject* createSymbol() {
+ return new SPSymbol();
+ }
+
+ bool symbolRegistered = SPFactory::instance().registerObject("svg:symbol", createSymbol);
+}
+
G_DEFINE_TYPE(SPSymbol, sp_symbol, G_TYPE_OBJECT);
static void sp_symbol_class_init(SPSymbolClass *klass)