summaryrefslogtreecommitdiffstats
path: root/src/sp-desc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-desc.cpp')
-rw-r--r--src/sp-desc.cpp34
1 files changed, 6 insertions, 28 deletions
diff --git a/src/sp-desc.cpp b/src/sp-desc.cpp
index 0fe1f5305..e7530e501 100644
--- a/src/sp-desc.cpp
+++ b/src/sp-desc.cpp
@@ -26,38 +26,16 @@ namespace {
bool descRegistered = SPFactory::instance().registerObject("svg:desc", createDesc);
}
-G_DEFINE_TYPE(SPDesc, sp_desc, SP_TYPE_OBJECT);
-
-static void sp_desc_class_init(SPDescClass *klass)
-{
- SPObjectClass *sp_object_class = (SPObjectClass *)(klass);
-
-}
-
-CDesc::CDesc(SPDesc* desc) : CObject(desc) {
- this->spdesc = desc;
-}
-
-CDesc::~CDesc() {
-}
-
-SPDesc::SPDesc() : SPObject() {
- SPDesc* desc = this;
-
- desc->cdesc = new CDesc(desc);
- desc->typeHierarchy.insert(typeid(SPDesc));
-
- delete desc->cobject;
- desc->cobject = desc->cdesc;
+SPDesc::SPDesc() : SPObject(), CObject(this) {
+ delete this->cobject;
+ this->cobject = this;
}
-static void sp_desc_init(SPDesc *desc)
-{
- new (desc) SPDesc();
+SPDesc::~SPDesc() {
}
-Inkscape::XML::Node* CDesc::write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags) {
- SPDesc* object = this->spdesc;
+Inkscape::XML::Node* SPDesc::write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags) {
+ SPDesc* object = this;
if (!repr) {
repr = object->getRepr()->duplicate(doc);