diff --git a/hwpfilter/source/hcode.cxx b/hwpfilter/source/hcode.cxx index 8bb22e06c956..9616529bbb33 100644 --- a/hwpfilter/source/hcode.cxx +++ b/hwpfilter/source/hcode.cxx @@ -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(index / (0xFE - 0xA1 + 1) + 0xB0); - lo = sal::static_int_cast(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)); } diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index 8ab0716d533f..2cfd2544fe00 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -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 )