summaryrefslogtreecommitdiffstats
path: root/src/sp-flowtext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-flowtext.cpp')
-rw-r--r--src/sp-flowtext.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sp-flowtext.cpp b/src/sp-flowtext.cpp
index 766026980..6d2385aff 100644
--- a/src/sp-flowtext.cpp
+++ b/src/sp-flowtext.cpp
@@ -14,7 +14,7 @@
#include "inkscape.h"
#include "document.h"
#include "selection.h"
-#include "desktop-handles.h"
+
#include "desktop.h"
#include "xml/repr.h"
@@ -525,10 +525,10 @@ Inkscape::XML::Node *SPFlowtext::getAsText()
Glib::ustring::iterator span_text_start_iter;
this->layout.getSourceOfCharacter(it, &rawptr, &span_text_start_iter);
SPObject *source_obj = reinterpret_cast<SPObject *>(rawptr);
- gchar *style_text = sp_style_write_difference((dynamic_cast<SPString *>(source_obj) ? source_obj->parent : source_obj)->style, this->style);
- if (style_text && *style_text) {
- span_tspan->setAttribute("style", style_text);
- g_free(style_text);
+
+ Glib::ustring style_text = (dynamic_cast<SPString *>(source_obj) ? source_obj->parent : source_obj)->style->write( SP_STYLE_FLAG_IFDIFF, this->style);
+ if (!style_text.empty()) {
+ span_tspan->setAttribute("style", style_text.c_str());
}
SPString *str = dynamic_cast<SPString *>(source_obj);
@@ -620,7 +620,7 @@ bool SPFlowtext::has_internal_frame() const
SPItem *create_flowtext_with_internal_frame (SPDesktop *desktop, Geom::Point p0, Geom::Point p1)
{
- SPDocument *doc = sp_desktop_document (desktop);
+ SPDocument *doc = desktop->getDocument();
Inkscape::XML::Document *xml_doc = doc->getReprDoc();
Inkscape::XML::Node *root_repr = xml_doc->createElement("svg:flowRoot");