From 8bcb8b187e157ddcf69943a070f29ad070f22f9a Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 17 Feb 2014 23:15:43 +0100 Subject: UnoControls: sal_Bool -> bool Change-Id: Ic548cf07fe115c101771999a0dc8d370e57cd3ab --- UnoControls/inc/basecontrol.hxx | 6 ++--- UnoControls/source/base/basecontrol.cxx | 12 +++++----- .../source/controls/OConnectionPointHelper.cxx | 10 ++++----- UnoControls/source/controls/framecontrol.cxx | 8 +++---- UnoControls/source/controls/progressbar.cxx | 4 ++-- UnoControls/source/controls/progressmonitor.cxx | 26 +++++++++++----------- UnoControls/source/inc/OConnectionPointHelper.hxx | 2 +- UnoControls/source/inc/progressbar.hxx | 4 ++-- UnoControls/source/inc/progressmonitor.hxx | 6 ++--- 9 files changed, 39 insertions(+), 39 deletions(-) diff --git a/UnoControls/inc/basecontrol.hxx b/UnoControls/inc/basecontrol.hxx index 0bc7e0ae2b07..be90e9d0f32c 100644 --- a/UnoControls/inc/basecontrol.hxx +++ b/UnoControls/inc/basecontrol.hxx @@ -1233,9 +1233,9 @@ private: sal_Int32 m_nY ; sal_Int32 m_nWidth ; // ... and size of window sal_Int32 m_nHeight ; - sal_Bool m_bVisible ; // Some state flags - sal_Bool m_bInDesignMode ; - sal_Bool m_bEnable ; + bool m_bVisible ; // Some state flags + bool m_bInDesignMode ; + bool m_bEnable ; }; // class BaseControl diff --git a/UnoControls/source/base/basecontrol.cxx b/UnoControls/source/base/basecontrol.cxx index 08f4f6696a7f..4659495de216 100644 --- a/UnoControls/source/base/basecontrol.cxx +++ b/UnoControls/source/base/basecontrol.cxx @@ -47,9 +47,9 @@ namespace unocontrols{ #define DEFAULT_Y 0 #define DEFAULT_WIDTH 100 #define DEFAULT_HEIGHT 100 -#define DEFAULT_VISIBLE sal_False -#define DEFAULT_INDESIGNMODE sal_False -#define DEFAULT_ENABLE sal_True +#define DEFAULT_VISIBLE false +#define DEFAULT_INDESIGNMODE false +#define DEFAULT_ENABLE true //____________________________________________________________________________________________________________ // construct/destruct @@ -326,7 +326,7 @@ void SAL_CALL BaseControl::createPeer( const Reference< XToolkit >& xToo // use method "BaseControl::getWindowDescriptor()" fot change window attributes !!! WindowDescriptor* pDescriptor = impl_getWindowDescriptor( xParentPeer ); - if ( m_bVisible == sal_True ) + if ( m_bVisible ) { pDescriptor->WindowAttributes |= WindowAttribute::SHOW ; } @@ -689,14 +689,14 @@ sal_Bool SAL_CALL BaseControl::setGraphics( const Reference< XGraphics >& xDevic // - set the graphics for an view // - in this class exist 2 graphics-member ... one for peer[_xGraphicsPeer] and one for view[_xGraphicsView] // - they are used by "windowPaint() and draw()", forwarded to "paint ()" - sal_Bool bReturn = sal_False ; + bool bReturn = false ; if ( xDevice.is() ) { // Ready for multithreading MutexGuard aGuard( m_aMutex ); m_xGraphicsView = xDevice ; - bReturn = sal_True ; + bReturn = true ; } return bReturn ; diff --git a/UnoControls/source/controls/OConnectionPointHelper.cxx b/UnoControls/source/controls/OConnectionPointHelper.cxx index af4410a7a6a8..9759347fa067 100644 --- a/UnoControls/source/controls/OConnectionPointHelper.cxx +++ b/UnoControls/source/controls/OConnectionPointHelper.cxx @@ -113,7 +113,7 @@ Type SAL_CALL OConnectionPointHelper::getConnectionType() throw( RuntimeExceptio MutexGuard aGuard( m_aSharedMutex ); // Set default return value, if method failed. - if ( impl_LockContainer() == sal_False ) + if ( !impl_LockContainer() ) { // Container not exist! Its an runtime error. throw RuntimeException(); @@ -163,7 +163,7 @@ void SAL_CALL OConnectionPointHelper::advise( const Reference< XInterface >& xLi // You can add a listener more then one time at XConnectionPointContainer, but here only one ... // Operation is permitted only, if reference to container is valid! - if ( impl_LockContainer() == sal_False ) + if ( !impl_LockContainer() ) { // Container not exist! Its an runtime error. throw RuntimeException(); @@ -183,7 +183,7 @@ void SAL_CALL OConnectionPointHelper::unadvise( const Reference< XInterface >& x // Ready for multithreading MutexGuard aGuard( m_aSharedMutex ); // Operation is permitted only, if reference to container is valid! - if ( impl_LockContainer() == sal_False ) + if ( !impl_LockContainer() ) { // Container not exist! Its an runtime error. throw RuntimeException(); @@ -204,7 +204,7 @@ Sequence< Reference< XInterface > > SAL_CALL OConnectionPointHelper::getConnecti // Ready for multithreading MutexGuard aGuard( m_aSharedMutex ); // Operation is permitted only, if reference to container is valid! - if ( impl_LockContainer() == sal_False ) + if ( !impl_LockContainer() ) { // Container not exist! Its an runtime error. throw RuntimeException(); @@ -230,7 +230,7 @@ Sequence< Reference< XInterface > > SAL_CALL OConnectionPointHelper::getConnecti // private method //______________________________________________________________________________________________________________ -sal_Bool OConnectionPointHelper::impl_LockContainer() +bool OConnectionPointHelper::impl_LockContainer() { // Convert weakreference to hard uno3-reference and return state. // If this reference different from NULL, there exist a hard reference to container. Container-instance can't be destroyed. diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx index 8c9601b34773..fb12538bfd2a 100644 --- a/UnoControls/source/controls/framecontrol.cxx +++ b/UnoControls/source/controls/framecontrol.cxx @@ -314,21 +314,21 @@ sal_Bool FrameControl::convertFastPropertyValue( Any& rConvertedVa sal_Int32 nHandle , const Any& rValue ) throw( IllegalArgumentException ) { - sal_Bool bReturn = sal_False ; + bool bReturn = false ; switch (nHandle) { case PROPERTYHANDLE_COMPONENTURL : rConvertedValue = rValue ; rOldValue <<= m_sComponentURL ; - bReturn = sal_True ; + bReturn = true ; break ; case PROPERTYHANDLE_LOADERARGUMENTS : rConvertedValue = rValue ; rOldValue <<= m_seqLoaderArguments ; - bReturn = sal_True ; + bReturn = true ; break ; } - if ( bReturn == sal_False ) + if ( !bReturn ) { throw IllegalArgumentException(); } diff --git a/UnoControls/source/controls/progressbar.cxx b/UnoControls/source/controls/progressbar.cxx index 8df5d9ae39d4..1fc1aad387d4 100644 --- a/UnoControls/source/controls/progressbar.cxx +++ b/UnoControls/source/controls/progressbar.cxx @@ -442,14 +442,14 @@ void ProgressBar::impl_recalcRange () if( nWindowWidth > nWindowHeight ) { - m_bHorizontal = sal_True ; + m_bHorizontal = true ; fBlockHeight = (nWindowHeight-(2*PROGRESSBAR_FREESPACE)) ; fBlockWidth = fBlockHeight ; fMaxBlocks = nWindowWidth/(fBlockWidth+PROGRESSBAR_FREESPACE); } else { - m_bHorizontal = sal_False ; + m_bHorizontal = false ; fBlockWidth = (nWindowWidth-(2*PROGRESSBAR_FREESPACE)) ; fBlockHeight = fBlockWidth ; fMaxBlocks = nWindowHeight/(fBlockHeight+PROGRESSBAR_FREESPACE); diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index c288632855fc..68738ac98cad 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -836,7 +836,7 @@ void ProgressMonitor::impl_cleanMemory () } // private method -IMPL_TextlistItem* ProgressMonitor::impl_searchTopic ( const OUString& rTopic, sal_Bool bbeforeProgress ) +IMPL_TextlistItem* ProgressMonitor::impl_searchTopic ( const OUString& rTopic, bool bbeforeProgress ) { // Get right textlist for following operations. ::std::vector< IMPL_TextlistItem* >* pTextList ; @@ -844,7 +844,7 @@ IMPL_TextlistItem* ProgressMonitor::impl_searchTopic ( const OUString& rTopic, s // Ready for multithreading ClearableMutexGuard aGuard ( m_aMutex ) ; - if ( bbeforeProgress == sal_True ) + if ( bbeforeProgress ) { pTextList = &maTextlist_Top ; } @@ -879,36 +879,36 @@ IMPL_TextlistItem* ProgressMonitor::impl_searchTopic ( const OUString& rTopic, s #ifdef DBG_UTIL // addText, updateText -sal_Bool ProgressMonitor::impl_debug_checkParameter ( +bool ProgressMonitor::impl_debug_checkParameter ( const OUString& rTopic, const OUString& rText, - sal_Bool /*bbeforeProgress*/ + bool /*bbeforeProgress*/ ) { // Check "rTopic" - if ( &rTopic == NULL ) return sal_False ; // NULL-pointer for reference ???!!! - if ( rTopic.isEmpty() ) return sal_False ; // "" + if ( &rTopic == NULL ) return false ; // NULL-pointer for reference ???!!! + if ( rTopic.isEmpty() ) return false ; // "" // Check "rText" - if ( &rText == NULL ) return sal_False ; // NULL-pointer for reference ???!!! - if ( rText.isEmpty() ) return sal_False ; // "" + if ( &rText == NULL ) return false ; // NULL-pointer for reference ???!!! + if ( rText.isEmpty() ) return false ; // "" // "bbeforeProgress" is valid in everyway! // Parameter OK ... return sal_True. - return sal_True ; + return true ; } // removeText -sal_Bool ProgressMonitor::impl_debug_checkParameter ( const OUString& rTopic, sal_Bool /*bbeforeProgress*/ ) +bool ProgressMonitor::impl_debug_checkParameter ( const OUString& rTopic, bool /*bbeforeProgress*/ ) { // Check "rTopic" - if ( &rTopic == NULL ) return sal_False ; // NULL-pointer for reference ???!!! - if ( rTopic.isEmpty() ) return sal_False ; // "" + if ( &rTopic == NULL ) return false ; // NULL-pointer for reference ???!!! + if ( rTopic.isEmpty() ) return false ; // "" // "bbeforeProgress" is valid in everyway! // Parameter OK ... return sal_True. - return sal_True ; + return true ; } #endif // #ifdef DBG_UTIL diff --git a/UnoControls/source/inc/OConnectionPointHelper.hxx b/UnoControls/source/inc/OConnectionPointHelper.hxx index 2307e1e402d2..2d10bd8ea291 100644 --- a/UnoControls/source/inc/OConnectionPointHelper.hxx +++ b/UnoControls/source/inc/OConnectionPointHelper.hxx @@ -243,7 +243,7 @@ private: @onerror */ - sal_Bool impl_LockContainer(); + bool impl_LockContainer(); /**_________________________________________________________________________________________________________ @short diff --git a/UnoControls/source/inc/progressbar.hxx b/UnoControls/source/inc/progressbar.hxx index f67e5b3d397f..c901429ec7c1 100644 --- a/UnoControls/source/inc/progressbar.hxx +++ b/UnoControls/source/inc/progressbar.hxx @@ -32,7 +32,7 @@ namespace unocontrols{ #define PROGRESSBAR_FREESPACE 4 -#define PROGRESSBAR_DEFAULT_HORIZONTAL sal_True +#define PROGRESSBAR_DEFAULT_HORIZONTAL true #define PROGRESSBAR_DEFAULT_BLOCKDIMENSION Size(1,1) #define PROGRESSBAR_DEFAULT_BACKGROUNDCOLOR TRGB_COLORDATA( 0x00, 0xC0, 0xC0, 0xC0 ) // lightgray #define PROGRESSBAR_DEFAULT_FOREGROUNDCOLOR TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x80 ) // blue @@ -406,7 +406,7 @@ protected: private: - sal_Bool m_bHorizontal ; // orientation for steps [true=horizontal/false=vertikal] + bool m_bHorizontal ; // orientation for steps [true=horizontal/false=vertikal] ::com::sun::star::awt::Size m_aBlockSize ; // width and height of a block [>=0,0] sal_Int32 m_nForegroundColor ; // (alpha,r,g,b) sal_Int32 m_nBackgroundColor ; // (alpha,r,g,b) diff --git a/UnoControls/source/inc/progressmonitor.hxx b/UnoControls/source/inc/progressmonitor.hxx index 3779fe687fdd..85a16fd055ed 100644 --- a/UnoControls/source/inc/progressmonitor.hxx +++ b/UnoControls/source/inc/progressmonitor.hxx @@ -719,7 +719,7 @@ private: @onerror - */ - IMPL_TextlistItem* impl_searchTopic( const OUString& sTopic , sal_Bool bbeforeProgress ); + IMPL_TextlistItem* impl_searchTopic( const OUString& sTopic , bool bbeforeProgress ); //____________________________________________________________________________________________________________ // debug methods @@ -742,8 +742,8 @@ private: #ifdef DBG_UTIL - sal_Bool impl_debug_checkParameter( const OUString& sTopic, const OUString& sText, sal_Bool bbeforeProgress ); // addText, updateText - sal_Bool impl_debug_checkParameter( const OUString& rTopic, sal_Bool bbeforeProgress ); // removeText + bool impl_debug_checkParameter( const OUString& sTopic, const OUString& sText, bool bbeforeProgress ); // addText, updateText + bool impl_debug_checkParameter( const OUString& rTopic, bool bbeforeProgress ); // removeText #endif //____________________________________________________________________________________________________________ -- cgit