summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: feae5f2)
raw | patch | inline | side by side (parent: feae5f2)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 23 Jul 2007 06:31:01 +0000 (06:31 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 23 Jul 2007 06:31:01 +0000 (06:31 +0000) |
src/text-chemistry.cpp | patch | blob | history |
diff --git a/src/text-chemistry.cpp b/src/text-chemistry.cpp
index 4853258596d82d74c539e119585d06b964a0f728..e1eaa47fb98e6735167471dd87573714444c1d8a 100644 (file)
--- a/src/text-chemistry.cpp
+++ b/src/text-chemistry.cpp
#include "sp-flowtext.h"
#include "sp-flowregion.h"
#include "sp-flowdiv.h"
+#include "sp-tspan.h"
SPItem *
SP_OBJECT_REPR(o)->setAttribute("dy", NULL);
SP_OBJECT_REPR(o)->setAttribute("rotate", NULL);
+ // if x contains a list, leave only the first value
+ gchar *x = (gchar *) SP_OBJECT_REPR(o)->attribute("x");
+ if (x) {
+ gchar **xa_space = g_strsplit(x, " ", 0);
+ gchar **xa_comma = g_strsplit(x, ",", 0);
+ if (xa_space && *xa_space && *(xa_space + 1)) {
+ SP_OBJECT_REPR(o)->setAttribute("x", g_strdup(*xa_space));
+ } else if (xa_comma && *xa_comma && *(xa_comma + 1)) {
+ SP_OBJECT_REPR(o)->setAttribute("x", g_strdup(*xa_comma));
+ }
+ g_strfreev(xa_space);
+ g_strfreev(xa_comma);
+ }
+
for (SPObject *i = sp_object_first_child(o); i != NULL; i = SP_OBJECT_NEXT(i)) {
text_remove_all_kerns_recursively(i);
}
for (GSList *items = g_slist_copy((GSList *) selection->itemList());
items != NULL;
items = items->next) {
+ SPObject *obj = SP_OBJECT(items->data);
- if (!SP_IS_TEXT(SP_OBJECT(items->data))) {
+ if (!SP_IS_TEXT(obj) && !SP_IS_TSPAN(obj) && !SP_IS_FLOWTEXT(obj)) {
continue;
}
- text_remove_all_kerns_recursively(SP_OBJECT(items->data));
- SP_OBJECT(items->data)->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_TEXT_LAYOUT_MODIFIED_FLAG);
+ text_remove_all_kerns_recursively(obj);
+ obj->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_TEXT_LAYOUT_MODIFIED_FLAG);
did = true;
}