From 9761e8b7eb2f4efedfff67a6574540d4ea2e9c5a Mon Sep 17 00:00:00 2001 From: Mark Hung Date: Wed, 2 Sep 2015 00:33:01 +0800 Subject: Fix tdf#93781 Impress copy wrong style name to clipboard when MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit style name contains Chinese character. Encode style name in multibyte sring (ex,Chinese) properly with RTFOutFuncs::Out_String(). Change-Id: Ibdd1010e28c711d7829643b60b32637ebce58bdb Reviewed-on: https://gerrit.libreoffice.org/18247 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit 85c62a36a907bc5ff31627349a80baa51efbd443) Reviewed-on: https://gerrit.libreoffice.org/18296 --- editeng/source/editeng/impedit4.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 0c26682d49f4..ecc12147b25a 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -515,7 +515,8 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) rOutput.WriteUInt32AsString( nNumber ); // Name of the template ... - rOutput.WriteCharPtr( " " ).WriteCharPtr( OUStringToOString(pStyle->GetName(), eDestEnc).getStr() ); + rOutput.WriteCharPtr( " " ); + RTFOutFuncs::Out_String( rOutput, pStyle->GetName(), eDestEnc ); rOutput.WriteCharPtr( ";}" ); nStyle++; } -- cgit v1.2.3