summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/edit.cxx6
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& )