From bf052b6e7cb79317c4f38ff144a77b6f9e49421e Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Fri, 13 Sep 2019 22:09:42 +0200 Subject: Allow to paste paragraphs in SVG2 Flow then paste overflow the shape --- src/ui/tools/text-tool.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/ui/tools/text-tool.cpp') diff --git a/src/ui/tools/text-tool.cpp b/src/ui/tools/text-tool.cpp index 20b4c2c65..a9a66d64f 100644 --- a/src/ui/tools/text-tool.cpp +++ b/src/ui/tools/text-tool.cpp @@ -1315,6 +1315,10 @@ bool sp_text_paste_inline(ToolBase *ec) Glib::ustring const clip_text = refClipboard->wait_for_text(); if (!clip_text.empty()) { + SPText *textitem = dynamic_cast(tc->text); + if (textitem) { + textitem->hide_shape_inside(); + } // Fix for 244940 // The XML standard defines the following as valid characters // (Extensible Markup Language (XML) 1.0 (Fourth Edition) paragraph 2.2) @@ -1360,6 +1364,9 @@ bool sp_text_paste_inline(ToolBase *ec) tc->text_sel_start = tc->text_sel_end = sp_te_insert_line(tc->text, tc->text_sel_start); begin = end + 1; } + if (textitem) { + textitem->show_shape_inside(); + } DocumentUndo::done(ec->desktop->getDocument(), SP_VERB_CONTEXT_TEXT, _("Paste text")); -- cgit v1.2.3