diff --git a/src/sp-symbol.cpp b/src/sp-symbol.cpp
index 8b176fb0a5bc5ba799e75f318f560cc5f8695824..6c8d3cd82a7433e64b6f2d70f52f0ec237b62e27 100644 (file)
--- a/src/sp-symbol.cpp
+++ b/src/sp-symbol.cpp
-#define __SP_SYMBOL_C__
-
/*
* SVG <symbol> implementation
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
+ * Abhishek Sharma
*
* Copyright (C) 1999-2003 Lauris Kaplinski
*
static void sp_symbol_class_init (SPSymbolClass *klass);
static void sp_symbol_init (SPSymbol *symbol);
-static void sp_symbol_build (SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_symbol_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static void sp_symbol_release (SPObject *object);
static void sp_symbol_set (SPObject *object, unsigned int key, const gchar *value);
static void sp_symbol_child_added (SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref);
}
static void
-sp_symbol_build (SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_symbol_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
SPGroup *group;
SPSymbol *symbol;
@@ -110,8 +109,8 @@ sp_symbol_build (SPObject *object, Document *document, Inkscape::XML::Node *repr
group = (SPGroup *) object;
symbol = (SPSymbol *) object;
- sp_object_read_attr (object, "viewBox");
- sp_object_read_attr (object, "preserveAspectRatio");
+ object->readAttr( "viewBox" );
+ object->readAttr( "preserveAspectRatio" );
if (((SPObjectClass *) parent_class)->build)
((SPObjectClass *) parent_class)->build (object, document, repr);
@@ -393,11 +392,15 @@ sp_symbol_write (SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::X
repr = xml_doc->createElement("svg:symbol");
}
- repr->setAttribute("viewBox", object->repr->attribute("viewBox"));
- repr->setAttribute("preserveAspectRatio", object->repr->attribute("preserveAspectRatio"));
+ //XML Tree being used directly here while it shouldn't be.
+ repr->setAttribute("viewBox", object->getRepr()->attribute("viewBox"));
+
+ //XML Tree being used directly here while it shouldn't be.
+ repr->setAttribute("preserveAspectRatio", object->getRepr()->attribute("preserveAspectRatio"));
- if (((SPObjectClass *) (parent_class))->write)
+ if (((SPObjectClass *) (parent_class))->write) {
((SPObjectClass *) (parent_class))->write (object, xml_doc, repr, flags);
+ }
return repr;
}