cid#1607313 silence Overflowed return value
and cid#1608099 Overflowed constant Change-Id: I10e08c1184bb6630b849c3e24a0c9b26302fd18a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173896 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
parent
695a46783e
commit
c30fa95c5d
@ -522,19 +522,16 @@ static int KsSearch(hchar c)
|
||||
|
||||
static hchar cdkssm2ks_han(hchar kssm)
|
||||
{
|
||||
unsigned int index;
|
||||
unsigned char lo, hi;
|
||||
|
||||
/* "One" */
|
||||
if (kssm == 0xd3c5)
|
||||
return 0xc7d1;
|
||||
|
||||
index = KsSearch(kssm);
|
||||
unsigned int index = KsSearch(kssm);
|
||||
if (kssm != ksTbl[index])
|
||||
return jaso2ks(kssm);
|
||||
hi = sal::static_int_cast<char>(index / (0xFE - 0xA1 + 1) + 0xB0);
|
||||
lo = sal::static_int_cast<unsigned char>(index % (0xFE - 0xA1 + 1) + 0xA1);
|
||||
return lo | (hi << 8);
|
||||
unsigned char hi(index / (0xFE - 0xA1 + 1) + 0xB0);
|
||||
unsigned char lo(index % (0xFE - 0xA1 + 1) + 0xA1);
|
||||
return hchar(lo | (hi << 8));
|
||||
}
|
||||
|
||||
|
||||
|
@ -978,12 +978,10 @@ void SdStyleSheetPool::UpdateStdNames()
|
||||
if( bHelpKnown )
|
||||
{
|
||||
OUString aNewName;
|
||||
if (pNameId)
|
||||
if (pNameId && pNameId == STR_PSEUDOSHEET_OUTLINE)
|
||||
{
|
||||
if (pNameId == STR_PSEUDOSHEET_OUTLINE)
|
||||
{
|
||||
aNewName += " " + OUString::number( sal_Int32( nHelpId - HID_PSEUDOSHEET_OUTLINE ) );
|
||||
}
|
||||
assert(nHelpId >= HID_PSEUDOSHEET_OUTLINE1 && nHelpId <= HID_PSEUDOSHEET_OUTLINE9);
|
||||
aNewName += " " + OUString::number( sal_Int32( nHelpId - HID_PSEUDOSHEET_OUTLINE ) );
|
||||
}
|
||||
|
||||
if( !aNewName.isEmpty() && aNewName != aOldName )
|
||||
|
Loading…
x
Reference in New Issue
Block a user