From c239b8d513fae662a4e3be85f85efb794d98d83d Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Mon, 16 Sep 2019 16:41:18 +0200 Subject: Allow paste preserving new lines into a flowtext element --- src/ui/clipboard.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/ui/clipboard.cpp') diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp index fb7bebc39..7341b8caf 100644 --- a/src/ui/clipboard.cpp +++ b/src/ui/clipboard.cpp @@ -65,6 +65,7 @@ #include "object/sp-rect.h" #include "object/sp-root.h" #include "object/sp-shape.h" +#include "object/sp-flowtext.h" #include "object/sp-textpath.h" #include "object/sp-use.h" #include "style.h" @@ -1093,6 +1094,10 @@ bool ClipboardManagerImpl::_pasteText(SPDesktop *desktop) if (textitem) { textitem->hide_shape_inside(); } + SPFlowtext *flowtext = dynamic_cast(tc->text); + if (flowtext) { + flowtext->fix_overflow_flowregion(false); + } // we realy only want to inherit container style /* SPCSSAttr *css = take_style_from_item(tc->text); for (int i = 0; i < nr_blocks; ++i) @@ -1123,6 +1128,9 @@ bool ClipboardManagerImpl::_pasteText(SPDesktop *desktop) if (textitem) { textitem->show_shape_inside(); } + if (flowtext) { + flowtext->fix_overflow_flowregion(true); + } } return true; } -- cgit v1.2.3