diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-12-02 18:39:33 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-12-02 18:39:33 +0000 |
| commit | 09e2f7b62d13537a0f006fc9953c533802fd9c12 (patch) | |
| tree | 78c1a72538f0e60e38c3ca1845a909fcad53f394 /src/sp-object.cpp | |
| parent | adding fussion improvements (diff) | |
| parent | Extensions. Fix for Bug #1192746 (e key does not start export on firefox [Jes... (diff) | |
| download | inkscape-09e2f7b62d13537a0f006fc9953c533802fd9c12.tar.gz inkscape-09e2f7b62d13537a0f006fc9953c533802fd9c12.zip | |
update to trunk
(bzr r13708.1.4)
Diffstat (limited to 'src/sp-object.cpp')
| -rw-r--r-- | src/sp-object.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/sp-object.cpp b/src/sp-object.cpp index fcff43aa5..4e45eb824 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -406,9 +406,9 @@ void SPObject::requestOrphanCollection() { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); // do not remove style or script elements (Bug #276244) - if (SP_IS_STYLE_ELEM(this)) { + if (dynamic_cast<SPStyleElem *>(this)) { // leave it - } else if (SP_IS_SCRIPT(this)) { + } else if (dynamic_cast<SPScript *>(this)) { // leave it } else if ((! prefs->getBool("/options/cleanupswatches/value", false)) && SP_IS_PAINT_SERVER(this) && static_cast<SPPaintServer*>(this)->isSwatch() ) { @@ -1254,6 +1254,16 @@ void SPObject::setAttribute(gchar const *key, gchar const *value, SPException *e //XML Tree being used here. getRepr()->setAttribute(key, value, false); } +void SPObject::setAttribute(char const *key, Glib::ustring const &value, SPException *ex) +{ + setAttribute(key, value.empty() ? NULL : value.c_str(), ex); +} +void SPObject::setAttribute(Glib::ustring const &key, Glib::ustring const &value, SPException *ex) +{ + setAttribute( key.empty() ? NULL : key.c_str(), + value.empty() ? NULL : value.c_str(), ex); +} + void SPObject::removeAttribute(gchar const *key, SPException *ex) { |
