diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-05-22 16:17:12 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-05-22 20:45:41 +0200 |
commit | bedf2134f78ef0c6d0117d3c29272047d90bcce3 (patch) | |
tree | 1d9e8657bbba15df8acf3d12eb4c75d595a2f89b /vcl | |
parent | 24f8a56d961fdbdc470213cf1684955d6cf6f1f8 (diff) |
cp#1000078: Replace "\r\n" with "\n" when pasting from X11 clipboard.
E.g. when pasting from terminal you will get "\r\n".
Writer inserts '\r' character into the document as an
invisible character. If you save that to .odt and reload, you will
get ' ' instead. Or when saving to .doc and reload, you will get '\n'.
Change-Id: Id6780bf6d71a8f0a17c1e6ee7a7dcb4d297446dc
(cherry picked from commit 278baa557d18136a2641c015f7077a5838188766)
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/dtrans/X11_transferable.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/unx/generic/dtrans/X11_transferable.cxx b/vcl/unx/generic/dtrans/X11_transferable.cxx index 55c50925688e..dd64fb7c13d9 100644 --- a/vcl/unx/generic/dtrans/X11_transferable.cxx +++ b/vcl/unx/generic/dtrans/X11_transferable.cxx @@ -71,7 +71,7 @@ Any SAL_CALL X11Transferable::getTransferData( const DataFlavor& rFlavor ) OUStringToOString( rFlavor.MimeType, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), OUStringToOString( aString, RTL_TEXTENCODING_ISO_8859_1 ).getStr() ); #endif - aRet <<= aString; + aRet <<= aString.replaceAll("\r\n", "\n"); } else aRet <<= aData; |