Code

XML Privatisation Stuff after a long time
[inkscape.git] / src / sp-object.cpp
index 80f39db4ac9051f5fe223a71ad2ff8a8fa2ec06f..88d24bffd08753216cf44ca6d762131f084e19d2 100644 (file)
@@ -503,6 +503,18 @@ SPObject::appendChildRepr(Inkscape::XML::Node *repr) {
     }
 }
 
+void SPObject::setCSS(SPCSSAttr *css, gchar const *attr)
+{
+       g_assert(this->getRepr() != NULL);
+       sp_repr_css_set(this->getRepr(), css, attr);
+}
+
+void SPObject::changeCSS(SPCSSAttr *css, gchar const *attr)
+{
+       g_assert(this->getRepr() != NULL);
+       sp_repr_css_change(this->getRepr(), css, attr);
+}
+
 /**
  * Retrieves the children as a GSList object, optionally ref'ing the children
  * in the process, if add_ref is specified.
@@ -1524,6 +1536,12 @@ SPObject::removeAttribute(gchar const *key, SPException *ex)
     getRepr()->setAttribute(key, NULL, false);
 }
 
+bool SPObject::storeAsDouble( gchar const *key, double *val ) const
+{
+       g_assert(this->getRepr()!= NULL);
+       return sp_repr_get_double(((Inkscape::XML::Node *)(this->getRepr())),key,val);
+}
+
 /* Helper */
 
 gchar *