Kaydet (Commit) d24b2a35 authored tarafından Justin Luth's avatar Justin Luth Kaydeden (comit) Eike Rathke

tdf#95354 - pad AltX to 4 characters

Change-Id: I552f305e78427bdbd37e48013f5cc4b78024e8ff
Reviewed-on: https://gerrit.libreoffice.org/19631Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: 's avatarEike Rathke <erack@redhat.com>
üst 59dfeacf
......@@ -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();
......
......@@ -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+";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment