summaryrefslogtreecommitdiffstats
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-06 13:32:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-14 18:03:06 +0200
commite67657d5211f6e95ddf8bd621108608573b00d5d (patch)
tree66724101dbd95721714bd40fcb4861663432774c /oox
parenttdf#135550 FmXListBoxCell does need to implement XListBox after all (diff)
downloadcore-e67657d5211f6e95ddf8bd621108608573b00d5d.tar.gz
core-e67657d5211f6e95ddf8bd621108608573b00d5d.zip
loplugin:simplifybool more
look for expressions like !(a && !b) which can be expanded out Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/dump/oledumper.cxx2
-rw-r--r--oox/source/helper/storagebase.cxx2
-rw-r--r--oox/source/ole/vbacontrol.cxx2
-rw-r--r--oox/source/ole/vbaproject.cxx2
4 files changed, 4 insertions, 4 deletions
diff --git a/oox/source/dump/oledumper.cxx b/oox/source/dump/oledumper.cxx
index 290ace6b39c0..a96c81e3819e 100644
--- a/oox/source/dump/oledumper.cxx
+++ b/oox/source/dump/oledumper.cxx
@@ -1115,7 +1115,7 @@ void AxPropertyObjectBase::dumpLargeProperties()
}
dumpToPosition( mnPropertiesEnd );
- if( !(ensureValid() && !maStreamProps.empty()) )
+ if( !ensureValid() || maStreamProps.empty() )
return;
writeEmptyItem( "stream-properties" );
diff --git a/oox/source/helper/storagebase.cxx b/oox/source/helper/storagebase.cxx
index 2f0ddd6b7926..50e7562dc993 100644
--- a/oox/source/helper/storagebase.cxx
+++ b/oox/source/helper/storagebase.cxx
@@ -190,7 +190,7 @@ void StorageBase::copyToStorage( StorageBase& rDestStrg, const OUString& rElemen
{
OSL_ENSURE( rDestStrg.isStorage() && !rDestStrg.isReadOnly(), "StorageBase::copyToStorage - invalid destination" );
OSL_ENSURE( !rElementName.isEmpty(), "StorageBase::copyToStorage - invalid element name" );
- if( !(rDestStrg.isStorage() && !rDestStrg.isReadOnly() && !rElementName.isEmpty()) )
+ if( !rDestStrg.isStorage() || rDestStrg.isReadOnly() || rElementName.isEmpty() )
return;
StorageRef xSubStrg = openSubStorage( rElementName, false );
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
index 42904adfa7be..7f61855ccf68 100644
--- a/oox/source/ole/vbacontrol.cxx
+++ b/oox/source/ole/vbacontrol.cxx
@@ -695,7 +695,7 @@ void VbaFormControl::moveRelative( const AxPairData& rDistance )
void VbaFormControl::moveEmbeddedToAbsoluteParent()
{
- if( !(mxSiteModel && !maControls.empty()) )
+ if( !mxSiteModel || maControls.empty() )
return;
// distance to move is equal to position of this control in its parent
diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx
index 6e8a9c5039af..403181ef15b6 100644
--- a/oox/source/ole/vbaproject.cxx
+++ b/oox/source/ole/vbaproject.cxx
@@ -515,7 +515,7 @@ void VbaProject::importModulesAndForms( StorageBase& rVbaPrjStrg, const GraphicH
void VbaProject::attachMacros()
{
- if( !(!maMacroAttachers.empty() && mxContext.is()) )
+ if( maMacroAttachers.empty() || !mxContext.is() )
return;
try