summaryrefslogtreecommitdiff
path: root/vcl/source/control/edit.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/control/edit.cxx')
-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 9e25359bcf19..d76b4464ffcf 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1290,8 +1290,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& )