diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2010-12-12 08:40:34 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2010-12-12 08:40:34 +0000 |
| commit | aadfea4113abc6863d7ab03d21b973802c41c503 (patch) | |
| tree | 3f890c0c112433fd850d59558208addf1baa85da /src/sp-symbol.cpp | |
| parent | Pot and Dutch translation update (diff) | |
| parent | A simple layout document as to what, why and how is cppification. (diff) | |
| download | inkscape-aadfea4113abc6863d7ab03d21b973802c41c503.tar.gz inkscape-aadfea4113abc6863d7ab03d21b973802c41c503.zip | |
Merge and cleanup of GSoC C++-ification project.
(bzr r9945.1.1)
Diffstat (limited to 'src/sp-symbol.cpp')
| -rw-r--r-- | src/sp-symbol.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/sp-symbol.cpp b/src/sp-symbol.cpp index 41004db6e..6c8d3cd82 100644 --- a/src/sp-symbol.cpp +++ b/src/sp-symbol.cpp @@ -1,10 +1,9 @@ -#define __SP_SYMBOL_C__ - /* * SVG <symbol> implementation * * Authors: * Lauris Kaplinski <lauris@kaplinski.com> + * Abhishek Sharma * * Copyright (C) 1999-2003 Lauris Kaplinski * @@ -110,8 +109,8 @@ sp_symbol_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *re 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; } |
