diff options
author | Noel Grandin <noel@peralex.com> | 2014-04-22 12:52:39 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-04-23 11:11:49 +0200 |
commit | 1f2a47a6d39be654847c2bdde7605e08ad2fb78a (patch) | |
tree | 92ea9da2d9147091594302fe86128b36221a9ce4 /io | |
parent | e4f690b0389263c35f83fa8b58382c6518d00f62 (diff) |
io: sal_Bool->bool
Change-Id: I136c98cbe15d1c6629028392a9573066320b3a04
Diffstat (limited to 'io')
-rw-r--r-- | io/source/TextInputStream/TextInputStream.cxx | 38 | ||||
-rw-r--r-- | io/source/TextOutputStream/TextOutputStream.cxx | 2 | ||||
-rw-r--r-- | io/source/acceptor/acc_pipe.cxx | 4 | ||||
-rw-r--r-- | io/source/acceptor/acc_socket.cxx | 24 | ||||
-rw-r--r-- | io/source/acceptor/acceptor.cxx | 12 | ||||
-rw-r--r-- | io/source/acceptor/acceptor.hxx | 8 | ||||
-rw-r--r-- | io/source/connector/connector.hxx | 8 | ||||
-rw-r--r-- | io/source/connector/ctr_socket.cxx | 10 | ||||
-rw-r--r-- | io/source/stm/odata.cxx | 32 | ||||
-rw-r--r-- | io/source/stm/omark.cxx | 4 | ||||
-rw-r--r-- | io/source/stm/opipe.cxx | 12 | ||||
-rw-r--r-- | io/source/stm/opump.cxx | 10 |
12 files changed, 82 insertions, 82 deletions
diff --git a/io/source/TextInputStream/TextInputStream.cxx b/io/source/TextInputStream/TextInputStream.cxx index 845d61ab4597..876d3a2807b1 100644 --- a/io/source/TextInputStream/TextInputStream.cxx +++ b/io/source/TextInputStream/TextInputStream.cxx @@ -62,7 +62,7 @@ class OTextInputStream : public TextInputStreamHelper // Encoding OUString mEncoding; - sal_Bool mbEncodingInitialized; + bool mbEncodingInitialized; rtl_TextToUnicodeConverter mConvText2Unicode; rtl_TextToUnicodeContext mContextText2Unicode; Sequence<sal_Int8> mSeqSource; @@ -71,11 +71,11 @@ class OTextInputStream : public TextInputStreamHelper sal_Unicode* mpBuffer; sal_Int32 mnBufferSize; sal_Int32 mnCharsInBuffer; - sal_Bool mbReachedEOF; + bool mbReachedEOF; void implResizeBuffer( void ); OUString implReadString( const Sequence< sal_Unicode >& Delimiters, - sal_Bool bRemoveDelimiter, sal_Bool bFindLineEnd ) + bool bRemoveDelimiter, bool bFindLineEnd ) throw(IOException, RuntimeException); sal_Int32 implReadNext() throw(IOException, RuntimeException); @@ -124,7 +124,7 @@ OTextInputStream::OTextInputStream() , mpBuffer(NULL) , mnBufferSize(0) , mnCharsInBuffer(0) - , mbReachedEOF(sal_False) + , mbReachedEOF(false) { } @@ -157,27 +157,27 @@ OUString OTextInputStream::readLine( ) throw(IOException, RuntimeException, std::exception) { static Sequence< sal_Unicode > aDummySeq; - return implReadString( aDummySeq, sal_True, sal_True ); + return implReadString( aDummySeq, true, true ); } OUString OTextInputStream::readString( const Sequence< sal_Unicode >& Delimiters, sal_Bool bRemoveDelimiter ) throw(IOException, RuntimeException, std::exception) { - return implReadString( Delimiters, bRemoveDelimiter, sal_False ); + return implReadString( Delimiters, bRemoveDelimiter, false ); } sal_Bool OTextInputStream::isEOF() throw(IOException, RuntimeException, std::exception) { - sal_Bool bRet = sal_False; + bool bRet = false; if( mnCharsInBuffer == 0 && mbReachedEOF ) - bRet = sal_True; + bRet = true; return bRet; } OUString OTextInputStream::implReadString( const Sequence< sal_Unicode >& Delimiters, - sal_Bool bRemoveDelimiter, sal_Bool bFindLineEnd ) + bool bRemoveDelimiter, bool bFindLineEnd ) throw(IOException, RuntimeException) { OUString aRetStr; @@ -201,8 +201,8 @@ OUString OTextInputStream::implReadString( const Sequence< sal_Unicode >& Delimi sal_Int32 nBufferReadPos = 0; sal_Int32 nCopyLen = 0; - sal_Bool bFound = sal_False; - sal_Bool bFoundFirstLineEndChar = sal_False; + bool bFound = false; + bool bFoundFirstLineEndChar = false; sal_Unicode cFirstLineEndChar = 0; const sal_Unicode* pDelims = Delimiters.getConstArray(); const sal_Int32 nDelimCount = Delimiters.getLength(); @@ -228,7 +228,7 @@ OUString OTextInputStream::implReadString( const Sequence< sal_Unicode >& Delimi { if( bFoundFirstLineEndChar ) { - bFound = sal_True; + bFound = true; nCopyLen = nBufferReadPos - 2; if( c == cLineEndChar1 || c == cLineEndChar2 ) { @@ -246,7 +246,7 @@ OUString OTextInputStream::implReadString( const Sequence< sal_Unicode >& Delimi } else if( c == cLineEndChar1 || c == cLineEndChar2 ) { - bFoundFirstLineEndChar = sal_True; + bFoundFirstLineEndChar = true; cFirstLineEndChar = c; } } @@ -256,7 +256,7 @@ OUString OTextInputStream::implReadString( const Sequence< sal_Unicode >& Delimi { if( c == pDelims[ i ] ) { - bFound = sal_True; + bFound = true; nCopyLen = nBufferReadPos; if( bRemoveDelimiter ) nCopyLen--; @@ -296,7 +296,7 @@ sal_Int32 OTextInputStream::implReadNext() sal_Int32 nRead = mxStream->readSomeBytes( mSeqSource, nBytesToRead ); sal_Int32 nTotalRead = nRead; if( nRead < nBytesToRead ) - mbReachedEOF = sal_True; + mbReachedEOF = true; // Try to convert sal_uInt32 uiInfo; @@ -322,11 +322,11 @@ sal_Int32 OTextInputStream::implReadNext() &nSrcCvtBytes ); nSourceCount += nSrcCvtBytes; - sal_Bool bCont = sal_False; + bool bCont = false; if( uiInfo & RTL_TEXTTOUNICODE_INFO_DESTBUFFERTOSMALL ) { implResizeBuffer(); - bCont = sal_True; + bCont = true; } if( uiInfo & RTL_TEXTTOUNICODE_INFO_SRCBUFFERTOSMALL ) @@ -336,7 +336,7 @@ sal_Int32 OTextInputStream::implReadNext() nRead = mxStream->readSomeBytes( aOneByteSeq, 1 ); if( nRead == 0 ) { - mbReachedEOF = sal_True; + mbReachedEOF = true; break; } @@ -348,7 +348,7 @@ sal_Int32 OTextInputStream::implReadNext() } mSeqSource.getArray()[ nOldLen ] = aOneByteSeq.getConstArray()[ 0 ]; pbSource = mSeqSource.getConstArray(); - bCont = sal_True; + bCont = true; } if( bCont ) diff --git a/io/source/TextOutputStream/TextOutputStream.cxx b/io/source/TextOutputStream/TextOutputStream.cxx index 6f045a708c93..555cbeba7a96 100644 --- a/io/source/TextOutputStream/TextOutputStream.cxx +++ b/io/source/TextOutputStream/TextOutputStream.cxx @@ -59,7 +59,7 @@ class OTextOutputStream : public TextOutputStreamHelper // Encoding OUString mEncoding; - sal_Bool mbEncodingInitialized; + bool mbEncodingInitialized; rtl_UnicodeToTextConverter mConvUnicode2Text; rtl_UnicodeToTextContext mContextUnicode2Text; diff --git a/io/source/acceptor/acc_pipe.cxx b/io/source/acceptor/acc_pipe.cxx index 6fa424c60f42..6ba5606f86b0 100644 --- a/io/source/acceptor/acc_pipe.cxx +++ b/io/source/acceptor/acc_pipe.cxx @@ -149,7 +149,7 @@ namespace io_acceptor PipeAcceptor::PipeAcceptor( const OUString &sPipeName , const OUString & sConnectionDescription) : m_sPipeName( sPipeName ), m_sConnectionDescription( sConnectionDescription ), - m_bClosed( sal_False ) + m_bClosed( false ) { } @@ -199,7 +199,7 @@ namespace io_acceptor void PipeAcceptor::stopAccepting() { - m_bClosed = sal_True; + m_bClosed = true; Pipe pipe; { MutexGuard guard( m_mutex ); diff --git a/io/source/acceptor/acc_socket.cxx b/io/source/acceptor/acc_socket.cxx index 82ec366d40c4..9146757a4ef8 100644 --- a/io/source/acceptor/acc_socket.cxx +++ b/io/source/acceptor/acc_socket.cxx @@ -49,7 +49,7 @@ namespace io_acceptor { template<class T> struct ReferenceEqual { - sal_Bool operator () (const ::com::sun::star::uno::Reference<T> & op1, + bool operator () (const ::com::sun::star::uno::Reference<T> & op1, const ::com::sun::star::uno::Reference<T> & op2) const { return op1.get() == op2.get(); @@ -103,14 +103,14 @@ namespace io_acceptor { OUString m_sDescription; ::osl::Mutex _mutex; - sal_Bool _started; - sal_Bool _closed; - sal_Bool _error; + bool _started; + bool _closed; + bool _error; XStreamListener_hash_set _listeners; }; template<class T> - void notifyListeners(SocketConnection * pCon, sal_Bool * notified, T t) + void notifyListeners(SocketConnection * pCon, bool * notified, T t) { XStreamListener_hash_set listeners; @@ -118,7 +118,7 @@ namespace io_acceptor { ::osl::MutexGuard guard(pCon->_mutex); if(!*notified) { - *notified = sal_True; + *notified = true; listeners = pCon->_listeners; } } @@ -158,9 +158,9 @@ namespace io_acceptor { SocketConnection::SocketConnection( const OUString &sConnectionDescription) : m_nStatus( 0 ), m_sDescription( sConnectionDescription ), - _started(sal_False), - _closed(sal_False), - _error(sal_False) + _started(false), + _closed(false), + _error(false) { // make it unique m_sDescription += ",uniqueValue=" ; @@ -317,13 +317,13 @@ namespace io_acceptor { SocketAcceptor::SocketAcceptor( const OUString &sSocketName, sal_uInt16 nPort, - sal_Bool bTcpNoDelay, + bool bTcpNoDelay, const OUString &sConnectionDescription) : m_sSocketName( sSocketName ), m_sConnectionDescription( sConnectionDescription ), m_nPort( nPort ), m_bTcpNoDelay( bTcpNoDelay ), - m_bClosed( sal_False ) + m_bClosed( false ) { } @@ -396,7 +396,7 @@ namespace io_acceptor { void SocketAcceptor::stopAccepting() { - m_bClosed = sal_True; + m_bClosed = true; m_socket.close(); } } diff --git a/io/source/acceptor/acceptor.cxx b/io/source/acceptor/acceptor.cxx index 207ba21ff611..49d3feef50aa 100644 --- a/io/source/acceptor/acceptor.cxx +++ b/io/source/acceptor/acceptor.cxx @@ -71,7 +71,7 @@ namespace io_acceptor SocketAcceptor *m_pSocket; Mutex m_mutex; OUString m_sLastDescription; - sal_Bool m_bInAccept; + bool m_bInAccept; Reference< XMultiComponentFactory > _xSMgr; Reference< XComponentContext > _xCtx; @@ -82,7 +82,7 @@ namespace io_acceptor OAcceptor::OAcceptor( const Reference< XComponentContext > & xCtx ) : m_pPipe( 0 ) , m_pSocket( 0 ) - , m_bInAccept( sal_False ) + , m_bInAccept( false ) , _xSMgr( xCtx->getServiceManager() ) , _xCtx( xCtx ) {} @@ -101,7 +101,7 @@ namespace io_acceptor struct BeingInAccept { - BeingInAccept( sal_Bool *pFlag,const OUString & sConnectionDescription ) throw( AlreadyAcceptingException) + BeingInAccept( bool *pFlag,const OUString & sConnectionDescription ) throw( AlreadyAcceptingException) : m_pFlag( pFlag ) { if( *m_pFlag ) @@ -110,13 +110,13 @@ namespace io_acceptor sMessage += sConnectionDescription; throw AlreadyAcceptingException( sMessage , Reference< XInterface > () ); } - *m_pFlag = sal_True; + *m_pFlag = true; } ~BeingInAccept() { - *m_pFlag = sal_False; + *m_pFlag = false; } - sal_Bool *m_pFlag; + bool *m_pFlag; }; Reference< XConnection > OAcceptor::accept( const OUString &sConnectionDescription ) diff --git a/io/source/acceptor/acceptor.hxx b/io/source/acceptor/acceptor.hxx index 89002f0256b0..3e56b86e75e9 100644 --- a/io/source/acceptor/acceptor.hxx +++ b/io/source/acceptor/acceptor.hxx @@ -38,7 +38,7 @@ namespace io_acceptor { ::osl::Pipe m_pipe; OUString m_sPipeName; OUString m_sConnectionDescription; - sal_Bool m_bClosed; + bool m_bClosed; }; class SocketAcceptor @@ -46,7 +46,7 @@ namespace io_acceptor { public: SocketAcceptor( const OUString & sSocketName , sal_uInt16 nPort, - sal_Bool bTcpNoDelay, + bool bTcpNoDelay, const OUString &sConnectionDescription ); void init(); @@ -59,8 +59,8 @@ namespace io_acceptor { OUString m_sSocketName; OUString m_sConnectionDescription; sal_uInt16 m_nPort; - sal_Bool m_bTcpNoDelay; - sal_Bool m_bClosed; + bool m_bTcpNoDelay; + bool m_bClosed; }; } diff --git a/io/source/connector/connector.hxx b/io/source/connector/connector.hxx index 6579f75aab9b..f9deefa780b9 100644 --- a/io/source/connector/connector.hxx +++ b/io/source/connector/connector.hxx @@ -41,7 +41,7 @@ namespace stoc_connector template<class T> struct ReferenceEqual { - sal_Bool operator () (const ::com::sun::star::uno::Reference<T> & op1, + bool operator () (const ::com::sun::star::uno::Reference<T> & op1, const ::com::sun::star::uno::Reference<T> & op2) const { return op1.get() == op2.get(); @@ -122,9 +122,9 @@ namespace stoc_connector OUString m_sDescription; ::osl::Mutex _mutex; - sal_Bool _started; - sal_Bool _closed; - sal_Bool _error; + bool _started; + bool _closed; + bool _error; XStreamListener_hash_set _listeners; }; diff --git a/io/source/connector/ctr_socket.cxx b/io/source/connector/ctr_socket.cxx index 7d6e582ffadb..d7ad019a3525 100644 --- a/io/source/connector/ctr_socket.cxx +++ b/io/source/connector/ctr_socket.cxx @@ -31,7 +31,7 @@ using namespace ::com::sun::star::connection; namespace stoc_connector { template<class T> - void notifyListeners(SocketConnection * pCon, sal_Bool * notified, T t) + void notifyListeners(SocketConnection * pCon, bool * notified, T t) { XStreamListener_hash_set listeners; @@ -39,7 +39,7 @@ namespace stoc_connector { ::osl::MutexGuard guard(pCon->_mutex); if(!*notified) { - *notified = sal_True; + *notified = true; listeners = pCon->_listeners; } } @@ -80,9 +80,9 @@ namespace stoc_connector { SocketConnection::SocketConnection( const OUString &sConnectionDescription ) : m_nStatus( 0 ), m_sDescription( sConnectionDescription ), - _started(sal_False), - _closed(sal_False), - _error(sal_False) + _started(false), + _closed(false), + _error(false) { // make it unique m_sDescription += ",uniqueValue="; diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx index 7c2cc270c3ff..556c985b2fb3 100644 --- a/io/source/stm/odata.cxx +++ b/io/source/stm/odata.cxx @@ -59,7 +59,7 @@ class ODataInputStream : { public: ODataInputStream( ) - : m_bValidStream( sal_False ) + : m_bValidStream( false ) { } @@ -116,7 +116,7 @@ protected: Reference < XConnectable > m_pred; Reference < XConnectable > m_succ; Reference < XInputStream > m_input; - sal_Bool m_bValidStream; + bool m_bValidStream; }; ODataInputStream::~ODataInputStream() @@ -199,7 +199,7 @@ void ODataInputStream::closeInput(void ) setInputStream( Reference< XInputStream > () ); setPredecessor( Reference < XConnectable >() ); setSuccessor( Reference < XConnectable >() ); - m_bValidStream = sal_False; + m_bValidStream = false; } else { @@ -510,7 +510,7 @@ class ODataOutputStream : { public: ODataOutputStream() - : m_bValidStream( sal_False ) + : m_bValidStream( false ) { } virtual ~ODataOutputStream(); @@ -564,7 +564,7 @@ protected: Reference < XConnectable > m_succ; Reference < XConnectable > m_pred; Reference< XOutputStream > m_output; - sal_Bool m_bValidStream; + bool m_bValidStream; }; ODataOutputStream::~ODataOutputStream() @@ -929,7 +929,7 @@ class OObjectOutputStream: public: OObjectOutputStream() : m_nMaxId(0) , - m_bValidMarkable(sal_False) + m_bValidMarkable(false) { } @@ -998,7 +998,7 @@ private: ObjectContainer_Impl m_mapObject; sal_Int32 m_nMaxId; Reference< XMarkableStream > m_rMarkable; - sal_Bool m_bValidMarkable; + bool m_bValidMarkable; }; OObjectOutputStream::~OObjectOutputStream() @@ -1009,7 +1009,7 @@ void OObjectOutputStream::writeObject( const Reference< XPersistObject > & xPObj { connectToMarkable(); - sal_Bool bWriteObj = sal_False; + bool bWriteObj = false; // create Mark to write length of info sal_uInt32 nInfoLenMark = m_rMarkable->createMark(); @@ -1029,7 +1029,7 @@ void OObjectOutputStream::writeObject( const Reference< XPersistObject > & xPObj m_mapObject[ rX ] = ++m_nMaxId; ODataOutputStream::writeLong( m_nMaxId ); ODataOutputStream::writeUTF( xPObj->getServiceName() ); - bWriteObj = sal_True; + bWriteObj = true; } else { @@ -1096,7 +1096,7 @@ void OObjectOutputStream::connectToMarkable(void) Reference < XActiveDataSource > source( rTry , UNO_QUERY ); rTry = source; } - m_bValidMarkable = sal_True; + m_bValidMarkable = true; } } @@ -1197,7 +1197,7 @@ public: OObjectInputStream( const Reference < XComponentContext > &r) : m_rSMgr( r->getServiceManager() ) , m_rCxt( r ) - , m_bValidMarkable(sal_False) + , m_bValidMarkable(false) { } virtual ~OObjectInputStream(); @@ -1273,7 +1273,7 @@ private: private: Reference < XMultiComponentFactory > m_rSMgr; Reference < XComponentContext > m_rCxt; - sal_Bool m_bValidMarkable; + bool m_bValidMarkable; Reference < XMarkableStream > m_rMarkable; vector < Reference< XPersistObject > > m_aPersistVector; @@ -1316,7 +1316,7 @@ Reference< XPersistObject > OObjectInputStream::readObject() throw (::com::sun: // skip data of new version skipBytes( nLen - m_rMarkable->offsetToMark( nMark ) ); - sal_Bool bLoadSuccesfull = sal_True; + bool bLoadSuccesfull = true; if( nId ) { if( !aName.isEmpty() ) @@ -1341,14 +1341,14 @@ Reference< XPersistObject > OObjectInputStream::readObject() throw (::com::sun: else { // no service with this name could be instantiated - bLoadSuccesfull = sal_False; + bLoadSuccesfull = false; } } else { if( m_aPersistVector.size() < nId ) { // id unknown, load failure ! - bLoadSuccesfull = sal_False; + bLoadSuccesfull = false; } else { @@ -1394,7 +1394,7 @@ void OObjectInputStream::connectToMarkable() Reference < XActiveDataSink > sink( rTry , UNO_QUERY ); rTry = sink; } - m_bValidMarkable = sal_True; + m_bValidMarkable = true; } } diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx index ec7f5991939b..bd026b498255 100644 --- a/io/source/stm/omark.cxx +++ b/io/source/stm/omark.cxx @@ -136,7 +136,7 @@ private: Reference< XConnectable > m_pred; Reference< XOutputStream > m_output; - sal_Bool m_bValidStream; + bool m_bValidStream; IRingBuffer *m_pBuffer; map<sal_Int32,sal_Int32,less< sal_Int32 > > m_mapMarks; @@ -551,7 +551,7 @@ private: Reference < XConnectable > m_pred; Reference< XInputStream > m_input; - sal_Bool m_bValidStream; + bool m_bValidStream; IRingBuffer *m_pBuffer; map<sal_Int32,sal_Int32,less< sal_Int32 > > m_mapMarks; diff --git a/io/source/stm/opipe.cxx b/io/source/stm/opipe.cxx index 2e1e86320725..a6871c43abce 100644 --- a/io/source/stm/opipe.cxx +++ b/io/source/stm/opipe.cxx @@ -115,8 +115,8 @@ private: sal_Int32 m_nBytesToSkip; - sal_Bool m_bOutputStreamClosed; - sal_Bool m_bInputStreamClosed; + bool m_bOutputStreamClosed; + bool m_bInputStreamClosed; oslCondition m_conditionBytesAvail; Mutex m_mutexAccess; @@ -129,8 +129,8 @@ OPipeImpl::OPipeImpl() { m_nBytesToSkip = 0; - m_bOutputStreamClosed = sal_False; - m_bInputStreamClosed = sal_False; + m_bOutputStreamClosed = false; + m_bInputStreamClosed = false; m_pFIFO = new MemFIFO; m_conditionBytesAvail = osl_createCondition(); @@ -264,7 +264,7 @@ void OPipeImpl::closeInput(void) { MutexGuard guard( m_mutexAccess ); - m_bInputStreamClosed = sal_True; + m_bInputStreamClosed = true; delete m_pFIFO; m_pFIFO = 0; @@ -356,7 +356,7 @@ void OPipeImpl::closeOutput(void) { MutexGuard guard( m_mutexAccess ); - m_bOutputStreamClosed = sal_True; + m_bOutputStreamClosed = true; osl_setCondition( m_conditionBytesAvail ); setPredecessor( Reference < XConnectable > () ); return; diff --git a/io/source/stm/opump.cxx b/io/source/stm/opump.cxx index ef8678a39129..d5c010e66356 100644 --- a/io/source/stm/opump.cxx +++ b/io/source/stm/opump.cxx @@ -64,7 +64,7 @@ namespace io_stm { Reference< XInputStream > m_xInput; Reference< XOutputStream > m_xOutput; OInterfaceContainerHelper m_cnt; - sal_Bool m_closeFired; + bool m_closeFired; void run(); static void static_run( void* pObject ); @@ -107,7 +107,7 @@ namespace io_stm { Pump::Pump() : m_aThread( 0 ), m_cnt( m_aMutex ), - m_closeFired( sal_False ) + m_closeFired( false ) { } @@ -139,13 +139,13 @@ void Pump::fireError( const Any & exception ) void Pump::fireClose() { - sal_Bool bFire = sal_False; + bool bFire = false; { MutexGuard guard( m_aMutex ); if( ! m_closeFired ) { - m_closeFired = sal_True; - bFire = sal_True; + m_closeFired = true; + bFire = true; } } |