[Libreoffice-commits] core.git: cui/source
Caolán McNamara
caolanm at redhat.com
Fri Jul 28 11:03:59 UTC 2017
cui/source/dialogs/cuicharmap.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit f9d3644d1e560fe5b2e6ae948cdd402045d64c3b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jul 28 12:01:43 2017 +0100
check that u_charName was successful
Change-Id: I55896eb939a864c3437e3f3c5b13c272966e4b85
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index 05626672e419..70b86a82149f 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -510,8 +510,7 @@ void SvxCharacterMap::init()
/* get the character name */
u_charName((UChar32)90, U_UNICODE_CHAR_NAME, buffer, sizeof(buffer), &errorCode);
-
- if(U_SUCCESS(errorCode))
+ if (U_SUCCESS(errorCode))
m_pCharName->SetText(OUString::createFromAscii(buffer));
}
@@ -672,7 +671,8 @@ void SvxCharacterMap::setCharName(sal_UCS4 nDecimalValue)
UErrorCode errorCode = U_ZERO_ERROR;
char buffer[100];
u_charName(nDecimalValue, U_UNICODE_CHAR_NAME, buffer, sizeof(buffer), &errorCode);
- m_pCharName->SetText(OUString::createFromAscii(buffer));
+ if (U_SUCCESS(errorCode))
+ m_pCharName->SetText(OUString::createFromAscii(buffer));
}
IMPL_LINK_NOARG(SvxCharacterMap, SubsetSelectHdl, ListBox&, void)
More information about the Libreoffice-commits
mailing list