diff options
author | Justin Luth <justin_luth@sil.org> | 2015-10-27 20:20:27 +0300 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-10-28 14:20:27 +0000 |
commit | d24b2a352ad32df843964c687970edc4dc0f27aa (patch) | |
tree | 85caf3c3a0f52953929d22459a742dd734c94d48 /i18nutil | |
parent | 59dfeacf8c08b911e8bf3b1f5d9bf896970dd929 (diff) |
tdf#95354 - pad AltX to 4 characters
Change-Id: I552f305e78427bdbd37e48013f5cc4b78024e8ff
Reviewed-on: https://gerrit.libreoffice.org/19631
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'i18nutil')
-rw-r--r-- | i18nutil/source/utility/unicode.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx index 5180e1ec0674..8b56239550d5 100644 --- a/i18nutil/source/utility/unicode.cxx +++ b/i18nutil/source/utility/unicode.cxx @@ -1242,8 +1242,12 @@ OUString ToggleUnicodeCodepoint::ReplacementString() sal_Int32 nPos = 0; while( nPos < sIn.getLength() ) { + OUStringBuffer aTmp = OUString::number(sIn.iterateCodePoints(&nPos),16); + //pad with zeros - minimum length of 4. + for( sal_Int32 i = 4 - aTmp.getLength(); i > 0; --i ) + aTmp.insert( 0,"0" ); maOutput.append( "U+" ); - maOutput.append( OUString::number(sIn.iterateCodePoints(&nPos),16) ); + maOutput.append( aTmp ); } } return maOutput.toString(); |