diff options
| author | Shlomi Fish <shlomif@shlomifish.org> | 2019-05-28 09:42:48 +0000 |
|---|---|---|
| committer | Shlomi Fish <shlomif@shlomifish.org> | 2019-06-06 12:57:27 +0000 |
| commit | dd680d1500974fb3bdd55f99a4640ab681a3f288 (patch) | |
| tree | e1f5730d6b96366fee0097f4928caead5ddeea5c | |
| parent | Refactoring: call setAttribute() directly. (diff) | |
| download | inkscape-dd680d1500974fb3bdd55f99a4640ab681a3f288.tar.gz inkscape-dd680d1500974fb3bdd55f99a4640ab681a3f288.zip | |
Style fixes.
Thanks to @Qantas94Heavy 's comments.
----
I hereby disclaim any implicit or explicit ownership of my changes in this
changeset, and put them under a multiple licence consisting of your choice of
one of more of:
- The CC0 / Public Domain - https://creativecommons.org/choose/zero/ .
- The MIT / Expat license - https://en.wikipedia.org/wiki/MIT_License
- The default licence of your project
- The https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License - version
2.1 or higher
- The https://en.wikipedia.org/wiki/GNU_General_Public_License - version 2 or
higher
- Any licence in the 2018-Aug-27 popular licenses list of
https://opensource.org/licenses
- The https://en.wikipedia.org/wiki/Apache_License version 2.0 or later
- The https://en.wikipedia.org/wiki/Artistic_License version 2.0 or later
- The https://en.wikipedia.org/wiki/ISC_license
- The https://opensource.org/licenses/BSD-2-Clause
Crediting me will be nice, but not mandatory, and you can change the licence
of the project without needing my permission.
| -rw-r--r-- | src/object/sp-offset.cpp | 12 | ||||
| -rw-r--r-- | src/ui/dialog/filter-effects-dialog.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/selectordialog.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/svg-fonts-dialog.cpp | 2 | ||||
| -rw-r--r-- | src/widgets/gradient-vector.cpp | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/object/sp-offset.cpp b/src/object/sp-offset.cpp index b5965813e..667fdf9c3 100644 --- a/src/object/sp-offset.cpp +++ b/src/object/sp-offset.cpp @@ -118,8 +118,8 @@ void SPOffset::build(SPDocument *document, Inkscape::XML::Node *repr) { //XML Tree being used directly here (as object->getRepr) //in all the below lines in the block while it shouldn't be. gchar const *oldA = this->getRepr()->attribute("sodipodi:radius"); - this->setAttribute("inkscape:radius",oldA); - this->setAttribute("sodipodi:radius",nullptr); + this->setAttribute("inkscape:radius", oldA); + this->setAttribute("sodipodi:radius", nullptr); this->readAttr( "inkscape:radius" ); } @@ -128,8 +128,8 @@ void SPOffset::build(SPDocument *document, Inkscape::XML::Node *repr) { this->readAttr( "inkscape:original" ); } else { gchar const *oldA = this->getRepr()->attribute("sodipodi:original"); - this->setAttribute("inkscape:original",oldA); - this->setAttribute("sodipodi:original",nullptr); + this->setAttribute("inkscape:original", oldA); + this->setAttribute("sodipodi:original", nullptr); this->readAttr( "inkscape:original" ); } @@ -148,11 +148,11 @@ void SPOffset::build(SPDocument *document, Inkscape::XML::Node *repr) { nA[0]='#'; nA[lA+1]=0; - this->setAttribute("xlink:href",nA); + this->setAttribute("xlink:href", nA); free(nA); - this->setAttribute("inkscape:href",nullptr); + this->setAttribute("inkscape:href", nullptr); } this->readAttr( "xlink:href" ); diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index 23f0acb9f..48398e716 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -1116,7 +1116,7 @@ private: SPFilterPrimitive* prim = _dialog._primitive_list.get_selected(); if(prim) { - _funcNode->setAttribute( "type", _type.get_as_attribute() ); + _funcNode->setAttribute("type", _type.get_as_attribute()); SPFilter* filter = _dialog._filter_modifier.get_selected_filter(); filter->requestModified(SP_OBJECT_MODIFIED_FLAG); diff --git a/src/ui/dialog/selectordialog.cpp b/src/ui/dialog/selectordialog.cpp index e99f35df2..d44528df1 100644 --- a/src/ui/dialog/selectordialog.cpp +++ b/src/ui/dialog/selectordialog.cpp @@ -838,7 +838,7 @@ void SelectorDialog::_insertClass(const std::vector<SPObject *>& objVec, const G } } if (add) { - obj->setAttribute("class", classAttr + " " + className ); + obj->setAttribute("class", classAttr + " " + className); } } } diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp index ad6bc25a4..c81b04030 100644 --- a/src/ui/dialog/svg-fonts-dialog.cpp +++ b/src/ui/dialog/svg-fonts-dialog.cpp @@ -209,7 +209,7 @@ void SvgFontsDialog::AttrSpin::on_attr_changed(){ if(name && o) { std::ostringstream temp; temp << this->spin.get_value(); - o->setAttribute((const gchar*) name, temp.str() ); + o->setAttribute(name, temp.str()); o->parent->requestModified(SP_OBJECT_MODIFIED_FLAG); Glib::ustring undokey = "svgfonts:"; diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp index cb4eb7a87..677936ba5 100644 --- a/src/widgets/gradient-vector.cpp +++ b/src/widgets/gradient-vector.cpp @@ -734,7 +734,7 @@ static void sp_grd_ed_add_stop(GtkWidget */*widget*/, GtkWidget *vb) sp_svg_write_color(c, sizeof(c), cnew); gdouble opacity = static_cast<gdouble>(SP_RGBA32_A_F(cnew)); os << "stop-color:" << c << ";stop-opacity:" << opacity <<";"; - newstop->setAttribute("style", os.str().c_str()); + newstop->setAttribute("style", os.str()); sp_repr_set_css_double( newstop->getRepr(), "offset", (double)newstop->offset); sp_gradient_vector_widget_load_gradient(vb, gradient); |
