From b66c3b342d59f791ceb62dd8bfc901c98258ee50 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Tue, 14 Nov 2017 13:40:32 +0100 Subject: Don't set a default 'font-size' when copying text if one is not set. Fixes bug reported by crogers when pasting into flowed text. --- src/ui/clipboard.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp index dbeee644c..118d7ae1f 100644 --- a/src/ui/clipboard.cpp +++ b/src/ui/clipboard.cpp @@ -1049,9 +1049,12 @@ bool ClipboardManagerImpl::_pasteText(SPDesktop *desktop) SPCSSAttr *css = take_style_from_item(tc->text); for (int i = 0; i < nr_blocks; ++i) { - gchar const *w = sp_repr_css_property(css, "font-size", "40px"); - if (w) + gchar const *w = sp_repr_css_property(css, "font-size", "0px"); + + // Don't set font-size if it wasn't set. + if (w && strcmp(w, "0px") != 0) { sp_repr_css_set_property(te_selected_style[i], "font-size", w); + } } for (int i = 0; i < text.length(); ++i) -- cgit v1.2.3