diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-04-20 17:20:42 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-04-20 17:27:29 +0200 |
commit | f9ec2400464f4ce84a0d4e4b1e125449ea212bb1 (patch) | |
tree | ae753c4d859e2fd52fe6841494d9844b1828ba22 /ucbhelper/source | |
parent | 1c71c60d59bad925035715d78ca4014d6d4c9aea (diff) |
loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: Ie47a53763332119d290ebe5646af987ddd44be9d
Diffstat (limited to 'ucbhelper/source')
-rw-r--r-- | ucbhelper/source/client/content.cxx | 2 | ||||
-rw-r--r-- | ucbhelper/source/provider/resultset.cxx | 62 | ||||
-rw-r--r-- | ucbhelper/source/provider/resultsetmetadata.cxx | 16 | ||||
-rw-r--r-- | ucbhelper/source/provider/simpleauthenticationrequest.cxx | 4 |
4 files changed, 42 insertions, 42 deletions
diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx index dd0397762f4e..ac8a418c83ac 100644 --- a/ucbhelper/source/client/content.cxx +++ b/ucbhelper/source/client/content.cxx @@ -956,7 +956,7 @@ bool Content::insertNewContent( const OUString& rContentType, makeAny( InsertCommandArgument( rData.is() ? rData : new EmptyInputStream, - sal_False /* ReplaceExisting */ ) ) ); + false /* ReplaceExisting */ ) ) ); aNewContent.m_xImpl->inserted(); rNewContent = aNewContent; diff --git a/ucbhelper/source/provider/resultset.cxx b/ucbhelper/source/provider/resultset.cxx index eccb3b503974..54ec956210ba 100644 --- a/ucbhelper/source/provider/resultset.cxx +++ b/ucbhelper/source/provider/resultset.cxx @@ -363,7 +363,7 @@ sal_Bool SAL_CALL ResultSet::next() if ( m_pImpl->m_bAfterLast ) { m_pImpl->m_xDataSupplier->validate(); - return sal_False; + return false; } // getResult works zero-based! @@ -371,12 +371,12 @@ sal_Bool SAL_CALL ResultSet::next() { m_pImpl->m_bAfterLast = true; m_pImpl->m_xDataSupplier->validate(); - return sal_False; + return false; } m_pImpl->m_nPos++; m_pImpl->m_xDataSupplier->validate(); - return sal_True; + return true; } @@ -387,14 +387,14 @@ sal_Bool SAL_CALL ResultSet::isBeforeFirst() if ( m_pImpl->m_bAfterLast ) { m_pImpl->m_xDataSupplier->validate(); - return sal_False; + return false; } // getResult works zero-based! if ( !m_pImpl->m_xDataSupplier->getResult( 0 ) ) { m_pImpl->m_xDataSupplier->validate(); - return sal_False; + return false; } m_pImpl->m_xDataSupplier->validate(); @@ -418,7 +418,7 @@ sal_Bool SAL_CALL ResultSet::isFirst() if ( m_pImpl->m_bAfterLast ) { m_pImpl->m_xDataSupplier->validate(); - return sal_False; + return false; } m_pImpl->m_xDataSupplier->validate(); @@ -433,14 +433,14 @@ sal_Bool SAL_CALL ResultSet::isLast() if ( m_pImpl->m_bAfterLast ) { m_pImpl->m_xDataSupplier->validate(); - return sal_False; + return false; } sal_Int32 nCount = m_pImpl->m_xDataSupplier->totalCount(); if ( !nCount ) { m_pImpl->m_xDataSupplier->validate(); - return sal_False; + return false; } m_pImpl->m_xDataSupplier->validate(); @@ -480,11 +480,11 @@ sal_Bool SAL_CALL ResultSet::first() m_pImpl->m_bAfterLast = false; m_pImpl->m_nPos = 1; m_pImpl->m_xDataSupplier->validate(); - return sal_True; + return true; } m_pImpl->m_xDataSupplier->validate(); - return sal_False; + return false; } @@ -499,11 +499,11 @@ sal_Bool SAL_CALL ResultSet::last() m_pImpl->m_bAfterLast = false; m_pImpl->m_nPos = nCount; m_pImpl->m_xDataSupplier->validate(); - return sal_True; + return true; } m_pImpl->m_xDataSupplier->validate(); - return sal_False; + return false; } @@ -553,7 +553,7 @@ sal_Bool SAL_CALL ResultSet::absolute( sal_Int32 row ) m_pImpl->m_bAfterLast = false; m_pImpl->m_nPos = 0; m_pImpl->m_xDataSupplier->validate(); - return sal_False; + return false; } else // |row| <= nCount { @@ -561,7 +561,7 @@ sal_Bool SAL_CALL ResultSet::absolute( sal_Int32 row ) m_pImpl->m_bAfterLast = false; m_pImpl->m_nPos = ( nCount + row + 1 ); m_pImpl->m_xDataSupplier->validate(); - return sal_True; + return true; } } else if ( row == 0 ) @@ -580,14 +580,14 @@ sal_Bool SAL_CALL ResultSet::absolute( sal_Int32 row ) m_pImpl->m_bAfterLast = false; m_pImpl->m_nPos = row; m_pImpl->m_xDataSupplier->validate(); - return sal_True; + return true; } else // row > nCount { osl::MutexGuard aGuard( m_pImpl->m_aMutex ); m_pImpl->m_bAfterLast = true; m_pImpl->m_xDataSupplier->validate(); - return sal_False; + return false; } } @@ -624,7 +624,7 @@ sal_Bool SAL_CALL ResultSet::relative( sal_Int32 rows ) m_pImpl->m_bAfterLast = false; m_pImpl->m_nPos = ( m_pImpl->m_nPos + rows ); m_pImpl->m_xDataSupplier->validate(); - return sal_True; + return true; } else { @@ -632,14 +632,14 @@ sal_Bool SAL_CALL ResultSet::relative( sal_Int32 rows ) m_pImpl->m_bAfterLast = false; m_pImpl->m_nPos = 0; m_pImpl->m_xDataSupplier->validate(); - return sal_False; + return false; } } else if ( rows == 0 ) { // nop. m_pImpl->m_xDataSupplier->validate(); - return sal_True; + return true; } else // rows > 0 { @@ -650,14 +650,14 @@ sal_Bool SAL_CALL ResultSet::relative( sal_Int32 rows ) m_pImpl->m_bAfterLast = false; m_pImpl->m_nPos = ( m_pImpl->m_nPos + rows ); m_pImpl->m_xDataSupplier->validate(); - return sal_True; + return true; } else { osl::MutexGuard aGuard( m_pImpl->m_aMutex ); m_pImpl->m_bAfterLast = true; m_pImpl->m_xDataSupplier->validate(); - return sal_False; + return false; } } @@ -687,11 +687,11 @@ sal_Bool SAL_CALL ResultSet::previous() if ( m_pImpl->m_nPos ) { m_pImpl->m_xDataSupplier->validate(); - return sal_True; + return true; } m_pImpl->m_xDataSupplier->validate(); - return sal_False; + return false; } @@ -713,7 +713,7 @@ sal_Bool SAL_CALL ResultSet::rowUpdated() throw( sdbc::SQLException, uno::RuntimeException, std::exception ) { m_pImpl->m_xDataSupplier->validate(); - return sal_False; + return false; } @@ -722,7 +722,7 @@ sal_Bool SAL_CALL ResultSet::rowInserted() throw( sdbc::SQLException, uno::RuntimeException, std::exception ) { m_pImpl->m_xDataSupplier->validate(); - return sal_False; + return false; } @@ -731,7 +731,7 @@ sal_Bool SAL_CALL ResultSet::rowDeleted() throw( sdbc::SQLException, uno::RuntimeException, std::exception ) { m_pImpl->m_xDataSupplier->validate(); - return sal_False; + return false; } @@ -818,7 +818,7 @@ sal_Bool SAL_CALL ResultSet::getBoolean( sal_Int32 columnIndex ) m_pImpl->m_bWasNull = true; m_pImpl->m_xDataSupplier->validate(); - return sal_False; + return false; } @@ -1468,7 +1468,7 @@ void ResultSet::rowCountChanged( sal_uInt32 nOld, sal_uInt32 nNew ) beans::PropertyChangeEvent( static_cast< cppu::OWeakObject * >( this ), OUString("RowCount"), - sal_False, + false, 1001, uno::makeAny( nOld ), // old value uno::makeAny( nNew ) ) ); // new value @@ -1484,10 +1484,10 @@ void ResultSet::rowCountFinal() beans::PropertyChangeEvent( static_cast< cppu::OWeakObject * >( this ), OUString("IsRowCountFinal"), - sal_False, + false, 1000, - uno:: makeAny( sal_False ), // old value - uno::makeAny( sal_True ) ) ); // new value + uno:: makeAny( false ), // old value + uno::makeAny( true ) ) ); // new value } diff --git a/ucbhelper/source/provider/resultsetmetadata.cxx b/ucbhelper/source/provider/resultsetmetadata.cxx index 7ac87be02fc1..b1b620f98eb6 100644 --- a/ucbhelper/source/provider/resultsetmetadata.cxx +++ b/ucbhelper/source/provider/resultsetmetadata.cxx @@ -162,7 +162,7 @@ sal_Bool SAL_CALL ResultSetMetaData::isAutoIncrement( sal_Int32 column ) */ if ( ( column < 1 ) || ( column > m_aProps.getLength() ) ) - return sal_False; + return false; return m_pImpl->m_aColumnData[ column - 1 ].isAutoIncrement; } @@ -173,7 +173,7 @@ sal_Bool SAL_CALL ResultSetMetaData::isCaseSensitive( sal_Int32 column ) throw( SQLException, RuntimeException, std::exception ) { if ( ( column < 1 ) || ( column > m_aProps.getLength() ) ) - return sal_False; + return false; return m_pImpl->m_aColumnData[ column - 1 ].isCaseSensitive; } @@ -189,7 +189,7 @@ sal_Bool SAL_CALL ResultSetMetaData::isSearchable( sal_Int32 column ) */ if ( ( column < 1 ) || ( column > m_aProps.getLength() ) ) - return sal_False; + return false; return m_pImpl->m_aColumnData[ column - 1 ].isSearchable; } @@ -204,7 +204,7 @@ sal_Bool SAL_CALL ResultSetMetaData::isCurrency( sal_Int32 column ) */ if ( ( column < 1 ) || ( column > m_aProps.getLength() ) ) - return sal_False; + return false; return m_pImpl->m_aColumnData[ column - 1 ].isCurrency; } @@ -235,7 +235,7 @@ sal_Bool SAL_CALL ResultSetMetaData::isSigned( sal_Int32 column ) */ if ( ( column < 1 ) || ( column > m_aProps.getLength() ) ) - return sal_False; + return false; return m_pImpl->m_aColumnData[ column - 1 ].isSigned; } @@ -514,7 +514,7 @@ sal_Bool SAL_CALL ResultSetMetaData::isReadOnly( sal_Int32 column ) return m_bReadOnly; if ( ( column < 1 ) || ( column > m_aProps.getLength() ) ) - return sal_True; + return true; // autoincrement==true => readonly return m_pImpl->m_aColumnData[ column - 1 ].isAutoIncrement || @@ -530,7 +530,7 @@ sal_Bool SAL_CALL ResultSetMetaData::isWritable( sal_Int32 column ) return !m_bReadOnly; if ( ( column < 1 ) || ( column > m_aProps.getLength() ) ) - return sal_False; + return false; return m_pImpl->m_aColumnData[ column - 1 ].isWritable; } @@ -544,7 +544,7 @@ sal_Bool SAL_CALL ResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) return !m_bReadOnly; if ( ( column < 1 ) || ( column > m_aProps.getLength() ) ) - return sal_False; + return false; return m_pImpl->m_aColumnData[ column - 1 ].isDefinitelyWritable; } diff --git a/ucbhelper/source/provider/simpleauthenticationrequest.cxx b/ucbhelper/source/provider/simpleauthenticationrequest.cxx index e8cdb9cc5c62..a1e0ae4f25d8 100644 --- a/ucbhelper/source/provider/simpleauthenticationrequest.cxx +++ b/ucbhelper/source/provider/simpleauthenticationrequest.cxx @@ -46,9 +46,9 @@ SimpleAuthenticationRequest::SimpleAuthenticationRequest( aRequest.HasRealm = !rRealm.isEmpty(); if ( aRequest.HasRealm ) aRequest.Realm = rRealm; - aRequest.HasUserName = sal_True; + aRequest.HasUserName = true; aRequest.UserName = rUserName; - aRequest.HasPassword = sal_True; + aRequest.HasPassword = true; aRequest.Password = rPassword; aRequest.HasAccount = !rAccount.isEmpty(); if ( aRequest.HasAccount ) |