Code

GSoC C++-ificiation merge and cleanup.
[inkscape.git] / src / sp-style-elem.cpp
index 1becc422162a694d3bce51a84b906978d78f849a..02ed80445346aedd73f1e6fe39bcb6e59221760e 100644 (file)
@@ -9,7 +9,7 @@ using Inkscape::XML::TEXT_NODE;
 
 static void sp_style_elem_init(SPStyleElem *style_elem);
 static void sp_style_elem_class_init(SPStyleElemClass *klass);
-static void sp_style_elem_build(SPObject *object, Document *doc, Inkscape::XML::Node *repr);
+static void sp_style_elem_build(SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr);
 static void sp_style_elem_set(SPObject *object, unsigned const key, gchar const *const value);
 static void sp_style_elem_read_content(SPObject *);
 static Inkscape::XML::Node *sp_style_elem_write(SPObject *, Inkscape::XML::Document *, Inkscape::XML::Node *, guint flags);
@@ -317,7 +317,8 @@ sp_style_elem_read_content(SPObject *const object)
      * Dodji replies "right, that's *bug*"; just an unexpected oversight.
      */
 
-    GString *const text = concat_children(*style_elem.repr);
+    //XML Tree being used directly here while it shouldn't be.
+    GString *const text = concat_children(*style_elem.getRepr());
     CRParser *parser = cr_parser_new_from_buf(reinterpret_cast<guchar *>(text->str), text->len,
                                               CR_UTF_8, FALSE);
 
@@ -385,12 +386,12 @@ rec_add_listener(Inkscape::XML::Node &repr,
 }
 
 static void
-sp_style_elem_build(SPObject *object, Document *document, Inkscape::XML::Node *repr)
+sp_style_elem_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
 {
     sp_style_elem_read_content(object);
 
-    sp_object_read_attr(object, "type");
-    sp_object_read_attr(object, "media");
+    object->readAttr( "type" );
+    object->readAttr( "media" );
 
     static Inkscape::XML::NodeEventVector const nodeEventVector = {
         child_add_rm_cb,   // child_added
@@ -416,4 +417,4 @@ sp_style_elem_build(SPObject *object, Document *document, Inkscape::XML::Node *r
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :