Kaydet (Commit) a4d22caa authored tarafından Caolán McNamara's avatar Caolán McNamara

replace snprintf with our own converters

Change-Id: I27b0b82ac5be631c0d47f486603e241026dcabd9
üst f59284e3
......@@ -775,16 +775,12 @@ IMPL_LINK(SvxCharacterMap, CharClickHdl, SvxCharView*, rView, void)
// Get the hexadecimal code
OUString charValue = rView->GetText();
char aBuf[32];
sal_Int32 tmp = 1;
sal_UCS4 cChar = charValue.iterateCodePoints(&tmp, -1);
snprintf( aBuf, sizeof(aBuf), "%X", static_cast<unsigned>(cChar));
OUString aHexText = OUString::createFromAscii(aBuf);
OUString aHexText = OUString::number(cChar, 16).toAsciiUpperCase();
// Get the decimal code
char aDecBuf[32];
snprintf( aDecBuf, sizeof(aDecBuf), "%u", static_cast<unsigned>(cChar));
OUString aDecimalText = OUString::createFromAscii(aDecBuf);
OUString aDecimalText = OUString::number(cChar);
m_pHexCodeText->SetText( aHexText );
m_pDecimalCodeText->SetText( aDecimalText );
......@@ -870,13 +866,9 @@ IMPL_LINK_NOARG(SvxCharacterMap, CharHighlightHdl, SvxShowCharSet*, void)
if ( bSelect )
{
// Get the hexadecimal code
char aBuf[32];
snprintf( aBuf, sizeof(aBuf), "%X", static_cast<unsigned>(cChar) );
aHexText = OUString::createFromAscii(aBuf);
aHexText = OUString::number(cChar, 16).toAsciiUpperCase();
// Get the decimal code
char aDecBuf[32];
snprintf( aDecBuf, sizeof(aDecBuf), "%u", static_cast<unsigned>(cChar) );
aDecimalText = OUString::createFromAscii(aDecBuf);
aDecimalText = OUString::number(cChar);
setCharName(cChar);
}
......
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