summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--UnoControls/source/controls/progressbar.cxx2
-rw-r--r--compilerplugins/clang/simplifybool.cxx8
-rw-r--r--sdext/source/pdfimport/wrapper/wrapper.cxx2
-rw-r--r--sdext/source/presenter/PresenterSlideSorter.cxx2
-rw-r--r--sfx2/source/appl/childwin.cxx4
-rw-r--r--sfx2/source/control/dispatch.cxx2
-rw-r--r--sfx2/source/dialog/dockwin.cxx2
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx2
-rw-r--r--starmath/source/accessibility.cxx8
-rw-r--r--starmath/source/node.cxx2
-rw-r--r--stoc/source/security/access_controller.cxx2
-rw-r--r--store/source/stordata.cxx6
-rw-r--r--store/source/stordir.cxx2
-rw-r--r--svgio/source/svgreader/svgellipsenode.cxx2
-rw-r--r--svgio/source/svgreader/svgimagenode.cxx2
-rw-r--r--svgio/source/svgreader/svgpatternnode.cxx4
-rw-r--r--svgio/source/svgreader/svgrectnode.cxx2
-rw-r--r--svgio/source/svgreader/svgstyleattributes.cxx4
-rw-r--r--svl/source/misc/urihelper.cxx2
-rw-r--r--svl/source/numbers/zformat.cxx6
-rw-r--r--svl/source/numbers/zforscan.cxx2
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx2
-rw-r--r--svtools/source/brwbox/brwbox1.cxx2
-rw-r--r--svtools/source/brwbox/editbrowsebox.cxx2
-rw-r--r--svtools/source/control/valueset.cxx2
-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
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx4
-rw-r--r--writerfilter/source/ooxml/OOXMLFastContextHandler.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx5
-rw-r--r--xmloff/source/transform/FrameOASISTContext.cxx2
33 files changed, 48 insertions, 49 deletions
diff --git a/UnoControls/source/controls/progressbar.cxx b/UnoControls/source/controls/progressbar.cxx
index 37ac9e379195..d8c9b889f2b5 100644
--- a/UnoControls/source/controls/progressbar.cxx
+++ b/UnoControls/source/controls/progressbar.cxx
@@ -221,7 +221,7 @@ void SAL_CALL ProgressBar::setRange ( sal_Int32 nMin, sal_Int32 nMax )
}
// assure that m_nValue is within the range
- if (!(m_nMinRange < m_nValue && m_nValue < m_nMaxRange))
+ if (m_nMinRange >= m_nValue || m_nValue >= m_nMaxRange)
m_nValue = m_nMinRange;
impl_recalcRange ();
diff --git a/compilerplugins/clang/simplifybool.cxx b/compilerplugins/clang/simplifybool.cxx
index 6541cf01ba8b..4e48de99cb5c 100644
--- a/compilerplugins/clang/simplifybool.cxx
+++ b/compilerplugins/clang/simplifybool.cxx
@@ -288,21 +288,21 @@ bool SimplifyBool::VisitUnaryLNot(UnaryOperator const * expr) {
}
else if (binaryOp->isLogicalOp())
{
- auto containsNegation = [](Expr const * expr) {
+ auto containsNegationOrComparison = [](Expr const * expr) {
expr = ignoreParenImpCastAndComma(expr);
if (auto unaryOp = dyn_cast<UnaryOperator>(expr))
if (unaryOp->getOpcode() == UO_LNot)
return expr;
if (auto binaryOp = dyn_cast<BinaryOperator>(expr))
- if (binaryOp->getOpcode() == BO_NE)
+ if (binaryOp->isComparisonOp())
return expr;
if (auto cxxOpCall = dyn_cast<CXXOperatorCallExpr>(expr))
if (cxxOpCall->getOperator() == OO_ExclaimEqual)
return expr;
return (Expr const*)nullptr;
};
- auto lhs = containsNegation(binaryOp->getLHS());
- auto rhs = containsNegation(binaryOp->getRHS());
+ auto lhs = containsNegationOrComparison(binaryOp->getLHS());
+ auto rhs = containsNegationOrComparison(binaryOp->getRHS());
if (!lhs || !rhs)
return true;
if (lhs || rhs)
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index e850e5a6c7b8..aba48b11a053 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -1106,7 +1106,7 @@ bool xpdf_ImportFromFile(const OUString& rURL,
for (;;)
{
nRes = aBuffering.read(&aChar, 1, &nBytesRead);
- if (osl_File_E_None != nRes || nBytesRead != 1 || !(aChar == '\n' || aChar == '\r') )
+ if (osl_File_E_None != nRes || nBytesRead != 1 || (aChar != '\n' && aChar != '\r') )
break;
}
if ( osl_File_E_None != nRes )
diff --git a/sdext/source/presenter/PresenterSlideSorter.cxx b/sdext/source/presenter/PresenterSlideSorter.cxx
index 681eb55a1cc6..029b0e05f3b0 100644
--- a/sdext/source/presenter/PresenterSlideSorter.cxx
+++ b/sdext/source/presenter/PresenterSlideSorter.cxx
@@ -497,7 +497,7 @@ void SAL_CALL PresenterSlideSorter::mouseReleased (const css::awt::MouseEvent& r
const geometry::RealPoint2D aPosition(rTemp.X, rEvent.Y);
const sal_Int32 nSlideIndex (mpLayout->GetSlideIndexForPosition(aPosition));
- if (!(nSlideIndex == mnSlideIndexMousePressed && mnSlideIndexMousePressed >= 0))
+ if (nSlideIndex != mnSlideIndexMousePressed || mnSlideIndexMousePressed < 0)
return;
switch (rEvent.ClickCount)
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 9c2ee6687ded..715606a114e8 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -122,7 +122,7 @@ bool GetPosSizeFromString( const OUString& rStr, Point& rPos, Size& rSize )
rSize.setHeight( rStr.getToken(0, '/', nIdx).toInt32() );
// negative sizes are invalid
- return !(rSize.Width() < 0 || rSize.Height() < 0);
+ return rSize.Width() >= 0 && rSize.Height() >= 0;
}
bool GetSplitSizeFromString( const OUString& rStr, Size& rSize )
@@ -141,7 +141,7 @@ bool GetSplitSizeFromString( const OUString& rStr, Size& rSize )
rSize.setHeight( aStr.getToken(0, ';', nIdx ).toInt32() );
// negative sizes are invalid
- return !(rSize.Width() < 0 || rSize.Height() < 0);
+ return rSize.Width() >= 0 && rSize.Height() >= 0;
}
return false;
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 48874f59ac7e..739336a8859c 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -709,7 +709,7 @@ bool SfxDispatcher::GetShellAndSlot_Impl(sal_uInt16 nSlot, SfxShell** ppShell,
if ( nullptr == (*ppSlot)->GetExecFnc() && bRealSlot )
*ppSlot = (*ppShell)->GetInterface()->GetRealSlot(*ppSlot);
// Check only real slots as enum slots don't have an execute function!
- return !bRealSlot || !((nullptr == *ppSlot) || (nullptr == (*ppSlot)->GetExecFnc()) );
+ return !bRealSlot || ((nullptr != *ppSlot) && (nullptr != (*ppSlot)->GetExecFnc()) );
}
return false;
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 562585a90c5e..926a68ab8bfa 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -297,7 +297,7 @@ namespace
static bool lcl_checkDockingWindowID( sal_uInt16 nID )
{
- return !(nID < SID_DOCKWIN_START || nID >= o3tl::make_unsigned(SID_DOCKWIN_START+NUM_OF_DOCKINGWINDOWS));
+ return nID >= SID_DOCKWIN_START && nID < o3tl::make_unsigned(SID_DOCKWIN_START+NUM_OF_DOCKINGWINDOWS);
}
static SfxWorkWindow* lcl_getWorkWindowFromXFrame( const uno::Reference< frame::XFrame >& rFrame )
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 1400bf71e17b..ece8ce6f11fe 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -2675,7 +2675,7 @@ ErrCode RequestPassword(const std::shared_ptr<const SfxFilter>& pCurrentFilter,
OString const utf8Ptm(OUStringToOString(pPasswordRequest->getPasswordToModify(), RTL_TEXTENCODING_UTF8));
if (!(52 <= utf8Pwd.getLength() && utf8Pwd.getLength() <= 55
&& SvtSaveOptions().GetODFSaneDefaultVersion() < SvtSaveOptions::ODFSVER_012)
- && !(52 <= utf8Ptm.getLength() && utf8Ptm.getLength() <= 55))
+ && (52 > utf8Ptm.getLength() || utf8Ptm.getLength() > 55))
{
break;
}
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index 854f09443712..014bc79e7ac5 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -435,7 +435,7 @@ Sequence< beans::PropertyValue > SAL_CALL SmGraphicAccessible::getCharacterAttri
{
SolarMutexGuard aGuard;
sal_Int32 nLen = GetAccessibleText_Impl().getLength();
- if (!(0 <= nIndex && nIndex < nLen))
+ if (0 > nIndex || nIndex >= nLen)
throw IndexOutOfBoundsException();
return Sequence< beans::PropertyValue >();
}
@@ -455,7 +455,7 @@ awt::Rectangle SAL_CALL SmGraphicAccessible::getCharacterBounds( sal_Int32 nInde
if (!pDoc)
throw RuntimeException();
OUString aTxt( GetAccessibleText_Impl() );
- if (!(0 <= nIndex && nIndex <= aTxt.getLength())) // aTxt.getLength() is valid
+ if (0 > nIndex || nIndex > aTxt.getLength()) // aTxt.getLength() is valid
throw IndexOutOfBoundsException();
// find a reasonable rectangle for position aTxt.getLength().
@@ -595,8 +595,8 @@ sal_Bool SAL_CALL SmGraphicAccessible::setSelection(
{
SolarMutexGuard aGuard;
sal_Int32 nLen = GetAccessibleText_Impl().getLength();
- if (!(0 <= nStartIndex && nStartIndex < nLen) ||
- !(0 <= nEndIndex && nEndIndex < nLen))
+ if (0 > nStartIndex || nStartIndex >= nLen ||
+ 0 > nEndIndex || nEndIndex >= nLen)
throw IndexOutOfBoundsException();
return false;
}
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 6238416a6bda..ba62c4d9a484 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2658,7 +2658,7 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell
static const sal_Unicode cUppercaseOmega = 0x03A9;
sal_Unicode cChar = rTmp[0];
// uppercase letters should be straight and lowercase letters italic
- bItalic = !(cUppercaseAlpha <= cChar && cChar <= cUppercaseOmega);
+ bItalic = (cUppercaseAlpha > cChar || cChar > cUppercaseOmega);
}
}
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx
index 7b10e11f01c9..c9387e7514b3 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -384,7 +384,7 @@ AccessController::AccessController( Reference< XComponentContext > const & xComp
}
// switch on caching for Mode::DynamicOnly and Mode::On (shareable multi-user process)
- if (!(Mode::On == m_mode || Mode::DynamicOnly == m_mode))
+ if (Mode::On != m_mode && Mode::DynamicOnly != m_mode)
return;
sal_Int32 cacheSize = 0; // multi-user cache size
diff --git a/store/source/stordata.cxx b/store/source/stordata.cxx
index 7ce39a9c1208..7e989bc43352 100644
--- a/store/source/stordata.cxx
+++ b/store/source/stordata.cxx
@@ -244,7 +244,7 @@ storeError OStoreIndirectionPageObject::read (
// Check arguments.
sal_uInt16 const nLimit = rPage.capacityCount();
- if (!((nDouble < nLimit) && (nSingle < nLimit)))
+ if ((nDouble >= nLimit) || (nSingle >= nLimit))
return store_E_InvalidAccess;
// Check single indirect page location.
@@ -347,7 +347,7 @@ storeError OStoreIndirectionPageObject::write (
// Check arguments.
sal_uInt16 const nLimit = rPage.capacityCount();
- if (!((nDouble < nLimit) && (nSingle < nLimit)))
+ if ((nDouble >= nLimit) || (nSingle >= nLimit))
return store_E_InvalidAccess;
// Load or create single indirect page.
@@ -462,7 +462,7 @@ storeError OStoreIndirectionPageObject::truncate (
// Check arguments.
sal_uInt16 const nLimit = rPage.capacityCount();
- if (!((nDouble < nLimit) && (nSingle < nLimit)))
+ if ((nDouble >= nLimit) || (nSingle >= nLimit))
return store_E_InvalidAccess;
// Truncate.
diff --git a/store/source/stordir.cxx b/store/source/stordir.cxx
index 7688194069de..80cb2efc501c 100644
--- a/store/source/stordir.cxx
+++ b/store/source/stordir.cxx
@@ -165,7 +165,7 @@ storeError OStoreDirectory_Impl::iterate (storeFindData &rFindData)
{
OStorePageLink aLink;
eErrCode = m_xManager->iterate (aKey, aLink, rFindData.m_nAttrib);
- if (!((eErrCode == store_E_None) && (aKey.m_nHigh == store::htonl(m_nPath))))
+ if (eErrCode != store_E_None || aKey.m_nHigh != store::htonl(m_nPath))
break;
if (!(rFindData.m_nAttrib & STORE_ATTRIB_ISLINK))
diff --git a/svgio/source/svgreader/svgellipsenode.cxx b/svgio/source/svgreader/svgellipsenode.cxx
index 59b635981015..6e05a418fa0c 100644
--- a/svgio/source/svgreader/svgellipsenode.cxx
+++ b/svgio/source/svgreader/svgellipsenode.cxx
@@ -134,7 +134,7 @@ namespace svgio::svgreader
const double fRx(getRx().solve(*this, xcoordinate));
const double fRy(getRy().solve(*this, ycoordinate));
- if(!(fRx > 0.0 && fRy > 0.0))
+ if(fRx <= 0.0 || fRy <= 0.0)
return;
const basegfx::B2DPolygon aPath(
diff --git a/svgio/source/svgreader/svgimagenode.cxx b/svgio/source/svgreader/svgimagenode.cxx
index 8dfc70e643a1..1af8b20d2bde 100644
--- a/svgio/source/svgreader/svgimagenode.cxx
+++ b/svgio/source/svgreader/svgimagenode.cxx
@@ -196,7 +196,7 @@ namespace svgio::svgreader
const double fWidth(getWidth().solve(*this, xcoordinate));
const double fHeight(getHeight().solve(*this, ycoordinate));
- if(!(fWidth > 0.0 && fHeight > 0.0))
+ if(fWidth <= 0.0 || fHeight <= 0.0)
return;
BitmapEx aBitmapEx;
diff --git a/svgio/source/svgreader/svgpatternnode.cxx b/svgio/source/svgreader/svgpatternnode.cxx
index a72846aacd07..3e7402cb07a3 100644
--- a/svgio/source/svgreader/svgpatternnode.cxx
+++ b/svgio/source/svgreader/svgpatternnode.cxx
@@ -196,7 +196,7 @@ namespace svgio::svgreader
double fTargetWidth(rGeoRange.getWidth());
double fTargetHeight(rGeoRange.getHeight());
- if(!(fTargetWidth > 0.0 && fTargetHeight > 0.0))
+ if(fTargetWidth <= 0.0 || fTargetHeight <= 0.0)
return;
const SvgUnits aPatternUnits(getPatternUnits() ? *getPatternUnits() : objectBoundingBox);
@@ -226,7 +226,7 @@ namespace svgio::svgreader
rfH /= fTargetHeight;
}
- if(!(rfW > 0.0 && rfH > 0.0))
+ if(rfW <= 0.0 || rfH <= 0.0)
return;
if(objectBoundingBox == aPatternUnits)
diff --git a/svgio/source/svgreader/svgrectnode.cxx b/svgio/source/svgreader/svgrectnode.cxx
index dca3c3ad5e31..8b26bb5035d1 100644
--- a/svgio/source/svgreader/svgrectnode.cxx
+++ b/svgio/source/svgreader/svgrectnode.cxx
@@ -163,7 +163,7 @@ namespace svgio::svgreader
const double fWidth(getWidth().solve(*this, xcoordinate));
const double fHeight(getHeight().solve(*this, ycoordinate));
- if(!(fWidth > 0.0 && fHeight > 0.0))
+ if(fWidth <= 0.0 || fHeight <= 0.0)
return;
const double fX(getX().isSet() ? getX().solve(*this, xcoordinate) : 0.0);
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index 383545bf49da..f3387e11cd52 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -517,7 +517,7 @@ namespace svgio::svgreader
double fTargetWidth(rGeoRange.getWidth());
double fTargetHeight(rGeoRange.getHeight());
- if(!(fTargetWidth > 0.0 && fTargetHeight > 0.0))
+ if(fTargetWidth <= 0.0 || fTargetHeight <= 0.0)
return;
// get relative values from pattern
@@ -528,7 +528,7 @@ namespace svgio::svgreader
rFillPattern.getValuesRelative(fX, fY, fW, fH, rGeoRange, mrOwner);
- if(!(fW > 0.0 && fH > 0.0))
+ if(fW <= 0.0 || fH <= 0.0)
return;
// build the reference range relative to the rGeoRange
diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx
index 127134d1ab72..507c8c4f0bb9 100644
--- a/svl/source/misc/urihelper.cxx
+++ b/svl/source/misc/urihelper.cxx
@@ -433,7 +433,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
INetURLObject::EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
{
- if (!(rBegin <= rEnd && rEnd <= rText.getLength()))
+ if (rBegin > rEnd || rEnd > rText.getLength())
return OUString();
// Search for the first substring of [rBegin..rEnd[ that matches any of the
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 774b8fdd0d42..f683b4c62f12 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2984,7 +2984,7 @@ bool SvNumberformat::ImpGetFractionOutput(double fNumber,
bRes |= ImpNumberFillWithThousands(sStr, fNumber, k, j, nIx,
rInfo.nCntPre);
}
- if (bSign && !(nFrac == 0 && fNum == 0.0))
+ if (bSign && (nFrac != 0 || fNum != 0.0))
{
sBuff.insert(0, '-'); // Not -0
}
@@ -5561,8 +5561,8 @@ OUString SvNumberformat::impTransliterateImpl(const OUString& rStr,
nField = rNum.GetParams().indexOf(rKeywords[nDateKey] + "=", ++nField);
}
while (nField != -1 && nField != 0 &&
- !(rNum.GetParams()[nField - 1] == ',' ||
- rNum.GetParams()[nField - 1] == ' '));
+ (rNum.GetParams()[nField - 1] != ',' &&
+ rNum.GetParams()[nField - 1] != ' '));
// no format specified for actual keyword
if (nField == -1)
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index bf408885a319..200095d3ac82 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -796,7 +796,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
// "$U" (symbol) of "[$UYU]" (abbreviation).
if ( nCurrPos >= 0 && sCurString.getLength() > 1 &&
nPos-1 + sCurString.getLength() <= rStr.getLength() &&
- !(nPos > 1 && rStr[nPos-2] == '[') )
+ (nPos <= 1 || rStr[nPos-2] != '[') )
{
OUString aTest = pChrCls->uppercase( rStr.copy( nPos-1, sCurString.getLength() ) );
if ( aTest == sCurString )
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 8bdc1adb7314..506772366e87 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -92,7 +92,7 @@ static std::vector< OUString > getInfoFromInd( const OUString& aInd )
else
aStart = false;
- while( *pLine && !( pLine[0] == '_' && pLine[1] == '_' ))
+ while( *pLine && ( pLine[0] != '_' || pLine[1] != '_' ))
if( *pLine != '_' )
{
newItem.append( *pLine );
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index ee3922582cda..b7c36729f684 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -514,7 +514,7 @@ void BrowseBox::SetColumnWidth( sal_uInt16 nItemId, sal_uLong nWidth )
return;
// does the state change?
- if ( !(nWidth >= LONG_MAX || mvCols[ nItemPos ]->Width() != nWidth) )
+ if ( nWidth < LONG_MAX && mvCols[ nItemPos ]->Width() == nWidth )
return;
long nOldWidth = mvCols[ nItemPos ]->Width();
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index 0105082cea5c..9b56e56c0afa 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -947,7 +947,7 @@ namespace svt
return;
}
- if (!(nEditRow >= 0 && nEditCol > HandleColumnId))
+ if (nEditRow < 0 || nEditCol <= HandleColumnId)
return;
aController = GetController(nRow, nCol);
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 4bc20997393f..497da0904e72 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -1306,7 +1306,7 @@ void ValueSet::ImplFormatItem(vcl::RenderContext const & rRenderContext, ValueSe
if (pItem == mpNoneItem.get())
pItem->maText = GetText();
- if (!((aRect.GetHeight() > 0) && (aRect.GetWidth() > 0)))
+ if ((aRect.GetHeight() <= 0) || (aRect.GetWidth() <= 0))
return;
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
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;
}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index a88e50876b5c..fb58e1b9567b 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1864,7 +1864,7 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
const bool bTopSet = pParaContext->isSet(PROP_PARA_TOP_MARGIN);
const bool bBottomSet = pParaContext->isSet(PROP_PARA_BOTTOM_MARGIN);
const bool bContextSet = pParaContext->isSet(PROP_PARA_CONTEXT_MARGIN);
- if ( !(bTopSet == bBottomSet && bBottomSet == bContextSet) )
+ if ( bTopSet != bBottomSet || bBottomSet != bContextSet )
{
if ( !bTopSet )
@@ -1894,7 +1894,7 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
const bool bLeftSet = pParaContext->isSet(PROP_PARA_LEFT_MARGIN);
const bool bRightSet = pParaContext->isSet(PROP_PARA_RIGHT_MARGIN);
const bool bFirstSet = pParaContext->isSet(PROP_PARA_FIRST_LINE_INDENT);
- if ( !(bLeftSet == bRightSet && bRightSet == bFirstSet) )
+ if ( bLeftSet != bRightSet || bRightSet != bFirstSet )
{
if ( !bLeftSet )
{
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index e425025fbbe0..6a31e6b69a97 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -1937,7 +1937,7 @@ OOXMLFastContextHandlerWrapper::lcl_createFastChildContext
bool bIsWrap = Element == static_cast<sal_Int32>(NMSP_vmlWord | XML_wrap);
bool bIsSignatureLine = Element == static_cast<sal_Int32>(NMSP_vmlOffice | XML_signatureline);
bool bSkipImages = getDocument()->IsSkipImages() && oox::getNamespace(Element) == NMSP_dml &&
- !((oox::getBaseToken(Element) == XML_linkedTxbx) || (oox::getBaseToken(Element) == XML_txbx));
+ (oox::getBaseToken(Element) != XML_linkedTxbx) && (oox::getBaseToken(Element) != XML_txbx);
if ( bInNamespaces && ((!bIsWrap && !bIsSignatureLine)
|| mxShapeHandler->isShapeSent()) )
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 481c8fd9db75..3c7de5226a1d 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3497,9 +3497,8 @@ RTFError RTFDocumentImpl::popState()
{
// \par means an empty paragraph at the end of footnotes/endnotes, but
// not in case of other substreams, like headers.
- if (m_bNeedCr
- && !(m_nStreamType == NS_ooxml::LN_footnote || m_nStreamType == NS_ooxml::LN_endnote)
- && m_bIsNewDoc)
+ if (m_bNeedCr && m_nStreamType != NS_ooxml::LN_footnote
+ && m_nStreamType != NS_ooxml::LN_endnote && m_bIsNewDoc)
dispatchSymbol(RTF_PAR);
if (m_bNeedSect) // may be set by dispatchSymbol above!
sectBreak(true);
diff --git a/xmloff/source/transform/FrameOASISTContext.cxx b/xmloff/source/transform/FrameOASISTContext.cxx
index 98386a85252c..5f4d2d253eaf 100644
--- a/xmloff/source/transform/FrameOASISTContext.cxx
+++ b/xmloff/source/transform/FrameOASISTContext.cxx
@@ -59,7 +59,7 @@ bool XMLFrameOASISTransformerContext::IsLinkedEmbeddedObject(
return false;
}
GetTransformer().ConvertURIToOOo( sHRef, true );
- return !(!sHRef.isEmpty() && '#'==sHRef[0]);
+ return sHRef.isEmpty() || '#' != sHRef[0];
}
}