summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-19 09:07:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-30 10:49:51 +0200
commitd6c32cffb5cc81989b4bb4a221a152bbe607bd98 (patch)
tree2c4ef9ec2a201ffcfea145ed5a0b901f2b6853ea /svx
parent9ab64dc48a6a61edce6ff3724093162ca1cf8331 (diff)
loplugin:simplifybool extend to expression like !(a < b || c > d)
mostly to catch stuff from the flatten work, but I think this looks good in general Change-Id: I7be5b7bcf1f3d9f980c748ba20793965cef957e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92493 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/engine3d/polygn3d.cxx2
-rw-r--r--svx/source/sdr/primitive2d/sdrattributecreator.cxx2
-rw-r--r--svx/source/svdraw/svdcrtv.cxx2
-rw-r--r--svx/source/svdraw/svdoole2.cxx2
4 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/engine3d/polygn3d.cxx b/svx/source/engine3d/polygn3d.cxx
index d8c1b5d0c212..c33d9f096d23 100644
--- a/svx/source/engine3d/polygn3d.cxx
+++ b/svx/source/engine3d/polygn3d.cxx
@@ -107,7 +107,7 @@ void E3dPolygonObj::CreateDefaultTexture()
sal_uInt16 nSourceMode = 0;
// Determine the greatest degree of freedom
- if(!(aNormal.getX() > aNormal.getY() && aNormal.getX() > aNormal.getZ()))
+ if(aNormal.getX() <= aNormal.getY() || aNormal.getX() <= aNormal.getZ())
{
if(aNormal.getY() > aNormal.getZ())
{
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index 5696deeeb970..1ef622861814 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -658,7 +658,7 @@ namespace drawinglayer::primitive2d
{
Graphic aGraphic(rSet.Get(XATTR_FILLBITMAP).GetGraphicObject().GetGraphic());
- if(!(GraphicType::Bitmap == aGraphic.GetType() || GraphicType::GdiMetafile == aGraphic.GetType()))
+ if(GraphicType::Bitmap != aGraphic.GetType() && GraphicType::GdiMetafile != aGraphic.GetType())
{
// no content if not bitmap or metafile
OSL_ENSURE(false, "No fill graphic in SfxItemSet (!)");
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 3d2230a8b6a9..3f36c0e8c5c0 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -805,7 +805,7 @@ void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, sal_Bool bFull*/)
// there are still untested divisions by that sizes
tools::Rectangle aCurrentSnapRect(pCurrentCreate->GetSnapRect());
- if(!(aCurrentSnapRect.GetWidth() > 1 && aCurrentSnapRect.GetHeight() > 1))
+ if(aCurrentSnapRect.GetWidth() <= 1 || aCurrentSnapRect.GetHeight() <= 1)
{
tools::Rectangle aNewRect(maDragStat.GetStart(), maDragStat.GetStart() + Point(2, 2));
pCurrentCreate->NbcSetSnapRect(aNewRect);
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 65b30eaed7e3..b70b7a669ed4 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -346,7 +346,7 @@ sal_Bool SAL_CALL SdrLightEmbeddedClient_Impl::canInplaceActivate()
if ( !xObject.is() )
throw uno::RuntimeException();
// we don't want to switch directly from outplace to inplace mode
- bRet = !( xObject->getCurrentState() == embed::EmbedStates::ACTIVE || mpObj->GetAspect() == embed::Aspects::MSOLE_ICON );
+ bRet = ( xObject->getCurrentState() != embed::EmbedStates::ACTIVE && mpObj->GetAspect() != embed::Aspects::MSOLE_ICON );
} // if ( mpObj )
return bRet;
}