diff options
131 files changed, 570 insertions, 570 deletions
diff --git a/comphelper/source/container/container.cxx b/comphelper/source/container/container.cxx index 036375bcb97a..d3b440465de0 100644 --- a/comphelper/source/container/container.cxx +++ b/comphelper/source/container/container.cxx @@ -41,23 +41,23 @@ IndexAccessIterator::~IndexAccessIterator() {} //------------------------------------------------------------------------------ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> IndexAccessIterator::Next() { - sal_Bool bCheckingStartingPoint = !m_xCurrentObject.is(); + bool bCheckingStartingPoint = !m_xCurrentObject.is(); // Is the current node the starting point? - sal_Bool bAlreadyCheckedCurrent = m_xCurrentObject.is(); + bool bAlreadyCheckedCurrent = m_xCurrentObject.is(); // Have I already tested the current node through ShouldHandleElement? if (!m_xCurrentObject.is()) m_xCurrentObject = m_xStartingPoint; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xSearchLoop( m_xCurrentObject); - sal_Bool bHasMoreToSearch = sal_True; - sal_Bool bFoundSomething = sal_False; + bool bHasMoreToSearch = true; + bool bFoundSomething = false; while (!bFoundSomething && bHasMoreToSearch) { // Priming loop if (!bAlreadyCheckedCurrent && ShouldHandleElement(xSearchLoop)) { m_xCurrentObject = xSearchLoop; - bFoundSomething = sal_True; + bFoundSomething = true; } else { @@ -67,7 +67,7 @@ IndexAccessIterator::~IndexAccessIterator() {} { ::com::sun::star::uno::Any aElement(xContainerAccess->getByIndex(0)); xSearchLoop = *(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)aElement.getValue(); - bCheckingStartingPoint = sal_False; + bCheckingStartingPoint = false; m_arrChildIndizies.push_back((sal_Int32)0); } @@ -92,7 +92,7 @@ IndexAccessIterator::~IndexAccessIterator() {} // and check the next child ::com::sun::star::uno::Any aElement(xContainerAccess->getByIndex(nOldSearchChildIndex)); xSearchLoop = *(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*) aElement.getValue(); - bCheckingStartingPoint = sal_False; + bCheckingStartingPoint = false; // and update its position in the list. m_arrChildIndizies.push_back((sal_Int32)nOldSearchChildIndex); @@ -100,12 +100,12 @@ IndexAccessIterator::~IndexAccessIterator() {} } // Finally, if there's nothing more to do in this row (to the right), we'll move on to the next row. xSearchLoop = xParent; - bCheckingStartingPoint = sal_False; + bCheckingStartingPoint = false; } if (m_arrChildIndizies.empty() && !bCheckingStartingPoint) { //This is the case if there is nothing to the right in the original search loop - bHasMoreToSearch = sal_False; + bHasMoreToSearch = false; } } @@ -114,12 +114,12 @@ IndexAccessIterator::~IndexAccessIterator() {} if (ShouldHandleElement(xSearchLoop)) { m_xCurrentObject = xSearchLoop; - bFoundSomething = sal_True; + bFoundSomething = true; } else if (bCheckingStartingPoint) - bHasMoreToSearch = sal_False; - bAlreadyCheckedCurrent = sal_True; + bHasMoreToSearch = false; + bAlreadyCheckedCurrent = true; } } } diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx index 2d7df99a0e25..eaa97721f1a8 100644 --- a/comphelper/source/container/embeddedobjectcontainer.cxx +++ b/comphelper/source/container/embeddedobjectcontainer.cxx @@ -60,7 +60,7 @@ struct hashObjectName_Impl struct eqObjectName_Impl { - sal_Bool operator()(const OUString Str1, const OUString Str2) const + bool operator()(const OUString Str1, const OUString Str2) const { return ( Str1 == Str2 ); } @@ -148,13 +148,13 @@ void EmbeddedObjectContainer::SwitchPersistence( const uno::Reference < embed::X pImpl->bOwnsStorage = false; } -sal_Bool EmbeddedObjectContainer::CommitImageSubStorage() +bool EmbeddedObjectContainer::CommitImageSubStorage() { if ( pImpl->mxImageStorage.is() ) { try { - sal_Bool bReadOnlyMode = sal_True; + bool bReadOnlyMode = true; uno::Reference < beans::XPropertySet > xSet(pImpl->mxImageStorage,uno::UNO_QUERY); if ( xSet.is() ) { @@ -172,11 +172,11 @@ sal_Bool EmbeddedObjectContainer::CommitImageSubStorage() } catch (const uno::Exception&) { - return sal_False; + return false; } } - return sal_True; + return true; } void EmbeddedObjectContainer::ReleaseImageSubStorage() @@ -255,12 +255,12 @@ uno::Sequence < OUString > EmbeddedObjectContainer::GetObjectNames() return aSeq; } -sal_Bool EmbeddedObjectContainer::HasEmbeddedObjects() +bool EmbeddedObjectContainer::HasEmbeddedObjects() { return pImpl->maObjectContainer.size() != 0; } -sal_Bool EmbeddedObjectContainer::HasEmbeddedObject( const OUString& rName ) +bool EmbeddedObjectContainer::HasEmbeddedObject( const OUString& rName ) { EmbeddedObjectContainerNameMap::iterator aIt = pImpl->maObjectContainer.find( rName ); if ( aIt == pImpl->maObjectContainer.end() ) @@ -269,24 +269,24 @@ sal_Bool EmbeddedObjectContainer::HasEmbeddedObject( const OUString& rName ) return xAccess->hasByName(rName); } else - return sal_True; + return true; } -sal_Bool EmbeddedObjectContainer::HasEmbeddedObject( const uno::Reference < embed::XEmbeddedObject >& xObj ) +bool EmbeddedObjectContainer::HasEmbeddedObject( const uno::Reference < embed::XEmbeddedObject >& xObj ) { EmbeddedObjectContainerNameMap::iterator aIt = pImpl->maObjectContainer.begin(); while ( aIt != pImpl->maObjectContainer.end() ) { if ( (*aIt).second == xObj ) - return sal_True; + return true; else ++aIt; } - return sal_False; + return false; } -sal_Bool EmbeddedObjectContainer::HasInstantiatedEmbeddedObject( const OUString& rName ) +bool EmbeddedObjectContainer::HasInstantiatedEmbeddedObject( const OUString& rName ) { // allows to detect whether the object was already instantiated // currently the filter instantiate it on loading, so this method allows @@ -347,7 +347,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::Get_Impl( con { // create the object from the storage uno::Reference < beans::XPropertySet > xSet( pImpl->mxStorage, uno::UNO_QUERY ); - sal_Bool bReadOnlyMode = sal_True; + bool bReadOnlyMode = true; if ( xSet.is() ) { // get the open mode from the parent storage @@ -493,7 +493,7 @@ void EmbeddedObjectContainer::AddEmbeddedObject( const ::com::sun::star::uno::Re } } -sal_Bool EmbeddedObjectContainer::StoreEmbeddedObject( const uno::Reference < embed::XEmbeddedObject >& xObj, OUString& rName, sal_Bool bCopy ) +bool EmbeddedObjectContainer::StoreEmbeddedObject( const uno::Reference < embed::XEmbeddedObject >& xObj, OUString& rName, bool bCopy ) { SAL_INFO( "comphelper.container", "comphelper (mv76033) comphelper::EmbeddedObjectContainer::StoreEmbeddedObject" ); @@ -528,24 +528,24 @@ sal_Bool EmbeddedObjectContainer::StoreEmbeddedObject( const uno::Reference < em { SAL_WARN("comphelper.container", "EmbeddedObjectContainer::StoreEmbeddedObject: exception caught: " << e.Message); // TODO/LATER: better error recovery should keep storage intact - return sal_False; + return false; } - return sal_True; + return true; } -sal_Bool EmbeddedObjectContainer::InsertEmbeddedObject( const uno::Reference < embed::XEmbeddedObject >& xObj, OUString& rName ) +bool EmbeddedObjectContainer::InsertEmbeddedObject( const uno::Reference < embed::XEmbeddedObject >& xObj, OUString& rName ) { SAL_INFO( "comphelper.container", "comphelper (mv76033) comphelper::EmbeddedObjectContainer::InsertEmbeddedObject( Object )" ); // store it into the container storage - if ( StoreEmbeddedObject( xObj, rName, sal_False ) ) + if ( StoreEmbeddedObject( xObj, rName, false ) ) { // remember object AddEmbeddedObject( xObj, rName ); - return sal_True; + return true; } else - return sal_False; + return false; } uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::InsertEmbeddedObject( const uno::Reference < io::XInputStream >& xStm, OUString& rNewName ) @@ -556,14 +556,14 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::InsertEmbedde rNewName = CreateUniqueObjectName(); // store it into the container storage - sal_Bool bIsStorage = sal_False; + bool bIsStorage = false; try { // first try storage persistence uno::Reference < embed::XStorage > xStore = ::comphelper::OStorageHelper::GetStorageFromInputStream( xStm ); // storage was created from stream successfully - bIsStorage = sal_True; + bIsStorage = true; uno::Reference < embed::XStorage > xNewStore = pImpl->mxStorage->openStorageElement( rNewName, embed::ElementModes::READWRITE ); xStore->copyToStorage( xNewStore ); @@ -681,13 +681,13 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::InsertEmbedde return xObj; } -sal_Bool EmbeddedObjectContainer::TryToCopyGraphReplacement( EmbeddedObjectContainer& rSrc, +bool EmbeddedObjectContainer::TryToCopyGraphReplacement( EmbeddedObjectContainer& rSrc, const OUString& aOrigName, const OUString& aTargetName ) { SAL_INFO( "comphelper.container", "comphelper (mv76033) comphelper::EmbeddedObjectContainer::TryToCopyGraphReplacement" ); - sal_Bool bResult = sal_False; + bool bResult = false; if ( ( &rSrc != this || !aOrigName.equals( aTargetName ) ) && !aOrigName.isEmpty() && !aTargetName.isEmpty() ) { @@ -722,7 +722,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CopyAndGetEmb rName = CreateUniqueObjectName(); // objects without persistance are not really stored by the method - if ( xObj.is() && StoreEmbeddedObject( xObj, rName, sal_True ) ) + if ( xObj.is() && StoreEmbeddedObject( xObj, rName, true ) ) { xResult = Get_Impl( rName, xObj); if ( !xResult.is() ) @@ -853,7 +853,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CopyAndGetEmb return xResult; } -sal_Bool EmbeddedObjectContainer::MoveEmbeddedObject( EmbeddedObjectContainer& rSrc, const uno::Reference < embed::XEmbeddedObject >& xObj, OUString& rName ) +bool EmbeddedObjectContainer::MoveEmbeddedObject( EmbeddedObjectContainer& rSrc, const uno::Reference < embed::XEmbeddedObject >& xObj, OUString& rName ) { SAL_INFO( "comphelper.container", "comphelper (mv76033) comphelper::EmbeddedObjectContainer::MoveEmbeddedObject( Object )" ); @@ -864,7 +864,7 @@ sal_Bool EmbeddedObjectContainer::MoveEmbeddedObject( EmbeddedObjectContainer& r aName = xPersist->getEntryName(); // now move the object to the new container; the returned name is the new persist name in this container - sal_Bool bRet; + bool bRet; try { @@ -875,20 +875,20 @@ sal_Bool EmbeddedObjectContainer::MoveEmbeddedObject( EmbeddedObjectContainer& r catch (const uno::Exception&) { SAL_WARN( "comphelper.container", "Failed to insert embedded object into storage!" ); - bRet = sal_False; + bRet = false; } if ( bRet ) { // now remove the object from the former container - bRet = sal_False; + bRet = false; EmbeddedObjectContainerNameMap::iterator aIt = rSrc.pImpl->maObjectContainer.begin(); while ( aIt != rSrc.pImpl->maObjectContainer.end() ) { if ( (*aIt).second == xObj ) { rSrc.pImpl->maObjectContainer.erase( aIt ); - bRet = sal_True; + bRet = true; break; } @@ -907,7 +907,7 @@ sal_Bool EmbeddedObjectContainer::MoveEmbeddedObject( EmbeddedObjectContainer& r catch (const uno::Exception&) { SAL_WARN( "comphelper.container", "Failed to remove object from storage!" ); - bRet = sal_False; + bRet = false; } } @@ -918,7 +918,7 @@ sal_Bool EmbeddedObjectContainer::MoveEmbeddedObject( EmbeddedObjectContainer& r } // #i119941, bKeepToTempStorage: use to specify whether store the removed object to temporary storage+ -sal_Bool EmbeddedObjectContainer::RemoveEmbeddedObject( const OUString& rName, sal_Bool bClose, sal_Bool bKeepToTempStorage ) +bool EmbeddedObjectContainer::RemoveEmbeddedObject( const OUString& rName, bool bClose, bool bKeepToTempStorage ) { SAL_INFO( "comphelper.container", "comphelper (mv76033) comphelper::EmbeddedObjectContainer::RemoveEmbeddedObject( Name )" ); @@ -927,10 +927,10 @@ sal_Bool EmbeddedObjectContainer::RemoveEmbeddedObject( const OUString& rName, s //return RemoveEmbeddedObject( xObj, bClose ); return RemoveEmbeddedObject( xObj, bClose, bKeepToTempStorage ); else - return sal_False; + return false; } -sal_Bool EmbeddedObjectContainer::MoveEmbeddedObject( const OUString& rName, EmbeddedObjectContainer& rCnt ) +bool EmbeddedObjectContainer::MoveEmbeddedObject( const OUString& rName, EmbeddedObjectContainer& rCnt ) { SAL_INFO( "comphelper.container", "comphelper (mv76033) comphelper::EmbeddedObjectContainer::MoveEmbeddedObject( Name )" ); @@ -939,7 +939,7 @@ sal_Bool EmbeddedObjectContainer::MoveEmbeddedObject( const OUString& rName, Emb OSL_ENSURE( aIt2 == rCnt.pImpl->maObjectContainer.end(), "Object does already exist in target container!" ); if ( aIt2 != rCnt.pImpl->maObjectContainer.end() ) - return sal_False; + return false; uno::Reference < embed::XEmbeddedObject > xObj; EmbeddedObjectContainerNameMap::iterator aIt = pImpl->maObjectContainer.find( rName ); @@ -969,23 +969,23 @@ sal_Bool EmbeddedObjectContainer::MoveEmbeddedObject( const OUString& rName, Emb rCnt.TryToCopyGraphReplacement( *this, rName, rName ); // RemoveGraphicStream( rName ); - return sal_True; + return true; } catch (const uno::Exception&) { SAL_WARN( "comphelper.container", "Could not move object!"); - return sal_False; + return false; } } else SAL_WARN( "comphelper.container", "Unknown object!"); - return sal_False; + return false; } //sal_Bool EmbeddedObjectContainer::RemoveEmbeddedObject( const uno::Reference < embed::XEmbeddedObject >& xObj, sal_Bool bClose ) // #i119941, bKeepToTempStorage: use to specify whether store the removed object to temporary storage+ -sal_Bool EmbeddedObjectContainer::RemoveEmbeddedObject( const uno::Reference < embed::XEmbeddedObject >& xObj, sal_Bool bClose, sal_Bool bKeepToTempStorage ) +bool EmbeddedObjectContainer::RemoveEmbeddedObject( const uno::Reference < embed::XEmbeddedObject >& xObj, bool bClose, bool bKeepToTempStorage ) { SAL_INFO( "comphelper.container", "comphelper (mv76033) comphelper::EmbeddedObjectContainer::RemoveEmbeddedObject( Object )" ); @@ -1013,7 +1013,7 @@ sal_Bool EmbeddedObjectContainer::RemoveEmbeddedObject( const uno::Reference < e } catch (const util::CloseVetoException&) { - bClose = sal_False; + bClose = false; } } @@ -1081,18 +1081,18 @@ sal_Bool EmbeddedObjectContainer::RemoveEmbeddedObject( const uno::Reference < e } catch (const uno::Exception&) { - return sal_False; + return false; } } - sal_Bool bFound = sal_False; + bool bFound = false; EmbeddedObjectContainerNameMap::iterator aIt = pImpl->maObjectContainer.begin(); while ( aIt != pImpl->maObjectContainer.end() ) { if ( (*aIt).second == xObj ) { pImpl->maObjectContainer.erase( aIt ); - bFound = sal_True; + bFound = true; uno::Reference < container::XChild > xChild( xObj, uno::UNO_QUERY ); if ( xChild.is() ) xChild->setParent( uno::Reference < uno::XInterface >() ); @@ -1122,27 +1122,27 @@ sal_Bool EmbeddedObjectContainer::RemoveEmbeddedObject( const uno::Reference < e catch (const uno::Exception&) { SAL_WARN( "comphelper.container", "Failed to remove object from storage!" ); - return sal_False; + return false; } } - return sal_True; + return true; } -sal_Bool EmbeddedObjectContainer::CloseEmbeddedObject( const uno::Reference < embed::XEmbeddedObject >& xObj ) +bool EmbeddedObjectContainer::CloseEmbeddedObject( const uno::Reference < embed::XEmbeddedObject >& xObj ) { SAL_INFO( "comphelper.container", "comphelper (mv76033) comphelper::EmbeddedObjectContainer::CloseEmbeddedObject" ); // disconnect the object from the container and close it if possible - sal_Bool bFound = sal_False; + bool bFound = false; EmbeddedObjectContainerNameMap::iterator aIt = pImpl->maObjectContainer.begin(); while ( aIt != pImpl->maObjectContainer.end() ) { if ( (*aIt).second == xObj ) { pImpl->maObjectContainer.erase( aIt ); - bFound = sal_True; + bFound = true; break; } @@ -1220,7 +1220,7 @@ uno::Reference < io::XInputStream > EmbeddedObjectContainer::GetGraphicStream( c return GetGraphicStream( aName, pMediaType ); } -sal_Bool EmbeddedObjectContainer::InsertGraphicStream( const com::sun::star::uno::Reference < com::sun::star::io::XInputStream >& rStream, const OUString& rObjectName, const OUString& rMediaType ) +bool EmbeddedObjectContainer::InsertGraphicStream( const com::sun::star::uno::Reference < com::sun::star::io::XInputStream >& rStream, const OUString& rObjectName, const OUString& rMediaType ) { SAL_INFO( "comphelper.container", "comphelper (mv76033) comphelper::EmbeddedObjectContainer::InsertGraphicStream" ); @@ -1251,13 +1251,13 @@ sal_Bool EmbeddedObjectContainer::InsertGraphicStream( const com::sun::star::uno } catch (const uno::Exception&) { - return sal_False; + return false; } - return sal_True; + return true; } -sal_Bool EmbeddedObjectContainer::InsertGraphicStreamDirectly( const com::sun::star::uno::Reference < com::sun::star::io::XInputStream >& rStream, const OUString& rObjectName, const OUString& rMediaType ) +bool EmbeddedObjectContainer::InsertGraphicStreamDirectly( const com::sun::star::uno::Reference < com::sun::star::io::XInputStream >& rStream, const OUString& rObjectName, const OUString& rMediaType ) { SAL_INFO( "comphelper.container", "comphelper (mv76033) comphelper::EmbeddedObjectContainer::InsertGraphicStreamDirectly" ); @@ -1282,14 +1282,14 @@ sal_Bool EmbeddedObjectContainer::InsertGraphicStreamDirectly( const com::sun::s } catch (const uno::Exception&) { - return sal_False; + return false; } - return sal_True; + return true; } -sal_Bool EmbeddedObjectContainer::RemoveGraphicStream( const OUString& rObjectName ) +bool EmbeddedObjectContainer::RemoveGraphicStream( const OUString& rObjectName ) { SAL_INFO( "comphelper.container", "comphelper (mv76033) comphelper::EmbeddedObjectContainer::RemoveGraphicStream" ); @@ -1300,10 +1300,10 @@ sal_Bool EmbeddedObjectContainer::RemoveGraphicStream( const OUString& rObjectNa } catch (const uno::Exception&) { - return sal_False; + return false; } - return sal_True; + return true; } namespace { void InsertStreamIntoPicturesStorage_Impl( const uno::Reference< embed::XStorage >& xDocStor, @@ -1338,9 +1338,9 @@ namespace { } // ----------------------------------------------------------------------------- -sal_Bool EmbeddedObjectContainer::StoreAsChildren(sal_Bool _bOasisFormat,sal_Bool _bCreateEmbedded,const uno::Reference < embed::XStorage >& _xStorage) +bool EmbeddedObjectContainer::StoreAsChildren(bool _bOasisFormat,bool _bCreateEmbedded,const uno::Reference < embed::XStorage >& _xStorage) { - sal_Bool bResult = sal_False; + bool bResult = false; try { comphelper::EmbeddedObjectContainer aCnt( _xStorage ); @@ -1353,7 +1353,7 @@ sal_Bool EmbeddedObjectContainer::StoreAsChildren(sal_Bool _bOasisFormat,sal_Boo SAL_WARN_IF( !xObj.is(), "comphelper.container", "An empty entry in the embedded objects list!\n" ); if ( xObj.is() ) { - sal_Bool bSwitchBackToLoaded = sal_False; + bool bSwitchBackToLoaded = false; uno::Reference< embed::XLinkageSupport > xLink( xObj, uno::UNO_QUERY ); uno::Reference < io::XInputStream > xStream; @@ -1372,7 +1372,7 @@ sal_Bool EmbeddedObjectContainer::StoreAsChildren(sal_Bool _bOasisFormat,sal_Boo // the image must be regenerated // TODO/LATER: another aspect could be used if ( xObj->getCurrentState() == embed::EmbedStates::LOADED ) - bSwitchBackToLoaded = sal_True; + bSwitchBackToLoaded = true; xStream = GetGraphicReplacementStream( embed::Aspects::MSOLE_CONTENT, @@ -1404,7 +1404,7 @@ sal_Bool EmbeddedObjectContainer::StoreAsChildren(sal_Bool _bOasisFormat,sal_Boo { uno::Sequence< beans::PropertyValue > aArgs( _bOasisFormat ? 2 : 3 ); aArgs[0].Name = "StoreVisualReplacement"; - aArgs[0].Value <<= (sal_Bool)( !_bOasisFormat ); + aArgs[0].Value <<= !_bOasisFormat; // if it is an embedded object or the optimized inserting fails the normal inserting should be done aArgs[1].Name = "CanTryOptimization"; @@ -1438,7 +1438,7 @@ sal_Bool EmbeddedObjectContainer::StoreAsChildren(sal_Bool _bOasisFormat,sal_Boo catch (const uno::Exception& e) { // TODO/LATER: error handling - bResult = sal_False; + bResult = false; SAL_WARN("comphelper.container", "failed. Message: " << e.Message); } @@ -1455,15 +1455,15 @@ sal_Bool EmbeddedObjectContainer::StoreAsChildren(sal_Bool _bOasisFormat,sal_Boo catch (const uno::Exception&) { // TODO/LATER: error handling; - bResult = sal_False; + bResult = false; } } return bResult; } // ----------------------------------------------------------------------------- -sal_Bool EmbeddedObjectContainer::StoreChildren(sal_Bool _bOasisFormat,sal_Bool _bObjectsOnly) +bool EmbeddedObjectContainer::StoreChildren(bool _bOasisFormat,bool _bObjectsOnly) { - sal_Bool bResult = sal_True; + bool bResult = true; const uno::Sequence < OUString > aNames = GetObjectNames(); const OUString* pIter = aNames.getConstArray(); const OUString* pEnd = pIter + aNames.getLength(); @@ -1534,7 +1534,7 @@ sal_Bool EmbeddedObjectContainer::StoreChildren(sal_Bool _bOasisFormat,sal_Bool catch (const uno::Exception&) { // TODO/LATER: error handling - bResult = sal_False; + bResult = false; break; } } @@ -1575,7 +1575,7 @@ sal_Bool EmbeddedObjectContainer::StoreChildren(sal_Bool _bOasisFormat,sal_Bool catch (const uno::Exception&) { // TODO/LATER: error handling - bResult = sal_False; + bResult = false; } } return bResult; @@ -1608,9 +1608,9 @@ uno::Reference< io::XInputStream > EmbeddedObjectContainer::GetGraphicReplacemen return xInStream; } // ----------------------------------------------------------------------------- -sal_Bool EmbeddedObjectContainer::SetPersistentEntries(const uno::Reference< embed::XStorage >& _xStorage,bool _bClearModifedFlag) +bool EmbeddedObjectContainer::SetPersistentEntries(const uno::Reference< embed::XStorage >& _xStorage,bool _bClearModifedFlag) { - sal_Bool bError = sal_False; + bool bError = false; const uno::Sequence < OUString > aNames = GetObjectNames(); const OUString* pIter = aNames.getConstArray(); const OUString* pEnd = pIter + aNames.getLength(); @@ -1635,7 +1635,7 @@ sal_Bool EmbeddedObjectContainer::SetPersistentEntries(const uno::Reference< emb catch (const uno::Exception&) { // TODO/LATER: error handling - bError = sal_True; + bError = true; break; } } diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx index 207680e172ea..d2432d2e8cd6 100644 --- a/comphelper/source/container/enumerablemap.cxx +++ b/comphelper/source/container/enumerablemap.cxx @@ -280,7 +280,7 @@ namespace comphelper } // XEnumeration equivalents - ::sal_Bool hasMoreElements(); + bool hasMoreElements(); Any nextElement(); // IMapModificationListener @@ -725,7 +725,7 @@ namespace comphelper //= MapEnumerator //==================================================================== //-------------------------------------------------------------------- - ::sal_Bool MapEnumerator::hasMoreElements() + bool MapEnumerator::hasMoreElements() { if ( m_disposed ) throw DisposedException( OUString(), m_rParent ); diff --git a/comphelper/source/container/enumhelper.cxx b/comphelper/source/container/enumhelper.cxx index b48e67eae2ed..168cac43e5b9 100644 --- a/comphelper/source/container/enumhelper.cxx +++ b/comphelper/source/container/enumhelper.cxx @@ -33,7 +33,7 @@ OEnumerationByName::OEnumerationByName(const staruno::Reference<starcontainer::X :m_aNames(_rxAccess->getElementNames()) ,m_nPos(0) ,m_xAccess(_rxAccess) - ,m_bListening(sal_False) + ,m_bListening(false) { impl_startDisposeListening(); } @@ -44,7 +44,7 @@ OEnumerationByName::OEnumerationByName(const staruno::Reference<starcontainer::X :m_aNames(_aNames) ,m_nPos(0) ,m_xAccess(_rxAccess) - ,m_bListening(sal_False) + ,m_bListening(false) { impl_startDisposeListening(); } @@ -117,7 +117,7 @@ void OEnumerationByName::impl_startDisposeListening() if (xDisposable.is()) { xDisposable->addEventListener(this); - m_bListening = sal_True; + m_bListening = true; } --m_refCount; } @@ -135,7 +135,7 @@ void OEnumerationByName::impl_stopDisposeListening() if (xDisposable.is()) { xDisposable->removeEventListener(this); - m_bListening = sal_False; + m_bListening = false; } --m_refCount; } @@ -147,7 +147,7 @@ void OEnumerationByName::impl_stopDisposeListening() OEnumerationByIndex::OEnumerationByIndex(const staruno::Reference< starcontainer::XIndexAccess >& _rxAccess) :m_nPos(0) ,m_xAccess(_rxAccess) - ,m_bListening(sal_False) + ,m_bListening(false) { impl_startDisposeListening(); } @@ -220,7 +220,7 @@ void OEnumerationByIndex::impl_startDisposeListening() if (xDisposable.is()) { xDisposable->addEventListener(this); - m_bListening = sal_True; + m_bListening = true; } --m_refCount; } @@ -238,7 +238,7 @@ void OEnumerationByIndex::impl_stopDisposeListening() if (xDisposable.is()) { xDisposable->removeEventListener(this); - m_bListening = sal_False; + m_bListening = false; } --m_refCount; } diff --git a/comphelper/source/misc/SelectionMultiplex.cxx b/comphelper/source/misc/SelectionMultiplex.cxx index d4cca73a7da0..e5daf792d2b7 100644 --- a/comphelper/source/misc/SelectionMultiplex.cxx +++ b/comphelper/source/misc/SelectionMultiplex.cxx @@ -68,11 +68,11 @@ void OSelectionChangeListener::setAdapter(OSelectionChangeMultiplexer* pAdapter) //= OSelectionChangeMultiplexer //======================================================================== //------------------------------------------------------------------ -OSelectionChangeMultiplexer::OSelectionChangeMultiplexer(OSelectionChangeListener* _pListener, const Reference< XSelectionSupplier>& _rxSet, sal_Bool _bAutoReleaseSet) +OSelectionChangeMultiplexer::OSelectionChangeMultiplexer(OSelectionChangeListener* _pListener, const Reference< XSelectionSupplier>& _rxSet, bool _bAutoReleaseSet) :m_xSet(_rxSet) ,m_pListener(_pListener) ,m_nLockCount(0) - ,m_bListening(sal_False) + ,m_bListening(false) ,m_bAutoSetRelease(_bAutoReleaseSet) { m_pListener->setAdapter(this); @@ -113,7 +113,7 @@ void OSelectionChangeMultiplexer::dispose() m_pListener->setAdapter(NULL); m_pListener = NULL; - m_bListening = sal_False; + m_bListening = false; if (m_bAutoSetRelease) m_xSet = NULL; @@ -135,7 +135,7 @@ void SAL_CALL OSelectionChangeMultiplexer::disposing( const EventObject& _rSour } m_pListener = NULL; - m_bListening = sal_False; + m_bListening = false; if (m_bAutoSetRelease) m_xSet = NULL; diff --git a/comphelper/source/misc/accessiblecomponenthelper.cxx b/comphelper/source/misc/accessiblecomponenthelper.cxx index 816b24b30f3f..2fdaf84f12a6 100644 --- a/comphelper/source/misc/accessiblecomponenthelper.cxx +++ b/comphelper/source/misc/accessiblecomponenthelper.cxx @@ -44,7 +44,7 @@ namespace comphelper } //-------------------------------------------------------------------- - sal_Bool SAL_CALL OCommonAccessibleComponent::containsPoint( const Point& _rPoint ) throw (RuntimeException) + bool SAL_CALL OCommonAccessibleComponent::containsPoint( const Point& _rPoint ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); Rectangle aBounds( implGetBounds() ); diff --git a/comphelper/source/misc/accessiblecontexthelper.cxx b/comphelper/source/misc/accessiblecontexthelper.cxx index 3b7836377698..f4d9df56bc86 100644 --- a/comphelper/source/misc/accessiblecontexthelper.cxx +++ b/comphelper/source/misc/accessiblecontexthelper.cxx @@ -196,7 +196,7 @@ namespace comphelper } //--------------------------------------------------------------------- - sal_Bool OAccessibleContextHelper::isAlive() const + bool OAccessibleContextHelper::isAlive() const { return !GetBroadcastHelper().bDisposed && !GetBroadcastHelper().bInDispose; } diff --git a/comphelper/source/misc/accessibleeventnotifier.cxx b/comphelper/source/misc/accessibleeventnotifier.cxx index c46d54a33420..be60fe3d9824 100644 --- a/comphelper/source/misc/accessibleeventnotifier.cxx +++ b/comphelper/source/misc/accessibleeventnotifier.cxx @@ -128,7 +128,7 @@ namespace <TRUE/> if and only if the client could be found and <arg>rPos</arg> has been filled with it's position */ - static sal_Bool implLookupClient( + static bool implLookupClient( const AccessibleEventNotifier::TClientId nClient, ClientMap::iterator& rPos ) { diff --git a/comphelper/source/misc/accessibleselectionhelper.cxx b/comphelper/source/misc/accessibleselectionhelper.cxx index dea19d29b880..ed93e6888a57 100644 --- a/comphelper/source/misc/accessibleselectionhelper.cxx +++ b/comphelper/source/misc/accessibleselectionhelper.cxx @@ -46,7 +46,7 @@ namespace comphelper } //-------------------------------------------------------------------- - sal_Bool SAL_CALL OCommonAccessibleSelection::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) + bool SAL_CALL OCommonAccessibleSelection::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) { return( implIsSelected( nChildIndex ) ); } diff --git a/comphelper/source/misc/accessibletexthelper.cxx b/comphelper/source/misc/accessibletexthelper.cxx index 224a81ac6774..d21d7ff3cc41 100644 --- a/comphelper/source/misc/accessibletexthelper.cxx +++ b/comphelper/source/misc/accessibletexthelper.cxx @@ -81,21 +81,21 @@ namespace comphelper // ----------------------------------------------------------------------------- - sal_Bool OCommonAccessibleText::implIsValidBoundary( i18n::Boundary& rBoundary, sal_Int32 nLength ) + bool OCommonAccessibleText::implIsValidBoundary( i18n::Boundary& rBoundary, sal_Int32 nLength ) { return ( rBoundary.startPos >= 0 ) && ( rBoundary.startPos < nLength ) && ( rBoundary.endPos >= 0 ) && ( rBoundary.endPos <= nLength ); } // ----------------------------------------------------------------------------- - sal_Bool OCommonAccessibleText::implIsValidIndex( sal_Int32 nIndex, sal_Int32 nLength ) + bool OCommonAccessibleText::implIsValidIndex( sal_Int32 nIndex, sal_Int32 nLength ) { return ( nIndex >= 0 ) && ( nIndex < nLength ); } // ----------------------------------------------------------------------------- - sal_Bool OCommonAccessibleText::implIsValidRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex, sal_Int32 nLength ) + bool OCommonAccessibleText::implIsValidRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex, sal_Int32 nLength ) { return ( nStartIndex >= 0 ) && ( nStartIndex <= nLength ) && ( nEndIndex >= 0 ) && ( nEndIndex <= nLength ); } @@ -133,9 +133,9 @@ namespace comphelper // ----------------------------------------------------------------------------- - sal_Bool OCommonAccessibleText::implGetWordBoundary( i18n::Boundary& rBoundary, sal_Int32 nIndex ) + bool OCommonAccessibleText::implGetWordBoundary( i18n::Boundary& rBoundary, sal_Int32 nIndex ) { - sal_Bool bWord = sal_False; + bool bWord = false; OUString sText( implGetText() ); if ( implIsValidIndex( nIndex, sText.getLength() ) ) @@ -151,7 +151,7 @@ namespace comphelper { sal_Int32 nType = xCharClass->getCharacterType( sText, rBoundary.startPos, implGetLocale() ); if ( ( nType & ( i18n::KCharacterType::LETTER | i18n::KCharacterType::DIGIT ) ) != 0 ) - bWord = sal_True; + bWord = true; } } } @@ -360,7 +360,7 @@ namespace comphelper case AccessibleTextType::WORD: { // get word at index - sal_Bool bWord = implGetWordBoundary( aBoundary, nIndex ); + bool bWord = implGetWordBoundary( aBoundary, nIndex ); if ( bWord && implIsValidBoundary( aBoundary, nLength ) ) { aResult.SegmentText = sText.copy( aBoundary.startPos, aBoundary.endPos - aBoundary.startPos ); @@ -472,7 +472,7 @@ namespace comphelper // get word at index implGetWordBoundary( aBoundary, nIndex ); // get previous word - sal_Bool bWord = sal_False; + bool bWord = false; while ( !bWord && aBoundary.startPos > 0 ) bWord = implGetWordBoundary( aBoundary, aBoundary.startPos - 1 ); if ( bWord && implIsValidBoundary( aBoundary, nLength ) ) @@ -597,7 +597,7 @@ namespace comphelper // get word at index implGetWordBoundary( aBoundary, nIndex ); // get next word - sal_Bool bWord = sal_False; + bool bWord = false; while ( !bWord && aBoundary.endPos < nLength ) bWord = implGetWordBoundary( aBoundary, aBoundary.endPos ); if ( bWord && implIsValidBoundary( aBoundary, nLength ) ) @@ -615,7 +615,7 @@ namespace comphelper // get next sentence sal_Int32 nEnd = aBoundary.endPos; sal_Int32 nI = aBoundary.endPos; - sal_Bool bFound = sal_False; + bool bFound = false; while ( !bFound && ++nI < nLength ) { implGetSentenceBoundary( aBoundary, nI ); diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx index 7f47f62f246a..f189530365f0 100644 --- a/comphelper/source/misc/accessiblewrapper.cxx +++ b/comphelper/source/misc/accessiblewrapper.cxx @@ -75,7 +75,7 @@ namespace comphelper //------------------------------------------------------------------------- OWrappedAccessibleChildrenManager::OWrappedAccessibleChildrenManager( const Reference< XComponentContext >& _rxContext ) :m_xContext( _rxContext ) - ,m_bTransientChildren( sal_True ) + ,m_bTransientChildren( true ) { } @@ -85,7 +85,7 @@ namespace comphelper } //------------------------------------------------------------------------- - void OWrappedAccessibleChildrenManager::setTransientChildren( sal_Bool _bSet ) + void OWrappedAccessibleChildrenManager::setTransientChildren( bool _bSet ) { m_bTransientChildren = _bSet; } @@ -123,7 +123,7 @@ namespace comphelper //------------------------------------------------------------------------- Reference< XAccessible > OWrappedAccessibleChildrenManager::getAccessibleWrapperFor( - const Reference< XAccessible >& _rxKey, sal_Bool _bCreate ) + const Reference< XAccessible >& _rxKey, bool _bCreate ) { Reference< XAccessible > xValue; @@ -185,7 +185,7 @@ namespace comphelper _rOutValue.clear(); Reference< XAccessible > xChild; if ( _rInValue >>= xChild ) - _rOutValue <<= getAccessibleWrapperFor( xChild, sal_True ); + _rOutValue <<= getAccessibleWrapperFor( xChild, true ); } //------------------------------------------------------------------------- @@ -460,7 +460,7 @@ namespace comphelper #if OSL_DEBUG_LEVEL > 0 if ( AccessibleEventId::STATE_CHANGED == _rEvent.EventId ) { - sal_Bool bChildTransienceChanged = sal_False; + bool bChildTransienceChanged = false; sal_Int16 nChangeState = 0; if ( _rEvent.OldValue >>= nChangeState ) bChildTransienceChanged = bChildTransienceChanged || AccessibleStateType::MANAGES_DESCENDANTS == nChangeState; diff --git a/comphelper/source/misc/accimplaccess.cxx b/comphelper/source/misc/accimplaccess.cxx index 32e4cecc244b..b84853a27e25 100644 --- a/comphelper/source/misc/accimplaccess.cxx +++ b/comphelper/source/misc/accimplaccess.cxx @@ -139,7 +139,7 @@ namespace comphelper } //--------------------------------------------------------------------- - sal_Bool OAccessibleImplementationAccess::setAccessibleParent( + bool OAccessibleImplementationAccess::setAccessibleParent( const Reference< XAccessibleContext >& _rxComponent, const Reference< XAccessible >& _rxNewParent ) { OAccessibleImplementationAccess* pImplementation = getImplementation( _rxComponent ); diff --git a/comphelper/source/misc/configurationhelper.cxx b/comphelper/source/misc/configurationhelper.cxx index 14b82de407ff..4cb1cb1c812f 100644 --- a/comphelper/source/misc/configurationhelper.cxx +++ b/comphelper/source/misc/configurationhelper.cxx @@ -53,7 +53,7 @@ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::openConfig(cons } // enable lazy writing - sal_Bool bLazy = ((eMode & ConfigurationHelper::E_LAZY_WRITE)==ConfigurationHelper::E_LAZY_WRITE); + bool bLazy = ((eMode & ConfigurationHelper::E_LAZY_WRITE)==ConfigurationHelper::E_LAZY_WRITE); aParam.Name = "lazywrite"; aParam.Value = css::uno::makeAny(bLazy); lParams.push_back(css::uno::makeAny(aParam)); @@ -61,7 +61,7 @@ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::openConfig(cons // open it css::uno::Reference< css::uno::XInterface > xCFG; - sal_Bool bReadOnly = ((eMode & ConfigurationHelper::E_READONLY)==ConfigurationHelper::E_READONLY); + bool bReadOnly = ((eMode & ConfigurationHelper::E_READONLY)==ConfigurationHelper::E_READONLY); if (bReadOnly) xCFG = xConfigProvider->createInstanceWithArguments( OUString("com.sun.star.configuration.ConfigurationAccess"), diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx index 72b8636cbe7b..a690658ee84e 100644 --- a/comphelper/source/misc/docpasswordhelper.cxx +++ b/comphelper/source/misc/docpasswordhelper.cxx @@ -95,9 +95,9 @@ uno::Sequence< beans::PropertyValue > DocPasswordHelper::GenerateNewModifyPasswo } // ============================================================================ -sal_Bool DocPasswordHelper::IsModifyPasswordCorrect( const OUString& aPassword, const uno::Sequence< beans::PropertyValue >& aInfo ) +bool DocPasswordHelper::IsModifyPasswordCorrect( const OUString& aPassword, const uno::Sequence< beans::PropertyValue >& aInfo ) { - sal_Bool bResult = sal_False; + bool bResult = false; if ( !aPassword.isEmpty() && aInfo.getLength() ) { OUString sAlgorithm; @@ -123,7 +123,7 @@ sal_Bool DocPasswordHelper::IsModifyPasswordCorrect( const OUString& aPassword, for ( sal_Int32 nInd = 0; nInd < aNewHash.getLength() && nInd < aHash.getLength() && aNewHash[nInd] == aHash[nInd]; nInd ++ ) { if ( nInd == aNewHash.getLength() - 1 && nInd == aHash.getLength() - 1 ) - bResult = sal_True; + bResult = true; } } } diff --git a/comphelper/source/misc/docpasswordrequest.cxx b/comphelper/source/misc/docpasswordrequest.cxx index c0a59a79ab70..eb833fe74ce2 100644 --- a/comphelper/source/misc/docpasswordrequest.cxx +++ b/comphelper/source/misc/docpasswordrequest.cxx @@ -50,13 +50,13 @@ class AbortContinuation : public ::cppu::WeakImplHelper1< XInteractionAbort > public: inline explicit AbortContinuation() : mbSelected( false ) {} - inline sal_Bool isSelected() const { return mbSelected; } + inline bool isSelected() const { return mbSelected; } inline void reset() { mbSelected = false; } virtual void SAL_CALL select() throw( RuntimeException ) { mbSelected = true; } private: - sal_Bool mbSelected; + bool mbSelected; }; // ============================================================================ @@ -64,12 +64,12 @@ private: class PasswordContinuation : public ::cppu::WeakImplHelper1< XInteractionPassword2 > { public: - inline explicit PasswordContinuation() : mbReadOnly( sal_False ), mbSelected( sal_False ) {} + inline explicit PasswordContinuation() : mbReadOnly( false ), mbSelected( false ) {} - inline sal_Bool isSelected() const { return mbSelected; } - inline void reset() { mbSelected = sal_False; } + inline bool isSelected() const { return mbSelected; } + inline void reset() { mbSelected = false; } - virtual void SAL_CALL select() throw( RuntimeException ) { mbSelected = sal_True; } + virtual void SAL_CALL select() throw( RuntimeException ) { mbSelected = true; } virtual void SAL_CALL setPassword( const OUString& rPass ) throw( RuntimeException ) { maPassword = rPass; } virtual OUString SAL_CALL getPassword() throw( RuntimeException ) { return maPassword; } @@ -83,8 +83,8 @@ public: private: OUString maPassword; OUString maModifyPassword; - sal_Bool mbReadOnly; - sal_Bool mbSelected; + bool mbReadOnly; + bool mbSelected; }; // ============================================================================ @@ -106,7 +106,7 @@ SimplePasswordRequest::~SimplePasswordRequest() { } -sal_Bool SimplePasswordRequest::isPassword() const +bool SimplePasswordRequest::isPassword() const { return mpPassword->isSelected(); } @@ -129,7 +129,7 @@ Sequence< Reference< XInteractionContinuation > > SAL_CALL SimplePasswordRequest // ============================================================================ DocPasswordRequest::DocPasswordRequest( DocPasswordRequestType eType, - PasswordRequestMode eMode, const OUString& rDocumentName, sal_Bool bPasswordToModify ) + PasswordRequestMode eMode, const OUString& rDocumentName, bool bPasswordToModify ) : mpAbort( NULL ) , mpPassword( NULL ) { @@ -162,7 +162,7 @@ DocPasswordRequest::~DocPasswordRequest() { } -sal_Bool DocPasswordRequest::isPassword() const +bool DocPasswordRequest::isPassword() const { return mpPassword->isSelected(); } @@ -177,7 +177,7 @@ OUString DocPasswordRequest::getPasswordToModify() const return mpPassword->getPasswordToModify(); } -sal_Bool DocPasswordRequest::getRecommendReadOnly() const +bool DocPasswordRequest::getRecommendReadOnly() const { return mpPassword->getRecommendReadOnly(); } diff --git a/comphelper/source/misc/documentiologring.cxx b/comphelper/source/misc/documentiologring.cxx index a2e9de1f7447..5c588bbd1540 100644 --- a/comphelper/source/misc/documentiologring.cxx +++ b/comphelper/source/misc/documentiologring.cxx @@ -34,8 +34,8 @@ namespace comphelper // ---------------------------------------------------------- OSimpleLogRing::OSimpleLogRing() : m_aMessages( SIMPLELOGRING_SIZE ) -, m_bInitialized( sal_False ) -, m_bFull( sal_False ) +, m_bInitialized( false ) +, m_bFull( false ) , m_nPos( 0 ) { } @@ -87,11 +87,11 @@ void SAL_CALL OSimpleLogRing::logString( const OUString& aMessage ) throw (uno:: if ( ++m_nPos >= m_aMessages.getLength() ) { m_nPos = 0; - m_bFull = sal_True; + m_bFull = true; } // if used once then default initialized - m_bInitialized = sal_True; + m_bInitialized = true; } // ---------------------------------------------------------- @@ -107,7 +107,7 @@ uno::Sequence< OUString > SAL_CALL OSimpleLogRing::getCollectedLog() throw (uno: aResult[nInd] = m_aMessages[ ( nStart + nInd ) % m_aMessages.getLength() ]; // if used once then default initialized - m_bInitialized = sal_True; + m_bInitialized = true; return aResult; } @@ -135,7 +135,7 @@ void SAL_CALL OSimpleLogRing::initialize( const uno::Sequence< uno::Any >& aArgu 0 ); } - m_bInitialized = sal_True; + m_bInitialized = true; } // XServiceInfo diff --git a/comphelper/source/misc/documentiologring.hxx b/comphelper/source/misc/documentiologring.hxx index 99915c6dfc3d..30cf4ebf3412 100644 --- a/comphelper/source/misc/documentiologring.hxx +++ b/comphelper/source/misc/documentiologring.hxx @@ -39,8 +39,8 @@ class OSimpleLogRing : public ::cppu::WeakImplHelper3< ::com::sun::star::logging ::osl::Mutex m_aMutex; ::com::sun::star::uno::Sequence< OUString > m_aMessages; - sal_Bool m_bInitialized; - sal_Bool m_bFull; + bool m_bInitialized; + bool m_bFull; sal_Int32 m_nPos; public: diff --git a/comphelper/source/misc/instancelocker.cxx b/comphelper/source/misc/instancelocker.cxx index b25690829fcf..8e648c2c1e0b 100644 --- a/comphelper/source/misc/instancelocker.cxx +++ b/comphelper/source/misc/instancelocker.cxx @@ -43,8 +43,8 @@ OInstanceLocker::OInstanceLocker( const uno::Reference< uno::XComponentContext > : m_xContext( xContext ) , m_pLockListener( NULL ) , m_pListenersContainer( NULL ) -, m_bDisposed( sal_False ) -, m_bInitialized( sal_False ) +, m_bDisposed( false ) +, m_bInitialized( false ) { } @@ -92,7 +92,7 @@ void SAL_CALL OInstanceLocker::dispose() m_xLockListener = uno::Reference< uno::XInterface >(); } - m_bDisposed = sal_True; + m_bDisposed = true; } // -------------------------------------------------------- @@ -185,7 +185,7 @@ void SAL_CALL OInstanceLocker::initialize( const uno::Sequence< uno::Any >& aArg throw; } - m_bInitialized = sal_True; + m_bInitialized = true; } // XServiceInfo @@ -242,8 +242,8 @@ OLockListener::OLockListener( const uno::WeakReference< lang::XComponent >& xWra : m_xInstance( xInstance ) , m_xApproval( xApproval ) , m_xWrapper( xWrapper ) -, m_bDisposed( sal_False ) -, m_bInitialized( sal_False ) +, m_bDisposed( false ) +, m_bInitialized( false ) , m_nMode( nMode ) { } @@ -289,7 +289,7 @@ void OLockListener::Dispose() } m_xInstance = uno::Reference< uno::XInterface >(); - m_bDisposed = sal_True; + m_bDisposed = true; } // XEventListener @@ -445,12 +445,12 @@ void SAL_CALL OLockListener::notifyTermination( const lang::EventObject& aEvent // XInitialization // -------------------------------------------------------- -sal_Bool OLockListener::Init() +bool OLockListener::Init() { ::osl::ResettableMutexGuard aGuard( m_aMutex ); if ( m_bDisposed || m_bInitialized ) - return sal_False; + return false; try { @@ -480,9 +480,9 @@ sal_Bool OLockListener::Init() throw; } - m_bInitialized = sal_True; + m_bInitialized = true; - return sal_True; + return true; } void createRegistryInfo_OInstanceLocker() diff --git a/comphelper/source/misc/instancelocker.hxx b/comphelper/source/misc/instancelocker.hxx index ba80ce39ee8d..83153f793f53 100644 --- a/comphelper/source/misc/instancelocker.hxx +++ b/comphelper/source/misc/instancelocker.hxx @@ -51,8 +51,8 @@ class OInstanceLocker : public ::cppu::WeakImplHelper3< ::com::sun::star::lang:: ::cppu::OInterfaceContainerHelper* m_pListenersContainer; // list of listeners - sal_Bool m_bDisposed; - sal_Bool m_bInitialized; + bool m_bDisposed; + bool m_bInitialized; public: OInstanceLocker( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext ); @@ -92,8 +92,8 @@ class OLockListener : public ::cppu::WeakImplHelper2< ::com::sun::star::util::XC ::com::sun::star::uno::WeakReference< ::com::sun::star::lang::XComponent > m_xWrapper; - sal_Bool m_bDisposed; - sal_Bool m_bInitialized; + bool m_bDisposed; + bool m_bInitialized; sal_Int32 m_nMode; @@ -105,7 +105,7 @@ public: ~OLockListener(); - sal_Bool Init(); + bool Init(); void Dispose(); // XEventListener diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx index 0c6ffb7d2870..b734a8e2758c 100644 --- a/comphelper/source/misc/mimeconfighelper.cxx +++ b/comphelper/source/misc/mimeconfighelper.cxx @@ -261,10 +261,10 @@ OUString MimeConfigurationHelper::GetDocServiceNameFromMediaType( const OUString } //------------------------------------------------------------------------- -sal_Bool MimeConfigurationHelper::GetVerbByShortcut( const OUString& aVerbShortcut, +bool MimeConfigurationHelper::GetVerbByShortcut( const OUString& aVerbShortcut, embed::VerbDescriptor& aDescriptor ) { - sal_Bool bResult = sal_False; + bool bResult = false; uno::Reference< container::XNameAccess > xVerbsConfig = GetVerbsConfiguration(); uno::Reference< container::XNameAccess > xVerbsProps; @@ -279,7 +279,7 @@ sal_Bool MimeConfigurationHelper::GetVerbByShortcut( const OUString& aVerbShortc && ( xVerbsProps->getByName("VerbAttributes") >>= aTempDescr.VerbAttributes ) ) { aDescriptor = aTempDescr; - bResult = sal_True; + bResult = true; } } } @@ -569,7 +569,7 @@ OUString MimeConfigurationHelper::GetFactoryNameByMediaType( const OUString& aMe //----------------------------------------------------------------------- OUString MimeConfigurationHelper::UpdateMediaDescriptorWithFilterName( uno::Sequence< beans::PropertyValue >& aMediaDescr, - sal_Bool bIgnoreType ) + bool bIgnoreType ) { OUString aFilterName; @@ -647,12 +647,12 @@ OUString MimeConfigurationHelper::UpdateMediaDescriptorWithFilterName( OSL_ENSURE( !aDocName.isEmpty(), "The name must exist at this point!\n" ); - sal_Bool bNeedsAddition = sal_True; + bool bNeedsAddition = true; for ( sal_Int32 nMedInd = 0; nMedInd < aMediaDescr.getLength(); nMedInd++ ) if ( aMediaDescr[nMedInd].Name == "DocumentService" ) { aMediaDescr[nMedInd].Value <<= aDocName; - bNeedsAddition = sal_False; + bNeedsAddition = false; break; } @@ -664,7 +664,7 @@ OUString MimeConfigurationHelper::UpdateMediaDescriptorWithFilterName( aMediaDescr[nOldLen].Value <<= aDocName; } - return UpdateMediaDescriptorWithFilterName( aMediaDescr, sal_True ); + return UpdateMediaDescriptorWithFilterName( aMediaDescr, true ); } #ifdef WNT @@ -871,16 +871,16 @@ uno::Sequence< beans::PropertyValue > MimeConfigurationHelper::SearchForFilter( //------------------------------------------------------------------------- -sal_Bool MimeConfigurationHelper::ClassIDsEqual( const uno::Sequence< sal_Int8 >& aClassID1, const uno::Sequence< sal_Int8 >& aClassID2 ) +bool MimeConfigurationHelper::ClassIDsEqual( const uno::Sequence< sal_Int8 >& aClassID1, const uno::Sequence< sal_Int8 >& aClassID2 ) { if ( aClassID1.getLength() != aClassID2.getLength() ) - return sal_False; + return false; for ( sal_Int32 nInd = 0; nInd < aClassID1.getLength(); nInd++ ) if ( aClassID1[nInd] != aClassID2[nInd] ) - return sal_False; + return false; - return sal_True; + return true; } //------------------------------------------------------------------------- diff --git a/comphelper/source/misc/officerestartmanager.cxx b/comphelper/source/misc/officerestartmanager.cxx index e3a03989b096..3977fd8c5eea 100644 --- a/comphelper/source/misc/officerestartmanager.cxx +++ b/comphelper/source/misc/officerestartmanager.cxx @@ -79,7 +79,7 @@ void SAL_CALL OOfficeRestartManager::requestRestart( const uno::Reference< task: if ( m_bRestartRequested ) return; - m_bRestartRequested = sal_True; + m_bRestartRequested = true; // the office is still not initialized, no need to terminate, changing the state is enough if ( !m_bOfficeInitialized ) @@ -103,7 +103,7 @@ void SAL_CALL OOfficeRestartManager::requestRestart( const uno::Reference< task: catch ( uno::Exception& ) { // the try to request restart has failed - m_bRestartRequested = sal_False; + m_bRestartRequested = false; } } @@ -126,7 +126,7 @@ void SAL_CALL OOfficeRestartManager::notify( const uno::Any& /* aData */ ) { try { - sal_Bool bSuccess = sal_False; + bool bSuccess = false; if ( m_xContext.is() ) { @@ -153,12 +153,12 @@ void SAL_CALL OOfficeRestartManager::notify( const uno::Any& /* aData */ ) } if ( !bSuccess ) - m_bRestartRequested = sal_False; + m_bRestartRequested = false; } catch( uno::Exception& ) { // the try to restart has failed - m_bRestartRequested = sal_False; + m_bRestartRequested = false; } } diff --git a/comphelper/source/misc/officerestartmanager.hxx b/comphelper/source/misc/officerestartmanager.hxx index 536484952b59..d7cae3dafec4 100644 --- a/comphelper/source/misc/officerestartmanager.hxx +++ b/comphelper/source/misc/officerestartmanager.hxx @@ -38,14 +38,14 @@ class OOfficeRestartManager : public ::cppu::WeakImplHelper3< ::com::sun::star:: ::osl::Mutex m_aMutex; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; - sal_Bool m_bOfficeInitialized; - sal_Bool m_bRestartRequested; + bool m_bOfficeInitialized; + bool m_bRestartRequested; public: OOfficeRestartManager( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext ) : m_xContext( xContext ) - , m_bOfficeInitialized( sal_False ) - , m_bRestartRequested( sal_False ) + , m_bOfficeInitialized( false ) + , m_bRestartRequested( false ) {} virtual ~OOfficeRestartManager() diff --git a/comphelper/source/misc/sequence.cxx b/comphelper/source/misc/sequence.cxx index 00b3c3d584fb..ea0cfe117f0d 100644 --- a/comphelper/source/misc/sequence.cxx +++ b/comphelper/source/misc/sequence.cxx @@ -25,7 +25,7 @@ namespace comphelper //......................................................................... //------------------------------------------------------------------------------ -staruno::Sequence<sal_Int16> findValue(const staruno::Sequence< OUString >& _rList, const OUString& _rValue, sal_Bool _bOnlyFirst) +staruno::Sequence<sal_Int16> findValue(const staruno::Sequence< OUString >& _rList, const OUString& _rValue, bool _bOnlyFirst) { sal_Int32 nLength = _rList.getLength(); diff --git a/comphelper/source/misc/sequenceashashmap.cxx b/comphelper/source/misc/sequenceashashmap.cxx index 24dd7edc9637..e3df3a9e9f78 100644 --- a/comphelper/source/misc/sequenceashashmap.cxx +++ b/comphelper/source/misc/sequenceashashmap.cxx @@ -180,7 +180,7 @@ void SequenceAsHashMap::operator>>(css::uno::Sequence< css::beans::NamedValue >& } } -const css::uno::Any SequenceAsHashMap::getAsConstAny(::sal_Bool bAsPropertyValueList) const +const css::uno::Any SequenceAsHashMap::getAsConstAny(bool bAsPropertyValueList) const { css::uno::Any aDestination; if (bAsPropertyValueList) @@ -204,7 +204,7 @@ const css::uno::Sequence< css::beans::PropertyValue > SequenceAsHashMap::getAsCo return lReturn; } -sal_Bool SequenceAsHashMap::match(const SequenceAsHashMap& rCheck) const +bool SequenceAsHashMap::match(const SequenceAsHashMap& rCheck) const { const_iterator pCheck; for ( pCheck = rCheck.begin(); @@ -216,14 +216,14 @@ sal_Bool SequenceAsHashMap::match(const SequenceAsHashMap& rCheck) const const_iterator pFound = find(sCheckName); if (pFound == end()) - return sal_False; + return false; const css::uno::Any& aFoundValue = pFound->second; if (aFoundValue != aCheckValue) - return sal_False; + return false; } - return sal_True; + return true; } void SequenceAsHashMap::update(const SequenceAsHashMap& rUpdate) diff --git a/comphelper/source/misc/stillreadwriteinteraction.cxx b/comphelper/source/misc/stillreadwriteinteraction.cxx index 79fcbdf90400..1d74d8ffcf7b 100644 --- a/comphelper/source/misc/stillreadwriteinteraction.cxx +++ b/comphelper/source/misc/stillreadwriteinteraction.cxx @@ -28,9 +28,9 @@ namespace comphelper{ StillReadWriteInteraction::StillReadWriteInteraction(const css::uno::Reference< css::task::XInteractionHandler >& xHandler) - : m_bUsed (sal_False) - , m_bHandledByMySelf (sal_False) - , m_bHandledByInternalHandler(sal_False) + : m_bUsed (false) + , m_bHandledByMySelf (false) + , m_bHandledByInternalHandler(false) { ::std::vector< ::ucbhelper::InterceptedInteraction::InterceptedRequest > lInterceptions; ::ucbhelper::InterceptedInteraction::InterceptedRequest aInterceptedRequest; @@ -58,12 +58,12 @@ void StillReadWriteInteraction::resetInterceptions() void StillReadWriteInteraction::resetErrorStates() { - m_bUsed = sal_False; - m_bHandledByMySelf = sal_False; - m_bHandledByInternalHandler = sal_False; + m_bUsed = false; + m_bHandledByMySelf = false; + m_bHandledByInternalHandler = false; } -sal_Bool StillReadWriteInteraction::wasWriteError() +bool StillReadWriteInteraction::wasWriteError() { return (m_bUsed && m_bHandledByMySelf); } @@ -72,10 +72,10 @@ ucbhelper::InterceptedInteraction::EInterceptionState StillReadWriteInteraction: const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& xRequest) { // we are used! - m_bUsed = sal_True; + m_bUsed = true; // check if it's a real interception - might some parameters are not the right ones ... - sal_Bool bAbort = sal_False; + bool bAbort = false; switch(aRequest.Handle) { case HANDLE_INTERACTIVEIOEXCEPTION: @@ -97,7 +97,7 @@ ucbhelper::InterceptedInteraction::EInterceptionState StillReadWriteInteraction: case HANDLE_UNSUPPORTEDDATASINKEXCEPTION: { - bAbort = sal_True; + bAbort = true; } break; } @@ -105,7 +105,7 @@ ucbhelper::InterceptedInteraction::EInterceptionState StillReadWriteInteraction: // handle interaction by ourself if (bAbort) { - m_bHandledByMySelf = sal_True; + m_bHandledByMySelf = true; css::uno::Reference< css::task::XInteractionContinuation > xAbort = ::ucbhelper::InterceptedInteraction::extractContinuation( xRequest->getContinuations(), ::getCppuType(static_cast< css::uno::Reference< css::task::XInteractionAbort >* >(0))); @@ -118,7 +118,7 @@ ucbhelper::InterceptedInteraction::EInterceptionState StillReadWriteInteraction: // Otherwhise use internal handler. if (m_xInterceptedHandler.is()) { - m_bHandledByInternalHandler = sal_True; + m_bHandledByInternalHandler = true; m_xInterceptedHandler->handle(xRequest); } return ::ucbhelper::InterceptedInteraction::E_INTERCEPTED; diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index a4f36e8db0b0..2a362ebd040c 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -286,7 +286,7 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageOfFormatFromURL( const OUString& aURL, sal_Int32 nStorageMode, const uno::Reference< uno::XComponentContext >& rxContext, - sal_Bool bRepairStorage ) + bool bRepairStorage ) throw ( uno::Exception ) { uno::Sequence< beans::PropertyValue > aProps( 1 ); @@ -317,7 +317,7 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageOfFormatFromInputStr const OUString& aFormat, const uno::Reference < io::XInputStream >& xStream, const uno::Reference< uno::XComponentContext >& rxContext, - sal_Bool bRepairStorage ) + bool bRepairStorage ) throw ( uno::Exception ) { uno::Sequence< beans::PropertyValue > aProps( 1 ); @@ -349,7 +349,7 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageOfFormatFromStream( const uno::Reference < io::XStream >& xStream, sal_Int32 nStorageMode, const uno::Reference< uno::XComponentContext >& rxContext, - sal_Bool bRepairStorage ) + bool bRepairStorage ) throw ( uno::Exception ) { uno::Sequence< beans::PropertyValue > aProps( 1 ); @@ -437,14 +437,14 @@ uno::Sequence< beans::NamedValue > OStorageHelper::CreatePackageEncryptionData( } // ---------------------------------------------------------------------- -sal_Bool OStorageHelper::IsValidZipEntryFileName( const OUString& aName, sal_Bool bSlashAllowed ) +bool OStorageHelper::IsValidZipEntryFileName( const OUString& aName, bool bSlashAllowed ) { return IsValidZipEntryFileName( aName.getStr(), aName.getLength(), bSlashAllowed ); } // ---------------------------------------------------------------------- -sal_Bool OStorageHelper::IsValidZipEntryFileName( - const sal_Unicode *pChar, sal_Int32 nLength, sal_Bool bSlashAllowed ) +bool OStorageHelper::IsValidZipEntryFileName( + const sal_Unicode *pChar, sal_Int32 nLength, bool bSlashAllowed ) { for ( sal_Int32 i = 0; i < nLength; i++ ) { @@ -457,23 +457,23 @@ sal_Bool OStorageHelper::IsValidZipEntryFileName( case '\"': case '|': case ':': - return sal_False; + return false; case '/': if ( !bSlashAllowed ) - return sal_False; + return false; break; default: if ( pChar[i] < 32 || (pChar[i] >= 0xD800 && pChar[i] <= 0xDFFF) ) - return sal_False; + return false; } } - return sal_True; + return true; } // ---------------------------------------------------------------------- -sal_Bool OStorageHelper::PathHasSegment( const OUString& aPath, const OUString& aSegment ) +bool OStorageHelper::PathHasSegment( const OUString& aPath, const OUString& aSegment ) { - sal_Bool bResult = sal_False; + bool bResult = false; const sal_Int32 nPathLen = aPath.getLength(); const sal_Int32 nSegLen = aSegment.getLength(); @@ -486,16 +486,16 @@ sal_Bool OStorageHelper::PathHasSegment( const OUString& aPath, const OUString& aInternalSegment += "/"; if ( aPath.indexOf( aInternalSegment ) >= 0 ) - bResult = sal_True; + bResult = true; if ( !bResult && !aPath.compareTo( aSegment, nSegLen ) ) { if ( nPathLen == nSegLen || aPath[nSegLen] == '/' ) - bResult = sal_True; + bResult = true; } if ( !bResult && nPathLen > nSegLen && aPath.copy( nPathLen - nSegLen - 1, nSegLen + 1 ) == aEndSegment ) - bResult = sal_True; + bResult = true; } return bResult; diff --git a/comphelper/source/misc/syntaxhighlight.cxx b/comphelper/source/misc/syntaxhighlight.cxx index 012dd9ee9dff..b747f79d6541 100644 --- a/comphelper/source/misc/syntaxhighlight.cxx +++ b/comphelper/source/misc/syntaxhighlight.cxx @@ -261,10 +261,10 @@ class SyntaxHighlighter::Tokenizer sal_uInt16 aCharTypeTab[256]; // Auxiliary function: testing of the character flags - sal_Bool testCharFlags( sal_Unicode c, sal_uInt16 nTestFlags ); + bool testCharFlags( sal_Unicode c, sal_uInt16 nTestFlags ); // Get new token, EmptyString == nothing more over there - sal_Bool getNextToken( const sal_Unicode*& pos, /*out*/TokenTypes& reType, + bool getNextToken( const sal_Unicode*& pos, /*out*/TokenTypes& reType, /*out*/const sal_Unicode*& rpStartPos, /*out*/const sal_Unicode*& rpEndPos ); const char** ppListKeyWords; @@ -282,7 +282,7 @@ public: }; // Helper function: test character flag -sal_Bool SyntaxHighlighter::Tokenizer::testCharFlags( sal_Unicode c, sal_uInt16 nTestFlags ) +bool SyntaxHighlighter::Tokenizer::testCharFlags( sal_Unicode c, sal_uInt16 nTestFlags ) { bool bRet = false; if( c != 0 && c <= 255 ) @@ -303,7 +303,7 @@ void SyntaxHighlighter::Tokenizer::setKeyWords( const char** ppKeyWords, sal_uIn nKeyWordCount = nCount; } -sal_Bool SyntaxHighlighter::Tokenizer::getNextToken( const sal_Unicode*& pos, /*out*/TokenTypes& reType, +bool SyntaxHighlighter::Tokenizer::getNextToken( const sal_Unicode*& pos, /*out*/TokenTypes& reType, /*out*/const sal_Unicode*& rpStartPos, /*out*/const sal_Unicode*& rpEndPos ) { reType = TT_UNKNOWN; @@ -312,24 +312,24 @@ sal_Bool SyntaxHighlighter::Tokenizer::getNextToken( const sal_Unicode*& pos, /* sal_Unicode c = *pos; if( c == 0 ) - return sal_False; + return false; ++pos; //*** Go through all possibilities *** // Space? - if ( (testCharFlags( c, CHAR_SPACE ) == sal_True) ) + if ( testCharFlags( c, CHAR_SPACE ) ) { - while( testCharFlags( *pos, CHAR_SPACE ) == sal_True ) + while( testCharFlags( *pos, CHAR_SPACE ) ) ++pos; reType = TT_WHITESPACE; } // Identifier? - else if ( (testCharFlags( c, CHAR_START_IDENTIFIER ) == sal_True) ) + else if ( testCharFlags( c, CHAR_START_IDENTIFIER ) ) { - sal_Bool bIdentifierChar; + bool bIdentifierChar; do { // Naechstes Zeichen holen @@ -372,7 +372,7 @@ sal_Bool SyntaxHighlighter::Tokenizer::getNextToken( const sal_Unicode*& pos, /* { // Remove all characters until end of line or EOF sal_Unicode cPeek = *pos; - while( cPeek != 0 && testCharFlags( cPeek, CHAR_EOL ) == sal_False ) + while( cPeek != 0 && !testCharFlags( cPeek, CHAR_EOL ) ) { c = *pos++; cPeek = *pos; @@ -387,14 +387,14 @@ sal_Bool SyntaxHighlighter::Tokenizer::getNextToken( const sal_Unicode*& pos, /* // Operator? // only for BASIC '\'' should be a comment, otherwise it is a normal string and handled there - else if ( ( testCharFlags( c, CHAR_OPERATOR ) == sal_True ) || ( (c == '\'') && (aLanguage==HIGHLIGHT_BASIC)) ) + else if ( testCharFlags( c, CHAR_OPERATOR ) || ( (c == '\'') && (aLanguage==HIGHLIGHT_BASIC)) ) { // parameters for SQL view if ( (c==':') || (c=='?')) { if (c!='?') { - sal_Bool bIdentifierChar; + bool bIdentifierChar; do { // Get next character @@ -413,7 +413,7 @@ sal_Bool SyntaxHighlighter::Tokenizer::getNextToken( const sal_Unicode*& pos, /* if (cPeekNext=='-') { // Remove all characters until end of line or EOF - while( cPeekNext != 0 && testCharFlags( cPeekNext, CHAR_EOL ) == sal_False ) + while( cPeekNext != 0 && !testCharFlags( cPeekNext, CHAR_EOL ) ) { ++pos; cPeekNext = *pos; @@ -427,7 +427,7 @@ sal_Bool SyntaxHighlighter::Tokenizer::getNextToken( const sal_Unicode*& pos, /* if (cPeekNext=='/') { // Remove all characters until end of line or EOF - while( cPeekNext != 0 && testCharFlags( cPeekNext, CHAR_EOL ) == sal_False ) + while( cPeekNext != 0 && !testCharFlags( cPeekNext, CHAR_EOL ) ) { ++pos; cPeekNext = *pos; @@ -469,7 +469,7 @@ sal_Bool SyntaxHighlighter::Tokenizer::getNextToken( const sal_Unicode*& pos, /* } // Number? - else if( testCharFlags( c, CHAR_START_NUMBER ) == sal_True ) + else if( testCharFlags( c, CHAR_START_NUMBER ) ) { reType = TT_NUMBER; @@ -511,7 +511,7 @@ sal_Bool SyntaxHighlighter::Tokenizer::getNextToken( const sal_Unicode*& pos, /* if( reType == TT_NUMBER && nRadix == 10 ) { // Flag if the last character is an exponent - sal_Bool bAfterExpChar = sal_False; + bool bAfterExpChar = false; // Read all numbers while( testCharFlags( *pos, CHAR_IN_NUMBER ) || @@ -526,7 +526,7 @@ sal_Bool SyntaxHighlighter::Tokenizer::getNextToken( const sal_Unicode*& pos, /* } // String? - else if( testCharFlags( c, CHAR_START_STRING ) == sal_True ) + else if( testCharFlags( c, CHAR_START_STRING ) ) { // Remember which character has opened the string sal_Unicode cEndString = c; @@ -544,7 +544,7 @@ sal_Bool SyntaxHighlighter::Tokenizer::getNextToken( const sal_Unicode*& pos, /* break; } c = *pos++; - if( testCharFlags( c, CHAR_EOL ) == sal_True ) + if( testCharFlags( c, CHAR_EOL ) ) { // ERROR: unterminated string literal reType = TT_ERROR; @@ -563,11 +563,11 @@ sal_Bool SyntaxHighlighter::Tokenizer::getNextToken( const sal_Unicode*& pos, /* } // End of line? - else if( testCharFlags( c, CHAR_EOL ) == sal_True ) + else if( testCharFlags( c, CHAR_EOL ) ) { // If another EOL character comes, read it sal_Unicode cNext = *pos; - if( cNext != c && testCharFlags( cNext, CHAR_EOL ) == sal_True ) + if( cNext != c && testCharFlags( cNext, CHAR_EOL ) ) ++pos; reType = TT_EOL; @@ -577,7 +577,7 @@ sal_Bool SyntaxHighlighter::Tokenizer::getNextToken( const sal_Unicode*& pos, /* // Save end position rpEndPos = pos; - return sal_True; + return true; } SyntaxHighlighter::Tokenizer::Tokenizer( HighlighterLanguage aLang ): aLanguage(aLang) diff --git a/comphelper/source/misc/types.cxx b/comphelper/source/misc/types.cxx index 684f2d2779c2..ba5f936e7e25 100644 --- a/comphelper/source/misc/types.cxx +++ b/comphelper/source/misc/types.cxx @@ -42,7 +42,7 @@ using namespace ::com::sun::star::util; using namespace ::com::sun::star::lang; //------------------------------------------------------------------------- -sal_Bool operator ==(const DateTime& _rLeft, const DateTime& _rRight) +bool operator ==(const DateTime& _rLeft, const DateTime& _rRight) { return ( _rLeft.NanoSeconds == _rRight.NanoSeconds) && ( _rLeft.Seconds == _rRight.Seconds) && @@ -54,7 +54,7 @@ sal_Bool operator ==(const DateTime& _rLeft, const DateTime& _rRight) } //------------------------------------------------------------------------- -sal_Bool operator ==(const Date& _rLeft, const Date& _rRight) +bool operator ==(const Date& _rLeft, const Date& _rRight) { return ( _rLeft.Day == _rRight.Day) && ( _rLeft.Month == _rRight.Month) && @@ -62,7 +62,7 @@ sal_Bool operator ==(const Date& _rLeft, const Date& _rRight) } //------------------------------------------------------------------------- -sal_Bool operator ==(const Time& _rLeft, const Time& _rRight) +bool operator ==(const Time& _rLeft, const Time& _rRight) { return ( _rLeft.NanoSeconds == _rRight.NanoSeconds) && ( _rLeft.Seconds == _rRight.Seconds) && @@ -119,9 +119,9 @@ OUString getString(const Any& _rAny) } //------------------------------------------------------------------------------ -sal_Bool getBOOL(const Any& _rAny) +bool getBOOL(const Any& _rAny) { - sal_Bool nReturn = sal_False; + bool nReturn = false; if (_rAny.getValueType() == ::getCppuBooleanType()) nReturn = *(sal_Bool*)_rAny.getValue(); else @@ -149,7 +149,7 @@ FontDescriptor getDefaultFont() } //------------------------------------------------------------------------------ -sal_Bool isAssignableFrom(const Type& _rAssignable, const Type& _rFrom) +bool isAssignableFrom(const Type& _rAssignable, const Type& _rFrom) { // getthe type lib descriptions typelib_TypeDescription* pAssignable = NULL; @@ -164,7 +164,7 @@ sal_Bool isAssignableFrom(const Type& _rAssignable, const Type& _rFrom) //------------------------------------------------------------------ template<class TYPE> -bool tryCompare(const void* _pData, const Any& _rValue, sal_Bool& _bIdentical, TYPE& _rOut) +bool tryCompare(const void* _pData, const Any& _rValue, bool& _bIdentical, TYPE& _rOut) { bool bSuccess = _rValue >>= _rOut; _bIdentical = bSuccess && (_rOut == *reinterpret_cast<const TYPE*>(_pData)); @@ -172,7 +172,7 @@ bool tryCompare(const void* _pData, const Any& _rValue, sal_Bool& _bIdentical, T } //------------------------------------------------------------------ -bool tryCompare(const void* _pData, const Any& _rValue, sal_Bool& _bIdentical, sal_Unicode& _rOut) +bool tryCompare(const void* _pData, const Any& _rValue, bool& _bIdentical, sal_Unicode& _rOut) { bool bSuccess = ( _rValue.getValueTypeClass() == TypeClass_CHAR ); if ( bSuccess ) @@ -182,9 +182,9 @@ bool tryCompare(const void* _pData, const Any& _rValue, sal_Bool& _bIdentical, s } //------------------------------------------------------------------ -sal_Bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue) +bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue) { - sal_Bool bRes = sal_True; + bool bRes = true; if (_rType.getTypeClass() == TypeClass_ANY) { @@ -208,16 +208,16 @@ sal_Bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue) } else { - sal_Bool bConversionSuccess = sal_False; + bool bConversionSuccess = false; switch (_rType.getTypeClass()) { case TypeClass_VOID: - bConversionSuccess = sal_True; + bConversionSuccess = true; bRes = _rValue.getValueType().getTypeClass() == TypeClass_VOID; break; case TypeClass_BOOLEAN: { - sal_Bool aDummy; + bool aDummy; bConversionSuccess = tryCompare(pData, _rValue, bRes, aDummy); break; } @@ -298,7 +298,7 @@ sal_Bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue) bRes = *(FontDescriptor*)pData == aTemp; } else - bRes = sal_False; + bRes = false; break; } if (isA(_rType, static_cast<Date*>(NULL))) @@ -413,7 +413,7 @@ sal_Bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue) } break; default: - bRes = sal_False; + bRes = false; } bRes = bRes && bConversionSuccess; @@ -422,13 +422,13 @@ sal_Bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue) } //------------------------------------------------------------------------------ -sal_Bool compare(const Any& rLeft, const Any& rRight) +bool compare(const Any& rLeft, const Any& rRight) { return compare_impl(rLeft.getValueType(), rLeft.getValue(), rRight); } //------------------------------------------------------------------------- -sal_Bool operator ==(const FontDescriptor& _rLeft, const FontDescriptor& _rRight) +bool operator ==(const FontDescriptor& _rLeft, const FontDescriptor& _rRight) { return ( _rLeft.Name.equals( _rRight.Name ) ) && ( _rLeft.Height == _rRight.Height ) && diff --git a/comphelper/source/processfactory/processfactory.cxx b/comphelper/source/processfactory/processfactory.cxx index 32aff0f4f03f..fb4d2f7d9bc3 100644 --- a/comphelper/source/processfactory/processfactory.cxx +++ b/comphelper/source/processfactory/processfactory.cxx @@ -36,7 +36,7 @@ namespace comphelper This function preserves only that the xProcessFactory variable will not be create when the library is loaded. */ -Reference< XMultiServiceFactory > localProcessFactory( const Reference< XMultiServiceFactory >& xSMgr, sal_Bool bSet ) +Reference< XMultiServiceFactory > localProcessFactory( const Reference< XMultiServiceFactory >& xSMgr, bool bSet ) { Guard< Mutex > aGuard( Mutex::getGlobalMutex() ); @@ -52,13 +52,13 @@ Reference< XMultiServiceFactory > localProcessFactory( const Reference< XMultiSe void setProcessServiceFactory(const Reference< XMultiServiceFactory >& xSMgr) { - localProcessFactory( xSMgr, sal_True ); + localProcessFactory( xSMgr, true ); } Reference< XMultiServiceFactory > getProcessServiceFactory() { Reference< XMultiServiceFactory> xReturn; - xReturn = localProcessFactory( xReturn, sal_False ); + xReturn = localProcessFactory( xReturn, false ); if ( !xReturn.is() ) { throw DeploymentException( diff --git a/comphelper/source/property/ChainablePropertySetInfo.cxx b/comphelper/source/property/ChainablePropertySetInfo.cxx index 5188331db2ad..c30df8aea05f 100644 --- a/comphelper/source/property/ChainablePropertySetInfo.cxx +++ b/comphelper/source/property/ChainablePropertySetInfo.cxx @@ -96,7 +96,7 @@ Property SAL_CALL ChainablePropertySetInfo::getPropertyByName( const OUString& r sal_Bool SAL_CALL ChainablePropertySetInfo::hasPropertyByName( const OUString& rName ) throw(::com::sun::star::uno::RuntimeException) { - return static_cast < sal_Bool > ( maMap.find ( rName ) != maMap.end() ); + return maMap.find ( rName ) != maMap.end(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx index 6477e11ee329..3e2f2ca7a11b 100644 --- a/comphelper/source/property/MasterPropertySet.cxx +++ b/comphelper/source/property/MasterPropertySet.cxx @@ -63,7 +63,7 @@ using namespace ::com::sun::star::beans; SlaveData::SlaveData ( ChainablePropertySet *pSlave) : mpSlave ( pSlave ) , mxSlave ( pSlave ) -, mbInit ( sal_False ) +, mbInit ( false ) { } @@ -242,7 +242,7 @@ void SAL_CALL MasterPropertySet::setPropertyValues( const Sequence< OUString >& aOGuardArray[i].reset( new osl::Guard< comphelper::SolarMutex >(pSlave->mpSlave->mpMutex) ); pSlave->mpSlave->_preSetValues(); - pSlave->SetInit ( sal_True ); + pSlave->SetInit ( true ); } pSlave->mpSlave->_setSingleValue( *((*aIter).second->mpInfo), *pAny ); } @@ -255,7 +255,7 @@ void SAL_CALL MasterPropertySet::setPropertyValues( const Sequence< OUString >& if ( (*aSlaveIter).second->IsInit()) { (*aSlaveIter).second->mpSlave->_postSetValues(); - (*aSlaveIter).second->SetInit ( sal_False ); + (*aSlaveIter).second->SetInit ( false ); } ++aSlaveIter; } @@ -307,7 +307,7 @@ Sequence< Any > SAL_CALL MasterPropertySet::getPropertyValues( const Sequence< O aOGuardArray[i].reset( new osl::Guard< comphelper::SolarMutex >(pSlave->mpSlave->mpMutex) ); pSlave->mpSlave->_preGetValues(); - pSlave->SetInit ( sal_True ); + pSlave->SetInit ( true ); } pSlave->mpSlave->_getSingleValue( *((*aIter).second->mpInfo), *pAny ); } @@ -320,7 +320,7 @@ Sequence< Any > SAL_CALL MasterPropertySet::getPropertyValues( const Sequence< O if ( (*aSlaveIter).second->IsInit()) { (*aSlaveIter).second->mpSlave->_postSetValues(); - (*aSlaveIter).second->SetInit ( sal_False ); + (*aSlaveIter).second->SetInit ( false ); } ++aSlaveIter; } @@ -406,7 +406,7 @@ Sequence< PropertyState > SAL_CALL MasterPropertySet::getPropertyStates( const S if (!pSlave->IsInit()) { pSlave->mpSlave->_preGetPropertyState(); - pSlave->SetInit ( sal_True ); + pSlave->SetInit ( true ); } pSlave->mpSlave->_getPropertyState( *((*aIter).second->mpInfo), *pState ); } @@ -418,7 +418,7 @@ Sequence< PropertyState > SAL_CALL MasterPropertySet::getPropertyStates( const S if ( (*aSlaveIter).second->IsInit()) { (*aSlaveIter).second->mpSlave->_postGetPropertyState(); - (*aSlaveIter).second->SetInit ( sal_False ); + (*aSlaveIter).second->SetInit ( false ); } ++aSlaveIter; } diff --git a/comphelper/source/property/MasterPropertySetInfo.cxx b/comphelper/source/property/MasterPropertySetInfo.cxx index 5628e641e5bc..74baf2737726 100644 --- a/comphelper/source/property/MasterPropertySetInfo.cxx +++ b/comphelper/source/property/MasterPropertySetInfo.cxx @@ -112,7 +112,7 @@ Property SAL_CALL MasterPropertySetInfo::getPropertyByName( const OUString& rNam sal_Bool SAL_CALL MasterPropertySetInfo::hasPropertyByName( const OUString& rName ) throw(::com::sun::star::uno::RuntimeException) { - return static_cast < sal_Bool > ( maMap.find ( rName ) != maMap.end() ); + return maMap.find ( rName ) != maMap.end(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/property/opropertybag.cxx b/comphelper/source/property/opropertybag.cxx index 86cf28c7cb3d..fe724086670a 100644 --- a/comphelper/source/property/opropertybag.cxx +++ b/comphelper/source/property/opropertybag.cxx @@ -162,11 +162,11 @@ namespace comphelper bool bIgnoreRuntimeExceptionsWhileFiring) { if (nCount && !bVetoable) { - setModifiedImpl(sal_True, bIgnoreRuntimeExceptionsWhileFiring); + setModifiedImpl(true, bIgnoreRuntimeExceptionsWhileFiring); } } - void OPropertyBag::setModifiedImpl(::sal_Bool bModified, + void OPropertyBag::setModifiedImpl(bool bModified, bool bIgnoreRuntimeExceptionsWhileFiring) { { // do not lock mutex while notifying (#i93514#) to prevent deadlock diff --git a/comphelper/source/property/opropertybag.hxx b/comphelper/source/property/opropertybag.hxx index 2006c85f0d9c..d196e8536ae2 100644 --- a/comphelper/source/property/opropertybag.hxx +++ b/comphelper/source/property/opropertybag.hxx @@ -185,7 +185,7 @@ namespace comphelper sal_Bool bVetoable, bool bIgnoreRuntimeExceptionsWhileFiring); - void SAL_CALL setModifiedImpl( ::sal_Bool bModified, + void SAL_CALL setModifiedImpl( bool bModified, bool bIgnoreRuntimeExceptionsWhileFiring); private: diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx index 1256aeafc839..664d2bfbbb5a 100644 --- a/comphelper/source/property/propagg.cxx +++ b/comphelper/source/property/propagg.cxx @@ -201,7 +201,7 @@ sal_Bool OPropertyArrayAggregationHelper::fillPropertyMembersByHandle( OUString* _pPropName, sal_Int16* _pAttributes, sal_Int32 _nHandle) { ConstPropertyAccessorMapIterator i = m_aPropertyAccessors.find(_nHandle); - sal_Bool bRet = i != m_aPropertyAccessors.end(); + bool bRet = i != m_aPropertyAccessors.end(); if (bRet) { const ::com::sun::star::beans::Property& rProperty = m_aProperties.getConstArray()[(*i).second.nPos]; @@ -214,15 +214,15 @@ sal_Bool OPropertyArrayAggregationHelper::fillPropertyMembersByHandle( } //------------------------------------------------------------------------------ -sal_Bool OPropertyArrayAggregationHelper::getPropertyByHandle( sal_Int32 _nHandle, Property& _rProperty ) const +bool OPropertyArrayAggregationHelper::getPropertyByHandle( sal_Int32 _nHandle, Property& _rProperty ) const { ConstPropertyAccessorMapIterator pos = m_aPropertyAccessors.find(_nHandle); if ( pos != m_aPropertyAccessors.end() ) { _rProperty = m_aProperties[ pos->second.nPos ]; - return sal_True; + return true; } - return sal_False; + return false; } //------------------------------------------------------------------------------ @@ -442,7 +442,7 @@ namespace internal //------------------------------------------------------------------------------ OPropertySetAggregationHelper::OPropertySetAggregationHelper( ::cppu::OBroadcastHelper& rBHlp ) :OPropertyStateHelper( rBHlp ) - ,m_bListening( sal_False ) + ,m_bListening( false ) { m_pForwarder = new PropertyForwarder( *this ); } @@ -478,7 +478,7 @@ void OPropertySetAggregationHelper::disposing() // register as a single listener m_xAggregateMultiSet->removePropertiesChangeListener(this); m_xAggregateSet->removeVetoableChangeListener(OUString(), this); - m_bListening = sal_False; + m_bListening = false; } OPropertyStateHelper::disposing(); @@ -489,7 +489,7 @@ void SAL_CALL OPropertySetAggregationHelper::disposing(const ::com::sun::star:: { OSL_ENSURE(m_xAggregateSet.is(), "OPropertySetAggregationHelper::disposing : don't have an aggregate anymore !"); if (_rSource.Source == m_xAggregateSet) - m_bListening = sal_False; + m_bListening = false; } //------------------------------------------------------------------------------ @@ -565,7 +565,7 @@ void OPropertySetAggregationHelper::setAggregation(const ::com::sun::star::uno: { m_xAggregateMultiSet->removePropertiesChangeListener(this); m_xAggregateSet->removeVetoableChangeListener(OUString(), this); - m_bListening = sal_False; + m_bListening = false; } m_xAggregateState = m_xAggregateState.query( _rxDelegate ); @@ -590,7 +590,7 @@ void OPropertySetAggregationHelper::startListening() m_xAggregateMultiSet->addPropertiesChangeListener(aPropertyNames, this); m_xAggregateSet->addVetoableChangeListener(OUString(), this); - m_bListening = sal_True; + m_bListening = true; } } @@ -979,7 +979,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyToDefault(const OUString //------------------------------------------------------------------------------ sal_Bool SAL_CALL OPropertySetAggregationHelper::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) throw(IllegalArgumentException) { - sal_Bool bModified = sal_False; + bool bModified = false; OSL_ENSURE( m_pForwarder->isResponsibleFor( _nHandle ), "OPropertySetAggregationHelper::convertFastPropertyValue: this is no forwarded property - did you use declareForwardedProperty for it?" ); if ( m_pForwarder->isResponsibleFor( _nHandle ) ) diff --git a/comphelper/source/property/property.cxx b/comphelper/source/property/property.cxx index f1c544f3c93b..2eaec9af986c 100644 --- a/comphelper/source/property/property.cxx +++ b/comphelper/source/property/property.cxx @@ -130,14 +130,14 @@ void copyProperties(const Reference<XPropertySet>& _rxSource, } //------------------------------------------------------------------ -sal_Bool hasProperty(const OUString& _rName, const Reference<XPropertySet>& _rxSet) +bool hasProperty(const OUString& _rName, const Reference<XPropertySet>& _rxSet) { if (_rxSet.is()) { // XPropertySetInfoRef xInfo(rxSet->getPropertySetInfo()); return _rxSet->getPropertySetInfo()->hasPropertyByName(_rName); } - return sal_False; + return false; } //------------------------------------------------------------------ @@ -177,9 +177,9 @@ void ModifyPropertyAttributes(Sequence<Property>& seqProps, const OUString& sPro } //------------------------------------------------------------------ -sal_Bool tryPropertyValue(Any& _rConvertedValue, Any& _rOldValue, const Any& _rValueToSet, const Any& _rCurrentValue, const Type& _rExpectedType) +bool tryPropertyValue(Any& _rConvertedValue, Any& _rOldValue, const Any& _rValueToSet, const Any& _rCurrentValue, const Type& _rExpectedType) { - sal_Bool bModified(sal_False); + bool bModified(false); if (_rCurrentValue.getValue() != _rValueToSet.getValue()) { if ( _rValueToSet.hasValue() && ( !_rExpectedType.equals( _rValueToSet.getValueType() ) ) ) @@ -203,7 +203,7 @@ sal_Bool tryPropertyValue(Any& _rConvertedValue, Any& _rOldValue, const Any& _rV if ( _rCurrentValue != _rConvertedValue ) { _rOldValue = _rCurrentValue; - bModified = sal_True; + bModified = true; } } return bModified; diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx index e019511d76e2..0a859ef2ff91 100644 --- a/comphelper/source/property/propertycontainerhelper.cxx +++ b/comphelper/source/property/propertycontainerhelper.cxx @@ -66,7 +66,7 @@ namespace //========================================================================== //-------------------------------------------------------------------------- OPropertyContainerHelper::OPropertyContainerHelper() - :m_bUnused(sal_False) + :m_bUnused(false) { } @@ -147,13 +147,13 @@ void OPropertyContainerHelper::registerPropertyNoMember(const OUString& _rName, } //-------------------------------------------------------------------------- -sal_Bool OPropertyContainerHelper::isRegisteredProperty( sal_Int32 _nHandle ) const +bool OPropertyContainerHelper::isRegisteredProperty( sal_Int32 _nHandle ) const { return const_cast< OPropertyContainerHelper* >( this )->searchHandle( _nHandle ) != m_aProperties.end(); } //-------------------------------------------------------------------------- -sal_Bool OPropertyContainerHelper::isRegisteredProperty( const OUString& _rName ) const +bool OPropertyContainerHelper::isRegisteredProperty( const OUString& _rName ) const { // TODO: the current structure is from a time where properties were // static, not dynamic. Since we allow that properties are also dynamic, @@ -220,10 +220,10 @@ namespace } //-------------------------------------------------------------------------- -sal_Bool OPropertyContainerHelper::convertFastPropertyValue( +bool OPropertyContainerHelper::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) SAL_THROW( (IllegalArgumentException) ) { - sal_Bool bModified = sal_False; + bool bModified = false; // get the property somebody is asking for PropertiesIterator aPos = searchHandle(_nHandle); @@ -241,7 +241,7 @@ sal_Bool OPropertyContainerHelper::convertFastPropertyValue( case PropertyDescription::ltHoldMyself: case PropertyDescription::ltDerivedClassAnyType: { - sal_Bool bMayBeVoid = ((aPos->aProperty.Attributes & PropertyAttribute::MAYBEVOID) != 0); + bool bMayBeVoid = ((aPos->aProperty.Attributes & PropertyAttribute::MAYBEVOID) != 0); // non modifiable version of the value-to-be-set @@ -320,7 +320,7 @@ sal_Bool OPropertyContainerHelper::convertFastPropertyValue( if (!_rValue.getValueType().equals(aPos->aProperty.Type)) { - sal_Bool bConverted = sal_False; + bool bConverted = false; // a temporary any of the correct (required) type aProperlyTyped = Any( NULL, aPos->aProperty.Type.getTypeLibType() ); @@ -336,7 +336,7 @@ sal_Bool OPropertyContainerHelper::convertFastPropertyValue( ) { // could query for the requested interface - bConverted = sal_True; + bConverted = true; pNewValue = &aProperlyTyped; } @@ -390,7 +390,7 @@ void OPropertyContainerHelper::setFastPropertyValue(sal_Int32 _nHandle, const An case PropertyDescription::ltDerivedClassRealType: #if OSL_DEBUG_LEVEL > 0 - sal_Bool bSuccess = + bool bSuccess = #endif // copy the data from the to-be-set value uno_type_assignData( diff --git a/comphelper/source/property/propertysethelper.cxx b/comphelper/source/property/propertysethelper.cxx index 21cea0cc30bf..beb0358e861a 100644 --- a/comphelper/source/property/propertysethelper.cxx +++ b/comphelper/source/property/propertysethelper.cxx @@ -145,7 +145,7 @@ void SAL_CALL PropertySetHelper::setPropertyValues( const Sequence< OUString >& pEntries[nCount] = NULL; const OUString* pNames = aPropertyNames.getConstArray(); - sal_Bool bUnknown = sal_False; + bool bUnknown = false; sal_Int32 n; for( n = 0; !bUnknown && ( n < nCount ); n++, pNames++ ) { @@ -174,7 +174,7 @@ Sequence< Any > SAL_CALL PropertySetHelper::getPropertyValues( const Sequence< O pEntries[nCount] = NULL; const OUString* pNames = aPropertyNames.getConstArray(); - sal_Bool bUnknown = sal_False; + bool bUnknown = false; sal_Int32 n; for( n = 0; !bUnknown && ( n < nCount ); n++, pNames++ ) { @@ -239,7 +239,7 @@ Sequence< PropertyState > SAL_CALL PropertySetHelper::getPropertyStates( const S { const OUString* pNames = aPropertyName.getConstArray(); - sal_Bool bUnknown = sal_False; + bool bUnknown = false; PropertyMapEntry const ** pEntries = new PropertyMapEntry const *[nCount+1]; diff --git a/comphelper/source/property/propertysetinfo.cxx b/comphelper/source/property/propertysetinfo.cxx index cc4984122054..4e6a0e977892 100644 --- a/comphelper/source/property/propertysetinfo.cxx +++ b/comphelper/source/property/propertysetinfo.cxx @@ -43,7 +43,7 @@ public: const PropertyMap* getPropertyMap() const throw(); Property getPropertyByName( const OUString& aName ) throw( UnknownPropertyException ); - sal_Bool hasPropertyByName( const OUString& aName ) throw(); + bool hasPropertyByName( const OUString& aName ) throw(); private: PropertyMap maPropertyMap; @@ -138,7 +138,7 @@ Property PropertyMapImpl::getPropertyByName( const OUString& aName ) throw( Unkn return Property( aName, pEntry->mnHandle, pEntry->maType, pEntry->mnAttributes ); } -sal_Bool PropertyMapImpl::hasPropertyByName( const OUString& aName ) throw() +bool PropertyMapImpl::hasPropertyByName( const OUString& aName ) throw() { return maPropertyMap.find( aName ) != maPropertyMap.end(); } diff --git a/comphelper/source/property/propertystatecontainer.cxx b/comphelper/source/property/propertystatecontainer.cxx index 63fbe56fde36..e93c6bb04199 100644 --- a/comphelper/source/property/propertystatecontainer.cxx +++ b/comphelper/source/property/propertystatecontainer.cxx @@ -159,7 +159,7 @@ namespace comphelper Any aCurrentValue; getFastPropertyValue( aCurrentValue, _nHandle ); Any aDefaultValue; getPropertyDefaultByHandle( _nHandle, aDefaultValue ); - sal_Bool bEqual = uno_type_equalData( + bool bEqual = uno_type_equalData( const_cast< void* >( aCurrentValue.getValue() ), aCurrentValue.getValueType().getTypeLibType(), const_cast< void* >( aDefaultValue.getValue() ), aDefaultValue.getValueType().getTypeLibType(), reinterpret_cast< uno_QueryInterfaceFunc >(cpp_queryInterface), diff --git a/comphelper/source/property/propmultiplex.cxx b/comphelper/source/property/propmultiplex.cxx index e6cd40f0f344..08d27c6c8343 100644 --- a/comphelper/source/property/propmultiplex.cxx +++ b/comphelper/source/property/propmultiplex.cxx @@ -77,11 +77,11 @@ void OPropertyChangeListener::setAdapter(OPropertyChangeMultiplexer* pAdapter) //= OPropertyChangeMultiplexer //======================================================================== //------------------------------------------------------------------ -OPropertyChangeMultiplexer::OPropertyChangeMultiplexer(OPropertyChangeListener* _pListener, const Reference< XPropertySet>& _rxSet, sal_Bool _bAutoReleaseSet) +OPropertyChangeMultiplexer::OPropertyChangeMultiplexer(OPropertyChangeListener* _pListener, const Reference< XPropertySet>& _rxSet, bool _bAutoReleaseSet) :m_xSet(_rxSet) ,m_pListener(_pListener) ,m_nLockCount(0) - ,m_bListening(sal_False) + ,m_bListening(false) ,m_bAutoSetRelease(_bAutoReleaseSet) { m_pListener->setAdapter(this); @@ -118,7 +118,7 @@ void OPropertyChangeMultiplexer::dispose() m_pListener->setAdapter(NULL); m_pListener = NULL; - m_bListening = sal_False; + m_bListening = false; if (m_bAutoSetRelease) m_xSet = NULL; @@ -140,7 +140,7 @@ void SAL_CALL OPropertyChangeMultiplexer::disposing( const EventObject& _rSourc } m_pListener = NULL; - m_bListening = sal_False; + m_bListening = false; if (m_bAutoSetRelease) m_xSet = NULL; @@ -162,7 +162,7 @@ void OPropertyChangeMultiplexer::addProperty(const OUString& _sPropertyName) m_xSet->addPropertyChangeListener(_sPropertyName, static_cast< XPropertyChangeListener*>(this)); m_aProperties.realloc(m_aProperties.getLength() + 1); m_aProperties.getArray()[m_aProperties.getLength()-1] = _sPropertyName; - m_bListening = sal_True; + m_bListening = true; } } diff --git a/comphelper/source/property/propstate.cxx b/comphelper/source/property/propstate.cxx index e596bc158c0d..f2d0500af1eb 100644 --- a/comphelper/source/property/propstate.cxx +++ b/comphelper/source/property/propstate.cxx @@ -155,7 +155,7 @@ namespace comphelper Any aCurrentValue = getPropertyDefaultByHandle( _nHandle ); Any aDefaultValue; getFastPropertyValue( aDefaultValue, _nHandle ); - sal_Bool bEqual = uno_type_equalData( + bool bEqual = uno_type_equalData( const_cast< void* >( aCurrentValue.getValue() ), aCurrentValue.getValueType().getTypeLibType(), const_cast< void* >( aDefaultValue.getValue() ), aDefaultValue.getValueType().getTypeLibType(), reinterpret_cast< uno_QueryInterfaceFunc >(cpp_queryInterface), diff --git a/comphelper/source/streaming/basicio.cxx b/comphelper/source/streaming/basicio.cxx index 8a683a738570..ff68422ff94b 100644 --- a/comphelper/source/streaming/basicio.cxx +++ b/comphelper/source/streaming/basicio.cxx @@ -75,14 +75,14 @@ const staruno::Reference<stario::XObjectInputStream>& operator >> ( } //------------------------------------------------------------------------------ -const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_Bool& _rVal) +const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, bool& _rVal) { _rVal = _rxInStream->readBoolean(); return _rxInStream; } //------------------------------------------------------------------------------ -const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_Bool _bVal) +const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, bool _bVal) { _rxOutStream->writeBoolean(_bVal); return _rxOutStream; diff --git a/comphelper/source/streaming/seqinputstreamserv.cxx b/comphelper/source/streaming/seqinputstreamserv.cxx index 22986e58767e..80c07a51b809 100644 --- a/comphelper/source/streaming/seqinputstreamserv.cxx +++ b/comphelper/source/streaming/seqinputstreamserv.cxx @@ -81,13 +81,13 @@ private: ::osl::Mutex m_aMutex; - sal_Bool m_bInitialized; + bool m_bInitialized; uno::Reference< io::XInputStream > m_xInputStream; uno::Reference< io::XSeekable > m_xSeekable; }; SequenceInputStreamService::SequenceInputStreamService() -: m_bInitialized( sal_False ) +: m_bInitialized( false ) {} // com.sun.star.uno.XServiceInfo: @@ -221,7 +221,7 @@ void SAL_CALL SequenceInputStreamService::initialize( const uno::Sequence< ::com uno::Reference< io::XSeekable > xSeekable( xInputStream, uno::UNO_QUERY_THROW ); m_xInputStream = xInputStream; m_xSeekable = xSeekable; - m_bInitialized = sal_True; + m_bInitialized = true; } else throw lang::IllegalArgumentException( OUString("Unexpected type of argument!\n"), diff --git a/comphelper/source/streaming/seqstream.cxx b/comphelper/source/streaming/seqstream.cxx index 1348f7ecba8c..f3395d191fef 100644 --- a/comphelper/source/streaming/seqstream.cxx +++ b/comphelper/source/streaming/seqstream.cxx @@ -143,7 +143,7 @@ OSequenceOutputStream::OSequenceOutputStream(Sequence< sal_Int8 >& _rSeq, double ,m_nMinimumResize(_nMinimumResize) ,m_nMaximumResize(_nMaximumResize) ,m_nSize(0) // starting at position 0 - ,m_bConnected(sal_True) + ,m_bConnected(true) { OSL_ENSURE(m_nResizeFactor > 1, "OSequenceOutputStream::OSequenceOutputStream : invalid resize factor !"); OSL_ENSURE((m_nMaximumResize < 0) || (m_nMaximumResize > m_nMinimumResize), @@ -228,7 +228,7 @@ void SAL_CALL OSequenceOutputStream::closeOutput( ) throw(NotConnectedException // cut the sequence to the real size m_rSequence.realloc(m_nSize); // and don't allow any further accesses - m_bConnected = sal_False; + m_bConnected = false; } } // namespace comphelper diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx index 3fc14b8220e7..19b38fa308b2 100644 --- a/connectivity/source/commontools/ConnectionWrapper.cxx +++ b/connectivity/source/commontools/ConnectionWrapper.cxx @@ -120,7 +120,7 @@ OUString SAL_CALL OConnectionWrapper::getImplementationName( ) throw (::com::su // append our own service, if necessary OUString sConnectionService( "com.sun.star.sdbc.Connection" ); - if ( 0 == ::comphelper::findValue( aSupported, sConnectionService, sal_True ).getLength() ) + if ( 0 == ::comphelper::findValue( aSupported, sConnectionService, true ).getLength() ) { sal_Int32 nLen = aSupported.getLength(); aSupported.realloc( nLen + 1 ); diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 3705e3302b26..c07f80108e68 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -1077,7 +1077,7 @@ sal_Bool ODbaseTable::CreateImpl() try { Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext()); - aContent.executeCommand( "delete",bool2any( sal_True ) ); + aContent.executeCommand( "delete",bool2any( true ) ); } catch(const Exception&) // an exception is thrown when no file exists { @@ -1105,7 +1105,7 @@ sal_Bool ODbaseTable::CreateImpl() try { Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext()); - aMemoContent.executeCommand( "delete",bool2any( sal_True ) ); + aMemoContent.executeCommand( "delete",bool2any( true ) ); } catch(const Exception&) { @@ -1121,7 +1121,7 @@ sal_Bool ODbaseTable::CreateImpl() { aURL.setExtension(aExt); // kill dbf file Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext()); - aMemoContent.executeCommand( "delete",bool2any( sal_True ) ); + aMemoContent.executeCommand( "delete",bool2any( true ) ); return sal_False; } m_aHeader.db_typ = dBaseIIIMemo; diff --git a/cui/source/dialogs/showcols.cxx b/cui/source/dialogs/showcols.cxx index 599cd1c1b8b6..d6d1ab001413 100644 --- a/cui/source/dialogs/showcols.cxx +++ b/cui/source/dialogs/showcols.cxx @@ -60,7 +60,7 @@ IMPL_LINK_NOARG(FmShowColsDialog, OnClickedOk) { try { - xCol->setPropertyValue(CUIFM_PROP_HIDDEN, ::cppu::bool2any(sal_False)); + xCol->setPropertyValue(CUIFM_PROP_HIDDEN, ::cppu::bool2any(false)); } catch(...) { diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 5e5af3f2bd25..a167d72fefe5 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -1888,7 +1888,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_RELATIVEPOSITION,makeAny(sal_Int32(i+1))); pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_WIDTH,makeAny(sal_Int32(227))); pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_ALIGN,makeAny((sal_Int32)0)); - pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_HIDDEN,::cppu::bool2any(sal_False)); + pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_HIDDEN,::cppu::bool2any(false)); } catch(Exception&) { diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx index 7f0bccc20e79..4e93cd7842b2 100644 --- a/dbaccess/source/core/dataaccess/connection.cxx +++ b/dbaccess/source/core/dataaccess/connection.cxx @@ -92,7 +92,7 @@ Sequence< OUString > OConnection::getSupportedServiceNames( ) throw (RuntimeExc SAL_INFO("dbaccess", "OConnection::getSupportedServiceNames" ); Sequence< OUString > aSupported = OConnectionWrapper::getSupportedServiceNames(); - if ( 0 == findValue( aSupported, SERVICE_SDB_CONNECTION, sal_True ).getLength() ) + if ( 0 == findValue( aSupported, SERVICE_SDB_CONNECTION, true ).getLength() ) { sal_Int32 nLen = aSupported.getLength(); aSupported.realloc( nLen + 1 ); diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx index aa3fc5f505e6..b7cc3feb3ce0 100644 --- a/dbaccess/source/ext/macromigration/migrationengine.cxx +++ b/dbaccess/source/ext/macromigration/migrationengine.cxx @@ -1176,7 +1176,7 @@ namespace dbmm const sal_Int32 nBaseNameLen = sBaseName.getLength(); for ( sal_Int32 i=0; i<nBaseNameLen; ++i ) { - if ( ::comphelper::OStorageHelper::IsValidZipEntryFileName( pBaseName + i, 1, sal_False ) ) + if ( ::comphelper::OStorageHelper::IsValidZipEntryFileName( pBaseName + i, 1, false ) ) ++nValid; else ++nInvalid; @@ -1189,7 +1189,7 @@ namespace dbmm const sal_Unicode* pReplacement = aReplacement.getStr(); for ( sal_Int32 i=0; i<nBaseNameLen; ++i ) { - if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( pReplacement + i, 1, sal_False ) ) + if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( pReplacement + i, 1, false ) ) aReplacement[i] = '_'; } sBaseName = aReplacement.makeStringAndClear(); diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 48921a10700b..0e9c68d14240 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -1107,7 +1107,7 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t SolarMutexGuard aGuard; // the IsModified changed to sal_False ? if ( (evt.PropertyName.equals(PROPERTY_ISMODIFIED)) - && (::comphelper::getBOOL(evt.NewValue) == sal_False) + && !::comphelper::getBOOL(evt.NewValue) ) { // -> the current field isn't modified anymore, too setCurrentModified( sal_False ); @@ -1115,7 +1115,7 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t // switching to a new record ? if ( (evt.PropertyName.equals(PROPERTY_ISNEW)) - && (::comphelper::getBOOL(evt.NewValue) == sal_True) + && ::comphelper::getBOOL(evt.NewValue) ) { if (::comphelper::getINT32(xSource->getPropertyValue(PROPERTY_ROWCOUNT)) == 0) @@ -1719,7 +1719,7 @@ void SbaXDataBrowserController::applyParserFilter(const OUString& _rOldFilter, s FormErrorHelper aError(this); xFormSet->setPropertyValue(PROPERTY_FILTER, makeAny(_xParser->getFilter())); xFormSet->setPropertyValue(PROPERTY_HAVING_CLAUSE, makeAny(_xParser->getHavingClause())); - xFormSet->setPropertyValue(PROPERTY_APPLYFILTER, ::comphelper::makeBoolAny(sal_Bool(sal_True))); + xFormSet->setPropertyValue(PROPERTY_APPLYFILTER, ::comphelper::makeBoolAny(true)); bSuccess = reloadForm(m_xLoadable); } @@ -1884,8 +1884,8 @@ void SbaXDataBrowserController::ExecuteSearch() // prohibit the synchronization of the grid's display with the cursor's position Reference< XPropertySet > xModelSet(getControlModel(), UNO_QUERY); OSL_ENSURE(xModelSet.is(), "SbaXDataBrowserController::ExecuteSearch : no model set ?!"); - xModelSet->setPropertyValue("DisplayIsSynchron", ::comphelper::makeBoolAny(sal_Bool(sal_False))); - xModelSet->setPropertyValue("AlwaysShowCursor", ::comphelper::makeBoolAny(sal_Bool(sal_True))); + xModelSet->setPropertyValue("DisplayIsSynchron", ::comphelper::makeBoolAny(false)); + xModelSet->setPropertyValue("AlwaysShowCursor", ::comphelper::makeBoolAny(true)); xModelSet->setPropertyValue("CursorColor", makeAny(sal_Int32(COL_LIGHTRED))); Reference< ::com::sun::star::util::XNumberFormatsSupplier > xNFS(::dbtools::getNumberFormats(::dbtools::getConnection(m_xRowSet), sal_True, getORB())); @@ -1909,8 +1909,8 @@ void SbaXDataBrowserController::ExecuteSearch() } // restore the grid's normal operating state - xModelSet->setPropertyValue("DisplayIsSynchron", ::comphelper::makeBoolAny(sal_Bool(sal_True))); - xModelSet->setPropertyValue("AlwaysShowCursor", ::comphelper::makeBoolAny(sal_Bool(sal_False))); + xModelSet->setPropertyValue("DisplayIsSynchron", ::comphelper::makeBoolAny(true)); + xModelSet->setPropertyValue("AlwaysShowCursor", ::comphelper::makeBoolAny(false)); xModelSet->setPropertyValue("CursorColor", Any()); } @@ -1963,7 +1963,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property { Reference< XPropertySet > xActiveSet(getRowSet(), UNO_QUERY); sal_Bool bApplied = ::comphelper::getBOOL(xActiveSet->getPropertyValue(PROPERTY_APPLYFILTER)); - xActiveSet->setPropertyValue(PROPERTY_APPLYFILTER, ::comphelper::makeBoolAny(sal_Bool(!bApplied))); + xActiveSet->setPropertyValue(PROPERTY_APPLYFILTER, ::comphelper::makeBoolAny(!bApplied)); reloadForm(m_xLoadable); } InvalidateFeature(ID_BROWSER_FILTERED); @@ -2439,7 +2439,7 @@ IMPL_LINK(SbaXDataBrowserController, OnFoundData, FmFoundRecordInformation*, pIn Reference< XPropertySet > xModelSet(getControlModel(), UNO_QUERY); OSL_ENSURE(xModelSet.is(), "SbaXDataBrowserController::OnFoundData : no model set ?!"); Any aOld = xModelSet->getPropertyValue("DisplayIsSynchron"); - xModelSet->setPropertyValue("DisplayIsSynchron", ::comphelper::makeBoolAny(sal_Bool(sal_True))); + xModelSet->setPropertyValue("DisplayIsSynchron", ::comphelper::makeBoolAny(true)); xModelSet->setPropertyValue("DisplayIsSynchron", aOld); // and move to the field @@ -2485,7 +2485,7 @@ IMPL_LINK(SbaXDataBrowserController, OnCanceledNotFound, FmFoundRecordInformatio Reference< XPropertySet > xModelSet(getControlModel(), UNO_QUERY); OSL_ENSURE(xModelSet.is(), "SbaXDataBrowserController::OnCanceledNotFound : no model set ?!"); Any aOld = xModelSet->getPropertyValue("DisplayIsSynchron"); - xModelSet->setPropertyValue("DisplayIsSynchron", ::comphelper::makeBoolAny(sal_Bool(sal_True))); + xModelSet->setPropertyValue("DisplayIsSynchron", ::comphelper::makeBoolAny(true)); xModelSet->setPropertyValue("DisplayIsSynchron", aOld); } catch( const Exception& ) diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 0545cd68f1a0..a0e3c457370c 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -406,7 +406,7 @@ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo, } else { - ::comphelper::UStringMixEqual aCase(sal_False); + ::comphelper::UStringMixEqual aCase(false); // search for typeinfo where the typename is equal _sTypeName OTypeInfoMap::const_iterator typeInfoLoop = _rTypeInfo.begin(); OTypeInfoMap::const_iterator typeInfoEnd = _rTypeInfo.end(); diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index 8397a6a78ccd..f50aadb57207 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -189,7 +189,7 @@ namespace pNewConnData->SetFieldType(JTCS_TO,isColumnInKeyType(xReferencedKeys,sRelatedColumn,KeyType::PRIMARY) ? TAB_PRIMARY_FIELD : TAB_NORMAL_FIELD); { - Sequence< sal_Int16> aFind(::comphelper::findValue(_rSource.GetOriginalColumns()->getElementNames(),*pIter,sal_True)); + Sequence< sal_Int16> aFind(::comphelper::findValue(_rSource.GetOriginalColumns()->getElementNames(),*pIter,true)); if(aFind.getLength()) pNewConnData->SetFieldIndex(JTCS_FROM,aFind[0]+1); else @@ -199,7 +199,7 @@ namespace Reference<XNameAccess> xRefColumns = _rDest.GetOriginalColumns(); if(xRefColumns.is()) { - Sequence< sal_Int16> aFind(::comphelper::findValue(xRefColumns->getElementNames(),sRelatedColumn,sal_True)); + Sequence< sal_Int16> aFind(::comphelper::findValue(xRefColumns->getElementNames(),sRelatedColumn,true)); if(aFind.getLength()) pNewConnData->SetFieldIndex(JTCS_TO,aFind[0]+1); else diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index f445c2a6b575..94de2c99109e 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -1333,7 +1333,7 @@ void OQueryController::executeQuery() aProps[2].Value <<= sTranslatedStmt; aProps[3].Name = PROPERTY_ENABLE_BROWSER; - aProps[3].Value = ::cppu::bool2any(sal_False); + aProps[3].Value = ::cppu::bool2any(false); aProps[4].Name = PROPERTY_ACTIVE_CONNECTION; aProps[4].Value <<= getConnection(); diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index e3e2216eedc1..1a09f57b5569 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -1694,7 +1694,7 @@ void SAL_CALL OCommonEmbeddedObject::reload( uno::Sequence< beans::PropertyValue > aArgs( 1 ); aArgs[0].Name = "URL"; aArgs[0].Value <<= m_aLinkURL; - m_aLinkFilterName = aHelper.UpdateMediaDescriptorWithFilterName( aArgs, sal_False ); + m_aLinkFilterName = aHelper.UpdateMediaDescriptorWithFilterName( aArgs, false ); } } diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx index 9bbb43c32252..feb74c62b7f8 100644 --- a/embeddedobj/source/commonembedding/xfactory.cxx +++ b/embeddedobj/source/commonembedding/xfactory.cxx @@ -170,7 +170,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta uno::Sequence< beans::PropertyValue > aTempMedDescr( aMediaDescr ); // check if there is FilterName - OUString aFilterName = m_aConfigHelper.UpdateMediaDescriptorWithFilterName( aTempMedDescr, sal_False ); + OUString aFilterName = m_aConfigHelper.UpdateMediaDescriptorWithFilterName( aTempMedDescr, false ); uno::Reference< uno::XInterface > xResult; @@ -346,7 +346,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); - OUString aFilterName = m_aConfigHelper.UpdateMediaDescriptorWithFilterName( aTempMedDescr, sal_False ); + OUString aFilterName = m_aConfigHelper.UpdateMediaDescriptorWithFilterName( aTempMedDescr, false ); if ( !aFilterName.isEmpty() ) { diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx index f909ba5ff2bf..d79fcc58515d 100644 --- a/embeddedobj/source/general/xcreator.cxx +++ b/embeddedobj/source/general/xcreator.cxx @@ -255,7 +255,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Sequence< beans::PropertyValue > aTempMedDescr( aMediaDescr ); // check if there is FilterName - OUString aFilterName = m_aConfigHelper.UpdateMediaDescriptorWithFilterName( aTempMedDescr, sal_False ); + OUString aFilterName = m_aConfigHelper.UpdateMediaDescriptorWithFilterName( aTempMedDescr, false ); if ( !aFilterName.isEmpty() ) { @@ -360,7 +360,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); - OUString aFilterName = m_aConfigHelper.UpdateMediaDescriptorWithFilterName( aTempMedDescr, sal_False ); + OUString aFilterName = m_aConfigHelper.UpdateMediaDescriptorWithFilterName( aTempMedDescr, false ); if ( !aFilterName.isEmpty() ) { diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index e4a877135c92..fe26e886e559 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -2781,9 +2781,9 @@ namespace pcr if (xController.is()) { // do a preview by default - xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0, ::cppu::bool2any(sal_True)); + xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0, ::cppu::bool2any(true)); - xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, ::cppu::bool2any(sal_True)); + xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, ::cppu::bool2any(true)); xController->enableControl(ExtendedFilePickerElementIds::CHECKBOX_LINK, false); } diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 052a8f24c308..696563d9a282 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -2657,7 +2657,7 @@ void DffPropertyReader::CheckAndCorrectExcelTextRotation( SvStream& rIn, SfxItem ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); ::com::sun::star::uno::Reference< com::sun::star::embed::XStorage > xStorage ( ::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream( - OFOPXML_STORAGE_FORMAT_STRING, xInputStream, xContext, sal_True ) ); + OFOPXML_STORAGE_FORMAT_STRING, xInputStream, xContext, true ) ); if ( xStorage.is() ) { const OUString sDRS( "drs" ); diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index f270295ba272..6d2732b20c31 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -203,7 +203,7 @@ void OButtonModel::read(const Reference<XObjectInputStream>& _rxInStream) throw readHelpTextCompatibly(_rxInStream); // DispatchInternal - sal_Bool bDispath; + bool bDispath; _rxInStream >> bDispath; setDispatchUrlInternal(bDispath); } diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index 406433c2e508..285aa146b521 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -132,7 +132,7 @@ OComboBoxModel::OComboBoxModel(const Reference<XComponentContext>& _rxFactory) ,OErrorBroadcaster( OComponentHelper::rBHelper ) ,m_aListRowSet() ,m_eListSourceType(ListSourceType_TABLE) - ,m_bEmptyIsNull(sal_True) + ,m_bEmptyIsNull(true) { m_nClassId = FormComponentType::COMBOBOX; initValueProperty( PROPERTY_TEXT, PROPERTY_ID_TEXT ); @@ -353,7 +353,7 @@ void SAL_CALL OComboBoxModel::write(const Reference<stario::XObjectOutputStream> _rxOutStream << nBoundColumn; } - _rxOutStream << (sal_Bool)m_bEmptyIsNull; + _rxOutStream << m_bEmptyIsNull; _rxOutStream << m_aDefaultText; writeHelpTextCompatibly(_rxOutStream); @@ -391,7 +391,7 @@ void SAL_CALL OComboBoxModel::read(const Reference<stario::XObjectInputStream>& m_aBoundColumn <<= (sal_Int16)0; m_aDefaultText = OUString(); m_eListSourceType = ListSourceType_TABLE; - m_bEmptyIsNull = sal_True; + m_bEmptyIsNull = true; defaultCommonProperties(); return; } @@ -429,7 +429,7 @@ void SAL_CALL OComboBoxModel::read(const Reference<stario::XObjectInputStream>& if (nVersion > 0x0001) { - sal_Bool bNull; + bool bNull; _rxInStream >> bNull; m_bEmptyIsNull = bNull; } diff --git a/forms/source/component/ComboBox.hxx b/forms/source/component/ComboBox.hxx index 1fefa8453686..b6afbd3c140f 100644 --- a/forms/source/component/ComboBox.hxx +++ b/forms/source/component/ComboBox.hxx @@ -63,7 +63,7 @@ class OComboBoxModel ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter> m_xFormatter; ::com::sun::star::form::ListSourceType m_eListSourceType; // ListSource's type - sal_Bool m_bEmptyIsNull; // Empty string is interpreted as NULL + bool m_bEmptyIsNull; // Empty string is interpreted as NULL ::std::auto_ptr< ::dbtools::FormattedColumnValue > m_pValueFormatter; diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 7b4ac6ad56a3..a8f812cc9b39 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -423,7 +423,7 @@ void ODatabaseForm::impl_construct() // listen for the properties, important for Parameters if ( m_xAggregateSet.is() ) { - m_pAggregatePropertyMultiplexer = new OPropertyChangeMultiplexer(this, m_xAggregateSet, sal_False); + m_pAggregatePropertyMultiplexer = new OPropertyChangeMultiplexer(this, m_xAggregateSet, false); m_pAggregatePropertyMultiplexer->acquire(); m_pAggregatePropertyMultiplexer->addProperty(PROPERTY_COMMAND); m_pAggregatePropertyMultiplexer->addProperty(PROPERTY_ACTIVE_CONNECTION); @@ -1511,7 +1511,7 @@ Any SAL_CALL ODatabaseForm::getFastPropertyValue( sal_Int32 nHandle ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException) { if ((nHandle == PROPERTY_ID_ISMODIFIED) && (m_nResetsPending > 0)) - return ::cppu::bool2any((sal_False)); + return ::cppu::bool2any(false); // don't allow the aggregate which is currently being reset to return a (temporary) "yes" else return OPropertySetAggregationHelper::getFastPropertyValue(nHandle); @@ -2081,7 +2081,7 @@ void ODatabaseForm::reset_impl(bool _bAproveByListeners) // (do this _before_ the listeners are notified ! their reaction (maybe asynchronous) may depend // on the modified state of the row) if (bInsertRow) - m_xAggregateSet->setPropertyValue(PROPERTY_ISMODIFIED, ::cppu::bool2any(sal_Bool(sal_False))); + m_xAggregateSet->setPropertyValue(PROPERTY_ISMODIFIED, ::cppu::bool2any(false)); aResetGuard.clear(); { @@ -2092,7 +2092,7 @@ void ODatabaseForm::reset_impl(bool _bAproveByListeners) // and again : ensure the row isn't modified // we already did this after we (and maybe our dependents) resetted the values, but the listeners may have changed the row, too if (bInsertRow) - m_xAggregateSet->setPropertyValue(PROPERTY_ISMODIFIED, ::cppu::bool2any((sal_False))); + m_xAggregateSet->setPropertyValue(PROPERTY_ISMODIFIED, ::cppu::bool2any(false)); --m_nResetsPending; } diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 996c0fcd5620..e77b677c7e79 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -1360,7 +1360,7 @@ void OBoundControlModel::implInitAggMultiplexer( ) increment( m_refCount ); if ( m_xAggregateSet.is() ) { - m_pAggPropMultiplexer = new OPropertyChangeMultiplexer( this, m_xAggregateSet, sal_False ); + m_pAggPropMultiplexer = new OPropertyChangeMultiplexer( this, m_xAggregateSet, false ); m_pAggPropMultiplexer->acquire(); } decrement( m_refCount ); diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx index aa0caf59a58f..c524b0118aab 100644 --- a/forms/source/component/Grid.cxx +++ b/forms/source/component/Grid.cxx @@ -736,11 +736,11 @@ Any OGridControlModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const case PROPERTY_ID_DISPLAYSYNCHRON: case PROPERTY_ID_ENABLED: case PROPERTY_ID_ENABLEVISIBLE: - aReturn = makeBoolAny(sal_True); + aReturn = makeBoolAny(true); break; case PROPERTY_ID_ALWAYSSHOWCURSOR: - aReturn = makeBoolAny(sal_False); + aReturn = makeBoolAny(false); break; case PROPERTY_ID_HELPURL: diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index 8ec645c141f1..fe648ab9e6b2 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -816,7 +816,7 @@ bool OImageControlControl::implInsertGraphics() aDialog.SetTitle( sTitle ); Reference< XFilePickerControlAccess > xController( aDialog.GetFilePicker(), UNO_QUERY_THROW ); - xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0, ::cppu::bool2any(sal_True)); + xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0, ::cppu::bool2any(true)); Reference<XPropertySet> xBoundField; if ( hasProperty( PROPERTY_BOUNDFIELD, xSet ) ) diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index 8945b999886e..a09406ca411a 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -992,7 +992,7 @@ namespace frm // - this would be unable to reflect in the db column if ( hasField() ) { - setFastPropertyValue( PROPERTY_ID_MULTISELECTION, ::cppu::bool2any( ( sal_False ) ) ); + setFastPropertyValue( PROPERTY_ID_MULTISELECTION, ::cppu::bool2any( false ) ); } if ( !hasExternalListSource() ) @@ -1372,7 +1372,7 @@ namespace frm { // the indexes where the current string appears in our string items Sequence< sal_Int16 > aThisEntryIndexes; - aThisEntryIndexes = findValue( getStringItemList(), *pSelectEntries++, sal_False ); + aThisEntryIndexes = findValue( getStringItemList(), *pSelectEntries++, false ); // insert all the indexes of this entry into our set ::std::copy( @@ -1397,7 +1397,7 @@ namespace frm OUString sStringToSelect; OSL_VERIFY( _rExternalValue >>= sStringToSelect ); - aSelectIndexes = findValue( getStringItemList(), sStringToSelect, sal_False ); + aSelectIndexes = findValue( getStringItemList(), sStringToSelect, false ); } break; } diff --git a/forms/source/component/clickableimage.hxx b/forms/source/component/clickableimage.hxx index 1b88d5d0cf1f..ab16ab791245 100644 --- a/forms/source/component/clickableimage.hxx +++ b/forms/source/component/clickableimage.hxx @@ -84,7 +84,7 @@ namespace frm void DownloadDone(); ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes(); - inline sal_Bool isDispatchUrlInternal() const { return m_bDispatchUrlInternal; } + inline bool isDispatchUrlInternal() const { return m_bDispatchUrlInternal; } inline void setDispatchUrlInternal(sal_Bool _bDispatch) { m_bDispatchUrlInternal = _bDispatch; } public: diff --git a/forms/source/component/formcontrolfont.cxx b/forms/source/component/formcontrolfont.cxx index 02c8bdba721b..1a4690fdd6d4 100644 --- a/forms/source/component/formcontrolfont.cxx +++ b/forms/source/component/formcontrolfont.cxx @@ -531,7 +531,7 @@ namespace frm break; case PROPERTY_ID_FONT_WORDLINEMODE: - aReturn = makeBoolAny(sal_False); + aReturn = makeBoolAny(false); break; case PROPERTY_ID_FONT_NAME: @@ -548,7 +548,7 @@ namespace frm break; case PROPERTY_ID_FONT_KERNING: - aReturn = makeBoolAny(sal_False); + aReturn = makeBoolAny(false); break; case PROPERTY_ID_FONT_PITCH: diff --git a/include/comphelper/MasterPropertySet.hxx b/include/comphelper/MasterPropertySet.hxx index c11e2ccdd6ba..7ba220c7ebff 100644 --- a/include/comphelper/MasterPropertySet.hxx +++ b/include/comphelper/MasterPropertySet.hxx @@ -35,10 +35,10 @@ namespace comphelper { ChainablePropertySet * mpSlave; ::com::sun::star::uno::Reference < com::sun::star::beans::XPropertySet > mxSlave; - sal_Bool mbInit; + bool mbInit; SlaveData ( ChainablePropertySet *pSlave); - inline sal_Bool IsInit () { return mbInit;} - inline void SetInit ( sal_Bool bInit) { mbInit = bInit; } + inline bool IsInit () { return mbInit;} + inline void SetInit ( bool bInit) { mbInit = bInit; } }; } typedef std::map < sal_uInt8, comphelper::SlaveData* > SlaveMap; diff --git a/include/comphelper/SelectionMultiplex.hxx b/include/comphelper/SelectionMultiplex.hxx index 114373df8db0..e9ceb1b6246d 100644 --- a/include/comphelper/SelectionMultiplex.hxx +++ b/include/comphelper/SelectionMultiplex.hxx @@ -70,15 +70,15 @@ namespace comphelper ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionSupplier> m_xSet; OSelectionChangeListener* m_pListener; sal_Int32 m_nLockCount; - sal_Bool m_bListening : 1; - sal_Bool m_bAutoSetRelease : 1; + bool m_bListening : 1; + bool m_bAutoSetRelease : 1; OSelectionChangeMultiplexer(const OSelectionChangeMultiplexer&); OSelectionChangeMultiplexer& operator=(const OSelectionChangeMultiplexer&); protected: virtual ~OSelectionChangeMultiplexer(); public: - OSelectionChangeMultiplexer(OSelectionChangeListener* _pListener, const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionSupplier>& _rxSet, sal_Bool _bAutoReleaseSet = sal_True); + OSelectionChangeMultiplexer(OSelectionChangeListener* _pListener, const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionSupplier>& _rxSet, bool _bAutoReleaseSet = true); // XEventListener virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw( ::com::sun::star::uno::RuntimeException); diff --git a/include/comphelper/accessiblecomponenthelper.hxx b/include/comphelper/accessiblecomponenthelper.hxx index b352371537fe..090c5076f7e4 100644 --- a/include/comphelper/accessiblecomponenthelper.hxx +++ b/include/comphelper/accessiblecomponenthelper.hxx @@ -54,7 +54,7 @@ namespace comphelper note: getLocationOnScreen relies on a valid parent (XAccessibleContext::getParent()->getAccessibleContext()), which itself implements XAccessibleComponent */ - sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException); + bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException); ::com::sun::star::awt::Point SAL_CALL getLocation( ) throw (::com::sun::star::uno::RuntimeException); ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException); ::com::sun::star::awt::Size SAL_CALL getSize( ) throw (::com::sun::star::uno::RuntimeException); diff --git a/include/comphelper/accessiblecontexthelper.hxx b/include/comphelper/accessiblecontexthelper.hxx index 3cab201feabb..7790db4d02c6 100644 --- a/include/comphelper/accessiblecontexthelper.hxx +++ b/include/comphelper/accessiblecontexthelper.hxx @@ -217,7 +217,7 @@ namespace comphelper // life time control /// checks whether the object is alive (returns <TRUE/> then) or disposed - sal_Bool isAlive() const; + bool isAlive() const; /// checks for beeing alive. If the object is already disposed (i.e. not alive), an exception is thrown. void ensureAlive() const SAL_THROW( ( ::com::sun::star::lang::DisposedException ) ); diff --git a/include/comphelper/accessibleselectionhelper.hxx b/include/comphelper/accessibleselectionhelper.hxx index 4876ace41739..bbffc9347342 100644 --- a/include/comphelper/accessibleselectionhelper.hxx +++ b/include/comphelper/accessibleselectionhelper.hxx @@ -56,7 +56,7 @@ namespace comphelper throw ( ::com::sun::star::uno::RuntimeException ) = 0; // return if the specified child is visible => watch for special ChildIndexes (ACCESSIBLE_SELECTION_CHILD_xxx) - virtual sal_Bool + virtual bool implIsSelected( sal_Int32 nAccessibleChildIndex ) throw (::com::sun::star::uno::RuntimeException) = 0; @@ -70,7 +70,7 @@ namespace comphelper /** non-virtual versions of the methods which can be implemented using <method>implIsSelected</method> and <method>implSelect</method> */ void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); void SAL_CALL clearAccessibleSelection( ) throw (::com::sun::star::uno::RuntimeException); void SAL_CALL selectAllAccessibleChildren( ) throw (::com::sun::star::uno::RuntimeException); sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException); diff --git a/include/comphelper/accessibletexthelper.hxx b/include/comphelper/accessibletexthelper.hxx index c307d00cf3e1..e2c832c7104d 100644 --- a/include/comphelper/accessibletexthelper.hxx +++ b/include/comphelper/accessibletexthelper.hxx @@ -52,14 +52,14 @@ namespace comphelper ::com::sun::star::uno::Reference < ::com::sun::star::i18n::XBreakIterator > implGetBreakIterator(); ::com::sun::star::uno::Reference < ::com::sun::star::i18n::XCharacterClassification > implGetCharacterClassification(); - sal_Bool implIsValidBoundary( ::com::sun::star::i18n::Boundary& rBoundary, sal_Int32 nLength ); - virtual sal_Bool implIsValidIndex( sal_Int32 nIndex, sal_Int32 nLength ); - virtual sal_Bool implIsValidRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex, sal_Int32 nLength ); + bool implIsValidBoundary( ::com::sun::star::i18n::Boundary& rBoundary, sal_Int32 nLength ); + virtual bool implIsValidIndex( sal_Int32 nIndex, sal_Int32 nLength ); + virtual bool implIsValidRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex, sal_Int32 nLength ); virtual OUString implGetText() = 0; virtual ::com::sun::star::lang::Locale implGetLocale() = 0; virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) = 0; virtual void implGetGlyphBoundary( ::com::sun::star::i18n::Boundary& rBoundary, sal_Int32 nIndex ); - virtual sal_Bool implGetWordBoundary( ::com::sun::star::i18n::Boundary& rBoundary, sal_Int32 nIndex ); + virtual bool implGetWordBoundary( ::com::sun::star::i18n::Boundary& rBoundary, sal_Int32 nIndex ); virtual void implGetSentenceBoundary( ::com::sun::star::i18n::Boundary& rBoundary, sal_Int32 nIndex ); virtual void implGetParagraphBoundary( ::com::sun::star::i18n::Boundary& rBoundary, sal_Int32 nIndex ); virtual void implGetLineBoundary( ::com::sun::star::i18n::Boundary& rBoundary, sal_Int32 nIndex ); diff --git a/include/comphelper/accessiblewrapper.hxx b/include/comphelper/accessiblewrapper.hxx index 8bcb914bcc29..7aa4b4418523 100644 --- a/include/comphelper/accessiblewrapper.hxx +++ b/include/comphelper/accessiblewrapper.hxx @@ -339,7 +339,7 @@ namespace comphelper ::com::sun::star::uno::WeakReference< ::com::sun::star::accessibility::XAccessible > m_aOwningAccessible; // the XAccessible which belongs to the XAccessibleContext which we work for AccessibleMap m_aChildrenMap; // for caching children - sal_Bool m_bTransientChildren; // are we prohibited to cache our children? + bool m_bTransientChildren; // are we prohibited to cache our children? public: /// ctor @@ -350,7 +350,7 @@ namespace comphelper /** specifies if the children are to be consideren transient (i.e.: not cached) <p>to be called only once per lifetime</p> */ - void setTransientChildren( sal_Bool _bSet = sal_True ); + void setTransientChildren( bool _bSet = true ); /** sets the XAccessible which belongs to the XAccessibleContext which we work for <p>to be called only once per lifetime</p> @@ -361,7 +361,7 @@ namespace comphelper ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > getAccessibleWrapperFor( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxKey, - sal_Bool _bCreate = sal_True + bool _bCreate = true ); /// erases the given key from the map (if it is present there) diff --git a/include/comphelper/accimplaccess.hxx b/include/comphelper/accimplaccess.hxx index defc617fe66c..29f905d4de0e 100644 --- a/include/comphelper/accimplaccess.hxx +++ b/include/comphelper/accimplaccess.hxx @@ -120,7 +120,7 @@ namespace comphelper <TRUE/> in case of success, <FALSE/> otherwise. For error condition please look at <method>getImplementation</method>. */ - static sal_Bool setAccessibleParent( + static bool setAccessibleParent( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >& _rxComponent, const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxNewParent ); diff --git a/include/comphelper/basicio.hxx b/include/comphelper/basicio.hxx index 119608d8d48e..7b0c35410825 100644 --- a/include/comphelper/basicio.hxx +++ b/include/comphelper/basicio.hxx @@ -33,9 +33,9 @@ namespace stario = ::com::sun::star::io; namespace staruno = ::com::sun::star::uno; namespace starawt = ::com::sun::star::awt; -// sal_Bool -COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_Bool& _rVal); -COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_Bool _bVal); +// bool +COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, bool& _rVal); +COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, bool _bVal); // OUString COMPHELPER_DLLPUBLIC const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, OUString& _rStr); diff --git a/include/comphelper/container.hxx b/include/comphelper/container.hxx index 715424fcbc27..6739f90312b4 100644 --- a/include/comphelper/container.hxx +++ b/include/comphelper/container.hxx @@ -60,14 +60,14 @@ public: virtual void Invalidate() { m_xCurrentObject = NULL; } protected: - virtual sal_Bool ShouldHandleElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& /*rElement*/) { return sal_True; } + virtual bool ShouldHandleElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& /*rElement*/) { return true; } // This can be used to exclude certain elements; elements for which // this function returns sal_True will be simply skipped. // If this element is returned from Next(), then one can get // here get a little more information on the element. // That's why this method is not const. - virtual sal_Bool ShouldStepInto(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& /*xContainer*/) const { return sal_True; } + virtual bool ShouldStepInto(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& /*xContainer*/) const { return true; } }; //......................................................................... diff --git a/include/comphelper/docpasswordhelper.hxx b/include/comphelper/docpasswordhelper.hxx index 92b2731166c2..b275be2d93ab 100644 --- a/include/comphelper/docpasswordhelper.hxx +++ b/include/comphelper/docpasswordhelper.hxx @@ -129,7 +129,7 @@ public: <FALSE/> otherwise */ - static sal_Bool IsModifyPasswordCorrect( + static bool IsModifyPasswordCorrect( const OUString& aPassword, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aInfo ); diff --git a/include/comphelper/docpasswordrequest.hxx b/include/comphelper/docpasswordrequest.hxx index 1360a4342e13..f2c13d87e076 100644 --- a/include/comphelper/docpasswordrequest.hxx +++ b/include/comphelper/docpasswordrequest.hxx @@ -48,7 +48,7 @@ public: explicit SimplePasswordRequest( com::sun::star::task::PasswordRequestMode eMode ); virtual ~SimplePasswordRequest(); - sal_Bool isPassword() const; + bool isPassword() const; OUString getPassword() const; @@ -77,15 +77,15 @@ public: DocPasswordRequestType eType, ::com::sun::star::task::PasswordRequestMode eMode, const OUString& rDocumentName, - sal_Bool bPasswordToModify = sal_False ); + bool bPasswordToModify = false ); virtual ~DocPasswordRequest(); - sal_Bool isPassword() const; + bool isPassword() const; OUString getPassword() const; OUString getPasswordToModify() const; - sal_Bool getRecommendReadOnly() const; + bool getRecommendReadOnly() const; private: // XInteractionRequest diff --git a/include/comphelper/embeddedobjectcontainer.hxx b/include/comphelper/embeddedobjectcontainer.hxx index dd1de2074014..742ae4a2d56f 100644 --- a/include/comphelper/embeddedobjectcontainer.hxx +++ b/include/comphelper/embeddedobjectcontainer.hxx @@ -58,7 +58,7 @@ class COMPHELPER_DLLPUBLIC EmbeddedObjectContainer public: // add an embedded object to the container storage - sal_Bool StoreEmbeddedObject( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >&, OUString&, sal_Bool ); + bool StoreEmbeddedObject( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >&, OUString&, bool ); // add an embedded object that has been imported from the container storage - should only be called by filters! void AddEmbeddedObject( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >&, const OUString& ); @@ -70,7 +70,7 @@ public: ~EmbeddedObjectContainer(); void SwitchPersistence( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& ); - sal_Bool CommitImageSubStorage(); + bool CommitImageSubStorage(); void ReleaseImageSubStorage(); OUString CreateUniqueObjectName(); @@ -79,12 +79,12 @@ public: com::sun::star::uno::Sequence < OUString > GetObjectNames(); // check for existence of objects at all - sal_Bool HasEmbeddedObjects(); + bool HasEmbeddedObjects(); // check existence of an object - either by identity or by name - sal_Bool HasEmbeddedObject( const OUString& ); - sal_Bool HasEmbeddedObject( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ); - sal_Bool HasInstantiatedEmbeddedObject( const OUString& ); + bool HasEmbeddedObject( const OUString& ); + bool HasEmbeddedObject( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ); + bool HasInstantiatedEmbeddedObject( const OUString& ); // get the object name of an object - this is the persist name if the object has persistence OUString GetEmbeddedObjectName( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ); @@ -101,7 +101,7 @@ public: const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, OUString& ); // insert an embedded object into the container - objects persistent representation will be added to the storage - sal_Bool InsertEmbeddedObject( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >&, OUString& ); + bool InsertEmbeddedObject( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >&, OUString& ); // load an embedded object from a MediaDescriptor and insert it into the container // a new object will be created from the new content and returned @@ -122,18 +122,18 @@ public: ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject > CopyAndGetEmbeddedObject( EmbeddedObjectContainer& rSrc, const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& xObj, /* TODO const OUString& aOrigName,*/ OUString& rName ); // move an embedded object from one container to another one - sal_Bool MoveEmbeddedObject( EmbeddedObjectContainer& rSrc, const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >&, OUString& ); + bool MoveEmbeddedObject( EmbeddedObjectContainer& rSrc, const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >&, OUString& ); // remove an embedded object from the container and from the storage; if object can't be closed // #i119941, bKeepToTempStorage: use to specify whether store the removed object to temporary storage+ - sal_Bool RemoveEmbeddedObject( const OUString& rName, sal_Bool bClose = sal_True, sal_Bool bKeepToTempStorage = sal_True ); - sal_Bool RemoveEmbeddedObject( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >&, sal_Bool bClose = sal_True, sal_Bool bKeepToTempStorage = sal_True ); + bool RemoveEmbeddedObject( const OUString& rName, bool bClose = true, bool bKeepToTempStorage = true ); + bool RemoveEmbeddedObject( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >&, bool bClose = true, bool bKeepToTempStorage = true ); // close and remove an embedded object from the container without removing it from the storage - sal_Bool CloseEmbeddedObject( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ); + bool CloseEmbeddedObject( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ); // move an embedded object to another container (keep the persistent name) - sal_Bool MoveEmbeddedObject( const OUString& rName, EmbeddedObjectContainer& ); + bool MoveEmbeddedObject( const OUString& rName, EmbeddedObjectContainer& ); // get the stored graphical representation for the object com::sun::star::uno::Reference < com::sun::star::io::XInputStream > GetGraphicStream( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >&, OUString* pMediaType=0 ); @@ -142,23 +142,23 @@ public: com::sun::star::uno::Reference < com::sun::star::io::XInputStream > GetGraphicStream( const OUString& aName, OUString* pMediaType=0 ); // add a graphical representation for an object - sal_Bool InsertGraphicStream( const com::sun::star::uno::Reference < com::sun::star::io::XInputStream >& rStream, const OUString& rObjectName, const OUString& rMediaType ); + bool InsertGraphicStream( const com::sun::star::uno::Reference < com::sun::star::io::XInputStream >& rStream, const OUString& rObjectName, const OUString& rMediaType ); // try to add a graphical representation for an object in optimized way ( might fail ) - sal_Bool InsertGraphicStreamDirectly( const com::sun::star::uno::Reference < com::sun::star::io::XInputStream >& rStream, const OUString& rObjectName, const OUString& rMediaType ); + bool InsertGraphicStreamDirectly( const com::sun::star::uno::Reference < com::sun::star::io::XInputStream >& rStream, const OUString& rObjectName, const OUString& rMediaType ); // remove a graphical representation for an object - sal_Bool RemoveGraphicStream( const OUString& rObjectName ); + bool RemoveGraphicStream( const OUString& rObjectName ); // copy the graphical representation from different container - sal_Bool TryToCopyGraphReplacement( EmbeddedObjectContainer& rSrc, + bool TryToCopyGraphReplacement( EmbeddedObjectContainer& rSrc, const OUString& aOrigName, const OUString& aTargetName ); void CloseEmbeddedObjects(); - sal_Bool StoreChildren(sal_Bool _bOasisFormat,sal_Bool _bObjectsOnly); - sal_Bool StoreAsChildren( sal_Bool _bOasisFormat - ,sal_Bool _bCreateEmbedded + bool StoreChildren(bool _bOasisFormat,bool _bObjectsOnly); + bool StoreAsChildren( bool _bOasisFormat + ,bool _bCreateEmbedded ,const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& _xStorage); static com::sun::star::uno::Reference< com::sun::star::io::XInputStream > GetGraphicReplacementStream( @@ -172,7 +172,7 @@ public: * \param _bClearModifedFlag If <TRUE/> then the modified flag will be set to <FALSE/> otherwise nothing happen. * \return <FALSE/> if no error occurred, otherwise <TRUE/>. */ - sal_Bool SetPersistentEntries(const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& _xStorage,bool _bClearModifedFlag = true); + bool SetPersistentEntries(const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& _xStorage,bool _bClearModifedFlag = true); }; } diff --git a/include/comphelper/enumhelper.hxx b/include/comphelper/enumhelper.hxx index 3753772bd4d0..97eb69c6979b 100644 --- a/include/comphelper/enumhelper.hxx +++ b/include/comphelper/enumhelper.hxx @@ -61,7 +61,7 @@ class COMPHELPER_DLLPUBLIC OEnumerationByName : private OEnumerationLock staruno::Sequence< OUString > m_aNames; sal_Int32 m_nPos; staruno::Reference< starcontainer::XNameAccess > m_xAccess; - sal_Bool m_bListening; + bool m_bListening; public: OEnumerationByName(const staruno::Reference< starcontainer::XNameAccess >& _rxAccess); @@ -92,7 +92,7 @@ class COMPHELPER_DLLPUBLIC OEnumerationByIndex : private OEnumerationLock { sal_Int32 m_nPos; staruno::Reference< starcontainer::XIndexAccess > m_xAccess; - sal_Bool m_bListening; + bool m_bListening; public: OEnumerationByIndex(const staruno::Reference< starcontainer::XIndexAccess >& _rxAccess); diff --git a/include/comphelper/extract.hxx b/include/comphelper/extract.hxx index 04be9ec3f55b..6d401e66ae16 100644 --- a/include/comphelper/extract.hxx +++ b/include/comphelper/extract.hxx @@ -54,12 +54,12 @@ inline ::com::sun::star::uno::Any SAL_CALL int2enum( * @param rAny enum or int * @param sal_True if enum or int value was set else sal_False. */ -inline sal_Bool SAL_CALL enum2int( sal_Int32 & rnEnum, const ::com::sun::star::uno::Any & rAny ) +inline bool SAL_CALL enum2int( sal_Int32 & rnEnum, const ::com::sun::star::uno::Any & rAny ) { if (rAny.getValueTypeClass() == ::com::sun::star::uno::TypeClass_ENUM) { rnEnum = * reinterpret_cast< const int * >( rAny.getValue() ); - return sal_True; + return true; } return rAny >>= rnEnum; @@ -110,7 +110,7 @@ inline ::com::sun::star::uno::Any SAL_CALL enum2any( E eEnum ) * @return sal_True if any reference (including the null ref) was retrieved from any else sal_False. */ template< class T > -inline sal_Bool SAL_CALL extractInterface( +inline bool SAL_CALL extractInterface( ::com::sun::star::uno::Reference< T > & rxOut, const ::com::sun::star::uno::Any & rAny ) { @@ -124,7 +124,7 @@ inline sal_Bool SAL_CALL extractInterface( * a ::com::sun::star::lang::IllegalArgumentException is thrown * */ -inline sal_Bool SAL_CALL any2bool( const ::com::sun::star::uno::Any & rAny ) +inline bool SAL_CALL any2bool( const ::com::sun::star::uno::Any & rAny ) throw( ::com::sun::star::lang::IllegalArgumentException ) { if (rAny.getValueTypeClass() == ::com::sun::star::uno::TypeClass_BOOLEAN) @@ -146,7 +146,7 @@ inline sal_Bool SAL_CALL any2bool( const ::com::sun::star::uno::Any & rAny ) * @DEPRECATED : use makeAny< sal_Bool >() * */ -inline ::com::sun::star::uno::Any SAL_CALL bool2any( sal_Bool bBool ) +inline ::com::sun::star::uno::Any SAL_CALL bool2any( bool bBool ) { return ::com::sun::star::uno::Any( &bBool, ::getCppuBooleanType() ); } diff --git a/include/comphelper/interaction.hxx b/include/comphelper/interaction.hxx index 85cbc6acddb8..09e30e7d90af 100644 --- a/include/comphelper/interaction.hxx +++ b/include/comphelper/interaction.hxx @@ -43,19 +43,19 @@ namespace comphelper */ class OInteractionSelect { - sal_Bool m_bSelected : 1; /// indicates if the select event occurred + bool m_bSelected : 1; /// indicates if the select event occurred protected: - OInteractionSelect() : m_bSelected(sal_False) { } + OInteractionSelect() : m_bSelected(false) { } public: /// determines whether or not this handler was selected - sal_Bool wasSelected() const { return m_bSelected; } + bool wasSelected() const { return m_bSelected; } /// resets the state to "not selected", so you may reuse the handler - void reset() { m_bSelected = sal_False; } + void reset() { m_bSelected = false; } protected: - void implSelected() { m_bSelected = sal_True; } + void implSelected() { m_bSelected = true; } }; //========================================================================= diff --git a/include/comphelper/logging.hxx b/include/comphelper/logging.hxx index a9ebc86f1103..ce7b829e3779 100644 --- a/include/comphelper/logging.hxx +++ b/include/comphelper/logging.hxx @@ -57,7 +57,7 @@ namespace comphelper inline OUString convertLogArgToString( sal_Int32 _nValue ) { return OUString::number( _nValue ); } inline OUString convertLogArgToString( sal_Int16 _nValue ) { return OUString::number( _nValue ); } inline OUString convertLogArgToString( sal_Unicode _nValue ) { return OUString( _nValue ); } - inline OUString convertLogArgToString( sal_Bool _bValue ) { return OUString::boolean( _bValue ); } + inline OUString convertLogArgToString( bool _bValue ) { return OUString::boolean( _bValue ); } } } // namespace log::convert diff --git a/include/comphelper/mimeconfighelper.hxx b/include/comphelper/mimeconfighelper.hxx index c8fcfddaf81b..1203c2b6847e 100644 --- a/include/comphelper/mimeconfighelper.hxx +++ b/include/comphelper/mimeconfighelper.hxx @@ -73,7 +73,7 @@ public: const ::com::sun::star::uno::Sequence< sal_Int8 >& aClassID, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xObjectProps ); - sal_Bool GetVerbByShortcut( const OUString& aVerbShortcut, + bool GetVerbByShortcut( const OUString& aVerbShortcut, ::com::sun::star::embed::VerbDescriptor& aDescriptor ); OUString GetExplicitlyRegisteredObjClassID( const OUString& aMediaType ); @@ -106,7 +106,7 @@ public: OUString UpdateMediaDescriptorWithFilterName( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aMediaDescr, - sal_Bool bIgnoreType ); + bool bIgnoreType ); OUString UpdateMediaDescriptorWithFilterName( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aMediaDescr, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aObject ); @@ -127,7 +127,7 @@ public: sal_Int32 nMustFlags, sal_Int32 nDontFlags ); - static sal_Bool ClassIDsEqual( const ::com::sun::star::uno::Sequence< sal_Int8 >& aClassID1, + static bool ClassIDsEqual( const ::com::sun::star::uno::Sequence< sal_Int8 >& aClassID1, const ::com::sun::star::uno::Sequence< sal_Int8 >& aClassID2 ); static ::com::sun::star::uno::Sequence< sal_Int8 > GetSequenceClassID( sal_uInt32 n1, sal_uInt16 n2, sal_uInt16 n3, sal_uInt8 b8, sal_uInt8 b9, sal_uInt8 b10, sal_uInt8 b11, diff --git a/include/comphelper/propagg.hxx b/include/comphelper/propagg.hxx index 78be2ee22151..ad7cb4e3f528 100644 --- a/include/comphelper/propagg.hxx +++ b/include/comphelper/propagg.hxx @@ -154,7 +154,7 @@ public: /** returns information about a property given by handle */ - sal_Bool getPropertyByHandle( sal_Int32 _nHandle, ::com::sun::star::beans::Property& _rProperty ) const; + bool getPropertyByHandle( sal_Int32 _nHandle, ::com::sun::star::beans::Property& _rProperty ) const; enum PropertyOrigin @@ -206,7 +206,7 @@ protected: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet> m_xAggregateFastSet; internal::PropertyForwarder* m_pForwarder; - sal_Bool m_bListening : 1; + bool m_bListening : 1; public: OPropertySetAggregationHelper( ::cppu::OBroadcastHelper& rBHelper ); diff --git a/include/comphelper/property.hxx b/include/comphelper/property.hxx index 911df7fd9f56..ab2e795902c2 100644 --- a/include/comphelper/property.hxx +++ b/include/comphelper/property.hxx @@ -94,7 +94,7 @@ COMPHELPER_DLLPUBLIC void ModifyPropertyAttributes(staruno::Sequence<starbeans:: //------------------------------------------------------------------ /** check if the given set has the given property. */ -COMPHELPER_DLLPUBLIC sal_Bool hasProperty(const OUString& _rName, const staruno::Reference<starbeans::XPropertySet>& _rxSet); +COMPHELPER_DLLPUBLIC bool hasProperty(const OUString& _rName, const staruno::Reference<starbeans::XPropertySet>& _rxSet); //------------------------------------------------------------------ /** copy properties between property sets, in compliance with the property @@ -117,16 +117,16 @@ COMPHELPER_DLLPUBLIC void copyProperties(const staruno::Reference<starbeans::XPr @exception InvalidArgumentException thrown if the value could not be converted to the requested type (which is the template argument) */ template <typename T> -sal_Bool tryPropertyValue(staruno::Any& /*out*/_rConvertedValue, staruno::Any& /*out*/_rOldValue, const staruno::Any& _rValueToSet, const T& _rCurrentValue) +bool tryPropertyValue(staruno::Any& /*out*/_rConvertedValue, staruno::Any& /*out*/_rOldValue, const staruno::Any& _rValueToSet, const T& _rCurrentValue) { - sal_Bool bModified(sal_False); + bool bModified(false); T aNewValue = T(); ::cppu::convertPropertyValue(aNewValue, _rValueToSet); if (aNewValue != _rCurrentValue) { _rConvertedValue <<= aNewValue; _rOldValue <<= _rCurrentValue; - bModified = sal_True; + bModified = true; } return bModified; } @@ -141,13 +141,13 @@ sal_Bool tryPropertyValue(staruno::Any& /*out*/_rConvertedValue, staruno::Any& / @exception InvalidArgumentException thrown if the value could not be converted to the requested type (which is the template argument) */ template <class ENUMTYPE> -sal_Bool tryPropertyValueEnum(staruno::Any& /*out*/_rConvertedValue, staruno::Any& /*out*/_rOldValue, const staruno::Any& _rValueToSet, const ENUMTYPE& _rCurrentValue) +bool tryPropertyValueEnum(staruno::Any& /*out*/_rConvertedValue, staruno::Any& /*out*/_rOldValue, const staruno::Any& _rValueToSet, const ENUMTYPE& _rCurrentValue) { if (cppu::getTypeFavourUnsigned(&_rCurrentValue).getTypeClass() != staruno::TypeClass_ENUM) return tryPropertyValue(_rConvertedValue, _rOldValue, _rValueToSet, _rCurrentValue); - sal_Bool bModified(sal_False); + bool bModified(false); ENUMTYPE aNewValue; ::cppu::any2enum(aNewValue, _rValueToSet); // will throw an exception if not convertible @@ -156,7 +156,7 @@ sal_Bool tryPropertyValueEnum(staruno::Any& /*out*/_rConvertedValue, staruno::An { _rConvertedValue <<= aNewValue; _rOldValue <<= _rCurrentValue; - bModified = sal_True; + bModified = true; } return bModified; } @@ -170,16 +170,16 @@ sal_Bool tryPropertyValueEnum(staruno::Any& /*out*/_rConvertedValue, staruno::An sal_False, if the value could be converted and has not changed @exception InvalidArgumentException thrown if the value could not be converted to a boolean type */ -inline sal_Bool tryPropertyValue(staruno::Any& /*out*/_rConvertedValue, staruno::Any& /*out*/_rOldValue, const staruno::Any& _rValueToSet, sal_Bool _bCurrentValue) +inline bool tryPropertyValue(staruno::Any& /*out*/_rConvertedValue, staruno::Any& /*out*/_rOldValue, const staruno::Any& _rValueToSet, bool _bCurrentValue) { - sal_Bool bModified(sal_False); + bool bModified(false); sal_Bool bNewValue(sal_False); ::cppu::convertPropertyValue(bNewValue, _rValueToSet); - if (bNewValue != _bCurrentValue) + if (bool(bNewValue) != _bCurrentValue) { _rConvertedValue.setValue(&bNewValue, ::getBooleanCppuType()); _rOldValue.setValue(&_bCurrentValue, ::getBooleanCppuType()); - bModified = sal_True; + bModified = true; } return bModified; } @@ -194,7 +194,7 @@ inline sal_Bool tryPropertyValue(staruno::Any& /*out*/_rConvertedValue, staruno: sal_False, if the value could be converted and has not changed @exception InvalidArgumentException thrown if the value could not be converted to the requested type (which is the template argument) */ -COMPHELPER_DLLPUBLIC sal_Bool tryPropertyValue(staruno::Any& _rConvertedValue, staruno::Any& _rOldValue, const staruno::Any& _rValueToSet, const staruno::Any& _rCurrentValue, const staruno::Type& _rExpectedType); +COMPHELPER_DLLPUBLIC bool tryPropertyValue(staruno::Any& _rConvertedValue, staruno::Any& _rOldValue, const staruno::Any& _rValueToSet, const staruno::Any& _rCurrentValue, const staruno::Type& _rExpectedType); //......................................................................... } diff --git a/include/comphelper/propertycontainerhelper.hxx b/include/comphelper/propertycontainerhelper.hxx index a70b73aea26c..821903de3639 100644 --- a/include/comphelper/propertycontainerhelper.hxx +++ b/include/comphelper/propertycontainerhelper.hxx @@ -85,7 +85,7 @@ private: typedef Properties::const_iterator ConstPropertiesIterator; Properties m_aProperties; - sal_Bool m_bUnused; + bool m_bUnused; protected: OPropertyContainerHelper(); @@ -139,14 +139,14 @@ protected: /// checkes whether a property with the given handle has been registered - sal_Bool isRegisteredProperty( sal_Int32 _nHandle ) const; + bool isRegisteredProperty( sal_Int32 _nHandle ) const; /// checkes whether a property with the given name has been registered - sal_Bool isRegisteredProperty( const OUString& _rName ) const; + bool isRegisteredProperty( const OUString& _rName ) const; // helper for implementing OPropertySetHelper overridables - sal_Bool convertFastPropertyValue( + bool convertFastPropertyValue( ::com::sun::star::uno::Any & rConvertedValue, ::com::sun::star::uno::Any & rOldValue, sal_Int32 nHandle, diff --git a/include/comphelper/propmultiplex.hxx b/include/comphelper/propmultiplex.hxx index 02799f9ab049..83b9a905c2cf 100644 --- a/include/comphelper/propmultiplex.hxx +++ b/include/comphelper/propmultiplex.hxx @@ -75,13 +75,13 @@ namespace comphelper ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> m_xSet; OPropertyChangeListener* m_pListener; sal_Int32 m_nLockCount; - sal_Bool m_bListening : 1; - sal_Bool m_bAutoSetRelease : 1; + bool m_bListening : 1; + bool m_bAutoSetRelease : 1; virtual ~OPropertyChangeMultiplexer(); public: - OPropertyChangeMultiplexer(OPropertyChangeListener* _pListener, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxSet, sal_Bool _bAutoReleaseSet = sal_True); + OPropertyChangeMultiplexer(OPropertyChangeListener* _pListener, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxSet, bool _bAutoReleaseSet = true); // XEventListener virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw( ::com::sun::star::uno::RuntimeException); diff --git a/include/comphelper/seqstream.hxx b/include/comphelper/seqstream.hxx index ecc9e9030914..00677549ab96 100644 --- a/include/comphelper/seqstream.hxx +++ b/include/comphelper/seqstream.hxx @@ -87,7 +87,7 @@ protected: // the size of the virtual stream. This is not the size of the sequence, but the number of bytes written // into the stream at a given moment. - sal_Bool m_bConnected; + bool m_bConnected; // closeOutput has been called ? ::osl::Mutex m_aMutex; diff --git a/include/comphelper/sequence.hxx b/include/comphelper/sequence.hxx index 3cafedf0f622..38947231b713 100644 --- a/include/comphelper/sequence.hxx +++ b/include/comphelper/sequence.hxx @@ -38,7 +38,7 @@ namespace comphelper /** search the given string within the given sequence, return the positions where it was found. if _bOnlyFirst is sal_True, only the first occurrence will be returned. */ - COMPHELPER_DLLPUBLIC staruno::Sequence<sal_Int16> findValue(const staruno::Sequence< OUString >& _rList, const OUString& _rValue, sal_Bool _bOnlyFirst = sal_False); + COMPHELPER_DLLPUBLIC staruno::Sequence<sal_Int16> findValue(const staruno::Sequence< OUString >& _rList, const OUString& _rValue, bool _bOnlyFirst = false); namespace internal { @@ -126,7 +126,7 @@ namespace comphelper */ OSequenceIterator(const ::com::sun::star::uno::Any& _rSequenceAny); - sal_Bool hasMoreElements() const; + bool hasMoreElements() const; ::com::sun::star::uno::Any nextElement(); private: @@ -151,7 +151,7 @@ namespace comphelper ,m_pCurrent(NULL) { ::com::sun::star::uno::Sequence< TYPE > aContainer; - sal_Bool bSuccess = _rSequenceAny >>= aContainer; + bool bSuccess = _rSequenceAny >>= aContainer; OSL_ENSURE(bSuccess, "OSequenceIterator::OSequenceIterator: invalid Any!"); (void)bSuccess; construct(aContainer); @@ -168,7 +168,7 @@ namespace comphelper //--------------------------------------------------------------------- template <class TYPE> - sal_Bool OSequenceIterator<TYPE>::hasMoreElements() const + bool OSequenceIterator<TYPE>::hasMoreElements() const { return m_pCurrent - m_pElements < m_nLen; } diff --git a/include/comphelper/sequenceashashmap.hxx b/include/comphelper/sequenceashashmap.hxx index f33bdd52360c..f5e495f2e1cc 100644 --- a/include/comphelper/sequenceashashmap.hxx +++ b/include/comphelper/sequenceashashmap.hxx @@ -172,7 +172,7 @@ class COMPHELPER_DLLPUBLIC SequenceAsHashMap : public SequenceAsHashMapBase @return A const Any, which contains all items of this map. */ - const ::com::sun::star::uno::Any getAsConstAny(::sal_Bool bAsPropertyValue) const; + const ::com::sun::star::uno::Any getAsConstAny(bool bAsPropertyValue) const; //--------------------------------------- /** @short return this map instance to as a @@ -262,16 +262,16 @@ class COMPHELPER_DLLPUBLIC SequenceAsHashMap : public SequenceAsHashMapBase FALSE if it already exists. */ template< class TValueType > - sal_Bool createItemIfMissing(const OUString& sKey , + bool createItemIfMissing(const OUString& sKey , const TValueType& aValue) { if (find(sKey) == end()) { (*this)[sKey] = ::com::sun::star::uno::makeAny(aValue); - return sal_True; + return true; } - return sal_False; + return false; } //--------------------------------------- @@ -290,7 +290,7 @@ class COMPHELPER_DLLPUBLIC SequenceAsHashMap : public SequenceAsHashMapBase TRUE if all items of Rcheck could be found in these map; FALSE otherwise. */ - sal_Bool match(const SequenceAsHashMap& rCheck) const; + bool match(const SequenceAsHashMap& rCheck) const; //--------------------------------------- /** @short merge all values from the given map into diff --git a/include/comphelper/stillreadwriteinteraction.hxx b/include/comphelper/stillreadwriteinteraction.hxx index dee1cfaa0f31..2b758ed3fc28 100644 --- a/include/comphelper/stillreadwriteinteraction.hxx +++ b/include/comphelper/stillreadwriteinteraction.hxx @@ -34,16 +34,16 @@ private: static const sal_Int32 HANDLE_INTERACTIVEIOEXCEPTION = 0; static const sal_Int32 HANDLE_UNSUPPORTEDDATASINKEXCEPTION = 1; - sal_Bool m_bUsed; - sal_Bool m_bHandledByMySelf; - sal_Bool m_bHandledByInternalHandler; + bool m_bUsed; + bool m_bHandledByMySelf; + bool m_bHandledByInternalHandler; public: StillReadWriteInteraction(const com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler >& xHandler); void resetInterceptions(); void resetErrorStates(); - sal_Bool wasWriteError(); + bool wasWriteError(); private: virtual ucbhelper::InterceptedInteraction::EInterceptionState intercepted(const ::ucbhelper::InterceptedInteraction::InterceptedRequest& aRequest, diff --git a/include/comphelper/stl_types.hxx b/include/comphelper/stl_types.hxx index 52a558760a7b..73726f7c7564 100644 --- a/include/comphelper/stl_types.hxx +++ b/include/comphelper/stl_types.hxx @@ -60,15 +60,15 @@ public: //------------------------------------------------------------------------ class UStringMixEqual: public std::binary_function<OUString, OUString, bool> { - sal_Bool m_bCaseSensitive; + bool m_bCaseSensitive; public: - UStringMixEqual(sal_Bool bCaseSensitive = sal_True):m_bCaseSensitive(bCaseSensitive){} + UStringMixEqual(bool bCaseSensitive = true):m_bCaseSensitive(bCaseSensitive){} bool operator() (const OUString& lhs, const OUString& rhs) const { return m_bCaseSensitive ? lhs.equals( rhs ) : lhs.equalsIgnoreAsciiCase( rhs ); } - sal_Bool isCaseSensitive() const {return m_bCaseSensitive;} + bool isCaseSensitive() const {return m_bCaseSensitive;} }; //------------------------------------------------------------------------ class TPropertyValueEqualFunctor : public ::std::binary_function< ::com::sun::star::beans::PropertyValue,OUString,bool> diff --git a/include/comphelper/storagehelper.hxx b/include/comphelper/storagehelper.hxx index 1bf5f9a5b8c3..35255ada5185 100644 --- a/include/comphelper/storagehelper.hxx +++ b/include/comphelper/storagehelper.hxx @@ -148,7 +148,7 @@ public: sal_Int32 nStorageMode, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext = ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >(), - sal_Bool bRepairStorage = sal_False ) + bool bRepairStorage = false ) throw ( ::com::sun::star::uno::Exception ); static ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > @@ -157,7 +157,7 @@ public: const ::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream >& xStream, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext = ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >(), - sal_Bool bRepairStorage = sal_False ) + bool bRepairStorage = false ) throw ( ::com::sun::star::uno::Exception ); static ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > @@ -167,17 +167,17 @@ public: sal_Int32 nStorageMode = ::com::sun::star::embed::ElementModes::READWRITE, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext = ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >(), - sal_Bool bRepairStorage = sal_False ) + bool bRepairStorage = false ) throw ( ::com::sun::star::uno::Exception ); static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > CreatePackageEncryptionData( const OUString& aPassword ); - static sal_Bool IsValidZipEntryFileName( const OUString& aName, sal_Bool bSlashAllowed ); - static sal_Bool IsValidZipEntryFileName( const sal_Unicode *pChar, sal_Int32 nLength, sal_Bool bSlashAllowed ); + static bool IsValidZipEntryFileName( const OUString& aName, bool bSlashAllowed ); + static bool IsValidZipEntryFileName( const sal_Unicode *pChar, sal_Int32 nLength, bool bSlashAllowed ); - static sal_Bool PathHasSegment( const OUString& aPath, const OUString& aSegment ); + static bool PathHasSegment( const OUString& aPath, const OUString& aSegment ); // Methods to allow easy use of hierachical names inside storages diff --git a/include/comphelper/types.hxx b/include/comphelper/types.hxx index b57ff3595c89..3adf5cc290d6 100644 --- a/include/comphelper/types.hxx +++ b/include/comphelper/types.hxx @@ -51,20 +51,20 @@ namespace comphelper The comparison is deep, means if one of the Any's contains an Any which contains an Any ..., this is resolved <br/> Other types recognized currently : FontDescriptor, ::com::sun::star::util::Date/Tim/DateTime, staruno::Sequence<sal_Int8> */ - COMPHELPER_DLLPUBLIC sal_Bool compare(const staruno::Any& rLeft, const staruno::Any& rRight); + COMPHELPER_DLLPUBLIC bool compare(const staruno::Any& rLeft, const staruno::Any& rRight); //------------------------------------------------------------------------- /** compare two FontDescriptor's */ - COMPHELPER_DLLPUBLIC sal_Bool operator ==(const starawt::FontDescriptor& _rLeft, const starawt::FontDescriptor& _rRight); - inline sal_Bool operator !=(const starawt::FontDescriptor& _rLeft, const starawt::FontDescriptor& _rRight) + COMPHELPER_DLLPUBLIC bool operator ==(const starawt::FontDescriptor& _rLeft, const starawt::FontDescriptor& _rRight); + inline bool operator !=(const starawt::FontDescriptor& _rLeft, const starawt::FontDescriptor& _rRight) { return !(_rLeft == _rRight); } //------------------------------------------------------------------------- /// returns sal_True if objects of the types given are "compatible" - COMPHELPER_DLLPUBLIC sal_Bool isAssignableFrom(const staruno::Type& _rAssignable, const staruno::Type& _rFrom); + COMPHELPER_DLLPUBLIC bool isAssignableFrom(const staruno::Type& _rAssignable, const staruno::Type& _rFrom); //------------------------------------------------------------------------- /** just a small shortcut ... @@ -75,7 +75,7 @@ namespace comphelper So this function is nearly senseless .... */ template <class TYPE> - sal_Bool isA(const staruno::Type& _rType, TYPE* pDummy) + bool isA(const staruno::Type& _rType, TYPE* pDummy) { return _rType.equals(cppu::getTypeFavourUnsigned(pDummy)); } @@ -85,7 +85,7 @@ namespace comphelper same comment as for the other isA .... */ template <class TYPE> - sal_Bool isA(const staruno::Any& _rVal, TYPE* pDummy) + bool isA(const staruno::Any& _rVal, TYPE* pDummy) { return _rVal.getValueType().equals( cppu::getTypeFavourUnsigned(pDummy)); @@ -95,7 +95,7 @@ namespace comphelper /** check if a type you have at hand at runtime is equal to another type you have at compile time */ template <class TYPE> - sal_Bool isAReference(const staruno::Any& _rVal, TYPE*) + bool isAReference(const staruno::Any& _rVal, TYPE*) { return _rVal.getValueType().equals( cppu::getTypeFavourUnsigned( @@ -117,7 +117,7 @@ namespace comphelper } //------------------------------------------------------------------------- template <class TYPE> - sal_Bool getImplementation(TYPE*& _pObject, const staruno::Reference< staruno::XInterface >& _rxIFace) + bool getImplementation(TYPE*& _pObject, const staruno::Reference< staruno::XInterface >& _rxIFace) { _pObject = NULL; staruno::Reference< starlang::XUnoTunnel > xTunnel(_rxIFace, staruno::UNO_QUERY); @@ -153,16 +153,16 @@ namespace comphelper COMPHELPER_DLLPUBLIC double getDouble(const staruno::Any& _rAny); COMPHELPER_DLLPUBLIC float getFloat(const staruno::Any& _rAny); COMPHELPER_DLLPUBLIC OUString getString(const staruno::Any& _rAny); - COMPHELPER_DLLPUBLIC sal_Bool getBOOL(const staruno::Any& _rAny); + COMPHELPER_DLLPUBLIC bool getBOOL(const staruno::Any& _rAny); COMPHELPER_DLLPUBLIC sal_Int32 getEnumAsINT32(const staruno::Any& _rAny) throw(starlang::IllegalArgumentException); //= replacement of some former UsrAny.setXXX methods - can be used with rvalues - inline void setBOOL(staruno::Any& _rAny, sal_Bool _b) + inline void setBOOL(staruno::Any& _rAny, bool _b) { _rAny.setValue(&_b, ::getBooleanCppuType()); } //= extension of ::cppu::makeAny() - inline staruno::Any makeBoolAny(sal_Bool _b) + inline staruno::Any makeBoolAny(bool _b) { return staruno::Any(&_b, ::getBooleanCppuType()); } //......................................................................... diff --git a/include/comphelper/uno3.hxx b/include/comphelper/uno3.hxx index eb159b8b7662..ffe0be0a6a99 100644 --- a/include/comphelper/uno3.hxx +++ b/include/comphelper/uno3.hxx @@ -230,7 +230,7 @@ namespace comphelper .... */ template <class iface> - sal_Bool query_aggregation(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation >& _rxAggregate, ::com::sun::star::uno::Reference<iface>& _rxOut) + bool query_aggregation(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation >& _rxAggregate, ::com::sun::star::uno::Reference<iface>& _rxOut) { _rxOut = static_cast<iface*>(NULL); if (_rxAggregate.is()) @@ -250,7 +250,7 @@ namespace comphelper .... */ template <class iface> - sal_Bool query_interface(const InterfaceRef& _rxObject, ::com::sun::star::uno::Reference<iface>& _rxOut) + bool query_interface(const InterfaceRef& _rxObject, ::com::sun::star::uno::Reference<iface>& _rxOut) { _rxOut = static_cast<iface*>(NULL); if (_rxObject.is()) @@ -263,7 +263,7 @@ namespace comphelper return _rxOut.is(); } } - return sal_False; + return false; } //......................................................................... diff --git a/oox/source/helper/zipstorage.cxx b/oox/source/helper/zipstorage.cxx index a93045b10f20..c4cbdc5e8a5a 100644 --- a/oox/source/helper/zipstorage.cxx +++ b/oox/source/helper/zipstorage.cxx @@ -62,7 +62,7 @@ ZipStorage::ZipStorage( const Reference< XComponentContext >& rxContext, const R */ mxStorage = ::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream( ZIP_STORAGE_FORMAT_STRING, rxInStream, rxContext, - sal_False ); // DEV300_m80: Was sal_True, but DOCX and others did not load + false ); // DEV300_m80: Was sal_True, but DOCX and others did not load } catch (Exception const& e) { @@ -80,7 +80,7 @@ ZipStorage::ZipStorage( const Reference< XComponentContext >& rxContext, const R { const sal_Int32 nOpenMode = ElementModes::READWRITE | ElementModes::TRUNCATE; mxStorage = ::comphelper::OStorageHelper::GetStorageOfFormatFromStream( - OFOPXML_STORAGE_FORMAT_STRING, rxStream, nOpenMode, rxContext, sal_True ); + OFOPXML_STORAGE_FORMAT_STRING, rxStream, nOpenMode, rxContext, true ); } catch (Exception const& e) { diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 9a6d45f05708..a3baf893848a 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -2423,7 +2423,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openStreamElement( throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } - if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, sal_False ) ) + if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, false ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aStreamName == "_rels" ) @@ -2538,7 +2538,7 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement( throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } - if ( aStorName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStorName, sal_False ) ) + if ( aStorName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStorName, false ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aStorName == "_rels" ) @@ -2691,7 +2691,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneStreamElement( const OUStr throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } - if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, sal_False ) ) + if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, false ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aStreamName == "_rels" ) @@ -2853,7 +2853,7 @@ void SAL_CALL OStorage::copyStorageElementLastCommitTo( throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } - if ( aStorName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStorName, sal_False ) ) + if ( aStorName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStorName, false ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aStorName == "_rels" ) @@ -2945,7 +2945,7 @@ sal_Bool SAL_CALL OStorage::isStreamElement( const OUString& aElementName ) throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } - if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) ) + if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aElementName == "_rels" ) @@ -3012,7 +3012,7 @@ sal_Bool SAL_CALL OStorage::isStorageElement( const OUString& aElementName ) throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } - if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) ) + if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aElementName == "_rels" ) @@ -3083,7 +3083,7 @@ void SAL_CALL OStorage::removeElement( const OUString& aElementName ) throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } - if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) ) + if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aElementName == "_rels" ) @@ -3175,8 +3175,8 @@ void SAL_CALL OStorage::renameElement( const OUString& aElementName, const OUStr throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } - if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) - || aNewName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aNewName, sal_False ) ) + if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false ) + || aNewName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aNewName, false ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && ( aElementName == "_rels" || aNewName == "_rels" ) ) @@ -3279,8 +3279,8 @@ void SAL_CALL OStorage::copyElementTo( const OUString& aElementName, throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } - if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) - || aNewName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aNewName, sal_False ) ) + if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false ) + || aNewName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aNewName, false ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( !xDest.is() ) @@ -3380,8 +3380,8 @@ void SAL_CALL OStorage::moveElementTo( const OUString& aElementName, throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } - if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) - || aNewName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aNewName, sal_False ) ) + if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false ) + || aNewName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aNewName, false ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( !xDest.is() || xDest == uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ) ) @@ -3692,7 +3692,7 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getPlainRawStreamElement( if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML ) throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // the interface is not supported and must not be accessible - if ( sStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( sStreamName, sal_False ) ) + if ( sStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( sStreamName, false ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); uno::Reference < io::XInputStream > xTempIn; @@ -3799,7 +3799,7 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getRawEncrStreamElement( if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE ) throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() ); - if ( sStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( sStreamName, sal_False ) ) + if ( sStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( sStreamName, false ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); uno::Reference < io::XInputStream > xTempIn; @@ -3916,7 +3916,7 @@ void SAL_CALL OStorage::insertRawEncrStreamElement( const OUString& aStreamName, if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE ) throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() ); - if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, sal_False ) ) + if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, false ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( !xInStream.is() ) @@ -4252,7 +4252,7 @@ uno::Any SAL_CALL OStorage::getByName( const OUString& aName ) throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } - if ( aName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aName, sal_False ) ) + if ( aName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aName, false ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aName == "_rels" ) @@ -5501,7 +5501,7 @@ void SAL_CALL OStorage::insertStreamElementDirect( throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } - if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, sal_False ) ) + if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, false ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aStreamName == "_rels" ) @@ -5592,8 +5592,8 @@ void SAL_CALL OStorage::copyElementDirectlyTo( throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } - if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) - || aNewName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aNewName, sal_False ) ) + if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false ) + || aNewName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aNewName, false ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( !xDest.is() || xDest == uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ) ) @@ -5845,7 +5845,7 @@ uno::Any SAL_CALL OStorage::getElementPropertyValue( const OUString& aElementNam throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } - if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) ) + if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aElementName == "_rels" ) @@ -5946,7 +5946,7 @@ void SAL_CALL OStorage::copyStreamElementData( const OUString& aStreamName, cons throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } - if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, sal_False ) ) + if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, false ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aStreamName == "_rels" ) @@ -6030,7 +6030,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openStreamEle throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } - if ( aStreamPath.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamPath, sal_True ) ) + if ( aStreamPath.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamPath, true ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) @@ -6100,7 +6100,7 @@ void SAL_CALL OStorage::removeStreamElementByHierarchicalName( const OUString& a throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } - if ( aStreamPath.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamPath, sal_True ) ) + if ( aStreamPath.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamPath, true ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) ) @@ -6137,7 +6137,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncrypted if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE ) throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() ); - if ( aStreamPath.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamPath, sal_True ) ) + if ( aStreamPath.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamPath, true ) ) throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( !aEncryptionData.getLength() ) diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index 9c4b2bbfbda8..76ff293aa926 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -852,7 +852,7 @@ sal_Int32 ZipFile::readCEN() aEntry.nPathLen, RTL_TEXTENCODING_UTF8 ); - if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( aEntry.sPath, sal_True ) ) + if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( aEntry.sPath, true ) ) throw ZipException("Zip entry has an invalid name.", uno::Reference < XInterface > () ); aMemGrabber.skipBytes( aEntry.nPathLen + aEntry.nExtraLen + nCommentLen ); diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx index 3ab53baaf299..14c5f5766fc8 100644 --- a/package/source/zipapi/ZipOutputStream.cxx +++ b/package/source/zipapi/ZipOutputStream.cxx @@ -316,7 +316,7 @@ static sal_uInt32 getTruncated( sal_Int64 nNum, bool *pIsTruncated ) void ZipOutputStream::writeCEN( const ZipEntry &rEntry ) throw(IOException, RuntimeException) { - if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( rEntry.sPath, sal_True ) ) + if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( rEntry.sPath, true ) ) throw IOException("Unexpected character is used in file name.", uno::Reference< XInterface >() ); OString sUTF8Name = OUStringToOString( rEntry.sPath, RTL_TEXTENCODING_UTF8 ); @@ -387,7 +387,7 @@ void ZipOutputStream::writeEXT( const ZipEntry &rEntry ) sal_Int32 ZipOutputStream::writeLOC( const ZipEntry &rEntry ) throw(IOException, RuntimeException) { - if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( rEntry.sPath, sal_True ) ) + if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( rEntry.sPath, true ) ) throw IOException("Unexpected character is used in file name.", uno::Reference< XInterface >() ); OString sUTF8Name = OUStringToOString( rEntry.sPath, RTL_TEXTENCODING_UTF8 ); diff --git a/package/source/zippackage/ZipPackageEntry.cxx b/package/source/zippackage/ZipPackageEntry.cxx index 72bfefa4edae..6ceaea6dcd48 100644 --- a/package/source/zippackage/ZipPackageEntry.cxx +++ b/package/source/zippackage/ZipPackageEntry.cxx @@ -67,7 +67,7 @@ void SAL_CALL ZipPackageEntry::setName( const OUString& aName ) // unfortunately no other exception than RuntimeException can be thrown here // usually the package is used through storage implementation, the problem should be detected there - if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( aName, sal_True ) ) + if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( aName, true ) ) throw RuntimeException(THROW_WHERE "Unexpected character is used in file name.", uno::Reference< XInterface >() ); msName = aName; diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index b8ea4b614a38..0d284bb9f35d 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -844,7 +844,7 @@ uno::Sequence< OUString > SAL_CALL OReportDefinition::getSupportedServiceNames( aSupported = m_aProps->m_xServiceInfo->getSupportedServiceNames(); // append our own service, if necessary - if ( 0 == ::comphelper::findValue( aSupported, SERVICE_REPORTDEFINITION, sal_True ).getLength() ) + if ( 0 == ::comphelper::findValue( aSupported, SERVICE_REPORTDEFINITION, true ).getLength() ) { sal_Int32 nLen = aSupported.getLength(); aSupported.realloc( nLen + 1 ); @@ -1571,9 +1571,9 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS { sal_Bool bPersist = sal_False; if ( _xStorageToSaveTo == m_pImpl->m_xStorage ) - bPersist = m_pImpl->m_pObjectContainer->StoreChildren(sal_True,sal_False); + bPersist = m_pImpl->m_pObjectContainer->StoreChildren(true,false); else - bPersist = m_pImpl->m_pObjectContainer->StoreAsChildren(sal_True,sal_True,_xStorageToSaveTo); + bPersist = m_pImpl->m_pObjectContainer->StoreAsChildren(true,true,_xStorageToSaveTo); if( bPersist ) m_pImpl->m_pObjectContainer->SetPersistentEntries(m_pImpl->m_xStorage); diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 5ff6428e3e0e..fb66d744749c 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -3012,7 +3012,7 @@ void OReportController::insertGraphic() aDialog.SetTitle( sTitle ); uno::Reference< ui::dialogs::XFilePickerControlAccess > xController(aDialog.GetFilePicker(), UNO_QUERY_THROW); - xController->setValue(ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0, ::cppu::bool2any(sal_True)); + xController->setValue(ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0, ::cppu::bool2any(true)); xController->enableControl(ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, sal_False/*sal_True*/); sal_Bool bLink = sal_True; xController->setValue( ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, ::cppu::bool2any( bLink ) ); diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index 0e97eda57cd4..916fc7b3f0fd 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -209,7 +209,7 @@ bool ScDocShell::KillFile( const INetURLObject& rURL ) uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); aCnt.executeCommand( OUString( "delete" ), - comphelper::makeBoolAny( sal_True ) ); + comphelper::makeBoolAny( true ) ); } catch( uno::Exception& ) { diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx index 4cb25d8532ab..3928f304cb7a 100644 --- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx +++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx @@ -817,11 +817,11 @@ uno::Reference< XAccessibleContext > } // return sal_False in default case -sal_Bool +bool AccessibleDocumentViewBase::implIsSelected( sal_Int32 ) throw (uno::RuntimeException) { - return( sal_False ); + return( false ); } // return nothing in default case diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx index 1b7ccd4d0d59..9793ccea935a 100644 --- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx +++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx @@ -693,7 +693,7 @@ OUString /** Return selection state of specified child */ -sal_Bool +bool AccessibleDrawDocumentView::implIsSelected( sal_Int32 nAccessibleChildIndex ) throw (uno::RuntimeException) { diff --git a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx index 687ae6fa3a2a..da429f077a55 100644 --- a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx +++ b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx @@ -275,7 +275,7 @@ private: throw ( ::com::sun::star::uno::RuntimeException ); // return sal_False in default case - virtual sal_Bool + virtual bool implIsSelected( sal_Int32 nAccessibleChildIndex ) throw (::com::sun::star::uno::RuntimeException); diff --git a/sd/source/ui/inc/AccessibleDrawDocumentView.hxx b/sd/source/ui/inc/AccessibleDrawDocumentView.hxx index 1fd839ccb7e2..3d8e72cf742d 100644 --- a/sd/source/ui/inc/AccessibleDrawDocumentView.hxx +++ b/sd/source/ui/inc/AccessibleDrawDocumentView.hxx @@ -123,7 +123,7 @@ protected: throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool + virtual bool implIsSelected( sal_Int32 nAccessibleChildIndex ) throw (::com::sun::star::uno::RuntimeException); diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx index 4d74e08182cc..37622afc65a0 100644 --- a/sfx2/source/doc/DocumentMetadataAccess.cxx +++ b/sfx2/source/doc/DocumentMetadataAccess.cxx @@ -236,7 +236,7 @@ static bool isFileNameValid(const OUString & i_rFileName) segment == "." || // no . segments segment == ".." || // no .. segments !::comphelper::OStorageHelper::IsValidZipEntryFileName( - segment, sal_False)) // no invalid characters + segment, false)) // no invalid characters return false; } while (idx >= 0); return true; diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx index 5338ec9c59c9..1610923f989c 100644 --- a/sfx2/source/doc/oleprops.cxx +++ b/sfx2/source/doc/oleprops.cxx @@ -962,7 +962,7 @@ bool SfxOleSection::SetAnyValue( sal_Int32 nPropId, const Any& rValue ) ::com::sun::star::util::Date aApiDate; if( rValue.getValueType() == ::getBooleanCppuType() ) - SetBoolValue( nPropId, ::comphelper::getBOOL( rValue ) == sal_True ); + SetBoolValue( nPropId, ::comphelper::getBOOL( rValue ) ); else if( rValue >>= nInt32 ) SetInt32Value( nPropId, nInt32 ); else if( rValue >>= fDouble ) diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index f6944a9d3dee..b9b644a495fb 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -198,7 +198,7 @@ static sal_Bool AskPasswordToModify_Impl( const uno::Reference< task::XInteracti bMSType ? ::comphelper::DocPasswordRequestType_MS : ::comphelper::DocPasswordRequestType_STANDARD, bFirstTime ? ::com::sun::star::task::PasswordRequestMode_PASSWORD_ENTER : ::com::sun::star::task::PasswordRequestMode_PASSWORD_REENTER, aPath, - sal_True ) ); + true ) ); uno::Reference< com::sun::star::task::XInteractionRequest > rRequest( pPasswordRequest.get() ); xHandler->handle( rRequest ); diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx index 4068de0245fb..44ea57bbfe87 100644 --- a/svx/source/accessibility/charmapacc.cxx +++ b/svx/source/accessibility/charmapacc.cxx @@ -317,7 +317,7 @@ void SAL_CALL SvxShowCharSetAcc::disposing() IMPLEMENT_FORWARD_XINTERFACE2( SvxShowCharSetAcc, OAccessibleSelectionHelper, OAccessibleHelper_Base ) IMPLEMENT_FORWARD_XTYPEPROVIDER2( SvxShowCharSetAcc, OAccessibleSelectionHelper, OAccessibleHelper_Base ) // ----------------------------------------------------------------------- -sal_Bool SvxShowCharSetAcc::implIsSelected( sal_Int32 nAccessibleChildIndex ) throw (RuntimeException) +bool SvxShowCharSetAcc::implIsSelected( sal_Int32 nAccessibleChildIndex ) throw (RuntimeException) { return m_pParent && m_pParent->getCharSetControl()->IsSelected( sal::static_int_cast<sal_uInt16>(nAccessibleChildIndex)); diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 2a7f49ddaffb..379ad056d9cc 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -605,7 +605,7 @@ IMPL_LINK( FmGridHeader, OnAsyncExecuteDrop, void*, /*NOTINTERESTEDIN*/ ) break; default: aCommandType <<= (sal_Int32)CommandType::COMMAND; - xForm->setPropertyValue(FM_PROP_ESCAPE_PROCESSING, bool2any((sal_Bool)(2 == nCommandType))); + xForm->setPropertyValue(FM_PROP_ESCAPE_PROCESSING, bool2any(2 == nCommandType)); break; } xForm->setPropertyValue(FM_PROP_COMMANDTYPE, aCommandType); diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 6b2adc5eab4f..cabe7220e1f7 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -2680,7 +2680,7 @@ OUString DbListBox::GetFormatText(const Reference< ::com::sun::star::sdb::XColum sText = _rxField->getString(); if ( m_bBound ) { - Sequence< sal_Int16 > aPosSeq = ::comphelper::findValue( m_aValueList, sText, sal_True ); + Sequence< sal_Int16 > aPosSeq = ::comphelper::findValue( m_aValueList, sText, true ); if ( aPosSeq.getLength() ) sText = static_cast<ListBox*>(m_pWindow)->GetEntry(aPosSeq.getConstArray()[0]); else @@ -3038,7 +3038,7 @@ void DbFilterField::SetText(const OUString& rText) } break; case ::com::sun::star::form::FormComponentType::LISTBOX: { - Sequence<sal_Int16> aPosSeq = ::comphelper::findValue(m_aValueList, m_aText, sal_True); + Sequence<sal_Int16> aPosSeq = ::comphelper::findValue(m_aValueList, m_aText, true); if (aPosSeq.getLength()) static_cast<ListBox*>(m_pWindow)->SelectEntryPos(aPosSeq.getConstArray()[0], sal_True); else diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index d1f59fcb5240..28e52b47eee6 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -523,35 +523,35 @@ sal_Bool IsSearchableControl( const ::com::sun::star::uno::Reference< ::com::sun } //------------------------------------------------------------------------------ -sal_Bool FmXBoundFormFieldIterator::ShouldStepInto(const Reference< XInterface>& _rContainer) const +bool FmXBoundFormFieldIterator::ShouldStepInto(const Reference< XInterface>& _rContainer) const { if (_rContainer == m_xStartingPoint) // would be quite stupid to step over the root .... - return sal_True; + return true; return Reference< XControlModel>(_rContainer, UNO_QUERY).is(); } //------------------------------------------------------------------------------ -sal_Bool FmXBoundFormFieldIterator::ShouldHandleElement(const Reference< XInterface>& _rElement) +bool FmXBoundFormFieldIterator::ShouldHandleElement(const Reference< XInterface>& _rElement) { if (!_rElement.is()) // NULL element - return sal_False; + return false; if (Reference< XForm>(_rElement, UNO_QUERY).is() || Reference< XGrid>(_rElement, UNO_QUERY).is()) // a forms or a grid - return sal_False; + return false; Reference< XPropertySet> xSet(_rElement, UNO_QUERY); if (!xSet.is() || !::comphelper::hasProperty(FM_PROP_BOUNDFIELD, xSet)) // no "BoundField" property - return sal_False; + return false; Any aVal( xSet->getPropertyValue(FM_PROP_BOUNDFIELD) ); if (aVal.getValueTypeClass() != TypeClass_INTERFACE) // void or invalid property value - return sal_False; + return false; return aVal.hasValue(); } @@ -4031,7 +4031,7 @@ SearchableControlIterator::SearchableControlIterator(Reference< XInterface> xSta } //------------------------------------------------------------------------------ -sal_Bool SearchableControlIterator::ShouldHandleElement(const Reference< XInterface>& xElement) +bool SearchableControlIterator::ShouldHandleElement(const Reference< XInterface>& xElement) { // wenn das Ding eine ControlSource und einen BoundField-Property hat Reference< XPropertySet> xProperties(xElement, UNO_QUERY); @@ -4044,7 +4044,7 @@ sal_Bool SearchableControlIterator::ShouldHandleElement(const Reference< XInterf { // nehmen wir's m_sCurrentValue = ::comphelper::getString(xProperties->getPropertyValue(FM_PROP_CONTROLSOURCE)); - return sal_True; + return true; } } @@ -4055,17 +4055,17 @@ sal_Bool SearchableControlIterator::ShouldHandleElement(const Reference< XInterf if (::comphelper::getINT16(aClassId) == FormComponentType::GRIDCONTROL) { m_sCurrentValue = ""; - return sal_True; + return true; } } - return sal_False; + return false; } //------------------------------------------------------------------------------ -sal_Bool SearchableControlIterator::ShouldStepInto(const Reference< XInterface>& /*xContainer*/) const +bool SearchableControlIterator::ShouldStepInto(const Reference< XInterface>& /*xContainer*/) const { - return sal_True; + return true; } //============================================================================== diff --git a/svx/source/inc/charmapacc.hxx b/svx/source/inc/charmapacc.hxx index 2fc909ca0d37..d1c0962e2ad1 100644 --- a/svx/source/inc/charmapacc.hxx +++ b/svx/source/inc/charmapacc.hxx @@ -189,7 +189,7 @@ namespace svx // OCommonAccessibleSelection // return if the specified child is visible => watch for special ChildIndexes (ACCESSIBLE_SELECTION_CHILD_xxx) - virtual sal_Bool + virtual bool implIsSelected( sal_Int32 nAccessibleChildIndex ) throw (::com::sun::star::uno::RuntimeException); diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx index bbf13b814db4..53c6a3cb65a4 100644 --- a/svx/source/inc/fmshimp.hxx +++ b/svx/source/inc/fmshimp.hxx @@ -94,8 +94,8 @@ public: FmXBoundFormFieldIterator(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rStartingPoint) : ::comphelper::IndexAccessIterator(_rStartingPoint) { } protected: - virtual sal_Bool ShouldHandleElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rElement); - virtual sal_Bool ShouldStepInto(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rContainer) const; + virtual bool ShouldHandleElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rElement); + virtual bool ShouldStepInto(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rContainer) const; }; class FmFormPage; @@ -565,8 +565,8 @@ public: public: SearchableControlIterator(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xStartingPoint); - virtual sal_Bool ShouldHandleElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& rElement); - virtual sal_Bool ShouldStepInto(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xContainer) const; + virtual bool ShouldHandleElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& rElement); + virtual bool ShouldStepInto(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xContainer) const; virtual void Invalidate() { IndexAccessIterator::Invalidate(); m_sCurrentValue = OUString(); } }; diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 854057cccd70..e8349069302f 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -1263,7 +1263,7 @@ void SdrOle2Obj::Disconnect_Impl() comphelper::EmbeddedObjectContainer* pContainer = xObjRef.GetContainer(); if ( pContainer ) { - pContainer->RemoveEmbeddedObject( xObjRef.GetObject(), sal_False); + pContainer->RemoveEmbeddedObject( xObjRef.GetObject(), false); // TODO/LATER: mpImpl->aPersistName contains outdated information, to keep it updated // it should be returned from RemoveEmbeddedObject call. Currently it is no problem, diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 020ee9ae1c2f..3a8d2ad5c708 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -361,7 +361,7 @@ sal_Bool SwOLENode::SavePersistentData() if ( IsChart() && !sChartTblName.isEmpty() && !bChartWithInternalProvider ) bKeepObjectToTempStorage = sal_False; - pCnt->RemoveEmbeddedObject( aOLEObj.aName, sal_False, bKeepObjectToTempStorage ); + pCnt->RemoveEmbeddedObject( aOLEObj.aName, false, bKeepObjectToTempStorage ); // modify end @@ -719,7 +719,7 @@ SwOLEObj::~SwOLEObj() try { // remove object from container but don't close it - pCnt->RemoveEmbeddedObject( aName, sal_False); + pCnt->RemoveEmbeddedObject( aName, false); } catch ( uno::Exception& ) { diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index 33438afacd54..dd09040acf22 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -439,7 +439,7 @@ void SwUndoInsert::RepeatImpl(::sw::RepeatContext & rContext) // TODO/LATER: Copying through the container would copy the replacement image as well comphelper::EmbeddedObjectContainer aCnt; OUString aName = aCnt.CreateUniqueObjectName(); - if ( aCnt.StoreEmbeddedObject( rSwOLE.GetOleRef(), aName, sal_True ) ) + if ( aCnt.StoreEmbeddedObject( rSwOLE.GetOleRef(), aName, true ) ) { uno::Reference < embed::XEmbeddedObject > aNew = aCnt.GetEmbeddedObject( aName ); rDoc.Insert( rContext.GetRepeatPaM(), diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index cfb80d703110..62413d6f1139 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -1121,7 +1121,7 @@ void UnoRadioButtonControl::createPeer( const uno::Reference< awt::XToolkit > & // have it enabled by default because of 85071) uno::Reference< awt::XVclWindowPeer > xVclWindowPeer( getPeer(), uno::UNO_QUERY ); if ( xVclWindowPeer.is() ) - xVclWindowPeer->setProperty( GetPropertyName( BASEPROPERTY_AUTOTOGGLE ), ::cppu::bool2any( sal_True ) ); + xVclWindowPeer->setProperty( GetPropertyName( BASEPROPERTY_AUTOTOGGLE ), ::cppu::bool2any( true ) ); } void UnoRadioButtonControl::addItemListener(const uno::Reference < awt::XItemListener > & l) throw(uno::RuntimeException) diff --git a/writerperfect/source/impress/KeynoteImportFilter.cxx b/writerperfect/source/impress/KeynoteImportFilter.cxx index ea944e05d70b..60c1fcfc4731 100644 --- a/writerperfect/source/impress/KeynoteImportFilter.cxx +++ b/writerperfect/source/impress/KeynoteImportFilter.cxx @@ -302,7 +302,7 @@ throw( com::sun::star::uno::RuntimeException ) lComponentDataNV.realloc( nCDSize + 1 ); beans::NamedValue aValue; aValue.Name = "IsPackage"; - aValue.Value = comphelper::makeBoolAny(sal_True); + aValue.Value = comphelper::makeBoolAny(true); lComponentDataNV[nCDSize] = aValue; Descriptor[nComponentDataLocation].Value <<= lComponentDataNV; } @@ -312,7 +312,7 @@ throw( com::sun::star::uno::RuntimeException ) lComponentDataPV.realloc( nCDSize + 1 ); beans::PropertyValue aProp; aProp.Name = "IsPackage"; - aProp.Value = comphelper::makeBoolAny(sal_True); + aProp.Value = comphelper::makeBoolAny(true); aProp.Handle = -1; aProp.State = beans::PropertyState_DIRECT_VALUE; lComponentDataPV[nCDSize] = aProp; diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx index 8c5deb9410de..154d61b04cc5 100644 --- a/xmloff/source/draw/animimp.cxx +++ b/xmloff/source/draw/animimp.cxx @@ -605,7 +605,7 @@ void XMLAnimationsEffectContext::EndElement() { if( meKind == XMLE_HIDE && !mbTextEffect && meEffect == EK_none ) { - aAny = bool2any( sal_True ); + aAny = bool2any( true ); xSet->setPropertyValue( mpImpl->msDimHide, aAny ); } else @@ -634,7 +634,7 @@ void XMLAnimationsEffectContext::EndElement() aAny <<= bool2any( mbPlayFull ); xSet->setPropertyValue( mpImpl->msPlayFull, aAny ); - aAny <<= bool2any( sal_True ); + aAny <<= bool2any( true ); xSet->setPropertyValue( mpImpl->msSoundOn, aAny ); } else diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index f4bb6a0c3e0d..30a73d18e2da 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -1679,10 +1679,10 @@ void SdXMLTextBoxShapeContext::StartElement(const uno::Reference< xml::sax::XAtt if( xPropsInfo.is() ) { if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject")) - xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( sal_False ) ); + xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( false ) ); if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent")) - xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( sal_False ) ); + xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( false ) ); } } } @@ -2457,7 +2457,7 @@ void SdXMLGraphicObjectShapeContext::StartElement( const ::com::sun::star::uno:: if( xPropsInfo.is() ) { if( xPropsInfo->hasPropertyByName("IsPlaceholderDependent")) - xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( sal_False ) ); + xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( false ) ); } } } @@ -2568,7 +2568,7 @@ void SdXMLChartShapeContext::StartElement(const uno::Reference< xml::sax::XAttri { uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() ); if( xPropsInfo.is() && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject")) - xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( sal_False ) ); + xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( false ) ); uno::Any aAny; @@ -2595,7 +2595,7 @@ void SdXMLChartShapeContext::StartElement(const uno::Reference< xml::sax::XAttri if( xPropsInfo.is() ) { if( xPropsInfo->hasPropertyByName("IsPlaceholderDependent")) - xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( sal_False ) ); + xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( false ) ); } } } @@ -2699,10 +2699,10 @@ void SdXMLObjectShapeContext::StartElement( const ::com::sun::star::uno::Referen if( xPropsInfo.is() ) { if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject")) - xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( sal_False ) ); + xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( false ) ); if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent")) - xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( sal_False ) ); + xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( false ) ); } } } @@ -3079,10 +3079,10 @@ void SdXMLPluginShapeContext::StartElement( const ::com::sun::star::uno::Referen if( xPropsInfo.is() ) { if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject")) - xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( sal_False ) ); + xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( false ) ); if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent")) - xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( sal_False ) ); + xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( false ) ); } } } @@ -3886,10 +3886,10 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc if( xPropsInfo.is() ) { if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject")) - xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( sal_False ) ); + xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( false ) ); if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent")) - xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( sal_False ) ); + xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( false ) ); } } } diff --git a/xmloff/source/style/NamedBoolPropertyHdl.cxx b/xmloff/source/style/NamedBoolPropertyHdl.cxx index 4a26274a13d2..8d3273ef65e9 100644 --- a/xmloff/source/style/NamedBoolPropertyHdl.cxx +++ b/xmloff/source/style/NamedBoolPropertyHdl.cxx @@ -39,13 +39,13 @@ bool XMLNamedBoolPropertyHdl::importXML( const OUString& rStrImpValue, Any& rVal { if( rStrImpValue == maTrueStr ) { - rValue = ::cppu::bool2any( sal_True ); + rValue = ::cppu::bool2any( true ); return true; } if( rStrImpValue == maFalseStr ) { - rValue = ::cppu::bool2any( sal_False ); + rValue = ::cppu::bool2any( false ); return true; } diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx index 8abdc0a04066..a3396617f622 100644 --- a/xmloff/source/style/PageMasterExportPropMapper.cxx +++ b/xmloff/source/style/PageMasterExportPropMapper.cxx @@ -63,7 +63,7 @@ static void lcl_RemoveStateIfZero16( XMLPropertyState* pState ) static void lcl_AddState(::std::vector< XMLPropertyState >& rPropState, sal_Int32 nIndex, const OUString& rProperty, uno::Reference< beans::XPropertySet >& xProps) { if(::cppu::any2bool(xProps->getPropertyValue(rProperty))) - rPropState.push_back(XMLPropertyState (nIndex, cppu::bool2any(sal_True))); + rPropState.push_back(XMLPropertyState (nIndex, cppu::bool2any(true))); } // helper struct to handle equal XMLPropertyState's for page, header and footer diff --git a/xmloff/source/style/PageMasterPropHdl.cxx b/xmloff/source/style/PageMasterPropHdl.cxx index cb5d2902617a..a171f0c274d5 100644 --- a/xmloff/source/style/PageMasterPropHdl.cxx +++ b/xmloff/source/style/PageMasterPropHdl.cxx @@ -331,7 +331,7 @@ bool XMLPMPropHdl_CenterHorizontal::importXML( if (IsXMLToken( rStrImpValue, XML_BOTH) || IsXMLToken( rStrImpValue, XML_HORIZONTAL)) { - rValue = ::cppu::bool2any(sal_True); + rValue = ::cppu::bool2any(true); bRet = true; } @@ -372,7 +372,7 @@ bool XMLPMPropHdl_CenterVertical::importXML( if (IsXMLToken(rStrImpValue, XML_BOTH) || IsXMLToken(rStrImpValue, XML_VERTICAL) ) { - rValue = ::cppu::bool2any(sal_True); + rValue = ::cppu::bool2any(true); bRet = true; } |