[Libreoffice-commits] core.git: vcl/unx
Matúš Kukan
matus.kukan at collabora.com
Thu May 22 07:32:15 PDT 2014
vcl/unx/generic/dtrans/X11_transferable.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 278baa557d18136a2641c015f7077a5838188766
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Thu May 22 16:17:12 2014 +0200
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
diff --git a/vcl/unx/generic/dtrans/X11_transferable.cxx b/vcl/unx/generic/dtrans/X11_transferable.cxx
index 55c5092..dd64fb7 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;
More information about the Libreoffice-commits
mailing list