From 839c74d60e8c1dd4e2be802130905bafff934647 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sun, 26 Jul 2015 12:53:15 +0200 Subject: Commented out tidy_operator_styled_whitespace (fixes bug 1477723). Fixed bugs: - https://launchpad.net/bugs/1477723 (bzr r14258) --- src/text-editing.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/text-editing.cpp') diff --git a/src/text-editing.cpp b/src/text-editing.cpp index 050e223eb..d9cebc625 100644 --- a/src/text-editing.cpp +++ b/src/text-editing.cpp @@ -1805,6 +1805,14 @@ static bool tidy_operator_redundant_semi_nesting(SPObject **item, bool /*has_tex return false; } + +/* tidy_operator_styled_whitespace commented out: not only did it have bugs, + * but it did *not* preserve the rendering: spaces in different font sizes, + * for instance, have different width, so moving them out of tspans changes + * the document. cf https://bugs.launchpad.net/inkscape/+bug/1477723 +*/ + +#if 0 /** helper for tidy_operator_styled_whitespace(), finds the last string object in a paragraph which is not \a not_obj. */ static SPString* find_last_string_child_not_equal_to(SPObject *root, SPObject *not_obj) @@ -1883,6 +1891,7 @@ static bool tidy_operator_styled_whitespace(SPObject **item, bool has_text_decor delete_obj->deleteObject(); return true; } +#endif /* possible tidy operators that are not yet implemented, either because they are difficult, occur infrequently, or because I'm not sure that the @@ -1917,8 +1926,7 @@ static bool tidy_xml_tree_recursively(SPObject *root, bool has_text_decoration) tidy_operator_repeated_spans, tidy_operator_excessive_nesting, tidy_operator_redundant_double_nesting, - tidy_operator_redundant_semi_nesting, - tidy_operator_styled_whitespace + tidy_operator_redundant_semi_nesting }; bool changes = false; -- cgit v1.2.3 From c54db8d887cae2bd6dd326a10f976c726f905e7d Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Mon, 7 Dec 2015 21:19:14 +0100 Subject: static code analysis (bzr r14509) --- src/text-editing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/text-editing.cpp') diff --git a/src/text-editing.cpp b/src/text-editing.cpp index d9cebc625..057523b1e 100644 --- a/src/text-editing.cpp +++ b/src/text-editing.cpp @@ -68,7 +68,7 @@ void te_update_layout_now_recursive(SPItem *item) { if (SP_IS_GROUP(item)) { std::vector item_list = sp_item_group_item_list(SP_GROUP(item)); - for(std::vector::const_iterator i=item_list.begin();i!=item_list.end();i++){ + for(std::vector::const_iterator i=item_list.begin();i!=item_list.end();++i){ SPItem* list_item = *i; te_update_layout_now_recursive(list_item); } -- cgit v1.2.3