Clean up odd sal::static_int_cast<sal_Bool> uses
Change-Id: Idbd1cdb06315b96dc9f45e34108a1af45229ed2f Reviewed-on: https://gerrit.libreoffice.org/15484 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
parent
bac01f8af7
commit
1a31dd5ec4
@ -1200,8 +1200,7 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs )
|
||||
TriState eState = m_pTsbTile->GetState();
|
||||
if( m_pTsbTile->IsValueChangedFromSaved() )
|
||||
{
|
||||
XFillBmpTileItem aFillBmpTileItem(
|
||||
sal::static_int_cast< sal_Bool >( eState ) );
|
||||
XFillBmpTileItem aFillBmpTileItem( eState != TRISTATE_FALSE );
|
||||
pOld = GetOldItem( *rAttrs, XATTR_FILLBMP_TILE );
|
||||
if ( !pOld || !( *static_cast<const XFillBmpTileItem*>(pOld) == aFillBmpTileItem ) )
|
||||
{
|
||||
@ -1217,7 +1216,7 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs )
|
||||
if( m_pTsbStretch->IsValueChangedFromSaved() )
|
||||
{
|
||||
XFillBmpStretchItem aFillBmpStretchItem(
|
||||
sal::static_int_cast< sal_Bool >( eState ) );
|
||||
eState != TRISTATE_FALSE );
|
||||
pOld = GetOldItem( *rAttrs, XATTR_FILLBMP_STRETCH );
|
||||
if ( !pOld || !( *static_cast<const XFillBmpStretchItem*>(pOld) == aFillBmpStretchItem ) )
|
||||
{
|
||||
@ -2244,12 +2243,12 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyTileHdl_Impl)
|
||||
m_pMtrFldYSize->SetValue( m_pMtrFldYSize->GetValue() );
|
||||
}
|
||||
|
||||
rXFSet.Put( XFillBmpTileItem( sal::static_int_cast< sal_Bool >( eState ) ) );
|
||||
rXFSet.Put( XFillBmpTileItem( eState != TRISTATE_FALSE ) );
|
||||
|
||||
if( m_pTsbStretch->IsEnabled() )
|
||||
rXFSet.Put(
|
||||
XFillBmpStretchItem(
|
||||
sal::static_int_cast< sal_Bool >( m_pTsbStretch->GetState() ) ) );
|
||||
m_pTsbStretch->GetState() != TRISTATE_FALSE ) );
|
||||
|
||||
if( m_pTsbScale->IsEnabled() )
|
||||
rXFSet.Put( XFillBmpSizeLogItem( m_pTsbScale->GetState() == TRISTATE_FALSE ) );
|
||||
|
@ -805,7 +805,7 @@ bool SvxLineTabPage::FillItemSet( SfxItemSet* rAttrs )
|
||||
TriState eState = m_pTsbCenterStart->GetState();
|
||||
if( m_pTsbCenterStart->IsValueChangedFromSaved() )
|
||||
{
|
||||
XLineStartCenterItem aItem( sal::static_int_cast< sal_Bool >( eState ) );
|
||||
XLineStartCenterItem aItem( eState != TRISTATE_FALSE );
|
||||
pOld = GetOldItem( *rAttrs, XATTR_LINESTARTCENTER );
|
||||
if ( !pOld || !( *static_cast<const XLineStartCenterItem*>(pOld) == aItem ) )
|
||||
{
|
||||
@ -816,7 +816,7 @@ bool SvxLineTabPage::FillItemSet( SfxItemSet* rAttrs )
|
||||
eState = m_pTsbCenterEnd->GetState();
|
||||
if( m_pTsbCenterEnd->IsValueChangedFromSaved() )
|
||||
{
|
||||
XLineEndCenterItem aItem( sal::static_int_cast< sal_Bool >( eState ) );
|
||||
XLineEndCenterItem aItem( eState != TRISTATE_FALSE );
|
||||
pOld = GetOldItem( *rAttrs, XATTR_LINEENDCENTER );
|
||||
if ( !pOld || !( *static_cast<const XLineEndCenterItem*>(pOld) == aItem ) )
|
||||
{
|
||||
|
@ -196,7 +196,7 @@ void xdictionary::setJapaneseWordBreak()
|
||||
bool xdictionary::exists(const sal_uInt32 c)
|
||||
{
|
||||
// 0x1FFF is the hardcoded limit in gendict for data.existMarks
|
||||
bool exist = (data.existMark && ((c>>3) < 0x1FFF)) ? sal::static_int_cast<sal_Bool>((data.existMark[c>>3] & (1<<(c&0x07))) != 0) : sal_False;
|
||||
bool exist = data.existMark && (c>>3) < 0x1FFF && (data.existMark[c>>3] & (1<<(c&0x07))) != 0;
|
||||
if (!exist && japaneseWordBreak)
|
||||
return BreakIteratorImpl::getScriptClass(c) == ScriptType::ASIAN;
|
||||
else
|
||||
|
@ -710,7 +710,7 @@ LocaleDataImpl::getAllCalendars2( const Locale& rLocale ) throw(RuntimeException
|
||||
for(sal_Int16 i = 0; i < calendarsCount; i++) {
|
||||
OUString calendarID(allCalendars[offset]);
|
||||
offset++;
|
||||
bool defaultCalendar = sal::static_int_cast<sal_Bool>( allCalendars[offset][0] );
|
||||
bool defaultCalendar = allCalendars[offset][0] != 0;
|
||||
offset++;
|
||||
Sequence< CalendarItem2 > days = getCalendarItems( allCalendars, offset, REF_DAYS, i,
|
||||
rLocale, calendarsSeq);
|
||||
@ -879,7 +879,7 @@ LocaleDataImpl::getAllFormats( const Locale& rLocale ) throw(RuntimeException, s
|
||||
formatArray[nOff + 3],
|
||||
formatArray[nOff + 4],
|
||||
formatArray[nOff + 5][0],
|
||||
sal::static_int_cast<sal_Bool>(formatArray[nOff + 6][0]));
|
||||
formatArray[nOff + 6][0] != 0);
|
||||
seq[f] = elem;
|
||||
}
|
||||
}
|
||||
@ -943,8 +943,7 @@ LocaleDataImpl::getCollatorImplementations( const Locale& rLocale ) throw(Runtim
|
||||
Sequence< Implementation > seq(collatorCount);
|
||||
for(sal_Int16 i = 0; i < collatorCount; i++) {
|
||||
Implementation impl(collatorArray[i * COLLATOR_ELEMENTS + COLLATOR_OFFSET_ALGO],
|
||||
sal::static_int_cast<sal_Bool>(
|
||||
collatorArray[i * COLLATOR_ELEMENTS + COLLATOR_OFFSET_DEFAULT][0]));
|
||||
collatorArray[i * COLLATOR_ELEMENTS + COLLATOR_OFFSET_DEFAULT][0] != 0);
|
||||
seq[i] = impl;
|
||||
}
|
||||
return seq;
|
||||
|
@ -380,7 +380,7 @@ OUString SAL_CALL X509Certificate_MSCryptImpl :: getSubjectName() throw ( ::com:
|
||||
if( xExtn == NULL )
|
||||
throw RuntimeException() ;
|
||||
|
||||
xExtn->setCertExtn( pExtn->Value.pbData, pExtn->Value.cbData, ( unsigned char* )pExtn->pszObjId, strlen( pExtn->pszObjId ), sal::static_int_cast<sal_Bool>(pExtn->fCritical) ) ;
|
||||
xExtn->setCertExtn( pExtn->Value.pbData, pExtn->Value.cbData, ( unsigned char* )pExtn->pszObjId, strlen( pExtn->pszObjId ), pExtn->fCritical ) ;
|
||||
|
||||
xExtns[i] = xExtn ;
|
||||
}
|
||||
@ -406,7 +406,7 @@ OUString SAL_CALL X509Certificate_MSCryptImpl :: getSubjectName() throw ( ::com:
|
||||
if( xExtn == NULL )
|
||||
throw RuntimeException() ;
|
||||
|
||||
xExtn->setCertExtn( pExtn->Value.pbData, pExtn->Value.cbData, ( unsigned char* )pExtn->pszObjId, strlen( pExtn->pszObjId ), sal::static_int_cast<sal_Bool>(pExtn->fCritical) ) ;
|
||||
xExtn->setCertExtn( pExtn->Value.pbData, pExtn->Value.cbData, ( unsigned char* )pExtn->pszObjId, strlen( pExtn->pszObjId ), pExtn->fCritical ) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user