[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - extensions/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Feb 25 20:32:29 UTC 2021
extensions/source/propctrlr/standardcontrol.cxx | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
New commits:
commit 5ff60569f998d9afe9273ec4223d91f6d549e51a
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Feb 23 15:46:18 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Feb 25 21:31:54 2021 +0100
tdf#139070 format entry view of multilines with final formatting
so during editing of a multiline the singleline entry shows what
it will show when editing is finished, so we suppress the default
behaviour of gtk to show a newline symbol and the default
behaviour of vcl to strip newlines
Change-Id: Id7d384efc8b737c463f1bd44ca61376f342edb25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111417
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 0b64c9518ef2..48ecc0be056a 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -737,7 +737,16 @@ namespace pcr
IMPL_LINK_NOARG(OMultilineEditControl, TextViewModifiedHdl, weld::TextView&, void)
{
- m_xEntry->set_text(m_xTextView->get_text());
+ // tdf#139070 during editing update the entry to look like how it will
+ // look once editing is finished so that the default behaviour of vcl
+ // to strip newlines and the default behaviour of gtk to show a newline
+ // symbol is suppressed
+ OUString sText = m_xTextView->get_text();
+ auto aSeq = lcl_convertMultiLineToList(sText);
+ if (aSeq.getLength() > 1)
+ m_xEntry->set_text(lcl_convertListToDisplayText(aSeq));
+ else
+ m_xEntry->set_text(sText);
CheckEntryTextViewMisMatch();
setModified();
}
More information about the Libreoffice-commits
mailing list