summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-22 09:33:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-23 06:59:31 +0100
commit7a1c21e53fc4733a4bb52282ce0098fcc085ab0e (patch)
treec1b90f74e1ce9e9f3a852f398890899459189cab /sw/source/uibase
parentc24c32bf71b8e64bd0d36e511f554e1f6c015842 (diff)
loplugin:simplifybool for negation of comparison operator
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/swmodul1.cxx2
-rw-r--r--sw/source/uibase/frmdlg/frmmgr.cxx4
-rw-r--r--sw/source/uibase/shells/textfld.cxx2
-rw-r--r--sw/source/uibase/uno/unomod.cxx2
-rw-r--r--sw/source/uibase/utlui/content.cxx2
5 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx
index 192511fa587b..49067db87393 100644
--- a/sw/source/uibase/app/swmodul1.cxx
+++ b/sw/source/uibase/app/swmodul1.cxx
@@ -421,7 +421,7 @@ void SwModule::SetRedlineAuthor(const OUString &rAuthor)
OUString SwModule::GetRedlineAuthor(std::size_t nPos)
{
OSL_ENSURE(nPos < m_pAuthorNames.size(), "author not found!"); //#i45342# RTF doc with no author table caused reader to crash
- while(!(nPos < m_pAuthorNames.size()))
+ while(nPos >= m_pAuthorNames.size())
{
InsertRedlineAuthor("nn");
}
diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx
index 7cd7c2702333..2bf04a3cce44 100644
--- a/sw/source/uibase/frmdlg/frmmgr.cxx
+++ b/sw/source/uibase/frmdlg/frmmgr.cxx
@@ -335,8 +335,8 @@ void SwFlyFrameAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
// aligned at character or top of line in a special case
else if ((eAnchorType == RndStdIds::FLY_AT_PARA) ||
((eAnchorType == RndStdIds::FLY_AT_CHAR) &&
- !(rVal.nVRelOrient == text::RelOrientation::CHAR) &&
- !(rVal.nVRelOrient == text::RelOrientation::TEXT_LINE) ) )
+ (rVal.nVRelOrient != text::RelOrientation::CHAR) &&
+ (rVal.nVRelOrient != text::RelOrientation::TEXT_LINE) ) )
{
if (rVal.nHPos + rVal.nWidth > aBoundRect.Right())
{
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index 94ae920530cf..5e4dfeaef768 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -644,7 +644,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
bIsUrl = pIsUrl->GetValue();
SwScriptField* pField = static_cast<SwScriptField*>(aMgr.GetCurField());
- bNew = !pField || !(pField->GetTyp()->Which() == SwFieldIds::Script);
+ bNew = !pField || (pField->GetTyp()->Which() != SwFieldIds::Script);
bUpdate = pField && ( bIsUrl != (bool)pField->GetFormat() || pField->GetPar2() != aType || pField->GetPar1() != aText );
}
else
diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx
index a41e1f40b1e2..3cd3772ea3fa 100644
--- a/sw/source/uibase/uno/unomod.cxx
+++ b/sw/source/uibase/uno/unomod.cxx
@@ -354,7 +354,7 @@ void SwXPrintSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo,
sal_Int16 nTmp = 0;
rValue >>= nTmp;
SwPostItMode nVal = static_cast<SwPostItMode>(nTmp);
- if(!(nVal <= SwPostItMode::EndPage))
+ if(nVal > SwPostItMode::EndPage)
throw lang::IllegalArgumentException();
mpPrtOpt->SetPrintPostIts(nVal);
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index f7c6cc627f39..9b59a912c722 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1379,7 +1379,7 @@ void SwContentTree::RequestingChildren( SvTreeListEntry* pParent )
assert(!pChild || lcl_IsContentType(pChild) || dynamic_cast<SwOutlineContent*>(static_cast<SwTypeNumber*>(pChild->GetUserData())));
while(pChild &&
lcl_IsContent(pChild) &&
- !(static_cast<SwOutlineContent*>(pChild->GetUserData())->GetOutlineLevel() < nLevel)
+ (static_cast<SwOutlineContent*>(pChild->GetUserData())->GetOutlineLevel() >= nLevel)
)
{
pChild = Prev(pChild);