diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-21 21:32:17 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-22 08:22:32 +0100 |
commit | 1b1031a8f6aa3ed7eeb1516aac6c327b1fddea4b (patch) | |
tree | 2fbcc354c855c75d20fca5d23c5f045fa490d472 /sfx2 | |
parent | 3257e9a47a79678fc29d29166700e82d0ab7ab1c (diff) |
bool improvements
Change-Id: I5f90d0acff506955d1cc5a44944311012f3b04b9
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appcfg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/appinit.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/bastyp/fltfnc.cxx | 11 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/dockwin.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/printhelper.cxx | 14 |
8 files changed, 18 insertions, 21 deletions
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index acd9eebc1998..fbf0f5b799d3 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -691,7 +691,7 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_QUICKLAUNCHER), sal_True, &pItem)) { DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); - ShutdownIcon::SetAutostart( ( (const SfxBoolItem*)pItem )->GetValue() != sal_False ); + ShutdownIcon::SetAutostart( ( (const SfxBoolItem*)pItem )->GetValue() ); } // StarBasic Enable diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index a5f1fde1b7fc..f59ebfe70a71 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -100,7 +100,7 @@ void SAL_CALL SfxTerminateListener_Impl::queryTermination( const EventObject& ) void SAL_CALL SfxTerminateListener_Impl::notifyTermination( const EventObject& aEvent ) throw(RuntimeException ) { Reference< XDesktop > xDesktop( aEvent.Source, UNO_QUERY ); - if( xDesktop.is() == sal_True ) + if( xDesktop.is() ) xDesktop->removeTerminateListener( this ); SolarMutexGuard aGuard; diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 8c6d096093e3..5717f7aa2058 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -580,7 +580,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) TYPE(SfxBoolItem))); bool bShow = pItem == 0 ? !pAppData_Impl->m_xImeStatusWindow->isShowing() - : ( pItem->GetValue() == sal_True ); + : pItem->GetValue(); pAppData_Impl->m_xImeStatusWindow->show(bShow); if (pItem == 0) rReq.AppendItem(SfxBoolItem(SID_SHOW_IME_STATUS_WINDOW, diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 8f74c4682660..31ded84db0a7 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -622,7 +622,7 @@ const SfxFilter* SfxFilterMatcher::GetFilterForProps( const com::sun::star::uno: { uno::Reference< lang::XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory(); uno::Reference< container::XContainerQuery > xTypeCFG; - if( xServiceManager.is() == sal_True ) + if( xServiceManager.is() ) xTypeCFG = uno::Reference < com::sun::star::container::XContainerQuery >( xServiceManager->createInstance( "com.sun.star.document.TypeDetection" ), uno::UNO_QUERY ); if ( xTypeCFG.is() ) { @@ -804,7 +804,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const OUString& rName, uno::Reference< lang::XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory(); uno::Reference< container::XNameAccess > xFilterCFG ; uno::Reference< container::XNameAccess > xTypeCFG ; - if( xServiceManager.is() == sal_True ) + if( xServiceManager.is() ) { xFilterCFG = uno::Reference< container::XNameAccess >( xServiceManager->createInstance( "com.sun.star.document.FilterFactory" ), uno::UNO_QUERY ); xTypeCFG = uno::Reference< container::XNameAccess >( xServiceManager->createInstance( "com.sun.star.document.TypeDetection" ), uno::UNO_QUERY ); @@ -1139,16 +1139,13 @@ void SfxFilterContainer::ReadFilters_Impl( sal_Bool bUpdate ) uno::Reference< lang::XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory(); uno::Reference< container::XNameAccess > xFilterCFG ; uno::Reference< container::XNameAccess > xTypeCFG ; - if( xServiceManager.is() == sal_True ) + if( xServiceManager.is() ) { xFilterCFG = uno::Reference< container::XNameAccess >( xServiceManager->createInstance( "com.sun.star.document.FilterFactory" ), uno::UNO_QUERY ); xTypeCFG = uno::Reference< container::XNameAccess >( xServiceManager->createInstance( "com.sun.star.document.TypeDetection" ), uno::UNO_QUERY ); } - if( - ( xFilterCFG.is() == sal_True ) && - ( xTypeCFG.is() == sal_True ) - ) + if( xFilterCFG.is() && xTypeCFG.is() ) { // select right query to get right set of filters for search modul uno::Sequence< OUString > lFilterNames = xFilterCFG->getElementNames(); diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 0cb897792517..978bde987548 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1543,7 +1543,7 @@ bool CustomPropertiesWindow::IsLineValid( CustomPropertyLine* pLine ) const sal_uInt32 nTemp = nIndex; double fDummy = 0.0; bIsValid = const_cast< SvNumberFormatter& >( - m_aNumberFormatter ).IsNumberFormat( sValue, nIndex, fDummy ) != sal_False; + m_aNumberFormatter ).IsNumberFormat( sValue, nIndex, fDummy ); if ( bIsValid && nTemp != nIndex ) // sValue is a number but the format doesn't match the index bIsValid = false; diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 72f95bc8d1e9..823be0b97675 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -1075,7 +1075,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo) // detect floating mode // toggeling mode will not execute code in handlers, because pImp->bConstructed is not set yet - sal_Bool bFloatMode = IsFloatingMode(); + bool bFloatMode = IsFloatingMode(); if ( bFloatMode != ((GetAlignment() == SFX_ALIGN_NOALIGNMENT)) ) { bFloatMode = !bFloatMode; diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 311eedcd92fc..243f81808fd0 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -3235,7 +3235,7 @@ sal_Bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >& #ifdef DBG_UTIL // check for wrong creation of object container - sal_Bool bHasContainer = ( pImp->mpObjectContainer != 0 ); + bool bHasContainer = ( pImp->mpObjectContainer != 0 ); #endif if ( !xStorage.is() || xStorage == GetStorage() ) @@ -3384,7 +3384,7 @@ sal_Bool SfxObjectShell::SwitchPersistance( const uno::Reference< embed::XStorag sal_Bool bResult = sal_False; #ifdef DBG_UTIL // check for wrong creation of object container - sal_Bool bHasContainer = ( pImp->mpObjectContainer != 0 ); + bool bHasContainer = ( pImp->mpObjectContainer != 0 ); #endif if ( xStorage.is() ) { diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx index ed78d0ffe776..4641beaada05 100644 --- a/sfx2/source/doc/printhelper.cxx +++ b/sfx2/source/doc/printhelper.cxx @@ -362,9 +362,9 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue > if ( rProp.Name.equalsAscii( "PaperOrientation" ) ) { view::PaperOrientation eOrient; - if ( ( rProp.Value >>= eOrient ) == sal_False ) + if ( !( rProp.Value >>= eOrient ) ) { - if ( ( rProp.Value >>= lDummy ) == sal_False ) + if ( !( rProp.Value >>= lDummy ) ) throw ::com::sun::star::lang::IllegalArgumentException(); eOrient = ( view::PaperOrientation) lDummy; } @@ -379,9 +379,9 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue > // PaperFormat-Property? else if ( rProp.Name.equalsAscii( "PaperFormat" ) ) { - if ( ( rProp.Value >>= nPaperFormat ) == sal_False ) + if ( !( rProp.Value >>= nPaperFormat ) ) { - if ( ( rProp.Value >>= lDummy ) == sal_False ) + if ( !( rProp.Value >>= lDummy ) ) throw ::com::sun::star::lang::IllegalArgumentException(); nPaperFormat = ( view::PaperFormat ) lDummy; } @@ -397,7 +397,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue > else if ( rProp.Name.equalsAscii( "PaperSize" ) ) { awt::Size aTempSize ; - if ( ( rProp.Value >>= aTempSize ) == sal_False ) + if ( !( rProp.Value >>= aTempSize ) ) { throw ::com::sun::star::lang::IllegalArgumentException(); } @@ -411,7 +411,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue > else if ( rProp.Name.equalsAscii( "PrinterPaperTray" ) ) { OUString aTmp; - if ( ( rProp.Value >>= aTmp ) == sal_False ) + if ( !( rProp.Value >>= aTmp ) ) throw ::com::sun::star::lang::IllegalArgumentException(); sal_uInt16 nCount = pPrinter->GetPaperBinCount(); for (sal_uInt16 nBin=0; nBin<nCount; nBin++) @@ -695,7 +695,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >& else if ( rProp.Name.equalsAscii( "CopyCount" ) ) { sal_Int32 nCopies = 0; - if ( ( rProp.Value >>= nCopies ) == sal_False ) + if ( !( rProp.Value >>= nCopies ) ) throw ::com::sun::star::lang::IllegalArgumentException(); aCheckedArgs[nProps].Name = rProp.Name; |