summaryrefslogtreecommitdiffstats
path: root/src/sp-object.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2014-03-24 19:53:16 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2014-03-24 19:53:16 +0000
commit77c1e38b02cfc327e161afffd590473bcc7d4526 (patch)
treefda4c9d7c6efd18f15665755c6a0268c2bd5d7bd /src/sp-object.cpp
parentfix potential use of nullptr (item) (note that SPGroup inherits from SPItem) (diff)
downloadinkscape-77c1e38b02cfc327e161afffd590473bcc7d4526.tar.gz
inkscape-77c1e38b02cfc327e161afffd590473bcc7d4526.zip
noop: code legibilty
(bzr r13197)
Diffstat (limited to 'src/sp-object.cpp')
-rw-r--r--src/sp-object.cpp18
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;