diff options
20 files changed, 25 insertions, 25 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 8b6510e49d30..ab47f0146db2 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -2553,7 +2553,7 @@ void SAL_CALL SfxLibraryContainer::setLibraryReadOnly( const OUString& Name, sal SfxLibrary* pImplLib = getImplLib( Name ); if( pImplLib->mbLink ) { - if( (pImplLib->mbReadOnlyLink ? 1 : 0) != bReadOnly ) + if( pImplLib->mbReadOnlyLink != bool(bReadOnly) ) { pImplLib->mbReadOnlyLink = bReadOnly; pImplLib->implSetModified( true ); @@ -2562,7 +2562,7 @@ void SAL_CALL SfxLibraryContainer::setLibraryReadOnly( const OUString& Name, sal } else { - if( (pImplLib->mbReadOnly ? 1 : 0) != bReadOnly ) + if( pImplLib->mbReadOnly != bool(bReadOnly) ) { pImplLib->mbReadOnly = bReadOnly; pImplLib->implSetModified( true ); diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx index ed9ea945731d..74ebe3b0c714 100644 --- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx @@ -315,14 +315,14 @@ bool DataPointItemConverter::ApplySpecialItem( if( m_bOverwriteLabelsForAttributedDataPointsAlso ) { Reference< chart2::XDataSeries > xSeries( GetPropertySet(), uno::UNO_QUERY); - if( (bOldValue ? 1 : 0) != rValue || + if( bOldValue != bool(rValue) || DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, CHART_UNONAME_LABEL , aOldValue ) ) { DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, CHART_UNONAME_LABEL , uno::makeAny( aLabel ) ); bChanged = true; } } - else if( (bOldValue ? 1 : 0) != rValue ) + else if( bOldValue != bool(rValue) ) { GetPropertySet()->setPropertyValue(CHART_UNONAME_LABEL , uno::makeAny(aLabel)); bChanged = true; diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx index e0e5bbe31c1d..fe94df3f3dc2 100644 --- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx @@ -278,14 +278,14 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte if (mbDataSeries) { Reference<chart2::XDataSeries> xSeries(GetPropertySet(), uno::UNO_QUERY); - if ((bOldValue ? 1 : 0) != rValue || + if (bOldValue != bool(rValue) || DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, CHART_UNONAME_LABEL, aOldValue)) { DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(xSeries, CHART_UNONAME_LABEL, uno::makeAny(aLabel)); bChanged = true; } } - else if ((bOldValue ? 1 : 0) != rValue) + else if (bOldValue != bool(rValue)) { GetPropertySet()->setPropertyValue(CHART_UNONAME_LABEL, uno::makeAny(aLabel)); bChanged = true; diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 242fdf282915..fca17f15983c 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -662,7 +662,7 @@ sal_Bool SAL_CALL ChartController::suspend( sal_Bool bSuspend ) if( m_aLifeTimeManager.impl_isDisposed() ) return sal_False; //behave passive if already disposed, return false because request was not accepted //@todo? correct - if(bSuspend == (m_bSuspended ? 1 : 0)) + if(bool(bSuspend) == m_bSuspended) { OSL_FAIL( "new suspend mode equals old suspend mode" ); return sal_True; diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index 40bf4cef1ea7..1cbbf0e24897 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -525,7 +525,7 @@ sal_Bool SAL_CALL OApplicationController::suspend(sal_Bool bSuspend) throw( Runt bool bCanSuspend = true; - if ( (m_bSuspended ? 1 : 0) != bSuspend ) + if ( m_bSuspended != bool(bSuspend) ) { if ( bSuspend && !closeSubComponents() ) return sal_False; diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx index d9e44161f2e8..cfe5df91130c 100644 --- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx +++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx @@ -583,7 +583,7 @@ namespace dbaui { ::osl::ClearableMutexGuard aGuard( getMutex() ); - if ( (m_pImpl->m_bModified ? 1 : 0) == i_bModified ) + if ( m_pImpl->m_bModified == bool(i_bModified) ) return; m_pImpl->m_bModified = i_bModified; diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index ff52a843ed95..610a37b78376 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -554,7 +554,7 @@ BackendImpl::PackageImpl::isRegistered_( if (present) { //we never come here in the first iteration - if (reg != (status.Value != sal_False)) { + if (reg != bool(status.Value)) { ambig = true; reg = false; diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 33f584a9dec3..0e3a00b7ef49 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -374,7 +374,7 @@ sal_Bool SAL_CALL OBoundControl::getLock() throw(RuntimeException, std::exceptio void SAL_CALL OBoundControl::setLock(sal_Bool _bLock) throw(RuntimeException, std::exception) { - if ((m_bLocked ? 1 : 0) == _bLock) + if (m_bLocked == bool(_bLock)) return; osl::MutexGuard aGuard(m_aMutex); diff --git a/forms/source/helper/formnavigation.cxx b/forms/source/helper/formnavigation.cxx index b3ad06581eef..994574ee6170 100644 --- a/forms/source/helper/formnavigation.cxx +++ b/forms/source/helper/formnavigation.cxx @@ -100,7 +100,7 @@ namespace frm { if ( aFeature->second.aURL.Main == _rState.FeatureURL.Main ) { - if ( ( (aFeature->second.bCachedState ? 1 : 0) != _rState.IsEnabled ) + if ( ( aFeature->second.bCachedState != bool(_rState.IsEnabled) ) || ( aFeature->second.aCachedAdditionalState != _rState.State ) ) { diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx index d7f09dc64507..fdfef14c28d6 100644 --- a/framework/source/classes/menumanager.cxx +++ b/framework/source/classes/menumanager.cxx @@ -329,7 +329,7 @@ throw ( RuntimeException, std::exception ) bool bCheckmark = false; bool bMenuItemEnabled = m_pVCLMenu->IsItemEnabled( pStatusChangedMenu->nItemId ); - if ( Event.IsEnabled != (bMenuItemEnabled ? 1 : 0) ) + if ( bool(Event.IsEnabled) != bMenuItemEnabled ) m_pVCLMenu->EnableItem( pStatusChangedMenu->nItemId, Event.IsEnabled ); if ( Event.State >>= bCheckmark ) diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 1b173e3f5c9f..f3434b739541 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -2466,7 +2466,7 @@ throw (uno::RuntimeException, std::exception) m_bVisible = bVisible; aWriteLock.clear(); - if ( (bWasVisible ? 1 : 0) != bVisible ) + if ( bWasVisible != bool(bVisible) ) implts_setVisibleState( bVisible ); } diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx index bdc7c30d8b86..8f42eae393e2 100644 --- a/linguistic/source/dicimp.cxx +++ b/linguistic/source/dicimp.cxx @@ -768,7 +768,7 @@ void SAL_CALL DictionaryNeo::setActive( sal_Bool bActivate ) { MutexGuard aGuard( GetLinguMutex() ); - if ((bIsActive ? 1 : 0) != bActivate) + if (bIsActive != bool(bActivate)) { bIsActive = bActivate != 0; sal_Int16 nEvent = bIsActive ? diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index f657d233547e..42b0baf010a3 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -1812,10 +1812,10 @@ void SAL_CALL OReportDefinition::setModified( sal_Bool _bModified ) throw (beans if ( m_pImpl->m_pReportModel->IsReadOnly() && _bModified ) throw beans::PropertyVetoException(); - if ( (m_pImpl->m_bModified ? 1 : 0) != _bModified ) + if ( m_pImpl->m_bModified != bool(_bModified) ) { m_pImpl->m_bModified = _bModified; - if ( ( m_pImpl->m_pReportModel->IsChanged() ? 1 : 0 ) != _bModified ) + if ( m_pImpl->m_pReportModel->IsChanged() != bool(_bModified) ) m_pImpl->m_pReportModel->SetChanged(_bModified); lang::EventObject aEvent(*this); diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 596edba3a0d6..080f5da12cda 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -2855,7 +2855,7 @@ sal_Bool SAL_CALL SlideshowImpl::getAlwaysOnTop() throw (RuntimeException, std:: void SAL_CALL SlideshowImpl::setAlwaysOnTop( sal_Bool bAlways ) throw (RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - if( (maPresSettings.mbAlwaysOnTop ? 1 : 0) != bAlways ) + if( maPresSettings.mbAlwaysOnTop != bool(bAlways) ) { maPresSettings.mbAlwaysOnTop = bAlways; // todo, can this be changed while running? @@ -2877,7 +2877,7 @@ sal_Bool SAL_CALL SlideshowImpl::getMouseVisible() throw (RuntimeException, std: void SAL_CALL SlideshowImpl::setMouseVisible( sal_Bool bVisible ) throw (RuntimeException, std::exception) { SolarMutexGuard aSolarGuard; - if( (maPresSettings.mbMouseVisible ? 1 : 0) != bVisible ) + if( maPresSettings.mbMouseVisible != bool(bVisible) ) { maPresSettings.mbMouseVisible = bVisible; if( mpShowWindow ) diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 5437493c07e9..9610a8bd222b 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -1865,7 +1865,7 @@ void SfxStoringHelper::SetDocInfoState( } // set the modified flag back if required - if ( ((bNoModify && bIsModified) ? 1 : 0) != xModifiable->isModified() ) + if ( (bNoModify && bIsModified) != bool(xModifiable->isModified()) ) xModifiable->setModified( bIsModified ); } diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index 4bed8b2f3b59..e56ac06d7abd 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -605,7 +605,7 @@ sal_Bool SAL_CALL SfxBaseController::suspend( sal_Bool bSuspend ) throw( Runtime SolarMutexGuard aGuard; // ignore dublicate calls, which doesn't change anything real - if (bSuspend == (m_pData->m_bSuspendState ? 1 : 0)) + if (bool(bSuspend) == m_pData->m_bSuspendState) return sal_True; if ( bSuspend == sal_True ) diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx index f5ef9eb7d34b..f5f86da6cb94 100644 --- a/svx/source/form/fmsrcimp.cxx +++ b/svx/source/form/fmsrcimp.cxx @@ -423,7 +423,7 @@ FmSearchEngine::SEARCH_RESULT FmSearchEngine::SearchSpecial(bool _bSearchForNull // der aktuell zu vergleichende Inhalt iterFieldLoop->xContents->getString(); // needed for wasNull - bFound = (_bSearchForNull ? 1 : 0) == iterFieldLoop->xContents->wasNull(); + bFound = _bSearchForNull == bool(iterFieldLoop->xContents->wasNull()); if (bFound) break; diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 1a480441d48e..5efd2607b49d 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -2179,7 +2179,7 @@ void FormController::setControlLock(const Reference< XControl > & xControl) // a.) wenn der ganze Datensatz gesperrt ist // b.) wenn das zugehoerige Feld gespeert ist Reference< XBoundControl > xBound(xControl, UNO_QUERY); - if (xBound.is() && (( (bLocked && (bLocked ? 1 : 0) != xBound->getLock()) || + if (xBound.is() && (( (bLocked && bLocked != bool(xBound->getLock())) || !bLocked))) // beim entlocken immer einzelne Felder ueberprüfen { // gibt es eine Datenquelle diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 859fab9a7bad..1a50542c6042 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -670,7 +670,7 @@ static void lcl_SetTblSeparators(const uno::Any& rVal, SwTable* pTable, SwTableB for(size_t i = 0; i < nOldCount; ++i) { aCols[i] = pArray[i].Position; - if(pArray[i].IsVisible == (aCols.IsHidden(i) ? 1 : 0) || + if(bool(pArray[i].IsVisible) == aCols.IsHidden(i) || (!bRow && aCols.IsHidden(i)) || aCols[i] < nLastValue || UNO_TABLE_COLUMN_SUM < aCols[i] ) diff --git a/sw/source/ui/vba/vbaaddin.cxx b/sw/source/ui/vba/vbaaddin.cxx index 4547af5bfd0b..4c1358d58701 100644 --- a/sw/source/ui/vba/vbaaddin.cxx +++ b/sw/source/ui/vba/vbaaddin.cxx @@ -67,7 +67,7 @@ sal_Bool SAL_CALL SwVbaAddin::getInstalled() throw (uno::RuntimeException, std:: void SAL_CALL SwVbaAddin::setInstalled( sal_Bool _installed ) throw (uno::RuntimeException, std::exception) { - if( _installed != (mbInstalled ? 1 : 0) ) + if( bool(_installed) != mbInstalled ) { mbInstalled = _installed; // TODO: should call AutoExec and AutoExit etc. |