[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svx/source
Herbert Dürr
hdu at apache.org
Tue Jan 7 08:05:57 PST 2014
svx/source/accessibility/charmapacc.cxx | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
New commits:
commit b95a10423dfb52ec0d502a4f3ea85e17e15f2073
Author: Herbert Dürr <hdu at apache.org>
Date: Tue Jan 7 08:45:56 2014 +0000
Resolves: #i123986# fix charmap accessibility for...
code points beyond the unicode baseplane
(cherry picked from commit 5a81299b05da6f1f9ec81246abe54c55f49793a4)
Conflicts:
svx/source/accessibility/charmapacc.cxx
Change-Id: I29eaf14211be633a8dd354aac9f308e4a18ba27b
(cherry picked from commit 8fad6d99650c63dcc4a4ca4910d34dc4b901c00d)
diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx
index 7b65526..7f0487b 100644
--- a/svx/source/accessibility/charmapacc.cxx
+++ b/svx/source/accessibility/charmapacc.cxx
@@ -698,18 +698,21 @@ OUString SAL_CALL SvxShowCharSetItemAcc::getAccessibleDescription()
ensureAlive();
OUString sDescription = SVX_RESSTR( RID_SVXSTR_CHARACTER_CODE );
- sal_Unicode c = mpParent->maText[0];
+ const OUString aCharStr( mpParent->maText);
+ sal_Int32 nStrIndex = 0;
+ const sal_UCS4 c = aCharStr.iterateCodePoints( &nStrIndex );
+ const int tmp_len = (c < 0x10000) ? 4 : 6;
char buf[16] = "0x0000";
- sal_Unicode c_Shifted = c;
- for( int i = 0; i < 4; ++i )
+ sal_UCS4 c_Shifted = c;
+ for( int i = 0; i < tmp_len; ++i )
{
char h = (char)(c_Shifted & 0x0F);
- buf[5-i] = (h > 9) ? (h - 10 + 'A') : (h + '0');
+ buf[tmp_len+1-i] = (h > 9) ? (h - 10 + 'A') : (h + '0');
c_Shifted >>= 4;
}
if( c < 256 )
snprintf( buf+6, 10, " (%d)", c );
- sDescription += OUString(buf, strlen(buf), RTL_TEXTENCODING_ASCII_US);
+ sDescription += " " + OUString(buf, strlen(buf), RTL_TEXTENCODING_ASCII_US);
return sDescription;
}
More information about the Libreoffice-commits
mailing list