avmedia/source/viewer/mediawindow_impl.cxx                        |    2 -
 basctl/source/basicide/baside2.cxx                                |    4 +-
 basctl/source/basicide/basidesh.cxx                               |    2 -
 basegfx/source/color/bcolormodifier.cxx                           |   10 ++---
 basegfx/source/matrix/b3dhommatrix.cxx                            |    2 -
 basic/source/classes/sbxmod.cxx                                   |    4 +-
 basic/source/runtime/runtime.cxx                                  |    2 -
 basic/source/sbx/sbxvar.cxx                                       |    2 -
 basic/source/uno/namecont.cxx                                     |    2 -
 canvas/source/cairo/cairo_spritehelper.cxx                        |    2 -
 canvas/source/vcl/spritehelper.cxx                                |    3 -
 chart2/source/controller/main/ChartController_Window.cxx          |    2 -
 chart2/source/model/main/ChartModel_Persistence.cxx               |    2 -
 chart2/source/tools/InternalDataProvider.cxx                      |    2 -
 chart2/source/view/axes/Tickmarks_Equidistant.cxx                 |    2 -
 chart2/source/view/charttypes/BarChart.cxx                        |    2 -
 chart2/source/view/main/ChartView.cxx                             |    2 -
 comphelper/source/misc/backupfilehelper.cxx                       |    4 +-
 compilerplugins/clang/simplifybool.cxx                            |   12 ++++--
 connectivity/source/commontools/TColumnsHelper.cxx                |    2 -
 connectivity/source/commontools/TIndexes.cxx                      |    2 -
 connectivity/source/commontools/TKeys.cxx                         |    2 -
 connectivity/source/drivers/jdbc/CallableStatement.cxx            |    2 -
 connectivity/source/drivers/jdbc/JStatement.cxx                   |    2 -
 connectivity/source/drivers/jdbc/PreparedStatement.cxx            |    2 -
 cppuhelper/source/component_context.cxx                           |    2 -
 cui/source/dialogs/SpellDialog.cxx                                |    2 -
 cui/source/dialogs/hldocntp.cxx                                   |    2 -
 cui/source/tabpages/autocdlg.cxx                                  |    2 -
 cui/source/tabpages/tpline.cxx                                    |    2 -
 dbaccess/source/core/dataaccess/databasedocument.cxx              |    2 -
 dbaccess/source/filter/xml/xmlHierarchyCollection.cxx             |    2 -
 dbaccess/source/ui/browser/brwctrlr.cxx                           |    2 -
 dbaccess/source/ui/browser/sbagrid.cxx                            |    2 -
 dbaccess/source/ui/relationdesign/RTableConnectionData.cxx        |    2 -
 desktop/source/migration/services/jvmfwk.cxx                      |    2 -
 drawinglayer/source/primitive2d/controlprimitive2d.cxx            |    2 -
 drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx        |    2 -
 drawinglayer/source/primitive2d/svggradientprimitive2d.cxx        |    2 -
 drawinglayer/source/processor2d/vclprocessor2d.cxx                |    2 -
 editeng/source/editeng/impedit.cxx                                |    4 +-
 editeng/source/editeng/impedit2.cxx                               |    2 -
 editeng/source/editeng/impedit4.cxx                               |    3 -
 editeng/source/misc/hangulhanja.cxx                               |    2 -
 editeng/source/outliner/outliner.cxx                              |    4 +-
 editeng/source/outliner/outlvw.cxx                                |    2 -
 extensions/source/bibliography/toolbar.cxx                        |    2 -
 extensions/source/propctrlr/eformspropertyhandler.cxx             |    2 -
 filter/source/graphicfilter/icgm/actimpr.cxx                      |    2 -
 filter/source/msfilter/escherex.cxx                               |    2 -
 filter/source/msfilter/svdfppt.cxx                                |    2 -
 filter/source/xsltdialog/xmlfilterjar.cxx                         |   10 ++---
 forms/source/component/imgprod.cxx                                |    2 -
 formula/source/ui/dlg/formula.cxx                                 |    2 -
 framework/source/jobs/job.cxx                                     |    2 -
 framework/source/services/frame.cxx                               |    4 +-
 framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx |    6 +--
 framework/source/uiconfiguration/uiconfigurationmanager.cxx       |    6 +--
 framework/source/uielement/uicommanddescription.cxx               |    2 -
 idlc/source/astinterface.cxx                                      |    2 -
 linguistic/source/lngsvcmgr.cxx                                   |    2 -
 oox/source/dump/oledumper.cxx                                     |    2 -
 oox/source/helper/storagebase.cxx                                 |    2 -
 oox/source/ole/vbacontrol.cxx                                     |    2 -
 oox/source/ole/vbaproject.cxx                                     |    2 -
 reportdesign/source/core/sdr/UndoActions.cxx                      |    2 -
 reportdesign/source/filter/xml/xmlControlProperty.cxx             |    2 -
 sc/source/core/data/attarray.cxx                                  |    2 -
 sc/source/core/data/documen5.cxx                                  |    2 -
 sc/source/core/data/dptabres.cxx                                  |    6 +--
 sc/source/core/data/table3.cxx                                    |    2 -
 sc/source/core/tool/chgtrack.cxx                                  |    2 -
 sc/source/filter/excel/xepivot.cxx                                |    2 -
 sc/source/filter/oox/autofilterbuffer.cxx                         |    2 -
 sc/source/filter/oox/formulabase.cxx                              |    2 -
 sc/source/filter/oox/pivottablebuffer.cxx                         |    2 -
 sc/source/filter/oox/querytablebuffer.cxx                         |    2 -
 sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx            |    2 -
 sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx            |    2 -
 sc/source/filter/xml/XMLStylesExportHelper.cxx                    |    4 +-
 sc/source/filter/xml/XMLTableShapeResizer.cxx                     |    2 -
 sc/source/filter/xml/xmlcelli.cxx                                 |    6 +--
 sc/source/filter/xml/xmlexprt.cxx                                 |    2 -
 sc/source/ui/Accessibility/AccessibleContextBase.cxx              |    2 -
 sc/source/ui/Accessibility/AccessibleDocument.cxx                 |    2 -
 sc/source/ui/docshell/docsh2.cxx                                  |    4 +-
 sc/source/ui/formdlg/formula.cxx                                  |    2 -
 sc/source/ui/unoobj/cellsuno.cxx                                  |    4 +-
 sc/source/ui/view/cellsh.cxx                                      |    2 -
 sc/source/ui/view/output.cxx                                      |    2 -
 sc/source/ui/view/select.cxx                                      |    2 -
 sc/source/ui/view/tabview2.cxx                                    |    2 -
 sd/source/core/drawdoc4.cxx                                       |    4 +-
 sd/source/ui/animations/motionpathtag.cxx                         |    2 -
 sd/source/ui/annotations/annotationtag.cxx                        |    2 -
 sd/source/ui/annotations/annotationwindow.cxx                     |    2 -
 sd/source/ui/app/sdxfer.cxx                                       |    2 -
 sd/source/ui/func/futext.cxx                                      |   10 ++---
 sd/source/ui/slideshow/slideshowimpl.cxx                          |    2 -
 sd/source/ui/unoidl/unomodel.cxx                                  |    4 +-
 sd/source/ui/view/viewoverlaymanager.cxx                          |    2 -
 sd/source/ui/view/viewshel.cxx                                    |    2 -
 sfx2/source/dialog/templdlg.cxx                                   |    2 -
 sfx2/source/doc/docfile.cxx                                       |    6 ++-
 sfx2/source/doc/sfxbasemodel.cxx                                  |    2 -
 svgio/source/svgreader/svgtextnode.cxx                            |    2 -
 svgio/source/svgreader/svgusenode.cxx                             |    2 -
 svl/source/items/style.cxx                                        |    2 -
 svtools/source/brwbox/editbrowsebox2.cxx                          |    2 -
 svtools/source/control/ruler.cxx                                  |    4 +-
 svtools/source/control/tabbar.cxx                                 |    2 -
 svtools/source/uno/popupmenucontrollerbase.cxx                    |    2 -
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx           |    2 -
 svx/source/dialog/pagectrl.cxx                                    |    6 +--
 svx/source/fmcomp/gridctrl.cxx                                    |    2 -
 svx/source/form/fmundo.cxx                                        |    4 +-
 svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx          |    2 -
 svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx          |    2 -
 svx/source/svdraw/svdcrtv.cxx                                     |    2 -
 svx/source/svdraw/svddrgv.cxx                                     |    2 -
 svx/source/svdraw/svdedxv.cxx                                     |    2 -
 svx/source/svdraw/svdhdl.cxx                                      |   14 
+++----
 svx/source/svdraw/svdoole2.cxx                                    |    4 +-
 svx/source/svdraw/svdpoev.cxx                                     |    2 -
 svx/source/table/tablecontroller.cxx                              |    2 -
 svx/source/table/tablehandles.cxx                                 |    4 +-
 sw/source/core/crsr/callnk.cxx                                    |    2 -
 sw/source/core/crsr/crsrsh.cxx                                    |    6 +--
 sw/source/core/crsr/viscrs.cxx                                    |    4 +-
 sw/source/core/doc/DocumentStatisticsManager.cxx                  |    2 -
 sw/source/core/doc/doc.cxx                                        |    2 -
 sw/source/core/doc/docbm.cxx                                      |    4 +-
 sw/source/core/doc/doctxm.cxx                                     |    2 -
 sw/source/core/doc/fmtcol.cxx                                     |    4 +-
 sw/source/core/doc/htmltbl.cxx                                    |    4 +-
 sw/source/core/fields/expfld.cxx                                  |    2 -
 sw/source/core/fields/reffld.cxx                                  |    4 +-
 sw/source/core/graphic/ndgrf.cxx                                  |    2 -
 sw/source/core/layout/anchoreddrawobject.cxx                      |    2 -
 sw/source/core/layout/flycnt.cxx                                  |    2 -
 sw/source/core/layout/frmtool.cxx                                 |    2 -
 sw/source/core/layout/layact.cxx                                  |    2 -
 sw/source/core/layout/paintfrm.cxx                                |   18 
+++++-----
 sw/source/core/layout/tabfrm.cxx                                  |    4 +-
 sw/source/core/layout/wsfrm.cxx                                   |    4 +-
 sw/source/core/ole/ndole.cxx                                      |    2 -
 sw/source/core/swg/swblocks.cxx                                   |    2 -
 sw/source/core/table/swtable.cxx                                  |    2 -
 sw/source/core/text/frmform.cxx                                   |    2 -
 sw/source/core/text/inftxt.cxx                                    |    2 -
 sw/source/core/text/itrcrsr.cxx                                   |    5 +-
 sw/source/core/text/portxt.cxx                                    |   15 
+++-----
 sw/source/core/txtnode/atrftn.cxx                                 |    2 -
 sw/source/core/txtnode/ndtxt.cxx                                  |    4 +-
 sw/source/core/view/vprint.cxx                                    |    2 -
 sw/source/filter/html/css1atr.cxx                                 |    2 -
 sw/source/filter/html/svxcss1.cxx                                 |    2 -
 sw/source/filter/ww8/docxattributeoutput.cxx                      |    4 +-
 sw/source/filter/ww8/docxsdrexport.cxx                            |    2 -
 sw/source/filter/ww8/wrtw8esh.cxx                                 |    2 -
 sw/source/filter/ww8/wrtw8nds.cxx                                 |    2 -
 sw/source/filter/xml/swxml.cxx                                    |    6 +--
 sw/source/ui/dbui/addresslistdialog.cxx                           |    2 -
 sw/source/ui/index/cnttab.cxx                                     |    2 -
 sw/source/uibase/app/mainwn.cxx                                   |    2 -
 sw/source/uibase/dbui/dbmgr.cxx                                   |    4 +-
 sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx              |    2 -
 sw/source/uibase/docvw/edtdd.cxx                                  |    4 +-
 sw/source/uibase/docvw/edtwin.cxx                                 |    8 ++--
 sw/source/uibase/uno/unoatxt.cxx                                  |    4 +-
 testtools/source/bridgetest/constructors.cxx                      |    5 +-
 ucb/source/cacher/cachedcontentresultset.cxx                      |    2 -
 vbahelper/source/msforms/vbacontrols.cxx                          |   13 
++++++-
 vcl/source/control/button.cxx                                     |    6 +--
 vcl/source/treelist/transfer.cxx                                  |    4 +-
 vcl/source/window/cursor.cxx                                      |    2 -
 vcl/source/window/event.cxx                                       |    2 -
 vcl/source/window/window2.cxx                                     |    2 -
 vcl/unx/generic/app/wmadaptor.cxx                                 |   18 
+++++-----
 vcl/unx/generic/window/salframe.cxx                               |   12 ++----
 vcl/unx/gtk3/a11y/gtk3atklistener.cxx                             |    6 +--
 writerfilter/source/dmapper/DomainMapper_Impl.cxx                 |    4 +-
 writerfilter/source/dmapper/SmartTagHandler.cxx                   |    2 -
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx             |    2 -
 writerfilter/source/rtftok/rtfdocumentimpl.cxx                    |    4 +-
 xmloff/source/draw/ximppage.cxx                                   |    2 -
 xmloff/source/text/XMLTextFrameContext.cxx                        |    2 -
 187 files changed, 304 insertions(+), 296 deletions(-)

New commits:
commit e67657d5211f6e95ddf8bd621108608573b00d5d
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Aug 6 13:32:43 2020 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Aug 14 18:03:06 2020 +0200

    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.gran...@collabora.co.uk>

