summaryrefslogtreecommitdiffstats
path: root/src/extension/dbus/document-interface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/extension/dbus/document-interface.cpp')
-rw-r--r--src/extension/dbus/document-interface.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/extension/dbus/document-interface.cpp b/src/extension/dbus/document-interface.cpp
index c67234b34..706215573 100644
--- a/src/extension/dbus/document-interface.cpp
+++ b/src/extension/dbus/document-interface.cpp
@@ -226,7 +226,9 @@ gchar *finish_create_shape (DocumentInterface *object, GError ** /*error*/, Inks
SPCSSAttr *style = sp_desktop_get_style(object->desk, TRUE);
if (style) {
- newNode->setAttribute("style", sp_repr_css_write_string(style), TRUE);
+ Glib::ustring str;
+ sp_repr_css_write_string(style, str);
+ newNode->setAttribute("style", str.c_str(), TRUE);
}
else {
newNode->setAttribute("style", "fill:#0000ff;fill-opacity:1;stroke:#c900b9;stroke-width:0;stroke-miterlimit:0;stroke-opacity:1;stroke-dasharray:none", TRUE);
@@ -565,7 +567,7 @@ gchar *document_interface_node(DocumentInterface *object, gchar *type, GError **
}
/****************************************************************************
- ENVIORNMENT FUNCTIONS
+ ENVIRONMENT FUNCTIONS
****************************************************************************/
gdouble
document_interface_document_get_width (DocumentInterface *object)
@@ -582,7 +584,9 @@ document_interface_document_get_height (DocumentInterface *object)
gchar *document_interface_document_get_css(DocumentInterface *object, GError ** /*error*/)
{
SPCSSAttr *current = (object->desk)->current;
- return sp_repr_css_write_string(current);
+ glib::ustring str;
+ sp_repr_css_write_string(current, str);
+ return (str.empty() ? NULL : g_strdup (str.c_str()));
}
gboolean document_interface_document_merge_css(DocumentInterface *object,