diff options
Diffstat (limited to 'src/sp-object.cpp')
| -rw-r--r-- | src/sp-object.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/sp-object.cpp b/src/sp-object.cpp index 764b5f260..c3ce3606b 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -967,31 +967,29 @@ static gchar const *sp_xml_get_space_string(unsigned int space) } Inkscape::XML::Node* SPObject::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { - SPObject* object = this; - if (!repr && (flags & SP_OBJECT_WRITE_BUILD)) { - repr = object->getRepr()->duplicate(doc); + repr = this->getRepr()->duplicate(doc); if (!( flags & SP_OBJECT_WRITE_EXT )) { repr->setAttribute("inkscape:collect", NULL); } } else { - repr->setAttribute("id", object->getId()); + repr->setAttribute("id", this->getId()); - if (object->xml_space.set) { + if (this->xml_space.set) { char const *xml_space; - xml_space = sp_xml_get_space_string(object->xml_space.value); + xml_space = sp_xml_get_space_string(this->xml_space.value); repr->setAttribute("xml:space", xml_space); } if ( flags & SP_OBJECT_WRITE_EXT && - object->collectionPolicy() == SPObject::ALWAYS_COLLECT ) + this->collectionPolicy() == SPObject::ALWAYS_COLLECT ) { repr->setAttribute("inkscape:collect", "always"); } else { repr->setAttribute("inkscape:collect", NULL); } - SPStyle const *const obj_style = object->style; + SPStyle const *const obj_style = this->style; if (obj_style) { gchar *s = sp_style_write_string(obj_style, SP_STYLE_FLAG_IFSET); @@ -1028,7 +1026,7 @@ Inkscape::XML::Node* SPObject::write(Inkscape::XML::Document *doc, Inkscape::XML g_warning("Item's style is NULL; repr style attribute is %s", style_str); } - /** \note We treat object->style as authoritative. Its effects have + /** \note We treat this->style as authoritative. Its effects have * been written to the style attribute above; any properties that are * unset we take to be deliberately unset (e.g. so that clones can * override the property). @@ -1038,7 +1036,7 @@ Inkscape::XML::Node* SPObject::write(Inkscape::XML::Document *doc, Inkscape::XML * possibly we should write property attributes instead of a style * attribute. */ - sp_style_unset_property_attrs (object); + sp_style_unset_property_attrs (this); } return repr; |
