[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Feb 4 10:36:21 UTC 2020
vcl/source/control/edit.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 5acddba57e187c4a05d5bb25df36d22b829224cc
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Feb 3 15:19:07 2020 +0000
Commit: Michael Stahl <michael.stahl at cib.de>
CommitDate: Tue Feb 4 11:35:45 2020 +0100
Related: tdf#129933 assert on pasting over selection in edit
when its selected right to left with cursor flashing at the start
format->paragraph->area->color->pick, cursor into hex# edit, end to
cursor at the end, shift + home to select all, right to left, ctrl+c,
ctrl+v, assert
Change-Id: I8e29108ddff94487c298bd5e6607b98f5f841afd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87886
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 26802eab2a90..d38d85a986c1 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1300,8 +1300,12 @@ void Edit::ImplPaste( uno::Reference< datatransfer::clipboard::XClipboard > cons
uno::Any aData = xDataObj->getTransferData( aFlavor );
OUString aText;
aData >>= aText;
- if( ImplTruncateToMaxLen( aText, maSelection.Len() ) )
+
+ Selection aSelection(maSelection);
+ aSelection.Justify();
+ if (ImplTruncateToMaxLen(aText, aSelection.Len()))
ShowTruncationWarning(GetFrameWeld());
+
ReplaceSelected( aText );
}
catch( const css::uno::Exception& )
More information about the Libreoffice-commits
mailing list