X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fsp-flowregion.cpp;h=6e8c014f1f74def060b112b7c96aa43bc322595c;hb=b752616506705efd28f22c4d852d198ff40c7026;hp=51bc4c511be61d872c5966115971feb75669c883;hpb=fdc44da6a01ea7605271feed15df61005ddd0219;p=inkscape.git diff --git a/src/sp-flowregion.cpp b/src/sp-flowregion.cpp index 51bc4c511..6e8c014f1 100644 --- a/src/sp-flowregion.cpp +++ b/src/sp-flowregion.cpp @@ -14,6 +14,7 @@ #include "sp-text.h" #include "sp-use.h" #include "style.h" +#include "document.h" #include "sp-flowregion.h" @@ -233,7 +234,10 @@ static Inkscape::XML::Node * sp_flowregion_write (SPObject *object, Inkscape::XML::Node *repr, guint flags) { if (flags & SP_OBJECT_WRITE_BUILD) { - if ( repr == NULL ) repr = sp_repr_new ("svg:flowRegion"); + if ( repr == NULL ) { + Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object)); + repr = xml_doc->createElement("svg:flowRegion"); + } GSList *l = NULL; for ( SPObject *child = sp_object_first_child(object) ; child != NULL; child = SP_OBJECT_NEXT(child) ) { @@ -255,12 +259,12 @@ sp_flowregion_write (SPObject *object, Inkscape::XML::Node *repr, guint flags) if (((SPObjectClass *) (flowregion_parent_class))->write) ((SPObjectClass *) (flowregion_parent_class))->write (object, repr, flags); - + return repr; } -static gchar *sp_flowregion_description(SPItem *item) +static gchar *sp_flowregion_description(SPItem */*item*/) { // TRANSLATORS: "Flow region" is an area where text is allowed to flow return g_strdup_printf(_("Flow region")); @@ -447,7 +451,10 @@ static Inkscape::XML::Node * sp_flowregionexclude_write (SPObject *object, Inkscape::XML::Node *repr, guint flags) { if (flags & SP_OBJECT_WRITE_BUILD) { - if ( repr == NULL ) repr = sp_repr_new ("svg:flowRegionExclude"); + if ( repr == NULL ) { + Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object)); + repr = xml_doc->createElement("svg:flowRegionExclude"); + } GSList *l = NULL; for ( SPObject *child = sp_object_first_child(object) ; child != NULL; child = SP_OBJECT_NEXT(child) ) { @@ -469,12 +476,12 @@ sp_flowregionexclude_write (SPObject *object, Inkscape::XML::Node *repr, guint f if (((SPObjectClass *) (flowregionexclude_parent_class))->write) ((SPObjectClass *) (flowregionexclude_parent_class))->write (object, repr, flags); - + return repr; } -static gchar *sp_flowregionexclude_description(SPItem *item) +static gchar *sp_flowregionexclude_description(SPItem */*item*/) { /* TRANSLATORS: A region "cut out of" a flow region; text is not allowed to flow inside the * flow excluded region. flowRegionExclude in SVG 1.2: see