summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-04-20 17:18:33 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-04-20 17:25:46 +0200
commit2a455e4a36fe41f0c7a6e6a87582529043d7520f (patch)
tree59aaaf04d8c646a703e2fe1ec5047c204a56656e /package
parent398027e8b218d88837c169baca3a9213237cbc0d (diff)
loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I1879dece7dfb206dd55b13ca5572b962e20d37f5
Diffstat (limited to 'package')
-rw-r--r--package/source/xstor/ocompinstream.cxx4
-rw-r--r--package/source/xstor/owriteablestream.cxx10
-rw-r--r--package/source/xstor/xstorage.cxx30
-rw-r--r--package/source/zipapi/ZipOutputEntry.cxx2
-rw-r--r--package/source/zippackage/ZipPackage.cxx22
5 files changed, 34 insertions, 34 deletions
diff --git a/package/source/xstor/ocompinstream.cxx b/package/source/xstor/ocompinstream.cxx
index 57ee9ea41bbb..1f0c61a35e04 100644
--- a/package/source/xstor/ocompinstream.cxx
+++ b/package/source/xstor/ocompinstream.cxx
@@ -307,12 +307,12 @@ sal_Bool SAL_CALL OInputCompStream::hasByID( const OUString& sID )
try
{
getRelationshipByID( sID );
- return sal_True;
+ return true;
}
catch( container::NoSuchElementException& )
{}
- return sal_False;
+ return false;
}
OUString SAL_CALL OInputCompStream::getTargetByID( const OUString& sID )
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index 822ab1856f7a..5f2fec2ac146 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -230,7 +230,7 @@ OUString GetNewTempFileURL( const uno::Reference< uno::XComponentContext >& rCon
uno::UNO_QUERY_THROW );
try {
- xTempFile->setPropertyValue( "RemoveFile", uno::makeAny( sal_False ) );
+ xTempFile->setPropertyValue( "RemoveFile", uno::makeAny( false ) );
uno::Any aUrl = xTempFile->getPropertyValue( "Uri" );
aUrl >>= aTempURL;
}
@@ -810,7 +810,7 @@ void OWriteStream_Impl::Commit()
uno::Reference< packages::XDataSinkEncrSupport > xNewPackageStream;
uno::Sequence< uno::Any > aSeq( 1 );
- aSeq[0] <<= sal_False;
+ aSeq[0] <<= false;
if ( m_xCacheStream.is() )
{
@@ -1853,7 +1853,7 @@ void OWriteStream::ModifyParentUnlockMutex_Impl( ::osl::ResettableMutexGuard& aG
{
uno::Reference< util::XModifiable > xParentModif( static_cast<util::XModifiable*>(m_pImpl->m_pParent->m_pAntiImpl) );
aGuard.clear();
- xParentModif->setModified( sal_True );
+ xParentModif->setModified( true );
}
else
m_pImpl->m_pParent->m_bIsModified = true;
@@ -2647,7 +2647,7 @@ sal_Bool SAL_CALL OWriteStream::hasByID( const OUString& sID )
try
{
getRelationshipByID( sID );
- return sal_True;
+ return true;
}
catch( const container::NoSuchElementException& rNoSuchElementException )
{
@@ -2655,7 +2655,7 @@ sal_Bool SAL_CALL OWriteStream::hasByID( const OUString& sID )
m_pImpl->AddLog( "No Element" );
}
- return sal_False;
+ return false;
}
OUString SAL_CALL OWriteStream::getTargetByID( const OUString& sID )
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index 72452dd96168..9e59937114ee 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -134,7 +134,7 @@ void OStorage_Impl::completeStorageStreamCopy_Impl(
// TODO/LATER: in future it might make sense to provide the stream if there is one
uno::Reference< embed::XRelationshipAccess > xRelAccess( xDest, uno::UNO_QUERY_THROW );
xRelAccess->clearRelationships();
- xRelAccess->insertRelationships( aRelInfo, sal_False );
+ xRelAccess->insertRelationships( aRelInfo, false );
aPropNames.realloc( 2 );
aPropNames[1] = "MediaType";
@@ -755,7 +755,7 @@ void OStorage_Impl::CopyToStorage( const uno::Reference< embed::XStorage >& xDes
if ( !xRels.is() )
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 );
- xRels->insertRelationships( GetAllRelationshipsIfAny(), sal_False );
+ xRels->insertRelationships( GetAllRelationshipsIfAny(), false );
}
// if possible the destination storage should be committed after successful copying
@@ -847,7 +847,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
if ( !xRels.is() )
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
- xRels->insertRelationships( GetAllRelationshipsIfAny(), sal_False );
+ xRels->insertRelationships( GetAllRelationshipsIfAny(), false );
}
uno::Reference< embed::XOptimizedStorage > xOptDest( xDest, uno::UNO_QUERY_THROW );
@@ -1047,7 +1047,7 @@ void OStorage_Impl::Commit()
if ( !m_bCommited && !m_bIsRoot )
{
uno::Sequence< uno::Any > aSeq( 1 );
- aSeq[0] <<= sal_True;
+ aSeq[0] <<= true;
xNewPackageFolder.set( m_xPackage->createInstanceWithArguments( aSeq ),
uno::UNO_QUERY );
@@ -1379,7 +1379,7 @@ SotElement_Impl* OStorage_Impl::InsertStream( const OUString& aName, bool bEncr
throw embed::InvalidStorageException( THROW_WHERE);
uno::Sequence< uno::Any > aSeq( 1 );
- aSeq[0] <<= sal_False;
+ aSeq[0] <<= false;
uno::Reference< lang::XUnoTunnel > xNewElement( m_xPackage->createInstanceWithArguments( aSeq ),
uno::UNO_QUERY );
@@ -1421,7 +1421,7 @@ void OStorage_Impl::InsertRawStream( const OUString& aName, const uno::Reference
GetSeekableTempCopy( xInStream, m_xContext );
uno::Sequence< uno::Any > aSeq( 1 );
- aSeq[0] <<= sal_False;
+ aSeq[0] <<= false;
uno::Reference< lang::XUnoTunnel > xNewElement( m_xPackage->createInstanceWithArguments( aSeq ),
uno::UNO_QUERY );
@@ -1453,7 +1453,7 @@ OStorage_Impl* OStorage_Impl::CreateNewStorageImpl( sal_Int32 nStorageMode )
throw embed::InvalidStorageException( THROW_WHERE );
uno::Sequence< uno::Any > aSeq( 1 );
- aSeq[0] <<= sal_True;
+ aSeq[0] <<= true;
uno::Reference< lang::XUnoTunnel > xNewElement( m_xPackage->createInstanceWithArguments( aSeq ),
uno::UNO_QUERY );
@@ -3974,9 +3974,9 @@ void SAL_CALL OStorage::commit()
aCaught );
}
- setModified( sal_False );
+ setModified( false );
if ( xParentModif.is() )
- xParentModif->setModified( sal_True );
+ xParentModif->setModified( true );
BroadcastTransaction( STOR_MESS_COMMITED );
}
@@ -4047,7 +4047,7 @@ void SAL_CALL OStorage::revert()
aGuard.clear();
- setModified( sal_False );
+ setModified( false );
BroadcastTransaction( STOR_MESS_REVERTED );
}
@@ -4271,10 +4271,10 @@ sal_Bool SAL_CALL OStorage::hasByName( const OUString& aName )
}
if ( aName.isEmpty() )
- return sal_False;
+ return false;
if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aName == "_rels" )
- return sal_False;
+ return false;
SotElement_Impl* pElement = nullptr;
try
@@ -4886,7 +4886,7 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const OUString& aPropertyName )
if ( aPropertyName == "URL" )
return uno::makeAny( OUString() );
- return uno::makeAny( sal_False ); // RepairPackage
+ return uno::makeAny( false ); // RepairPackage
}
else if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE
&& ( aPropertyName == HAS_ENCRYPTED_ENTRIES_PROPERTY
@@ -5017,7 +5017,7 @@ sal_Bool SAL_CALL OStorage::hasByID( const OUString& sID )
try
{
getRelationshipByID( sID );
- return sal_True;
+ return true;
}
catch( const container::NoSuchElementException& rNoSuchElementException )
{
@@ -5025,7 +5025,7 @@ sal_Bool SAL_CALL OStorage::hasByID( const OUString& sID )
m_pImpl->AddLog( THROW_WHERE "Quiet exception" );
}
- return sal_False;
+ return false;
}
OUString SAL_CALL OStorage::getTargetByID( const OUString& sID )
diff --git a/package/source/zipapi/ZipOutputEntry.cxx b/package/source/zipapi/ZipOutputEntry.cxx
index 6f983d372bfd..073226eb4103 100644
--- a/package/source/zipapi/ZipOutputEntry.cxx
+++ b/package/source/zipapi/ZipOutputEntry.cxx
@@ -101,7 +101,7 @@ void ZipOutputEntry::createBufferFile()
uno::Reference < beans::XPropertySet > xTempFileProps(
io::TempFile::create(m_xContext),
uno::UNO_QUERY_THROW );
- xTempFileProps->setPropertyValue("RemoveFile", uno::makeAny(sal_False));
+ xTempFileProps->setPropertyValue("RemoveFile", uno::makeAny(false));
uno::Any aUrl = xTempFileProps->getPropertyValue( "Uri" );
aUrl >>= m_aTempURL;
assert(!m_aTempURL.isEmpty());
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 4b9a67105613..84cf1f757246 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -862,7 +862,7 @@ sal_Bool SAL_CALL ZipPackage::hasByHierarchicalName( const OUString& aName )
FolderHash::iterator aIter;
if ( ( nIndex = aName.getLength() ) == 1 && *aName.getStr() == '/' )
- return sal_True;
+ return true;
try
{
@@ -879,7 +879,7 @@ sal_Bool SAL_CALL ZipPackage::hasByHierarchicalName( const OUString& aName )
sal_Int32 nDirIndex = aName.lastIndexOf ( '/', nStreamIndex );
sTemp = aName.copy ( nDirIndex == -1 ? 0 : nDirIndex+1, nStreamIndex-nDirIndex-1 );
if ( sTemp == ( *aIter ).second->getName() )
- return sal_True;
+ return true;
else
m_aRecent.erase ( aIter );
}
@@ -887,7 +887,7 @@ sal_Bool SAL_CALL ZipPackage::hasByHierarchicalName( const OUString& aName )
{
sTemp = aName.copy ( nStreamIndex + 1 );
if ( ( *aIter ).second->hasByName( sTemp ) )
- return sal_True;
+ return true;
else
m_aRecent.erase( aIter );
}
@@ -896,7 +896,7 @@ sal_Bool SAL_CALL ZipPackage::hasByHierarchicalName( const OUString& aName )
else
{
if ( m_pRootFolder->hasByName ( aName ) )
- return sal_True;
+ return true;
}
ZipPackageFolder * pCurrent = m_pRootFolder;
ZipPackageFolder * pPrevious = nullptr;
@@ -912,13 +912,13 @@ sal_Bool SAL_CALL ZipPackage::hasByHierarchicalName( const OUString& aName )
pCurrent = pCurrent->doGetByName( sTemp ).pFolder;
}
else
- return sal_False;
+ return false;
nOldIndex = nIndex+1;
}
if ( bFolder )
{
m_aRecent[sDirName] = pPrevious;
- return sal_True;
+ return true;
}
else
{
@@ -927,7 +927,7 @@ sal_Bool SAL_CALL ZipPackage::hasByHierarchicalName( const OUString& aName )
if ( pCurrent->hasByName( sTemp ) )
{
m_aRecent[sDirName] = pCurrent;
- return sal_True;
+ return true;
}
}
}
@@ -942,7 +942,7 @@ sal_Bool SAL_CALL ZipPackage::hasByHierarchicalName( const OUString& aName )
OUString("ZipPackage::hasByHierarchicalName"),
nullptr, e);
}
- return sal_False;
+ return false;
}
uno::Reference< XInterface > SAL_CALL ZipPackage::createInstance()
@@ -1513,7 +1513,7 @@ void SAL_CALL ZipPackage::commitChanges()
TransferInfo aInfo;
aInfo.NameClash = NameClash::OVERWRITE;
- aInfo.MoveData = sal_False;
+ aInfo.MoveData = false;
aInfo.SourceURL = sTempURL;
aInfo.NewTitle = rtl::Uri::decode ( m_aURL.copy ( 1 + m_aURL.lastIndexOf ( static_cast < sal_Unicode > ( '/' ) ) ),
rtl_UriDecodeWithCharset,
@@ -1555,7 +1555,7 @@ void ZipPackage::DisconnectFromTargetAndThrowException_Impl( const uno::Referenc
uno::Any aUrl = xTempFile->getPropertyValue("Uri");
aUrl >>= aTempURL;
xTempFile->setPropertyValue("RemoveFile",
- uno::makeAny( sal_False ) );
+ uno::makeAny( false ) );
}
catch ( uno::Exception& )
{
@@ -1601,7 +1601,7 @@ const uno::Sequence< sal_Int8 > ZipPackage::GetEncryptionKey()
sal_Bool SAL_CALL ZipPackage::hasPendingChanges()
throw( RuntimeException, std::exception )
{
- return sal_False;
+ return false;
}
Sequence< ElementChange > SAL_CALL ZipPackage::getPendingChanges()
throw( RuntimeException, std::exception )