summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-11-05 15:20:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-11-06 06:27:51 +0100
commit7b99cdb2d77a3feaf9b782c1e656f2d922e2746e (patch)
tree180459dcd8379ee1a2e89098a4d9eda72abe8f05 /sw
parent7ee07296a66df29555c9e9a684f24bc68201cb78 (diff)
loplugin:indentation find broken if statements
so I don't read the "then" block as being a sequential statements Change-Id: Ib2004acd3518bd4ebd2246f02a26c2c0a8bbab4c Reviewed-on: https://gerrit.libreoffice.org/82069 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/fields/expfld.cxx2
-rw-r--r--sw/source/core/frmedt/fews.cxx2
-rw-r--r--sw/source/core/layout/fly.cxx6
-rw-r--r--sw/source/core/layout/frmtool.cxx2
-rw-r--r--sw/source/core/layout/ftnfrm.cxx4
-rw-r--r--sw/source/core/text/txtfrm.cxx2
-rw-r--r--sw/source/core/unocore/unofield.cxx2
-rw-r--r--sw/source/uibase/docvw/edtwin2.cxx2
-rw-r--r--sw/source/uibase/shells/basesh.cxx15
9 files changed, 19 insertions, 18 deletions
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 033ccb556faf..673e257e0554 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -368,7 +368,7 @@ void SwGetExpField::ChangeExpansion( const SwFrame& rFrame, const SwTextField& r
m_bLateInitialization = false;
if( !(GetSubType() & nsSwGetSetExpType::GSE_STRING) &&
static_cast< SwSetExpFieldType* >(pSetExpField)->GetType() == nsSwGetSetExpType::GSE_STRING )
- SetSubType( nsSwGetSetExpType::GSE_STRING );
+ SetSubType( nsSwGetSetExpType::GSE_STRING );
}
}
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index 3c0c7d5279a2..2f874fd34e24 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -472,7 +472,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con
{
SdrObject* pDrawObj = rMrkList.GetMark(i)->GetMarkedSdrObj();
if( pDrawObj )
- aDrawObjs.push_back( pDrawObj );
+ aDrawObjs.push_back( pDrawObj );
}
}
// loop on marked drawing objects
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index e4939dfb16c1..b5f364511f6e 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -450,7 +450,7 @@ void SwFlyFrame::ChainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow )
{
SwRootFrame* pLayout = pMaster->getRootFrame();
if( pLayout && pLayout->IsAnyShellAccessible() )
- pSh->Imp()->InvalidateAccessibleRelationSet( pMaster, pFollow );
+ pSh->Imp()->InvalidateAccessibleRelationSet( pMaster, pFollow );
}
}
@@ -496,7 +496,7 @@ void SwFlyFrame::UnchainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow )
{
SwRootFrame* pLayout = pMaster->getRootFrame();
if( pLayout && pLayout->IsAnyShellAccessible() )
- pSh->Imp()->InvalidateAccessibleRelationSet( pMaster, pFollow );
+ pSh->Imp()->InvalidateAccessibleRelationSet( pMaster, pFollow );
}
}
@@ -761,7 +761,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
{
SwRootFrame* pLayout = getRootFrame();
if( pLayout && pLayout->IsAnyShellAccessible() )
- pSh->Imp()->InvalidateAccessibleEditableState( true, this );
+ pSh->Imp()->InvalidateAccessibleEditableState( true, this );
}
}
break;
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index b1e414d46880..f0ef0a38314d 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -543,7 +543,7 @@ SwLayNotify::~SwLayNotify()
//Thereby the subordinates are retouched clean.
//Example problem: Take the Flys with the handles and downsize.
//Not for body and page, otherwise it flickers when loading HTML.
- pLay->SetCompletePaint();
+ pLay->SetCompletePaint();
}
}
//Notify Lower if the position has changed.
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 6711643d438b..da0cf0334de5 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -1112,7 +1112,7 @@ const SwFootnoteFrame *SwFootnoteBossFrame::FindFirstFootnote( SwContentFrame co
const SwFootnoteBossFrame* pBoss = pRet->GetRef()->FindFootnoteBossFrame();
if( pBoss->GetPhyPageNum() != nPageNum ||
nColNum != lcl_ColumnNum( pBoss ) )
- pRet = nullptr;
+ pRet = nullptr;
}
}
}
@@ -2562,7 +2562,7 @@ SwTwips SwFootnoteBossFrame::GetVarSpace() const
{
const SwViewShell *pSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr;
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
- nRet += BROWSE_HEIGHT - getFrameArea().Height();
+ nRet += BROWSE_HEIGHT - getFrameArea().Height();
}
return nRet;
}
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index b18d64c22ecf..028db9511c08 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -2906,7 +2906,7 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid,
const sal_uInt16 nWhich = pHt->Which();
if (RES_TXTATR_FIELD == nWhich ||
(HasFootnote() && pVoid && RES_TXTATR_FTN == nWhich))
- InvalidateRange(SwCharRange(nStart, TextFrameIndex(1)), 1);
+ InvalidateRange(SwCharRange(nStart, TextFrameIndex(1)), 1);
}
}
// A new boss, a new chance for growing
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 35dc5e95d3bc..b5b7f4e1a88e 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -1834,7 +1834,7 @@ void SAL_CALL SwXTextField::attach(
{
if (nSubType != nsSwGetSetExpType::GSE_STRING &&
static_cast< SwSetExpFieldType* >(pSetExpField)->GetType() == nsSwGetSetExpType::GSE_STRING)
- nSubType = nsSwGetSetExpType::GSE_STRING;
+ nSubType = nsSwGetSetExpType::GSE_STRING;
}
else
bSetGetExpFieldUninitialized = true; // #i82544#
diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx
index f8b96e99f2c0..872352db5e3d 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -184,7 +184,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
sSuffix == "text" ||
sSuffix == "graphic" ||
sSuffix == "ole" )
- sText = sText.copy( 0, nFound - 1);
+ sText = sText.copy( 0, nFound - 1);
}
// #i104300#
// special handling if target is a cross-reference bookmark
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 67e8ecfd7b64..bb9f4a975297 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -1237,11 +1237,14 @@ void SwBaseShell::Execute(SfxRequest &rReq)
default:
bMore = true;
}
- if(bMore && pArgs)
- {
- pItem = nullptr;
- pArgs->GetItemState(GetPool().GetWhich(nSlot), false, &pItem);
- if(pItem)
+
+
+ if(!bMore || !pArgs)
+ return;
+
+ pItem = nullptr;
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), false, &pItem);
+ if(pItem)
switch(nSlot)
{
case SID_ATTR_BRUSH:
@@ -1304,8 +1307,6 @@ void SwBaseShell::Execute(SfxRequest &rReq)
default:
OSL_FAIL("wrong Dispatcher");
}
-
- }
}
// Here the state for SID_IMAP / SID_CONTOUR will be handled