[Libreoffice-commits] core.git: i18nutil/source sw/qa
Justin Luth
justin_luth at sil.org
Wed Oct 28 14:20:49 UTC 2015
i18nutil/source/utility/unicode.cxx | 6 +++++-
sw/qa/extras/uiwriter/data/unicodeAltX.odt |binary
sw/qa/extras/uiwriter/uiwriter.cxx | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit d24b2a352ad32df843964c687970edc4dc0f27aa
Author: Justin Luth <justin_luth at sil.org>
Date: Tue Oct 27 20:20:27 2015 +0300
tdf#95354 - pad AltX to 4 characters
Change-Id: I552f305e78427bdbd37e48013f5cc4b78024e8ff
Reviewed-on: https://gerrit.libreoffice.org/19631
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx
index 5180e1e..8b56239 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();
diff --git a/sw/qa/extras/uiwriter/data/unicodeAltX.odt b/sw/qa/extras/uiwriter/data/unicodeAltX.odt
index 4c96eff..3ad797c 100644
Binary files a/sw/qa/extras/uiwriter/data/unicodeAltX.odt and b/sw/qa/extras/uiwriter/data/unicodeAltX.odt differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index d4ef3b7..ff1d65e 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -2609,7 +2609,7 @@ void SwUiWriterTest::testUnicodeNotationToggle()
pWrtShell->EndPara();
sOriginalDocString = pWrtShell->GetCrsr()->GetNode().GetTextNode()->GetText();
- CPPUNIT_ASSERT_EQUAL(OUString("uU+2b"), sOriginalDocString);
+ CPPUNIT_ASSERT_EQUAL(OUString("uU+002b"), sOriginalDocString);
lcl_dispatchCommand(mxComponent, ".uno:UnicodeNotationToggle", aPropertyValues);
sExpectedString = "u+";
More information about the Libreoffice-commits
mailing list