From 2a2f02608fcd82889de25e6beade38c62fb371a4 Mon Sep 17 00:00:00 2001 From: ishmal Date: Wed, 12 Apr 2006 21:28:33 +0000 Subject: [PATCH] add some sp_* stuff --- src/extension/internal/odf.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/extension/internal/odf.cpp b/src/extension/internal/odf.cpp index 37f26966c..2b78bede8 100644 --- a/src/extension/internal/odf.cpp +++ b/src/extension/internal/odf.cpp @@ -45,6 +45,10 @@ #include "xml/repr.h" #include "xml/attribute-record.h" +#include "sp-text.h" +#include "sp-flowtext.h" +#include "svg/svg.h" +#include "text-editing.h" #include @@ -338,6 +342,32 @@ bool OdfOutput::writeTree(Inkscape::XML::Node *node) SPItem *item = SP_ITEM(reprobj); //# Do our stuff + SPCurve *curve = NULL; + if (SP_IS_SHAPE(item)) + { + curve = sp_shape_get_curve(SP_SHAPE(item)); + } + else if (SP_IS_TEXT(item) || SP_IS_FLOWTEXT(item)) + { + curve = te_get_layout(item)->convertToCurves(); + } + + if (!curve) + return false; + + //Inkscape::XML::Node *repr = sp_repr_new("svg:path"); + /* Transformation */ + //repr->setAttribute("transform", SP_OBJECT_REPR(item)->attribute("transform")); + + /* Rotation center */ + //sp_repr_set_attr(repr, "inkscape:transform-center-x", SP_OBJECT_REPR(item)->attribute("inkscape:transform-center-x")); + //sp_repr_set_attr(repr, "inkscape:transform-center-y", SP_OBJECT_REPR(item)->attribute("inkscape:transform-center-y")); + + /* Definition */ + gchar *def_str = sp_svg_write_path(curve->bpath); + + g_free(def_str); + sp_curve_unref(curve); //# Iterate through the children -- 2.30.2