diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-02-03 15:19:07 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-02-03 20:23:43 +0100 |
commit | 12f9fdfac8b41d74e9474e8966e3d28755424931 (patch) | |
tree | 7377716d2b77a1e6a3ab8f79346119ae689a632f /vcl | |
parent | 49d8e5fb744534f4af7e5c7f08dee7a95bcc6ed5 (diff) |
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/+/87883
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/edit.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index a8a2cbe6f833..b3de2be3a68f 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -1286,8 +1286,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& ) |