From 85c62a36a907bc5ff31627349a80baa51efbd443 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 --- editeng/source/editeng/impedit4.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'editeng/source') diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index fcc47af2161c..ba50da1367a1 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