diff --git a/avmedia/source/viewer/mediawindow_impl.cxx 
b/avmedia/source/viewer/mediawindow_impl.cxx
index 98f867e4e4e1..466e3a70cb0a 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -577,7 +577,7 @@ void MediaWindowImpl::Paint(vcl::RenderContext& 
rRenderContext, const tools::Rec
     const Point aBasePos(mpChildWindow->GetPosPixel());
     const tools::Rectangle aVideoRect(aBasePos, mpChildWindow->GetSizePixel());
 
-    if (!(pLogo && !pLogo->IsEmpty() && !aVideoRect.IsEmpty()))
+    if (!pLogo || pLogo->IsEmpty() || aVideoRect.IsEmpty())
         return;
 
     Size aLogoSize(pLogo->GetSizePixel());
diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index f8964c96c3b8..a114332e42b2 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -278,7 +278,7 @@ void ModulWindow::CheckCompileBasic()
     bool const bModified = ( !m_xModule->IsCompiled() ||
         ( GetEditEngine() && GetEditEngine()->IsModified() ) );
 
-    if ( !(!bRunning && bModified) )
+    if ( bRunning || !bModified )
         return;
 
     bool bDone = false;
@@ -325,7 +325,7 @@ void ModulWindow::BasicExecute()
 
     CheckCompileBasic();
 
-    if ( !(XModule().is() && m_xModule->IsCompiled() && !m_aStatus.bError) )
+    if ( !XModule().is() || !m_xModule->IsCompiled() || m_aStatus.bError )
         return;
 
     if ( GetBreakPoints().size() )
diff --git a/basctl/source/basicide/basidesh.cxx 
b/basctl/source/basicide/basidesh.cxx
index 3a2259bf40ac..a2f9023e8147 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -900,7 +900,7 @@ void Shell::EnableScrollbars( bool bEnable )
 
 void Shell::SetCurLib( const ScriptDocument& rDocument, const OUString& 
aLibName, bool bUpdateWindows, bool bCheck )
 {
-    if ( !(!bCheck || ( rDocument != m_aCurDocument || aLibName != 
m_aCurLibName )) )
+    if ( bCheck && rDocument == m_aCurDocument && aLibName == m_aCurLibName )
         return;
 
     ContainerListenerImpl* pListener = static_cast< ContainerListenerImpl* >( 
m_xLibListener.get() );
diff --git a/basegfx/source/color/bcolormodifier.cxx 
b/basegfx/source/color/bcolormodifier.cxx
index c943658f05eb..5cf2a5a86c80 100644
--- a/basegfx/source/color/bcolormodifier.cxx
+++ b/basegfx/source/color/bcolormodifier.cxx
@@ -208,11 +208,11 @@ namespace basegfx
         mfBlueOff(0.0),
         mbUseIt(false)
     {
-        if(!(!basegfx::fTools::equalZero(mfRed)
-            || !basegfx::fTools::equalZero(mfGreen)
-            || !basegfx::fTools::equalZero(mfBlue)
-            || !basegfx::fTools::equalZero(mfLuminance)
-            || !basegfx::fTools::equalZero(mfContrast)))
+        if(basegfx::fTools::equalZero(mfRed)
+            && basegfx::fTools::equalZero(mfGreen)
+            && basegfx::fTools::equalZero(mfBlue)
+            && basegfx::fTools::equalZero(mfLuminance)
+            && basegfx::fTools::equalZero(mfContrast))
             return;
 
         // calculate slope
diff --git a/basegfx/source/matrix/b3dhommatrix.cxx 
b/basegfx/source/matrix/b3dhommatrix.cxx
index 2a56c7a28795..1382ff3c4a0f 100644
--- a/basegfx/source/matrix/b3dhommatrix.cxx
+++ b/basegfx/source/matrix/b3dhommatrix.cxx
@@ -149,7 +149,7 @@ namespace basegfx
 
     void B3DHomMatrix::rotate(double fAngleX,double fAngleY,double fAngleZ)
     {
-        if(!(!fTools::equalZero(fAngleX) || !fTools::equalZero(fAngleY) || 
!fTools::equalZero(fAngleZ)))
+        if(fTools::equalZero(fAngleX) && fTools::equalZero(fAngleY) && 
fTools::equalZero(fAngleZ))
             return;
 
         if(!fTools::equalZero(fAngleX))
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index b735933ea9b9..c7b62b70278c 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -1388,7 +1388,7 @@ void SbModule::GlobalRunInit( bool bBasicStart )
 {
     // If no Basic-Start, only initialise, if the module is not initialised
     if( !bBasicStart )
-        if( !(pImage && !pImage->bInit) )
+        if( !pImage || pImage->bInit )
             return;
 
     // Initialise GlobalInitErr-Flag for Compiler-Error
@@ -2081,7 +2081,7 @@ ErrCode SbMethod::Call( SbxValue* pRet, SbxVariable* 
pCaller )
 // #100883 Own Broadcast for SbMethod
 void SbMethod::Broadcast( SfxHintId nHintId )
 {
-    if( !(mpBroadcaster && !IsSet( SbxFlagBits::NoBroadcast )) )
+    if( !mpBroadcaster || IsSet( SbxFlagBits::NoBroadcast ) )
         return;
 
     // Because the method could be called from outside, test here once again
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 62a54b87b576..f55d5ad86bd8 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -911,7 +911,7 @@ void SbiRuntime::Error( ErrCode n, bool 
bVBATranslationAlreadyDone )
         return;
 
     nError = n;
-    if( !(isVBAEnabled() && !bVBATranslationAlreadyDone) )
+    if( !isVBAEnabled() || bVBATranslationAlreadyDone )
         return;
 
     OUString aMsg = pInst->GetErrorMsg();
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index 571c3cf1a69b..5134ff751aaa 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -146,7 +146,7 @@ SbxArray* SbxVariable::GetParameters() const
 
 void SbxVariable::Broadcast( SfxHintId nHintId )
 {
-    if( !(mpBroadcaster && !IsSet( SbxFlagBits::NoBroadcast )) )
+    if( !mpBroadcaster || IsSet( SbxFlagBits::NoBroadcast ) )
         return;
 
     // Because the method could be called from outside, check the
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 0904dcb766c2..58401206fc4d 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -2299,7 +2299,7 @@ void SAL_CALL SfxLibraryContainer::loadLibrary( const 
OUString& Name )
 
     bool bLoaded = pImplLib->mbLoaded;
     pImplLib->mbLoaded = true;
-    if( !(!bLoaded && xNameAccess->hasElements()) )
+    if( bLoaded || !xNameAccess->hasElements() )
         return;
 
     if( pImplLib->mbPasswordProtected )
diff --git a/canvas/source/cairo/cairo_spritehelper.cxx 
b/canvas/source/cairo/cairo_spritehelper.cxx
index 667f1ba249ba..1fe9eb9152e0 100644
--- a/canvas/source/cairo/cairo_spritehelper.cxx
+++ b/canvas/source/cairo/cairo_spritehelper.cxx
@@ -83,7 +83,7 @@ namespace cairocanvas
         const double fAlpha( getAlpha() );
         const ::basegfx::B2DHomMatrix aTransform( getTransformation() );
 
-        if( !(isActive() && !::basegfx::fTools::equalZero( fAlpha )) )
+        if( !isActive() || ::basegfx::fTools::equalZero( fAlpha ) )
             return;
 
         SAL_INFO( "canvas.cairo", "CanvasCustomSprite::redraw called");
diff --git a/canvas/source/vcl/spritehelper.cxx 
b/canvas/source/vcl/spritehelper.cxx
index df8550c6c9f2..e52bb211020c 100644
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -98,8 +98,7 @@ namespace vclcanvas
 
         const double fAlpha( getAlpha() );
 
-        if( !(isActive() &&
-            !::basegfx::fTools::equalZero( fAlpha )) )
+        if( !isActive() || ::basegfx::fTools::equalZero( fAlpha ) )
             return;
 
         const Point                 aEmptyPoint;
diff --git a/chart2/source/controller/main/ChartController_Window.cxx 
b/chart2/source/controller/main/ChartController_Window.cxx
index 2ac9f4b7bbd5..f41b18af994a 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -533,7 +533,7 @@ IMPL_LINK_NOARG(ChartController, DoubleClickWaitingHdl, 
Timer *, void)
 {
     m_bWaitingForDoubleClick = false;
 
-    if( !(!m_bWaitingForMouseUp && 
m_aSelection.maybeSwitchSelectionAfterSingleClickWasEnsured()) )
+    if( m_bWaitingForMouseUp || 
!m_aSelection.maybeSwitchSelectionAfterSingleClickWasEnsured() )
         return;
 
     impl_selectObjectAndNotiy();
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx 
b/chart2/source/model/main/ChartModel_Persistence.cxx
index b3dd7a7cfeeb..313b472be0d7 100644
--- a/chart2/source/model/main/ChartModel_Persistence.cxx
+++ b/chart2/source/model/main/ChartModel_Persistence.cxx
@@ -362,7 +362,7 @@ void ChartModel::impl_store(
     //notify parent data provider after saving thus the parent document can 
store
     //the ranges for which a load and update of the chart will be necessary
     Reference< beans::XPropertySet > xPropSet( m_xParent, uno::UNO_QUERY );
-    if ( !(!hasInternalDataProvider() && xPropSet.is()) )
+    if ( hasInternalDataProvider() || !xPropSet.is() )
         return;
 
     apphelper::MediaDescriptorHelper aMDHelper(rMediaDescriptor);
diff --git a/chart2/source/tools/InternalDataProvider.cxx 
b/chart2/source/tools/InternalDataProvider.cxx
index 9d78d9ffc758..c1d0008098ab 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -1360,7 +1360,7 @@ Sequence< double > SAL_CALL 
InternalDataProvider::getDateCategories()
     sal_Int32 nN=0;
     for (auto const& category : aCategories)
     {
-        if( !( !category.empty() && (category[0]>>=fValue) ) )
+        if( category.empty() || !(category[0]>>=fValue) )
             fValue = fNan;
         aDoubles[nN++]=fValue;
     }
diff --git a/chart2/source/view/axes/Tickmarks_Equidistant.cxx 
b/chart2/source/view/axes/Tickmarks_Equidistant.cxx
index 60f6e63311ad..48660a41d986 100644
--- a/chart2/source/view/axes/Tickmarks_Equidistant.cxx
+++ b/chart2/source/view/axes/Tickmarks_Equidistant.cxx
@@ -105,7 +105,7 @@ EquidistantTickFactory::EquidistantTickFactory(
 
     m_fOuterMajorTickBorderMin_Scaled = m_fOuterMajorTickBorderMin;
     m_fOuterMajorTickBorderMax_Scaled = m_fOuterMajorTickBorderMax;
-    if(!(!m_rIncrement.PostEquidistant && m_xInverseScaling.is()) )
+    if(m_rIncrement.PostEquidistant || !m_xInverseScaling.is())
         return;
 
     m_fOuterMajorTickBorderMin_Scaled = 
m_rScale.Scaling->doScaling(m_fOuterMajorTickBorderMin);
diff --git a/chart2/source/view/charttypes/BarChart.cxx 
b/chart2/source/view/charttypes/BarChart.cxx
index 3641e67b4657..da7461f38e7a 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -415,7 +415,7 @@ void BarChart::adaptOverlapAndGapwidthForGroupBarsPerAxis()
     //thus the different series use the same settings
 
     VDataSeries* pFirstSeries = getFirstSeries();
-    if(!(pFirstSeries && !pFirstSeries->getGroupBarsPerAxis()) )
+    if(!pFirstSeries || pFirstSeries->getGroupBarsPerAxis())
         return;
 
     sal_Int32 nAxisIndex = pFirstSeries->getAttachedAxisIndex();
diff --git a/chart2/source/view/main/ChartView.cxx 
b/chart2/source/view/main/ChartView.cxx
index a66bd266634b..656503a8588b 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -2503,7 +2503,7 @@ void ChartView::impl_updateView( bool bCheckLockedCtrler )
     if (bCheckLockedCtrler && mrChartModel.hasControllersLocked())
         return;
 
-    if( !(m_bViewDirty && !m_bInViewUpdate) )
+    if( !m_bViewDirty || m_bInViewUpdate )
         return;
 
     m_bInViewUpdate = true;
diff --git a/comphelper/source/misc/backupfilehelper.cxx 
b/comphelper/source/misc/backupfilehelper.cxx
index 5d1262838011..a5eb716d0942 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -640,7 +640,7 @@ namespace
             aUrl >>= aTempURL;
 
             // copy back file
-            if (!(!aTempURL.isEmpty() && 
DirectoryHelper::fileExists(aTempURL)))
+            if (aTempURL.isEmpty() || !DirectoryHelper::fileExists(aTempURL))
                 return;
 
             if (DirectoryHelper::fileExists(rUnoPackagReg))
@@ -1643,7 +1643,7 @@ namespace comphelper
         // no push when SafeModeDir exists, it may be Office's exit after 
SafeMode
         // where SafeMode flag is already deleted, but SafeModeDir cleanup is 
not
         // done yet (is done at next startup)
-        if (!(mbActive && !mbSafeModeDirExists))
+        if (!mbActive || mbSafeModeDirExists)
             return;
 
         const OUString aPackURL(getPackURL());
diff --git a/compilerplugins/clang/simplifybool.cxx 
b/compilerplugins/clang/simplifybool.cxx
index 89c262f54c98..d2e53d63aae9 100644
--- a/compilerplugins/clang/simplifybool.cxx
+++ b/compilerplugins/clang/simplifybool.cxx
@@ -293,11 +293,17 @@ bool SimplifyBool::VisitUnaryOperator(UnaryOperator const 
* expr) {
         }
         else if (binaryOp->isLogicalOp())
         {
-            auto containsNegationOrComparison = [](Expr const * expr) {
+            // if we find a negation condition inside, it is definitely better
+            // to expand it out
+            bool foundLNot = false;
+            auto containsNegationOrComparison = [&](Expr const * expr) {
                 expr = ignoreParenImpCastAndComma(expr);
                 if (auto unaryOp = dyn_cast<UnaryOperator>(expr))
                     if (unaryOp->getOpcode() == UO_LNot)
+                    {
+                        foundLNot = true;
                         return expr;
+                    }
                 if (auto binaryOp = dyn_cast<BinaryOperator>(expr))
                     if (binaryOp->isComparisonOp())
                         return expr;
@@ -308,9 +314,7 @@ bool SimplifyBool::VisitUnaryOperator(UnaryOperator const * 
expr) {
             };
             auto lhs = containsNegationOrComparison(binaryOp->getLHS());
             auto rhs = containsNegationOrComparison(binaryOp->getRHS());
-            if (!lhs || !rhs)
-                return true;
-            if (lhs || rhs)
+            if (foundLNot || (lhs && rhs))
                 report(
                     DiagnosticsEngine::Warning,
                     ("logical negation of logical op containing negation, can 
be simplified"),
diff --git a/connectivity/source/commontools/TColumnsHelper.cxx 
b/connectivity/source/commontools/TColumnsHelper.cxx
index a97faeeb8b4e..f06393778953 100644
--- a/connectivity/source/commontools/TColumnsHelper.cxx
+++ b/connectivity/source/commontools/TColumnsHelper.cxx
@@ -186,7 +186,7 @@ sdbcx::ObjectType OColumnsHelper::appendObject( const 
OUString& _rForName, const
 void OColumnsHelper::dropObject(sal_Int32 /*_nPos*/, const OUString& 
_sElementName)
 {
     OSL_ENSURE(m_pTable,"OColumnsHelper::dropByName: Table is null!");
-    if ( !(m_pTable && !m_pTable->isNew()) )
+    if ( !m_pTable || m_pTable->isNew() )
         return;
 
     Reference<XDatabaseMetaData> xMetaData = 
m_pTable->getConnection()->getMetaData();
diff --git a/connectivity/source/commontools/TIndexes.cxx 
b/connectivity/source/commontools/TIndexes.cxx
index f5cff00ec835..5a8c7c29a0f4 100644
--- a/connectivity/source/commontools/TIndexes.cxx
+++ b/connectivity/source/commontools/TIndexes.cxx
@@ -213,7 +213,7 @@ sdbcx::ObjectType OIndexesHelper::appendObject( const 
OUString& _rForName, const
 void OIndexesHelper::dropObject(sal_Int32 /*_nPos*/,const OUString& 
_sElementName)
 {
     Reference< XConnection> xConnection = m_pTable->getConnection();
-    if( !(xConnection.is() && !m_pTable->isNew()))
+    if( !xConnection.is() || m_pTable->isNew() )
         return;
 
     if ( m_pTable->getIndexService().is() )
diff --git a/connectivity/source/commontools/TKeys.cxx 
b/connectivity/source/commontools/TKeys.cxx
index 742a1832049a..4c223624dc3d 100644
--- a/connectivity/source/commontools/TKeys.cxx
+++ b/connectivity/source/commontools/TKeys.cxx
@@ -264,7 +264,7 @@ OUString OKeysHelper::getDropForeignKey() const
 void OKeysHelper::dropObject(sal_Int32 _nPos, const OUString& _sElementName)
 {
     Reference< XConnection> xConnection = m_pTable->getConnection();
-    if ( !(xConnection.is() && !m_pTable->isNew()) )
+    if ( !xConnection.is() || m_pTable->isNew() )
         return;
 
     Reference<XPropertySet> xKey(getObject(_nPos),UNO_QUERY);
diff --git a/connectivity/source/drivers/jdbc/CallableStatement.cxx 
b/connectivity/source/drivers/jdbc/CallableStatement.cxx
index 0994c827e29a..574fd666b75b 100644
--- a/connectivity/source/drivers/jdbc/CallableStatement.cxx
+++ b/connectivity/source/drivers/jdbc/CallableStatement.cxx
@@ -318,7 +318,7 @@ void java_sql_CallableStatement::createStatement(JNIEnv* 
/*_pEnv*/)
     checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
 
     SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java environment has been deleted!");
-    if( !(t.pEnv && !object) )
+    if( !t.pEnv || object )
         return;
 
     // initialize temporary variable
diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx 
b/connectivity/source/drivers/jdbc/JStatement.cxx
index 9bfe11838b7f..147e09c0f362 100644
--- a/connectivity/source/drivers/jdbc/JStatement.cxx
+++ b/connectivity/source/drivers/jdbc/JStatement.cxx
@@ -761,7 +761,7 @@ void java_sql_Statement::createStatement(JNIEnv* _pEnv)
     ::osl::MutexGuard aGuard( m_aMutex );
     checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
 
-    if( !(_pEnv && !object) )
+    if( !_pEnv || object )
         return;
 
     // initialize temporary variable
diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx 
b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
index 34c28f084677..083f1917e72a 100644
--- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx
+++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
@@ -655,7 +655,7 @@ void java_sql_PreparedStatement::createStatement(JNIEnv* 
_pEnv)
     ::osl::MutexGuard aGuard( m_aMutex );
     checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
 
-    if( !(!object && _pEnv) )
+    if( object || !_pEnv )
         return;
 
     // initialize temporary variable
diff --git a/cppuhelper/source/component_context.cxx 
b/cppuhelper/source/component_context.cxx
index 739be2800631..c79bf6d12b2e 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -492,7 +492,7 @@ ComponentContext::ComponentContext(
         }
     }
 
-    if (!(!m_xSMgr.is() && m_xDelegate.is()))
+    if (m_xSMgr.is() || !m_xDelegate.is())
         return;
 
     // wrap delegate's smgr XPropertySet into new smgr
diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 1a0a08624761..29bf889ec6fd 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -917,7 +917,7 @@ void SpellDialog::ToplevelFocusChanged()
     *   The only sensible thing would be to call the new Method differently,
     *   e.g. DialogGot/LostFocus or so.
     */
-    if (!(m_xDialog->get_visible() && !bFocusLocked))
+    if (!m_xDialog->get_visible() || bFocusLocked)
         return;
 
     if (m_xDialog->has_toplevel_focus())
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 50d7131ad8fa..1a201f8421c3 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -385,7 +385,7 @@ void SvxHyperlinkNewDocTp::DoApply()
     {
     }
 
-    if (!(bCreate && !aStrNewName.isEmpty()))
+    if (!bCreate || aStrNewName.isEmpty())
         return;
 
     ExecuteInfo* pExecuteInfo = new ExecuteInfo;
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index ef413c52d54d..c82875ece77d 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -2094,7 +2094,7 @@ IMPL_LINK(OfaAutoCompleteTabPage, CheckHdl, 
weld::ToggleButton&, rBox, void)
 void OfaAutoCompleteTabPage::CopyToClipboard() const
 {
     auto rows = m_xLBEntries->get_selected_rows();
-    if (!(m_pAutoCompleteList && !rows.empty()))
+    if (!m_pAutoCompleteList || rows.empty())
         return;
 
     rtl::Reference<TransferDataContainer> pCntnr = new TransferDataContainer;
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 6079adcd5790..522bab7789a4 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -1428,7 +1428,7 @@ IMPL_LINK_NOARG(SvxLineTabPage, MenuCreateHdl_Impl, 
weld::ToggleButton&, void)
             m_xSymbolMB->set_item_sensitive("gallery", false);
     }
 
-    if (!(!m_xSymbolsMenu && m_pSymbolList))
+    if (m_xSymbolsMenu || !m_pSymbolList)
         return;
 
     m_xSymbolsMenu = m_xBuilder->weld_menu("symbolssubmenu");
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx 
b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 4eac4796982b..77b5ef45fca0 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -855,7 +855,7 @@ void SAL_CALL ODatabaseDocument::disconnectController( 
const Reference< XControl
     if ( bNotifyViewClosed )
         m_aEventNotifier.notifyDocumentEvent( "OnViewClosed", Reference< 
XController2 >( _xController, UNO_QUERY ) );
 
-    if ( !(bLastControllerGone && !bIsClosing) )
+    if ( !bLastControllerGone || bIsClosing )
         return;
 
     // if this was the last view, close the document as a whole
diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx 
b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
index d542a1ad7807..182463181e56 100644
--- a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
+++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
@@ -59,7 +59,7 @@ OXMLHierarchyCollection::OXMLHierarchyCollection( ODBFilter& 
rImport
                 SAL_WARN("dbaccess", "unknown attribute " << 
SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << 
aIter.toString());
         }
     }
-    if ( !(!sName.isEmpty() && _xParentContainer.is()) )
+    if ( sName.isEmpty() || !_xParentContainer.is() )
         return;
 
     try
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx 
b/dbaccess/source/ui/browser/brwctrlr.cxx
index 8a0bb0cb6edc..3366ed97df15 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -2407,7 +2407,7 @@ void SbaXDataBrowserController::LoadFinished(bool 
/*bWasSynch*/)
 {
     m_nRowSetPrivileges = 0;
 
-    if (!(isValid() && !loadingCancelled()))
+    if (!isValid() || loadingCancelled())
         return;
 
     // obtain cached values
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx 
b/dbaccess/source/ui/browser/sbagrid.cxx
index 3af305f5ead5..13b6ceac29cd 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -568,7 +568,7 @@ void SbaGridHeader::PreExecuteColumnContextMenu(sal_uInt16 
nColId, PopupMenu& rM
 
     // prepend some new items
     bool bColAttrs = (nColId != sal_uInt16(-1)) && (nColId != 0);
-    if ( !(bColAttrs && !bDBIsReadOnly))
+    if ( !bColAttrs || bDBIsReadOnly)
         return;
 
     sal_uInt16 nPos = 0;
diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx 
b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
index e9b87f28eca1..1e38bb2f7e03 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
@@ -77,7 +77,7 @@ void ORelationTableConnectionData::DropRelation()
     ::osl::MutexGuard aGuard( m_aMutex );
     // delete relation
     Reference< XIndexAccess> xKeys = getReferencingTable()->getKeys();
-    if( !(!m_aConnName.isEmpty() && xKeys.is()) )
+    if( m_aConnName.isEmpty() || !xKeys.is() )
         return;
 
     const sal_Int32 nCount = xKeys->getCount();
diff --git a/desktop/source/migration/services/jvmfwk.cxx 
b/desktop/source/migration/services/jvmfwk.cxx
index 20a7c2ff2da3..d388692e4be5 100644
--- a/desktop/source/migration/services/jvmfwk.cxx
+++ b/desktop/source/migration/services/jvmfwk.cxx
@@ -234,7 +234,7 @@ void JavaMigration::migrateJavarc()
     bool bSuccess = javaini.getFrom("Home", sValue);
     OSL_ENSURE(bSuccess, "[Service implementation " IMPL_NAME
                        "] XJob::execute: Could not get Home entry from 
java.ini/javarc.");
-    if (!(bSuccess && !sValue.isEmpty()))
+    if (!bSuccess || sValue.isEmpty())
         return;
 
     //get the directory
diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx 
b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
index c3b030dcf1ac..3f20baa1351f 100644
--- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
@@ -45,7 +45,7 @@ namespace drawinglayer::primitive2d
 {
         void ControlPrimitive2D::createXControl()
         {
-            if(!(!mxXControl.is() && getControlModel().is()))
+            if(mxXControl.is() || !getControlModel().is())
                 return;
 
             uno::Reference< beans::XPropertySet > xSet(getControlModel(), 
uno::UNO_QUERY);
diff --git a/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx 
b/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx
index d4b604e79c9f..a95e42cfecad 100644
--- a/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx
@@ -35,7 +35,7 @@ namespace drawinglayer::primitive2d
             const std::vector< basegfx::B2DPoint >& rPositions = 
getPositions();
             const sal_uInt32 nMarkerCount(rPositions.size());
 
-            if(!(nMarkerCount && !getMarker().IsEmpty()))
+            if(!nMarkerCount || getMarker().IsEmpty())
                 return;
 
             // get pixel size
diff --git a/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx 
b/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx
index e6906a638084..7c9eb8441306 100644
--- a/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx
@@ -377,7 +377,7 @@ namespace drawinglayer::primitive2d
 
         void SvgGradientHelper::createMirroredGradientEntries()
         {
-            if(!(maMirroredGradientEntries.empty() && 
!getGradientEntries().empty()))
+            if(!maMirroredGradientEntries.empty() || 
getGradientEntries().empty())
                 return;
 
             const sal_uInt32 nCount(getGradientEntries().size());
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index ffb649da3554..3aa7d0262b98 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -958,7 +958,7 @@ void VclProcessor2D::RenderMarkerArrayPrimitive2D(
     const std::vector<basegfx::B2DPoint>& rPositions = 
rMarkArrayCandidate.getPositions();
     const sal_uInt32 nCount(rPositions.size());
 
-    if (!(nCount && !rMarkArrayCandidate.getMarker().IsEmpty()))
+    if (!nCount || rMarkArrayCandidate.getMarker().IsEmpty())
         return;
 
     // get pixel size
diff --git a/editeng/source/editeng/impedit.cxx 
b/editeng/source/editeng/impedit.cxx
index ad32674b4140..666426c8485b 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -871,7 +871,7 @@ void ImpEditView::ResetOutputArea( const tools::Rectangle& 
rRect )
     SetOutputArea(rRect);
 
     // invalidate surrounding areas if update is true
-    if(!(!aOldArea.IsEmpty() && pEditEngine->pImpEditEngine->GetUpdateMode()))
+    if(aOldArea.IsEmpty() || !pEditEngine->pImpEditEngine->GetUpdateMode())
         return;
 
     // #i119885# use grown area if needed; do when getting bigger OR smaller
@@ -2101,7 +2101,7 @@ void ImpEditView::HideDDCursor()
 
 void ImpEditView::ShowDDCursor( const tools::Rectangle& rRect )
 {
-    if ( !(pDragAndDropInfo && !pDragAndDropInfo->bVisCursor) )
+    if ( !pDragAndDropInfo || pDragAndDropInfo->bVisCursor )
         return;
 
     if (pOutWin && pOutWin->GetCursor())
diff --git a/editeng/source/editeng/impedit2.cxx 
b/editeng/source/editeng/impedit2.cxx
index a94fcf958722..34babbcedc7f 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -4141,7 +4141,7 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion )
     }
 
 
-    if ( !(nPortion && !aStatus.ULSpaceSummation()) )
+    if ( !nPortion || aStatus.ULSpaceSummation() )
         return;
 
     ParaPortion* pPrev = GetParaPortions().SafeGetObject( nPortion-1 );
diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index 00a999a5abac..42525141c461 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2068,8 +2068,7 @@ void ImpEditEngine::ApplyChangedSentence(EditView const & 
rEditView,
     // sentence got removed in the dialog
 
     DBG_ASSERT(pSpellInfo, "pSpellInfo not initialized");
-    if (!(pSpellInfo &&
-        !pSpellInfo->aLastSpellPortions.empty()))  // no portions -> no text 
to be changed
+    if (!pSpellInfo || pSpellInfo->aLastSpellPortions.empty())  // no portions 
-> no text to be changed
         return;
 
     // get current paragraph length to calculate later on how the sentence 
length changed,
diff --git a/editeng/source/misc/hangulhanja.cxx 
b/editeng/source/misc/hangulhanja.cxx
index 840868edbd00..7d09c85c096a 100644
--- a/editeng/source/misc/hangulhanja.cxx
+++ b/editeng/source/misc/hangulhanja.cxx
@@ -277,7 +277,7 @@ namespace editeng
     void HangulHanjaConversion_Impl::createDialog()
     {
         DBG_ASSERT( m_bIsInteractive, "createDialog when the conversion should 
not be interactive?" );
-        if ( !(m_bIsInteractive && !m_pConversionDialog) )
+        if ( !m_bIsInteractive || m_pConversionDialog )
             return;
 
         EditAbstractDialogFactory* pFact = EditAbstractDialogFactory::Create();
diff --git a/editeng/source/outliner/outliner.cxx 
b/editeng/source/outliner/outliner.cxx
index 8cf7132c5a6b..27d86600aa3d 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -1049,8 +1049,8 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& 
rStartPos,
     }
 
     // In case of collapsed subparagraphs paint a line before the text.
-    if( !(pParaList->HasChildren(pPara) && 
!pParaList->HasVisibleChildren(pPara) &&
-            !bStrippingPortions && !nOrientation) )
+    if( !pParaList->HasChildren(pPara) || pParaList->HasVisibleChildren(pPara) 
||
+            bStrippingPortions || nOrientation )
         return;
 
     long nWidth = pOutDev->PixelToLogic( Size( 10, 0 ) ).Width();
diff --git a/editeng/source/outliner/outlvw.cxx 
b/editeng/source/outliner/outlvw.cxx
index 8d1127e15ba8..2bd7d8bb9172 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -677,7 +677,7 @@ void OutlinerView::PasteSpecial()
 
 void OutlinerView::Paste( bool bUseSpecial )
 {
-    if ( !(!ImpCalcSelectedPages( false ) || 
pOwner->ImpCanDeleteSelectedPages( this )) )
+    if ( ImpCalcSelectedPages( false ) && !pOwner->ImpCanDeleteSelectedPages( 
this ) )
         return;
 
     pOwner->UndoActionStart( OLUNDO_INSERT );
diff --git a/extensions/source/bibliography/toolbar.cxx 
b/extensions/source/bibliography/toolbar.cxx
index d7726cbf9580..1bd3680e0f96 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -363,7 +363,7 @@ void BibToolBar::SendDispatch(sal_uInt16 nId, const 
Sequence< PropertyValue >& r
 
     uno::Reference< frame::XDispatchProvider >  xDSP( xController, UNO_QUERY );
 
-    if( !(xDSP.is() && !aCommand.isEmpty()))
+    if( !xDSP.is() || aCommand.isEmpty() )
         return;
 
     uno::Reference< util::XURLTransformer >  xTrans( 
util::URLTransformer::create(comphelper::getProcessComponentContext()) );
diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx 
b/extensions/source/propctrlr/eformspropertyhandler.cxx
index 0a972e25697a..bda8df5a0c05 100644
--- a/extensions/source/propctrlr/eformspropertyhandler.cxx
+++ b/extensions/source/propctrlr/eformspropertyhandler.cxx
@@ -496,7 +496,7 @@ namespace pcr
 
             OSL_ENSURE( xModel.is() && xBinding.is() && !sFacetName.isEmpty(),
                 "EFormsPropertyHandler::onInteractivePropertySelection: 
something is missing for the dialog initialization!" );
-            if ( !( xModel.is() && xBinding.is() && !sFacetName.isEmpty() ) )
+            if ( !xModel.is() || !xBinding.is() || sFacetName.isEmpty() )
                 return InteractiveSelectionResult_Cancelled;
 
             xDialogProps->setPropertyValue("FormModel", makeAny( xModel ) );
diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx 
b/filter/source/graphicfilter/icgm/actimpr.cxx
index 604c09862b29..652edeed2d14 100644
--- a/filter/source/graphicfilter/icgm/actimpr.cxx
+++ b/filter/source/graphicfilter/icgm/actimpr.cxx
@@ -544,7 +544,7 @@ void CGMImpressOutAct::DrawEllipticalArc( FloatPoint const 
& rCenter, FloatPoint
 
 void CGMImpressOutAct::DrawBitmap( CGMBitmapDescriptor* pBmpDesc )
 {
-    if ( !(pBmpDesc->mbStatus && !!pBmpDesc->mxBitmap) )
+    if ( !pBmpDesc->mbStatus || !pBmpDesc->mxBitmap )
         return;
 
     FloatPoint aOrigin = pBmpDesc->mnOrigin;
diff --git a/filter/source/msfilter/escherex.cxx 
b/filter/source/msfilter/escherex.cxx
index 2dabfa2014d5..7bb27d496f3b 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -864,7 +864,7 @@ void EscherPropertyContainer::CreateTextProperties(
     // n#404221: In case of rotation we need to write the txtflTextFlow
     // attribute too.
     // fdo#58204: not custom shapes (TODO: other cases when it doesn't work?)
-    if (!(bIsTextFrame && !bIsCustomShape))
+    if (!bIsTextFrame || bIsCustomShape)
         return;
 
     sal_uInt16 nAngle = EscherPropertyValueHelper::GetPropertyValue(
diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index ef51e0be269f..a8e2905ce70d 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1725,7 +1725,7 @@ bool PPTConvertOCXControls::InsertControl(
 };
 void PPTConvertOCXControls::GetDrawPage()
 {
-    if( !(!xDrawPage.is() && mxModel.is()) )
+    if( xDrawPage.is() || !mxModel.is() )
         return;
 
     css::uno::Reference< css::drawing::XDrawPages > xDrawPages;
diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx 
b/filter/source/xsltdialog/xmlfilterjar.cxx
index 94dd2540d478..fa8690824d3f 100644
--- a/filter/source/xsltdialog/xmlfilterjar.cxx
+++ b/filter/source/xsltdialog/xmlfilterjar.cxx
@@ -115,11 +115,11 @@ static void addFile_( Reference< XInterface > const & 
xRootFolder, Reference< XS
 
 void XMLFilterJarHelper::addFile( Reference< XInterface > const & xRootFolder, 
Reference< XSingleServiceFactory > const & xFactory, const OUString& 
rSourceFile )
 {
-    if( !(!rSourceFile.isEmpty() &&
-        !rSourceFile.startsWith("http:") &&
-        !rSourceFile.startsWith("https:") &&
-        !rSourceFile.startsWith("jar:") &&
-        !rSourceFile.startsWith("ftp:")) )
+    if( rSourceFile.isEmpty() ||
+        rSourceFile.startsWith("http:") ||
+        rSourceFile.startsWith("https:") ||
+        rSourceFile.startsWith("jar:") ||
+        rSourceFile.startsWith("ftp:") )
         return;
 
     OUString aFileURL( rSourceFile );
diff --git a/forms/source/component/imgprod.cxx 
b/forms/source/component/imgprod.cxx
index a7435f2b654e..9bd74f9f4792 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -248,7 +248,7 @@ void ImageProducer::NewDataAvailable()
 
 void ImageProducer::startProduction()
 {
-    if( !(!maConsList.empty() || maDoneHdl.IsSet()) )
+    if( maConsList.empty() && !maDoneHdl.IsSet() )
         return;
 
     bool bNotifyEmptyGraphics = false;
diff --git a/formula/source/ui/dlg/formula.cxx 
b/formula/source/ui/dlg/formula.cxx
index b92824fc60a5..71404a0f3dbf 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -1548,7 +1548,7 @@ void FormulaDlg_Impl::RefInputStartAfter()
 void FormulaDlg_Impl::RefInputDoneAfter( bool bForced )
 {
     m_xRefBtn->SetStartImage();
-    if (!(bForced || !m_xRefBtn->GetWidget()->get_visible()))
+    if (!bForced && m_xRefBtn->GetWidget()->get_visible())
         return;
 
     m_xEdRef->GetWidget()->hide();
diff --git a/framework/source/jobs/job.cxx b/framework/source/jobs/job.cxx
index 9f85f8452d3f..4cb9c5bb0ce1 100644
--- a/framework/source/jobs/job.cxx
+++ b/framework/source/jobs/job.cxx
@@ -525,7 +525,7 @@ void Job::impl_startListening()
     }
 
     // listening for model closing
-    if (!(m_xModel.is() && !m_bListenOnModel))
+    if (!m_xModel.is() || m_bListenOnModel)
         return;
 
     try
diff --git a/framework/source/services/frame.cxx 
b/framework/source/services/frame.cxx
index 676965b3230c..db71cfdbcbdd 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -2501,8 +2501,8 @@ void SAL_CALL XFrameImpl::windowDeactivated( const 
css::lang::EventObject& )
     // is a parent window of the last active Window!
     SolarMutexClearableGuard aSolarGuard;
     vcl::Window* pFocusWindow = Application::GetFocusWindow();
-    if  ( !(xContainerWindow.is() && xParent.is() &&
-          !css::uno::Reference< css::frame::XDesktop >( xParent, 
css::uno::UNO_QUERY ).is())
+    if  ( !xContainerWindow.is() || !xParent.is() ||
+          css::uno::Reference< css::frame::XDesktop >( xParent, 
css::uno::UNO_QUERY ).is()
         )
         return;
 
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx 
b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index 8062a3b27d75..f2dfd653009f 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -1494,7 +1494,7 @@ void SAL_CALL ModuleUIConfigurationManager::reload()
     if ( m_bDisposed )
         throw DisposedException();
 
-    if ( !(m_xUserConfigStorage.is() && m_bModified && !m_bReadOnly) )
+    if ( !m_xUserConfigStorage.is() || !m_bModified || m_bReadOnly )
         return;
 
     // Try to access our module sub folder
@@ -1537,7 +1537,7 @@ void SAL_CALL ModuleUIConfigurationManager::store()
     if ( m_bDisposed )
         throw DisposedException();
 
-    if ( !(m_xUserConfigStorage.is() && m_bModified && !m_bReadOnly) )
+    if ( !m_xUserConfigStorage.is() || !m_bModified || m_bReadOnly )
         return;
 
     // Try to access our module sub folder
@@ -1569,7 +1569,7 @@ void SAL_CALL 
ModuleUIConfigurationManager::storeToStorage( const Reference< XSt
     if ( m_bDisposed )
         throw DisposedException();
 
-    if ( !(m_xUserConfigStorage.is() && m_bModified && !m_bReadOnly) )
+    if ( !m_xUserConfigStorage.is() || !m_bModified || m_bReadOnly )
         return;
 
     // Try to access our module sub folder
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx 
b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index 84262be81c1a..8a3ba8304c70 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -1226,7 +1226,7 @@ void SAL_CALL UIConfigurationManager::reload()
     if ( m_bDisposed )
         throw DisposedException();
 
-    if ( !(m_xDocConfigStorage.is() && m_bModified && !m_bReadOnly) )
+    if ( !m_xDocConfigStorage.is() || !m_bModified || m_bReadOnly )
         return;
 
     // Try to access our module sub folder
@@ -1265,7 +1265,7 @@ void SAL_CALL UIConfigurationManager::store()
     if ( m_bDisposed )
         throw DisposedException();
 
-    if ( !(m_xDocConfigStorage.is() && m_bModified && !m_bReadOnly) )
+    if ( !m_xDocConfigStorage.is() || !m_bModified || m_bReadOnly )
         return;
 
     // Try to access our module sub folder
@@ -1297,7 +1297,7 @@ void SAL_CALL UIConfigurationManager::storeToStorage( 
const Reference< XStorage
     if ( m_bDisposed )
         throw DisposedException();
 
-    if ( !(m_xDocConfigStorage.is() && m_bModified && !m_bReadOnly) )
+    if ( !m_xDocConfigStorage.is() || !m_bModified || m_bReadOnly )
         return;
 
     // Try to access our module sub folder
diff --git a/framework/source/uielement/uicommanddescription.cxx 
b/framework/source/uielement/uicommanddescription.cxx
index a33099ae5cb5..f53c2a5cb1fc 100644
--- a/framework/source/uielement/uicommanddescription.cxx
+++ b/framework/source/uielement/uicommanddescription.cxx
@@ -349,7 +349,7 @@ void ConfigurationAccess_UICommand::fillCache()
 
 void ConfigurationAccess_UICommand::addGenericInfoToCache()
 {
-    if ( !(m_xGenericUICommands.is() && !m_bGenericDataRetrieved) )
+    if ( !m_xGenericUICommands.is() || m_bGenericDataRetrieved )
         return;
 
     Sequence< OUString > aCommandNameSeq;
diff --git a/idlc/source/astinterface.cxx b/idlc/source/astinterface.cxx
index a5f2ed21bf2c..50e24d1fd667 100644
--- a/idlc/source/astinterface.cxx
+++ b/idlc/source/astinterface.cxx
@@ -287,7 +287,7 @@ void AstInterface::checkInheritedInterfaceClashes(
             return;
         }
     }
-    if (!(direct || !optional))
+    if (!direct && optional)
         return;
 
     for (DeclList::const_iterator i(ifc->getIteratorBegin());
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 5891dbbd4fb1..5f25749da164 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -870,7 +870,7 @@ void LngSvcMgr::GetSpellCheckerDsp_Impl( bool bSetSvcList )
 
 void LngSvcMgr::GetGrammarCheckerDsp_Impl( bool bSetSvcList  )
 {
-    if (!(!mxGrammarDsp.is() && SvtLinguConfig().HasGrammarChecker()))
+    if (mxGrammarDsp.is() || !SvtLinguConfig().HasGrammarChecker())
         return;
 
     //! since the grammar checking iterator needs to be a one instance service
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
diff --git a/reportdesign/source/core/sdr/UndoActions.cxx 
b/reportdesign/source/core/sdr/UndoActions.cxx
index 84161e92bcb1..02585c420eaa 100644
--- a/reportdesign/source/core/sdr/UndoActions.cxx
+++ b/reportdesign/source/core/sdr/UndoActions.cxx
@@ -112,7 +112,7 @@ OUndoContainerAction::~OUndoContainerAction()
 
     // and the object does not have a parent
     Reference< XChild >  xChild( m_xOwnElement, UNO_QUERY );
-    if ( !(xChild.is() && !xChild->getParent().is()) )
+    if ( !xChild.is() || xChild->getParent().is() )
         return;
 
     OXUndoEnvironment& rEnv = static_cast< OReportModel& >( rMod 
).GetUndoEnv();
diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx 
b/reportdesign/source/filter/xml/xmlControlProperty.cxx
index 4d69f5dff943..8af7508269aa 100644
--- a/reportdesign/source/filter/xml/xmlControlProperty.cxx
+++ b/reportdesign/source/filter/xml/xmlControlProperty.cxx
@@ -138,7 +138,7 @@ void OXMLControlProperty::endFastElement(sal_Int32 )
 {
     if ( m_pContainer )
         m_pContainer->addValue(m_aCharBuffer.makeStringAndClear());
-    if ( !(!m_aSetting.Name.isEmpty() && m_xControl.is()) )
+    if ( m_aSetting.Name.isEmpty() || !m_xControl.is() )
         return;
 
     if ( m_bIsList && !m_aSequence.hasElements() )
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 8174eeb84bbb..201c7698d9a6 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -52,7 +52,7 @@ ScAttrArray::ScAttrArray( SCCOL nNewCol, SCTAB nNewTab, 
ScDocument* pDoc, ScAttr
     nTab( nNewTab ),
     pDocument( pDoc )
 {
-    if ( !(nCol != -1 && pDefaultColAttrArray && 
!pDefaultColAttrArray->mvData.empty()))
+    if ( nCol == -1 || !pDefaultColAttrArray || 
pDefaultColAttrArray->mvData.empty() )
         return;
 
     ScAddress aAdrStart( nCol, 0, nTab );
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx
index 598643b7f473..2702e1e65e54 100644
--- a/sc/source/core/data/documen5.cxx
+++ b/sc/source/core/data/documen5.cxx
@@ -371,7 +371,7 @@ void ScDocument::RestoreChartListener( const OUString& 
rName )
     uno::Reference< util::XCloseable > xComponent = xObject->getComponent();
     uno::Reference< chart2::XChartDocument > xChartDoc( xComponent, 
uno::UNO_QUERY );
     uno::Reference< chart2::data::XDataReceiver > xReceiver( xComponent, 
uno::UNO_QUERY );
-    if ( !(xChartDoc.is() && xReceiver.is() && 
!xChartDoc->hasInternalDataProvider()))
+    if ( !xChartDoc.is() || !xReceiver.is() || 
xChartDoc->hasInternalDataProvider() )
         return;
 
     const uno::Sequence<OUString> aRepresentations( 
xReceiver->getUsedRangeRepresentations() );
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 8519edb13122..0fa8647cecb1 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -1455,7 +1455,7 @@ void ScDPResultMember::FillMemberResults(
 
     long nUserSubStart;
     long nUserSubCount = GetSubTotalCount(&nUserSubStart);
-    if ( !(nUserSubCount && pChildDimension && !bSubTotalInTitle) )
+    if ( !nUserSubCount || !pChildDimension || bSubTotalInTitle )
         return;
 
     long nMemberMeasure = nMeasure;
@@ -1581,7 +1581,7 @@ void ScDPResultMember::FillDataResults(
 
     long nUserSubStart;
     long nUserSubCount = GetSubTotalCount(&nUserSubStart);
-    if ( !(nUserSubCount || !bHasChild) )
+    if ( !nUserSubCount && bHasChild )
         return;
 
     // Calculate at least automatic if no subtotals are selected,
@@ -2093,7 +2093,7 @@ void ScDPDataMember::FillDataRow(
 
     long nUserSubStart;
     long nUserSubCount = pRefMember->GetSubTotalCount(&nUserSubStart);
-    if ( !(nUserSubCount || !bHasChild) )
+    if ( !nUserSubCount && bHasChild )
         return;
 
     // Calculate at least automatic if no subtotals are selected,
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 2ce838df8477..449a4a900a7e 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -3001,7 +3001,7 @@ public:
             if (pEntry)
             {
                 SvNumFormatType nNumFmtType = pEntry->GetType();
-                if (!((nNumFmtType & SvNumFormatType::DATE) && !(nNumFmtType & 
SvNumFormatType::TIME)))
+                if (!(nNumFmtType & SvNumFormatType::DATE) || (nNumFmtType & 
SvNumFormatType::TIME))
                     rItem.meType = ScQueryEntry::ByValue;    // not a date only
             }
             else
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 4f12df13ec42..ca79af8606d6 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -3217,7 +3217,7 @@ void ScChangeTrack::MergePrepare( const ScChangeAction* 
pFirstMerge, bool bShare
 void ScChangeTrack::MergeOwn( ScChangeAction* pAct, sal_uLong nFirstMerge, 
bool bShared )
 {
     // #i94841# [Collaboration] When deleting rows is rejected, the content is 
sometimes wrong
-    if ( !(bShared || !ScChangeTrack::MergeIgnore( *pAct, nFirstMerge )) )
+    if ( !bShared && ScChangeTrack::MergeIgnore( *pAct, nFirstMerge ) )
         return;
 
     SetMergeState( SC_CTMS_OWN );
diff --git a/sc/source/filter/excel/xepivot.cxx 
b/sc/source/filter/excel/xepivot.cxx
index 8200d281e501..0d8909b01793 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -1335,7 +1335,7 @@ void XclExpPivotTable::SetFieldPropertiesFromDim( const 
ScDPSaveDimension& rSave
     bool bDataLayout = nFieldIdx == EXC_SXIVD_DATA;
     bool bMultiData = maDataFields.size() > 1;
 
-    if( !(!bDataLayout || bMultiData) )
+    if( bDataLayout && !bMultiData )
         return;
 
     switch( eOrient )
diff --git a/sc/source/filter/oox/autofilterbuffer.cxx 
b/sc/source/filter/oox/autofilterbuffer.cxx
index 6cb33c4d2658..1136425465eb 100644
--- a/sc/source/filter/oox/autofilterbuffer.cxx
+++ b/sc/source/filter/oox/autofilterbuffer.cxx
@@ -666,7 +666,7 @@ void AutoFilterBuffer::finalizeImport( sal_Int16 nSheet )
     // first, try to create an auto filter
     bool bHasAutoFilter = finalizeImport( xDatabaseRange );
     // no success: try to create an advanced filter
-    if( !(!bHasAutoFilter && xDatabaseRange.is()) )
+    if( bHasAutoFilter || !xDatabaseRange.is() )
         return;
 
     // the built-in defined name 'Criteria' must exist
diff --git a/sc/source/filter/oox/formulabase.cxx 
b/sc/source/filter/oox/formulabase.cxx
index afd418acaf85..f6553af07cd9 100644
--- a/sc/source/filter/oox/formulabase.cxx
+++ b/sc/source/filter/oox/formulabase.cxx
@@ -1687,7 +1687,7 @@ void FormulaProcessorBase::convertStringToStringList(
         ApiTokenSequence& orTokens, sal_Unicode cStringSep, bool 
bTrimLeadingSpaces ) const
 {
     OUString aString;
-    if( !(extractString( aString, orTokens ) && !aString.isEmpty()) )
+    if( !extractString( aString, orTokens ) || aString.isEmpty() )
         return;
 
     ::std::vector< ApiToken > aNewTokens;
diff --git a/sc/source/filter/oox/pivottablebuffer.cxx 
b/sc/source/filter/oox/pivottablebuffer.cxx
index 23889b790774..2717fff2a610 100644
--- a/sc/source/filter/oox/pivottablebuffer.cxx
+++ b/sc/source/filter/oox/pivottablebuffer.cxx
@@ -1208,7 +1208,7 @@ void PivotTable::finalizeImport()
         return;
 
     mpPivotCache = getPivotCaches().importPivotCacheFragment( 
maDefModel.mnCacheId );
-    if( !(mpPivotCache && mpPivotCache->isValidDataSource() && 
!maDefModel.maName.isEmpty()) )
+    if( !mpPivotCache || !mpPivotCache->isValidDataSource() || 
maDefModel.maName.isEmpty() )
         return;
 
     // clear destination area of the original pivot table
diff --git a/sc/source/filter/oox/querytablebuffer.cxx 
b/sc/source/filter/oox/querytablebuffer.cxx
index fc1110406dd8..8d5ec052d139 100644
--- a/sc/source/filter/oox/querytablebuffer.cxx
+++ b/sc/source/filter/oox/querytablebuffer.cxx
@@ -219,7 +219,7 @@ void QueryTable::finalizeImport()
 
     // check that valid web query properties exist
     const WebPrModel* pWebPr = xConnection->getModel().mxWebPr.get();
-    if( !(pWebPr && !pWebPr->mbXml) )
+    if( !pWebPr || pWebPr->mbXml )
         return;
 
     OUString aFileUrl = getBaseFilter().getAbsoluteUrl( pWebPr->maUrl );
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx 
b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
index 7eddf7c25ece..02e0b7b2cbec 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
@@ -507,7 +507,7 @@ void 
ScChangeTrackingExportHelper::AddDeletionAttributes(const ScChangeActionDel
         return;
 
     rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_TABLE, 
OUString::number(nStartSheet));
-    if (!(pDelAction->IsMultiDelete() && !pDelAction->GetDx() && 
!pDelAction->GetDy()))
+    if (!pDelAction->IsMultiDelete() || pDelAction->GetDx() || 
pDelAction->GetDy())
         return;
 
     const ScChangeAction* p = pDelAction->GetNext();
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx 
b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
index dc1a93a7c913..c3d505143536 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
@@ -653,7 +653,7 @@ void ScXMLChangeTrackingImportHelper::SetNewCell(const 
ScMyContentAction* pActio
 
     assert(dynamic_cast<ScChangeActionContent*>(pChangeAction));
     ScChangeActionContent* pChangeActionContent = 
static_cast<ScChangeActionContent*>(pChangeAction);
-    if (!(pChangeActionContent->IsTopContent() && 
!pChangeActionContent->IsDeletedIn()))
+    if (!pChangeActionContent->IsTopContent() || 
pChangeActionContent->IsDeletedIn())
         return;
 
     sal_Int32 nCol, nRow, nTab, nCol2, nRow2, nTab2;
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx 
b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 5a66ece4bd7d..bdf2e4cf7972 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -114,8 +114,8 @@ void ScMyValidationsContainer::AddValidation(const 
uno::Any& aTempAny,
     bool bShowInputMessage = 
::cppu::any2bool(xPropertySet->getPropertyValue(gsSHOWINP));
     sheet::ValidationType aValidationType;
     xPropertySet->getPropertyValue(gsTYPE) >>= aValidationType;
-    if (!(bShowErrorMessage || bShowInputMessage || aValidationType != 
sheet::ValidationType_ANY ||
-        !sErrorMessage.isEmpty() || !sErrorTitle.isEmpty() || 
!sInputMessage.isEmpty() || !sInputTitle.isEmpty()))
+    if (!bShowErrorMessage && !bShowInputMessage && aValidationType == 
sheet::ValidationType_ANY &&
+        sErrorMessage.isEmpty() && sErrorTitle.isEmpty() && 
sInputMessage.isEmpty() && sInputTitle.isEmpty())
         return;
 
     ScMyValidation aValidation;
diff --git a/sc/source/filter/xml/XMLTableShapeResizer.cxx 
b/sc/source/filter/xml/XMLTableShapeResizer.cxx
index 84577bcaf2e6..b5c3b56e4f8e 100644
--- a/sc/source/filter/xml/XMLTableShapeResizer.cxx
+++ b/sc/source/filter/xml/XMLTableShapeResizer.cxx
@@ -117,7 +117,7 @@ void ScMyOLEFixer::AddOLE(const uno::Reference 
<drawing::XShape>& rShape,
 
 void ScMyOLEFixer::FixupOLEs()
 {
-    if (!(!aShapes.empty() && rImport.GetModel().is()))
+    if (aShapes.empty() || !rImport.GetModel().is())
         return;
 
     OUString sPersistName ("PersistName");
diff --git a/sc/source/filter/xml/xmlcelli.cxx 
b/sc/source/filter/xml/xmlcelli.cxx
index cb8e50a1acc0..1551fb9fbb6f 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -947,7 +947,7 @@ void ScXMLTableRowCellContext::SetAnnotation(const 
ScAddress& rPos)
 void ScXMLTableRowCellContext::SetDetectiveObj( const ScAddress& rPosition )
 {
     ScDocument* pDoc = rXMLImport.GetDocument();
-    if( !(pDoc && cellExists(*pDoc, rPosition) && pDetectiveObjVec && 
!pDetectiveObjVec->empty()) )
+    if( !pDoc || !cellExists(*pDoc, rPosition) || !pDetectiveObjVec || 
pDetectiveObjVec->empty() )
         return;
 
     LockSolarMutex();
@@ -969,8 +969,8 @@ void ScXMLTableRowCellContext::SetDetectiveObj( const 
ScAddress& rPosition )
 void ScXMLTableRowCellContext::SetCellRangeSource( const ScAddress& rPosition )
 {
     ScDocument* pDoc = rXMLImport.GetDocument();
-    if( !(pDoc && cellExists(*pDoc, rPosition) && pCellRangeSource  && 
!pCellRangeSource->sSourceStr.isEmpty() &&
-        !pCellRangeSource->sFilterName.isEmpty() && 
!pCellRangeSource->sURL.isEmpty()) )
+    if( !pDoc || !cellExists(*pDoc, rPosition) || !pCellRangeSource || 
pCellRangeSource->sSourceStr.isEmpty() ||
+        pCellRangeSource->sFilterName.isEmpty() || 
pCellRangeSource->sURL.isEmpty() )
         return;
 
     LockSolarMutex();
diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index cf05f7814ac9..1c35e014a6c8 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3510,7 +3510,7 @@ void ScXMLExport::WriteShapes(const ScMyCell& rMyCell)
 void ScXMLExport::WriteTableShapes()
 {
     ScMyTableShapes* pTableShapes(pSharedData->GetTableShapes());
-    if (!(pTableShapes && !(*pTableShapes)[nCurrentTable].empty()))
+    if (!pTableShapes || (*pTableShapes)[nCurrentTable].empty())
         return;
 
     OSL_ENSURE(pTableShapes->size() > static_cast<size_t>(nCurrentTable), 
"wrong Table");
diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx 
b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
index 14d660c7fd91..f775a1137459 100644
--- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
@@ -384,7 +384,7 @@ void SAL_CALL
         return;
 
     SolarMutexGuard aGuard;
-    if (!(!IsDefunc() && mnClientId))
+    if (IsDefunc() || !mnClientId)
         return;
 
     sal_Int32 nListenerCount = 
comphelper::AccessibleEventNotifier::removeEventListener( mnClientId, xListener 
);
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx 
b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 737590610bf5..836e63e0c28b 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -684,7 +684,7 @@ void ScChildrenShapes::Select(sal_Int32 nIndex)
         return;
 
     uno::Reference<drawing::XShape> xShape;
-    if (!(!IsSelected(nIndex, xShape) && 
maZOrderedShapes[nIndex]->bSelectable))
+    if (IsSelected(nIndex, xShape) || !maZOrderedShapes[nIndex]->bSelectable)
         return;
 
     uno::Reference<drawing::XShapes> 
xShapes(mpViewShell->getSelectedXShapes());
diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx
index f9aca0c64d6c..1c819a021ae2 100644
--- a/sc/source/ui/docshell/docsh2.cxx
+++ b/sc/source/ui/docshell/docsh2.cxx
@@ -114,8 +114,8 @@ void ScDocShell::InitItems()
         PutItem( SvxColorListItem( XColorList::GetStdColorList(), 
SID_COLOR_TABLE ) );
     }
 
-    if (!(!utl::ConfigManager::IsFuzzing() &&
-        (!m_aDocument.GetForbiddenCharacters() || 
!m_aDocument.IsValidAsianCompression() || !m_aDocument.IsValidAsianKerning())))
+    if (utl::ConfigManager::IsFuzzing() ||
+        (m_aDocument.GetForbiddenCharacters() && 
m_aDocument.IsValidAsianCompression() && m_aDocument.IsValidAsianKerning()))
         return;
 
     //  get settings from SvxAsianConfig
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index c21a8d859cbc..4c756ca3b646 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -484,7 +484,7 @@ bool ScFormulaDlg::IsDocAllowed(SfxObjectShell* pDocSh) 
const
 {
     //  not allowed: different from this doc, and no name
     //  pDocSh is always a ScDocShell
-    return !(pDocSh && &static_cast<ScDocShell*>(pDocSh)->GetDocument() != 
m_pDoc && !pDocSh->HasName());        // everything else is allowed
+    return !pDocSh || &static_cast<ScDocShell*>(pDocSh)->GetDocument() == 
m_pDoc || pDocSh->HasName();        // everything else is allowed
 }
 
 void ScFormulaDlg::SetActive()
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index b4b9e6498c21..bf47a5608406 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -1680,7 +1680,7 @@ ScDocument* ScCellRangesBase::GetDocument() const
 
 void ScCellRangesBase::InitInsertRange(ScDocShell* pDocSh, const ScRange& rR)
 {
-    if ( !(!pDocShell && pDocSh) )
+    if ( pDocShell || !pDocSh )
         return;
 
     pDocShell = pDocSh;
@@ -3238,7 +3238,7 @@ void SAL_CALL 
ScCellRangesBase::addChartDataChangeEventListener( const uno::Refe
                                     chart::XChartDataChangeEventListener >& 
aListener )
 {
     SolarMutexGuard aGuard;
-    if ( !(pDocShell && !aRanges.empty()) )
+    if ( !pDocShell || aRanges.empty() )
         return;
 
     //! test for duplicates ?
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index ff7e37538c08..3885415df7a6 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -271,7 +271,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
                 //! is not called, when protected AND matrix, we will have
                 //! to live with this... is caught in Copy-Routine, otherwise
                 //! work is to be done once more
-                if ( !(!bEditable && bOnlyNotBecauseOfMatrix) )
+                if ( bEditable || !bOnlyNotBecauseOfMatrix )
                     bNeedEdit = false;          // allowed when 
protected/ReadOnly
                 bDisable = GetObjectShell()->isContentExtractionLocked();
                 break;
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 1a73ffb7169e..046c70e4b4b1 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -2068,7 +2068,7 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW 
nRefStartY,
         if (bRight)
             mpDev->DrawLine( Point( nMaxX, nMinY ), Point( nMaxX, nMaxY ) );
     }
-    if ( !(bHandle && bRight && bBottom && 
!comphelper::LibreOfficeKit::isActive()) )
+    if ( !bHandle || !bRight || !bBottom || 
comphelper::LibreOfficeKit::isActive() )
         return;
 
     mpDev->SetLineColor( rColor );
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index e1463ccebf53..3aa42c29a77f 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -166,7 +166,7 @@ void ScViewFunctionSet::BeginDrag()
 
     ScMarkData& rMark = pViewData->GetMarkData();
     rMark.MarkToSimple();
-    if ( !(rMark.IsMarked() && !rMark.IsMultiMarked()) )
+    if ( !rMark.IsMarked() || rMark.IsMultiMarked() )
         return;
 
     ScDocumentUniquePtr pClipDoc(new ScDocument( SCDOCMODE_CLIP ));
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index 99eb33fa9670..7442cb261acb 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -411,7 +411,7 @@ void ScTabView::DoneBlockMode( bool bContinue )
     // because the other engine does not have any anchor.
     // bMoveIsShift prevents the selection to be canceled.
 
-    if (!(IsBlockMode() && !bMoveIsShift))
+    if (!IsBlockMode() || bMoveIsShift)
         return;
 
     ScMarkData& rMark = aViewData.GetMarkData();
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 59687f189450..c33f9d5f3f98 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -819,8 +819,8 @@ void SdDrawDocument::StopOnlineSpelling()
 // Start OnlineSpelling in the background
 void SdDrawDocument::StartOnlineSpelling(bool bForceSpelling)
 {
-    if (!(mbOnlineSpell && (bForceSpelling || mbInitialOnlineSpellingEnabled) 
&&
-        mpDocSh && !mpDocSh->IsReadOnly()) )
+    if ( !mbOnlineSpell || !(bForceSpelling || mbInitialOnlineSpellingEnabled) 
||
+         !mpDocSh || mpDocSh->IsReadOnly() )
         return;
 
     StopOnlineSpelling();
diff --git a/sd/source/ui/animations/motionpathtag.cxx 
b/sd/source/ui/animations/motionpathtag.cxx
index 4c5226fcf8c6..1bc2c58cad96 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -285,7 +285,7 @@ void SdPathHdl::CreateB2dIAObject()
 
     SdrMarkView* pView = pHdlList->GetView();
 
-    if(!(pView && !pView->areMarkHandlesHidden()))
+    if(!pView || pView->areMarkHandlesHidden())
         return;
 
     SdrPageView* pPageView = pView->GetSdrPageView();
diff --git a/sd/source/ui/annotations/annotationtag.cxx 
b/sd/source/ui/annotations/annotationtag.cxx
index 4e1cd4504791..f4b0d66a5563 100644
--- a/sd/source/ui/annotations/annotationtag.cxx
+++ b/sd/source/ui/annotations/annotationtag.cxx
@@ -200,7 +200,7 @@ void AnnotationHdl::CreateB2dIAObject()
 
     SdrMarkView* pView = pHdlList->GetView();
 
-    if(!(pView && !pView->areMarkHandlesHidden()))
+    if(!pView || pView->areMarkHandlesHidden())
         return;
 
     SdrPageView* pPageView = pView->GetSdrPageView();
diff --git a/sd/source/ui/annotations/annotationwindow.cxx 
b/sd/source/ui/annotations/annotationwindow.cxx
index 828045c6b2da..fab5c58679f0 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -603,7 +603,7 @@ void AnnotationWindow::Paint(vcl::RenderContext& 
rRenderContext, const ::tools::
 {
     FloatingWindow::Paint(rRenderContext, rRect);
 
-    if(!(mpMeta->IsVisible() && !mbReadonly))
+    if(!mpMeta->IsVisible() || mbReadonly)
         return;
 
     const bool bHighContrast = 
Application::GetSettings().GetStyleSettings().GetHighContrastMode();
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index 769003d1ded9..b56c4a7c6389 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -375,7 +375,7 @@ static bool lcl_HasOnlyOneTable( SdrModel* pModel )
 
 void SdTransferable::AddSupportedFormats()
 {
-    if( !(!mbPageTransferable || mbPageTransferablePersistent) )
+    if( mbPageTransferable && !mbPageTransferablePersistent )
         return;
 
     if( !mbLateInit )
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 358805436097..a44e89b3b34b 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -1178,11 +1178,11 @@ void FuText::DeleteDefaultText()
 
     PresObjKind ePresObjKind = pPage->GetPresObjKind(mxTextObj.get());
 
-    if ( !((ePresObjKind == PresObjKind::Title   ||
-          ePresObjKind == PresObjKind::Outline ||
-          ePresObjKind == PresObjKind::Notes   ||
-          ePresObjKind == PresObjKind::Text) &&
-          !pPage->IsMasterPage()) )
+    if ( !(ePresObjKind == PresObjKind::Title   ||
+           ePresObjKind == PresObjKind::Outline ||
+           ePresObjKind == PresObjKind::Notes   ||
+           ePresObjKind == PresObjKind::Text      ) ||
+          pPage->IsMasterPage() )
         return;
 
     ::Outliner* pOutliner = mpView->GetTextEditOutliner();
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index fba43df9aebe..9ca70b5ce710 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -2430,7 +2430,7 @@ void SAL_CALL SlideshowImpl::activate()
 
     maDeactivateTimer.Stop();
 
-    if( !(!mbActive && mxShow.is()) )
+    if( mbActive || !mxShow.is() )
         return;
 
     mbActive = true;
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 8db31ea24a25..0d7d14cc2f59 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1886,8 +1886,8 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 
nRenderer, const uno::Any& r
 
     vcl::PDFExtOutDevData* pPDFExtOutDevData = 
dynamic_cast<vcl::PDFExtOutDevData* >( pOut->GetExtOutDevData() );
 
-    if ( !(!( mpDoc->GetSdPage(static_cast<sal_Int16>(nPageNumber)-1, 
PageKind::Standard)->IsExcluded() ) ||
-        (pPDFExtOutDevData && pPDFExtOutDevData->GetIsExportHiddenSlides())) )
+    if ( mpDoc->GetSdPage(static_cast<sal_Int16>(nPageNumber)-1, 
PageKind::Standard)->IsExcluded() &&
+        !(pPDFExtOutDevData && pPDFExtOutDevData->GetIsExportHiddenSlides()) )
         return;
 
     if (pPDFExtOutDevData)
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx 
b/sd/source/ui/view/viewoverlaymanager.cxx
index 0485dde40f94..59c9fde7c377 100644
--- a/sd/source/ui/view/viewoverlaymanager.cxx
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -262,7 +262,7 @@ void ImageButtonHdl::CreateB2dIAObject()
 
     SdrMarkView* pView = pHdlList->GetView();
 
-    if(!(pView && !pView->areMarkHandlesHidden()))
+    if(!pView || pView->areMarkHandlesHidden())
         return;
 
     SdrPageView* pPageView = pView->GetSdrPageView();
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index e1af322f88eb..ec1dd6d27b5a 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -762,7 +762,7 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& 
rCEvt, ::sd::Window* pWi
 
 void ViewShell::SetupRulers()
 {
-    if(!(mbHasRulers && mpContentWindow && 
!SlideShow::IsRunning(GetViewShellBase())))
+    if(!mbHasRulers || !mpContentWindow || 
SlideShow::IsRunning(GetViewShellBase()))
         return;
 
     long nHRulerOfs = 0;
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index e706d9de3c21..022c0e4d3439 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1801,7 +1801,7 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl()
     }
 
     // if there are no used styles selected or the user approved the changes
-    if ( !(!bUsedStyle || aApproved) )
+    if ( bUsedStyle && !aApproved )
         return;
 
     for (auto const& elem : aList)
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 4114273f2cc6..588568af05d0 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -793,10 +793,12 @@ void SfxMedium::StorageBackup_Impl()
     ::ucbhelper::Content aOriginalContent;
     Reference< css::ucb::XCommandEnvironment > xDummyEnv;
 
-    bool bBasedOnOriginalFile = ( !pImpl->pTempFile && !( 
!pImpl->m_aLogicName.isEmpty() && pImpl->m_bSalvageMode )
+    bool bBasedOnOriginalFile =
+        !pImpl->pTempFile
+        && ( pImpl->m_aLogicName.isEmpty() || !pImpl->m_bSalvageMode )
         && !GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE 
).isEmpty()
         && GetURLObject().GetProtocol() == INetProtocol::File
-        && ::utl::UCBContentHelper::IsDocument( GetURLObject().GetMainURL( 
INetURLObject::DecodeMechanism::NONE ) ) );
+        && ::utl::UCBContentHelper::IsDocument( GetURLObject().GetMainURL( 
INetURLObject::DecodeMechanism::NONE ) );
 
     if ( bBasedOnOriginalFile && pImpl->m_aBackupURL.isEmpty()
       && ::ucbhelper::Content::create( GetURLObject().GetMainURL( 
INetURLObject::DecodeMechanism::NONE ), xDummyEnv, 
comphelper::getProcessComponentContext(), aOriginalContent ) )
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 533650751d75..e0b657a928d8 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -3028,7 +3028,7 @@ void SfxBaseModel::impl_store(  const   OUString&         
          sURL
         }
     }
 
-    if ( !(!bSaved && m_pData->m_pObjectShell.is()) )
+    if ( bSaved || !m_pData->m_pObjectShell.is() )
         return;
 
     SfxGetpApp()->NotifyEvent( SfxEventHint( bSaveTo ? 
SfxEventHintId::SaveToDoc : SfxEventHintId::SaveAsDoc, 
GlobalEventConfig::GetEventName( bSaveTo ? GlobalEventId::SAVETODOC : 
GlobalEventId::SAVEASDOC ),
diff --git a/svgio/source/svgreader/svgtextnode.cxx 
b/svgio/source/svgreader/svgtextnode.cxx
index aff56aa7f3ea..5498ee0f525b 100644
--- a/svgio/source/svgreader/svgtextnode.cxx
+++ b/svgio/source/svgreader/svgtextnode.cxx
@@ -221,7 +221,7 @@ namespace svgio::svgreader
             // SVGTokenTref and SVGTokenTextPath. These increase a given 
current text position
             const SvgStyleAttributes* pStyle = getSvgStyleAttributes();
 
-            if(!(pStyle && !getChildren().empty()))
+            if(!pStyle || getChildren().empty())
                 return;
 
             const double fOpacity(pStyle->getOpacity().getNumber());
diff --git a/svgio/source/svgreader/svgusenode.cxx 
b/svgio/source/svgreader/svgusenode.cxx
index 4d71af3cf527..5096864008b6 100644
--- a/svgio/source/svgreader/svgusenode.cxx
+++ b/svgio/source/svgreader/svgusenode.cxx
@@ -140,7 +140,7 @@ namespace svgio::svgreader
             // try to access link to content
             const SvgNode* pXLink = getDocument().findSvgNodeById(maXLink);
 
-            if (!(pXLink && Display_none != pXLink->getDisplay() && 
!mbDecomposingSvgNode))
+            if (!pXLink || Display_none == pXLink->getDisplay() || 
mbDecomposingSvgNode)
                 return;
 
             // decompose children
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 1d62ed6fb550..e6606c82bdfa 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -372,7 +372,7 @@ struct DoesStyleMatchStyleSheetPredicate final : public 
svl::StyleSheetPredicate
         bool bUsed = mIterator->SearchUsed() && styleSheet.IsUsed( );
 
         bool bSearchHidden( mIterator->GetSearchMask() & 
SfxStyleSearchBits::Hidden );
-        bool bMatchVisibility = !( !bSearchHidden && styleSheet.IsHidden() && 
!bUsed );
+        bool bMatchVisibility = bSearchHidden || !styleSheet.IsHidden() || 
bUsed;
         bool bOnlyHidden = mIterator->GetSearchMask( ) == 
SfxStyleSearchBits::Hidden && styleSheet.IsHidden( );
 
         bool bMatches = bMatchFamily && bMatchVisibility
diff --git a/svtools/source/brwbox/editbrowsebox2.cxx 
b/svtools/source/brwbox/editbrowsebox2.cxx
index a3505877be18..51f58e320703 100644
--- a/svtools/source/brwbox/editbrowsebox2.cxx
+++ b/svtools/source/brwbox/editbrowsebox2.cxx
@@ -68,7 +68,7 @@ void EditBrowseBox::implCreateActiveAccessible( )
     DBG_ASSERT( IsEditing(), "EditBrowseBox::implCreateActiveAccessible: not 
to be called if we're not editing currently!" );
     DBG_ASSERT( !m_aImpl->m_xActiveCell.is(), 
"EditBrowseBox::implCreateActiveAccessible: not to be called if the old one is 
still alive!" );
 
-    if ( !(!m_aImpl->m_xActiveCell.is() && IsEditing()) )
+    if ( m_aImpl->m_xActiveCell.is() || !IsEditing() )
          return;
 
     Reference< XAccessible > xCont = aController->GetWindow().GetAccessible();
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index ce62c133ff3c..46c9afcdb1cf 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -363,7 +363,7 @@ void Ruler::ImplVDrawText(vcl::RenderContext& 
rRenderContext, long nX, long nY,
 void Ruler::ImplInvertLines(vcl::RenderContext& rRenderContext)
 {
     // Position lines
-    if (!(!mpData->pLines.empty() && mbActive && !mbDrag && !mbFormat && 
!(mnUpdateFlags & RULER_UPDATE_LINES)) )
+    if (mpData->pLines.empty() || !mbActive || mbDrag || mbFormat || 
(mnUpdateFlags & RULER_UPDATE_LINES) )
         return;
 
     long nNullWinOff = mpData->nNullVirOff + mnVirOff;
@@ -1915,7 +1915,7 @@ void Ruler::ImplEndDrag()
 
 void Ruler::MouseButtonDown( const MouseEvent& rMEvt )
 {
-    if ( !(rMEvt.IsLeft() && !IsTracking()) )
+    if ( rMEvt.IsLeft() || IsTracking() )
         return;
 
     Point   aMousePos = rMEvt.GetPosPixel();
diff --git a/svtools/source/control/tabbar.cxx 
b/svtools/source/control/tabbar.cxx
index 270a0ee343ff..be068ee8894c 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -1520,7 +1520,7 @@ void TabBar::ImplPrePaint()
 
     mbFirstFormat = false;
 
-    if (!(mnCurPageId && (mnFirstPos == 0) && !mbDropPos))
+    if (!mnCurPageId || (mnFirstPos != 0) || mbDropPos)
         return;
 
     auto& pItem = mpImpl->mpItemList[GetPagePos(mnCurPageId)];
diff --git a/svtools/source/uno/popupmenucontrollerbase.cxx 
b/svtools/source/uno/popupmenucontrollerbase.cxx
index 9ce0bda33a63..1b2f6df58c0b 100644
--- a/svtools/source/uno/popupmenucontrollerbase.cxx
+++ b/svtools/source/uno/popupmenucontrollerbase.cxx
@@ -336,7 +336,7 @@ void SAL_CALL PopupMenuControllerBase::setPopupMenu( const 
Reference< awt::XPopu
     osl::MutexGuard aLock( m_aMutex );
     throwIfDisposed();
 
-    if ( !(m_xFrame.is() && !m_xPopupMenu.is()) )
+    if ( !m_xFrame.is() || m_xPopupMenu.is() )
         return;
 
     // Create popup menu on demand
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx 
b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index adf9bd12e396..6a88afe524df 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -655,7 +655,7 @@ static void GetPoint( const tools::Polygon& rPoly, const 
std::vector< double >&
     const Point& rPt = rPoly[ nIdx ];
     fx1 = rPt.X();
     fy1 = rPt.Y();
-    if ( !(nIdx && ( aIter != rDistances.end() ) && !rtl::math::approxEqual( 
*aIter, fX )) )
+    if ( !nIdx || ( aIter == rDistances.end() ) || rtl::math::approxEqual( 
*aIter, fX ) )
         return;
 
     nIdx = sal::static_int_cast<sal_uInt16>( std::distance( 
rDistances.begin(), aIter ) );
diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx
index e30fbccb7359..6aee246982db 100644
--- a/svx/source/dialog/pagectrl.cxx
+++ b/svx/source/dialog/pagectrl.cxx
@@ -327,9 +327,9 @@ void SvxPageWindow::drawFillAttributes(vcl::RenderContext& 
rRenderContext,
 {
     const basegfx::B2DRange aPaintRange = 
vcl::unotools::b2DRectangleFromRectangle(rPaintRange);
 
-    if(!(!aPaintRange.isEmpty() &&
-       !basegfx::fTools::equalZero(aPaintRange.getWidth()) &&
-       !basegfx::fTools::equalZero(aPaintRange.getHeight())))
+    if(aPaintRange.isEmpty() ||
+       basegfx::fTools::equalZero(aPaintRange.getWidth()) ||
+       basegfx::fTools::equalZero(aPaintRange.getHeight()))
         return;
 
     const basegfx::B2DRange aDefineRange = 
vcl::unotools::b2DRectangleFromRectangle(rDefineRange);
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index fe556acde87c..18ff809a1bc4 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -2714,7 +2714,7 @@ void DbGridControl::CellModified()
         }
     }
 
-    if (!(!IsFilterMode() && IsValid(m_xCurrentRow) && 
!m_xCurrentRow->IsModified()))
+    if (IsFilterMode() || !IsValid(m_xCurrentRow) || 
m_xCurrentRow->IsModified())
         return;
 
     // enable edit mode
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index 9cb5f876e286..f92403c57312 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -976,7 +976,7 @@ void FmUndoPropertyAction::Undo()
 {
     FmXUndoEnvironment& rEnv = static_cast<FmFormModel&>(rMod).GetUndoEnv();
 
-    if (!(xObj.is() && !rEnv.IsLocked()))
+    if (!xObj.is() || rEnv.IsLocked())
         return;
 
     rEnv.Lock();
@@ -996,7 +996,7 @@ void FmUndoPropertyAction::Redo()
 {
     FmXUndoEnvironment& rEnv = static_cast<FmFormModel&>(rMod).GetUndoEnv();
 
-    if (!(xObj.is() && !rEnv.IsLocked()))
+    if (!xObj.is() || rEnv.IsLocked())
         return;
 
     rEnv.Lock();
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx 
b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index e54918f51ce7..d8d4fb83035a 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -1729,7 +1729,7 @@ namespace sdr::contact {
         ViewObjectContactOfSdrObj::ActionChanged();
         const ControlHolder& rControl(m_pImpl->getExistentControl());
 
-        if(!(rControl.is() && !rControl.isDesignMode()))
+        if(!rControl.is() || rControl.isDesignMode())
             return;
 
         // #i93180# if layer visibility has changed and control is in live 
mode, it is necessary
diff --git a/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx 
b/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx
index 5c227e446207..aaa0f3d14fe7 100644
--- a/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx
@@ -207,7 +207,7 @@ namespace
             bool bMirrored,
             double fMinimalDiscreteUnit)
         {
-            if(!(rStyle.IsUsed() && !basegfx::areParallel(rMyVector, 
rOtherVector)))
+            if(!rStyle.IsUsed() || basegfx::areParallel(rMyVector, 
rOtherVector))
                 return;
 
             // create angle between both. angle() needs vectors pointing away 
from the same point,
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 7cb50a08f685..061bc034d92e 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -742,7 +742,7 @@ void SdrCreateView::BrkCreateObj()
 
 void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, sal_Bool bFull*/)
 {
-    if(!(IsCreateObj() && !maDragStat.IsShown()))
+    if(!IsCreateObj() || maDragStat.IsShown())
         return;
 
     if(pCurrentCreate)
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index 0be9b5786cb7..1dcb24c9ca10 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -799,7 +799,7 @@ bool SdrDragView::BegInsGluePoint(const Point& rPnt)
 
 void SdrDragView::ShowDragObj()
 {
-    if(!(mpCurrentSdrDragMethod && !maDragStat.IsShown()))
+    if(!mpCurrentSdrDragMethod || maDragStat.IsShown())
         return;
 
     // Changed for the GridOffset stuff: No longer iterate over
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index eaf8a89922b5..02974eaa36a0 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -783,7 +783,7 @@ void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView 
const& rOutlView) co
     bool bTextFrame(pText && pText->IsTextFrame());
     bool bFitToSize(pText && pText->IsFitToSize());
 
-    if (!(bTextFrame && !bFitToSize))
+    if (!bTextFrame || bFitToSize)
         return;
 
     tools::Rectangle aBlankRect(rOutlView.GetOutputArea());
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index f16f73346c1e..9a3380e8b2b9 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -1134,7 +1134,7 @@ void SdrHdlColor::CreateB2dIAObject()
 
     SdrMarkView* pView = pHdlList->GetView();
 
-    if(!(pView && !pView->areMarkHandlesHidden()))
+    if(!pView || pView->areMarkHandlesHidden())
         return;
 
     SdrPageView* pPageView = pView->GetSdrPageView();
@@ -1286,7 +1286,7 @@ void SdrHdlGradient::CreateB2dIAObject()
 
     SdrMarkView* pView = pHdlList->GetView();
 
-    if(!(pView && !pView->areMarkHandlesHidden()))
+    if(!pView || pView->areMarkHandlesHidden())
         return;
 
     SdrPageView* pPageView = pView->GetSdrPageView();
@@ -1506,7 +1506,7 @@ void SdrHdlBezWgt::CreateB2dIAObject()
 
     SdrMarkView* pView = pHdlList->GetView();
 
-    if(!(pView && !pView->areMarkHandlesHidden()))
+    if(!pView || pView->areMarkHandlesHidden())
         return;
 
     SdrPageView* pPageView = pView->GetSdrPageView();
@@ -1565,7 +1565,7 @@ void E3dVolumeMarker::CreateB2dIAObject()
 
     SdrMarkView* pView = pHdlList->GetView();
 
-    if(!(pView && !pView->areMarkHandlesHidden()))
+    if(!pView || pView->areMarkHandlesHidden())
         return;
 
     SdrPageView* pPageView = pView->GetSdrPageView();
@@ -1731,7 +1731,7 @@ void ImpMeasureHdl::CreateB2dIAObject()
 
     SdrMarkView* pView = pHdlList->GetView();
 
-    if(!(pView && !pView->areMarkHandlesHidden()))
+    if(!pView || pView->areMarkHandlesHidden())
         return;
 
     BitmapColorIndex eColIndex = BitmapColorIndex::LightCyan;
@@ -1805,7 +1805,7 @@ void ImpTextframeHdl::CreateB2dIAObject()
 
     SdrMarkView* pView = pHdlList->GetView();
 
-    if(!(pView && !pView->areMarkHandlesHidden()))
+    if(!pView || pView->areMarkHandlesHidden())
         return;
 
     SdrPageView* pPageView = pView->GetSdrPageView();
@@ -2394,7 +2394,7 @@ void SdrCropHdl::CreateB2dIAObject()
     SdrMarkView* pView = pHdlList ? pHdlList->GetView() : nullptr;
     SdrPageView* pPageView = pView ? pView->GetSdrPageView() : nullptr;
 
-    if( !(pPageView && !pView->areMarkHandlesHidden()) )
+    if( !pPageView || pView->areMarkHandlesHidden() )
         return;
 
     const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 4528172a567b..a1c6846575d7 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -916,7 +916,7 @@ void SdrOle2Obj::DisconnectFileLink_Impl()
 
 void SdrOle2Obj::CheckFileLink_Impl()
 {
-    if (!(mpImpl->mxObjRef.GetObject().is() && !mpImpl->mpObjectLink))
+    if (!mpImpl->mxObjRef.GetObject().is() || mpImpl->mpObjectLink)
         return;
 
     try
@@ -1059,7 +1059,7 @@ void SdrOle2Obj::Disconnect()
 
 void SdrOle2Obj::RemoveListeners_Impl()
 {
-    if ( !(mpImpl->mxObjRef.is() && !mpImpl->aPersistName.isEmpty()) )
+    if ( !mpImpl->mxObjRef.is() || mpImpl->aPersistName.isEmpty() )
         return;
 
     try
diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx
index cd077e4eb8be..79d70de48187 100644
--- a/svx/source/svdraw/svdpoev.cxx
+++ b/svx/source/svdraw/svdpoev.cxx
@@ -62,7 +62,7 @@ void SdrPolyEditView::ImpCheckPolyPossibilities()
     ImpResetPolyPossibilityFlags();
     const size_t nMarkCount(GetMarkedObjectCount());
 
-    if(!(nMarkCount && !ImpIsFrameHandles()))
+    if(!nMarkCount || ImpIsFrameHandles())
         return;
 
     bool b1stSmooth(true);
diff --git a/svx/source/table/tablecontroller.cxx 
b/svx/source/table/tablecontroller.cxx
index 2169f04599dc..317135b6c260 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -2008,7 +2008,7 @@ void SvxTableController::EditCell(const CellPos& rPos, 
vcl::Window* pWindow, Tbl
     CellPos aPos( rPos );
     findMergeOrigin( aPos );
 
-    if( !(&rTableObj != mrView.GetTextEditObject() || bEmptyOutliner || 
!rTableObj.IsTextEditActive( aPos )) )
+    if( &rTableObj == mrView.GetTextEditObject() && !bEmptyOutliner && 
rTableObj.IsTextEditActive( aPos ) )
         return;
 
     if( rTableObj.IsTextEditActive() )
diff --git a/svx/source/table/tablehandles.cxx 
b/svx/source/table/tablehandles.cxx
index 52cef1299295..222624c2b3fa 100644
--- a/svx/source/table/tablehandles.cxx
+++ b/svx/source/table/tablehandles.cxx
@@ -142,7 +142,7 @@ void TableEdgeHdl::CreateB2dIAObject()
 {
     GetRidOfIAObject();
 
-    if(!(pHdlList && pHdlList->GetView() && 
!pHdlList->GetView()->areMarkHandlesHidden()))
+    if(!pHdlList || !pHdlList->GetView() || 
pHdlList->GetView()->areMarkHandlesHidden())
         return;
 
     SdrMarkView* pView = pHdlList->GetView();
@@ -259,7 +259,7 @@ void TableBorderHdl::CreateB2dIAObject()
 {
     GetRidOfIAObject();
 
-    if (!(pHdlList && pHdlList->GetView() && 
!pHdlList->GetView()->areMarkHandlesHidden()))
+    if (!pHdlList || !pHdlList->GetView() || 
pHdlList->GetView()->areMarkHandlesHidden())
         return;
 
     SdrMarkView* pView = pHdlList->GetView();
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 292099c5e316..3b0ca8fcc21a 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -203,7 +203,7 @@ SwCallLink::~SwCallLink() COVERITY_NOEXCEPT_FALSE
     if (!pFrame)
         return;
     pFlyFrame = pFrame->FindFlyFrame();
-    if ( !(pFlyFrame && !m_rShell.IsTableMode()) )
+    if ( !pFlyFrame || m_rShell.IsTableMode() )
         return;
 
     const SwNodeIndex* pIndex = 
pFlyFrame->GetFormat()->GetContent().GetContentIdx();
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index a2a169339bae..26ed4473924e 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -3702,7 +3702,7 @@ void SwCursorShell::GetSmartTagTerm( std::vector< 
OUString >& rSmartTagTypes,
     SwPaM* pCursor = GetCursor();
     SwPosition aPos( *pCursor->GetPoint() );
     SwTextNode *pNode = aPos.nNode.GetNode().GetTextNode();
-    if ( !(pNode && !pNode->IsInProtectSect()) )
+    if ( !pNode || pNode->IsInProtectSect() )
         return;
 
     const SwWrongList *pSmartTagList = pNode->GetSmartTags();
@@ -3713,7 +3713,7 @@ void SwCursorShell::GetSmartTagTerm( std::vector< 
OUString >& rSmartTagTypes,
     sal_Int32 nBegin = nCurrent;
     sal_Int32 nLen = 1;
 
-    if (!(pSmartTagList->InWrongWord(nBegin, nLen) && 
!pNode->IsSymbolAt(nBegin)))
+    if (!pSmartTagList->InWrongWord(nBegin, nLen) || pNode->IsSymbolAt(nBegin))
         return;
 
     const sal_uInt16 nIndex = pSmartTagList->GetWrongPos( nBegin );
@@ -3754,7 +3754,7 @@ void SwCursorShell::GetSmartTagRect( const Point& rPt, 
SwRect& rSelectRect )
     sal_Int32 nBegin = aPos.nContent.GetIndex();
     sal_Int32 nLen = 1;
 
-    if (!(pSmartTagList->InWrongWord(nBegin, nLen) && 
!pNode->IsSymbolAt(nBegin)))
+    if (!pSmartTagList->InWrongWord(nBegin, nLen) || pNode->IsSymbolAt(nBegin))
         return;
 
     // get smarttag word
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index cf544c08a536..3479e62c2c37 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -300,7 +300,7 @@ void SwVisibleCursor::SetPosAndShow(SfxViewShell const * 
pViewShell)
         }
     }
 
-    if ( !(!m_pCursorShell->IsCursorReadonly()  || 
m_pCursorShell->GetViewOptions()->IsSelectionInReadonly()) )
+    if ( m_pCursorShell->IsCursorReadonly() && 
!m_pCursorShell->GetViewOptions()->IsSelectionInReadonly() )
         return;
 
     if ( m_pCursorShell->GetDrawView() )
@@ -450,7 +450,7 @@ void SwSelPaintRects::Show(std::vector<OString>* 
pSelectionRectangles)
     // talks about "the" cursor at the moment. As long as that's true,
     // don't say anything about the Writer cursor till a draw object is
     // being edited.
-    if (!(comphelper::LibreOfficeKit::isActive() && 
!pView->GetTextEditObject()))
+    if (!comphelper::LibreOfficeKit::isActive() || pView->GetTextEditObject())
         return;
 
     // If pSelectionRectangles is set, we're just collecting the text 
selections -> don't emit start/end.
diff --git a/sw/source/core/doc/DocumentStatisticsManager.cxx 
b/sw/source/core/doc/DocumentStatisticsManager.cxx
index 03e00df6ceee..5d9a6faa94f4 100644
--- a/sw/source/core/doc/DocumentStatisticsManager.cxx
+++ b/sw/source/core/doc/DocumentStatisticsManager.cxx
@@ -86,7 +86,7 @@ void DocumentStatisticsManager::SetDocStat( const SwDocStat& 
rStat )
 
 void DocumentStatisticsManager::UpdateDocStat( bool bCompleteAsync, bool 
bFields )
 {
-    if( !(mpDocStat->bModified || !mbInitialized))
+    if( !mpDocStat->bModified && mbInitialized)
         return;
 
     if (!bCompleteAsync)
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 69dcd0f98039..005927fbee51 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1221,7 +1221,7 @@ const SwFormatINetFormat* SwDoc::FindINetAttr( const 
OUString& rName ) const
 void SwDoc::Summary( SwDoc* pExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, bool 
bImpress )
 {
     const SwOutlineNodes& rOutNds = GetNodes().GetOutLineNds();
-    if( !(pExtDoc && !rOutNds.empty()) )
+    if( !pExtDoc || rOutNds.empty() )
         return;
 
     ::StartProgress( STR_STATSTR_SUMMARY, 0, rOutNds.size(), GetDocShell() );
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index a6ecd452e576..385afa6846ea 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -1759,8 +1759,8 @@ void SaveBookmark::SetInDoc(
     else
         aPam.GetPoint()->nContent.Assign(aPam.GetContentNode(), m_nContent1);
 
-    if(!(!aPam.HasMark()
-        || CheckNodesRange(aPam.GetPoint()->nNode, aPam.GetMark()->nNode, 
true)))
+    if(aPam.HasMark()
+        && !CheckNodesRange(aPam.GetPoint()->nNode, aPam.GetMark()->nNode, 
true))
         return;
 
     ::sw::mark::IBookmark* const pBookmark = 
dynamic_cast<::sw::mark::IBookmark*>(
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index b3eba9df2dbd..d5d16626650e 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1840,7 +1840,7 @@ void SwTOXBaseSection::UpdatePageNum_( SwTextNode* pNd,
     }
 
     // The main entries should get their character style
-    if (!(xCharStyleIdx && !xCharStyleIdx->empty() && 
!GetMainEntryCharStyle().isEmpty()))
+    if (!xCharStyleIdx || xCharStyleIdx->empty() || 
GetMainEntryCharStyle().isEmpty())
         return;
 
     // eventually the last index must me appended
diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx
index 4ef745fc1926..f59efb8b10a4 100644
--- a/sw/source/core/doc/fmtcol.cxx
+++ b/sw/source/core/doc/fmtcol.cxx
@@ -51,8 +51,8 @@ namespace TextFormatCollFunc
         }
 
         // #i73790#
-        if ( !(!pTextFormatColl->StayAssignedToListLevelOfOutlineStyle() &&
-             pTextFormatColl->IsAssignedToListLevelOfOutlineStyle()) )
+        if ( pTextFormatColl->StayAssignedToListLevelOfOutlineStyle() ||
+             !pTextFormatColl->IsAssignedToListLevelOfOutlineStyle() )
             return;
 
         if (!pNewNumRuleItem)
diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index 437ec985e9be..8022218db3db 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -1455,8 +1455,8 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 
nAbsAvail, sal_uInt16 nRelAv
     // left or right. Here we calculate their width.
     m_nInhAbsLeftSpace = 0;
     m_nInhAbsRightSpace = 0;
-    if( !(!IsTopTable() && (m_nRelLeftFill>0 || m_nRelRightFill>0 ||
-                          nAbsTabWidth<nAbsAvail)) )
+    if( IsTopTable() ||
+        !(m_nRelLeftFill>0 || m_nRelRightFill>0 || nAbsTabWidth<nAbsAvail) )
         return;
 
     // Calculate the width of additional cells we use for
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 6860d57a0fa8..ea8bd57e796f 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -912,7 +912,7 @@ void SwSetExpField::SetValue(const double& rValue, 
SwRootFrame const*const pLayo
     {
         SetValue(rValue);
     }
-    if (!(!pLayout || pLayout->IsHideRedlines()))
+    if (pLayout && !pLayout->IsHideRedlines())
         return;
 
     m_fValueRLHidden = rValue;
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 7b8adb96bbd0..ab5537502d18 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -327,8 +327,8 @@ static void lcl_formatReferenceLanguage( OUString& rRefText,
         }
     }
     // not a title text starting already with a definitive article
-    if ( !(!sNumbering.startsWith("A ") && !sNumbering.startsWith("Az ") &&
-         !sNumbering.startsWith("a ") && !sNumbering.startsWith("az ")) )
+    if ( sNumbering.startsWith("A ") || sNumbering.startsWith("Az ") ||
+         sNumbering.startsWith("a ") || sNumbering.startsWith("az ") )
         return;
 
     // lowercase, if rReferenceLanguage == "hu", not "Hu"
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 33bfd4ede834..55ced4c704bc 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -839,7 +839,7 @@ void SwGrfNode::ApplyInputStream(
 void SwGrfNode::UpdateLinkWithInputStream()
 {
     // do not work on link, if a <SwapIn> has been triggered.
-    if ( !(!mbInSwapIn && IsLinkedFile()) )
+    if ( mbInSwapIn || !IsLinkedFile() )
         return;
 
     GetLink()->setStreamToLoadFrom( mxInputStream, mbIsStreamReadOnly );
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx 
b/sw/source/core/layout/anchoreddrawobject.cxx
index 23334a44a01b..0d7a8658b46e 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -523,7 +523,7 @@ void SwAnchoredDrawObject::SetDrawObjAnchor()
 */
 void SwAnchoredDrawObject::InvalidatePage_( SwPageFrame* _pPageFrame )
 {
-    if ( !(_pPageFrame && !_pPageFrame->GetFormat()->GetDoc()->IsInDtor()) )
+    if ( !_pPageFrame || _pPageFrame->GetFormat()->GetDoc()->IsInDtor() )
         return;
 
     if ( !_pPageFrame->GetUpper() )
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index ce6abc998735..953b527ee65b 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -329,7 +329,7 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
         return;
     }
 
-    if ( !(!SwOszControl::IsInProgress( this ) && !IsLocked() && 
!IsColLocked()) )
+    if ( SwOszControl::IsInProgress( this ) || IsLocked() || IsColLocked() )
         return;
 
     // #i28701# - use new method <GetPageFrame()>
diff --git a/sw/source/core/layout/frmtool.cxx 
b/sw/source/core/layout/frmtool.cxx
index 2a56f8e5cb04..0ade3a3315ed 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -388,7 +388,7 @@ SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE
     // #i61999#
     // no invalidation of columned Writer fly frames, because automatic
     // width doesn't make sense for such Writer fly frames.
-    if ( !(pFly->Lower() && !pFly->Lower()->IsColumnFrame()) )
+    if ( !pFly->Lower() || pFly->Lower()->IsColumnFrame() )
         return;
 
     const SwFormatFrameSize &rFrameSz = pFly->GetFormat()->GetFrameSize();
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index d506251278ff..93076422c5dd 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -228,7 +228,7 @@ void SwLayAction::PaintContent( const SwContentFrame *pCnt,
         PaintContent_( pCnt, pPage, aPaintRect );
     }
 
-    if ( !(pCnt->IsRetouche() && !pCnt->GetNext()) )
+    if ( !pCnt->IsRetouche() || pCnt->GetNext() )
         return;
 
     const SwFrame *pTmp = pCnt;
diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index a3454140ed82..9dbd735fabe9 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3543,10 +3543,10 @@ static drawinglayer::primitive2d::Primitive2DContainer 
lcl_CreateDashedIndicator
 
 void SwPageFrame::PaintBreak( ) const
 {
-    if ( !(gProp.pSGlobalShell->GetOut()->GetOutDevType() != OUTDEV_PRINTER  &&
-         !gProp.pSGlobalShell->GetViewOptions()->IsPDFExport() &&
-         !gProp.pSGlobalShell->GetViewOptions()->IsReadonly() &&
-         !gProp.pSGlobalShell->IsPreview()) )
+    if ( gProp.pSGlobalShell->GetOut()->GetOutDevType() == OUTDEV_PRINTER  ||
+         gProp.pSGlobalShell->GetViewOptions()->IsPDFExport() ||
+         gProp.pSGlobalShell->GetViewOptions()->IsReadonly() ||
+         gProp.pSGlobalShell->IsPreview() )
         return;
 
     const SwFrame* pBodyFrame = Lower();
@@ -3580,10 +3580,10 @@ void SwPageFrame::PaintBreak( ) const
 
 void SwColumnFrame::PaintBreak( ) const
 {
-    if ( !(gProp.pSGlobalShell->GetOut()->GetOutDevType() != OUTDEV_PRINTER  &&
-         !gProp.pSGlobalShell->GetViewOptions()->IsPDFExport() &&

... etc. - the rest is truncated
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to