summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJohn Smith <john.smith7545@yahoo.com>2012-05-26 00:14:56 +0000
committerJohn Smith <removethis.john.q.public@bigmail.com>2012-05-26 00:14:56 +0000
commit6ee7c590a4e30b3fa5767bbabde8fa31e9f14927 (patch)
tree14a6e68a2dc216d97d5c9d9f0c94c0c55d1eadc7 /src/main.cpp
parentmesh gradient: fix bad indexing (diff)
downloadinkscape-6ee7c590a4e30b3fa5767bbabde8fa31e9f14927.tar.gz
inkscape-6ee7c590a4e30b3fa5767bbabde8fa31e9f14927.zip
Fix for 903772 : Support --export-text-to-path when outputting plain SVG
(bzr r11418)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 15efd22d9..ee18c8822 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -121,6 +121,11 @@
#include "compat-key-syms.h"
#endif
+#include "path-chemistry.h"
+#include "sp-text.h"
+#include "sp-flowtext.h"
+#include "text-editing.h"
+
enum {
SP_ARG_NONE,
SP_ARG_NOGUI,
@@ -1036,6 +1041,29 @@ int sp_process_file_list(GSList *fl)
sp_do_export_png(doc);
}
if (sp_export_svg) {
+ if (sp_export_text_to_path) {
+ GSList *items = NULL;
+ SPRoot *root = doc->getRoot();
+ for ( SPObject *iter = root->firstChild(); iter ; iter = iter->getNext()) {
+ SPItem* item = (SPItem*) iter;
+ if (! (SP_IS_TEXT(item) || SP_IS_FLOWTEXT(item) || SP_IS_GROUP(item))) {
+ continue;
+ }
+
+ te_update_layout_now_recursive(item);
+ items = g_slist_append(items, item);
+ }
+
+ GSList *selected = NULL;
+ GSList *to_select = NULL;
+
+ sp_item_list_to_curves(items, &selected, &to_select);
+
+ g_slist_free (items);
+ g_slist_free (selected);
+ g_slist_free (to_select);
+ }
+
Inkscape::XML::Document *rdoc;
Inkscape::XML::Node *repr;
rdoc = sp_repr_document_new("svg:svg");