diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-20 12:48:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-20 15:39:38 +0200 |
commit | 283a9790bffa6536f4c26bd31d85f815bc64dd08 (patch) | |
tree | c65ac7fe50fbea809dd765c24edbb47b57adea2b /sw | |
parent | 18bdf78e156f3cd1e6ccbb3ae28e919583bac70c (diff) |
loplugin:indentation check for indent inside block
look for places where the statements inside a block are
not indented
Change-Id: I0cbfa7e0b6fb194b2aff6fa7e070fb907d70ca2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123885
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/frmtool.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/table/swtable.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/txtnode/thints.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 28 |
6 files changed, 33 insertions, 33 deletions
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 70303008b48c..fb1a5f8426fb 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -2342,12 +2342,12 @@ tools::Long SwBorderAttrs::CalcLeft( const SwFrame *pCaller ) const if (!pCaller->IsTextFrame() || !static_cast<const SwTextFrame*>(pCaller)->GetDoc().GetDocumentSettingManager().get(DocumentSettingId::INVERT_BORDER_SPACING)) { - // OD 23.01.2003 #106895# - for cell frame in R2L text direction the left - // and right border are painted on the right respectively left. - if ( pCaller->IsCellFrame() && pCaller->IsRightToLeft() ) - nLeft = CalcRightLine(); - else - nLeft = CalcLeftLine(); + // OD 23.01.2003 #106895# - for cell frame in R2L text direction the left + // and right border are painted on the right respectively left. + if ( pCaller->IsCellFrame() && pCaller->IsRightToLeft() ) + nLeft = CalcRightLine(); + else + nLeft = CalcLeftLine(); } // for paragraphs, "left" is "before text" and "right" is "after text" diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index c3b508493667..daa52cfc2da9 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -147,9 +147,9 @@ void InsTableBox( SwDoc& rDoc, SwTableNode* pTableNd, SwAttrSet aAttrSet( *pCNd->GetpSwAttrSet() ); if(pCNd->GetSwAttrSet().HasItem(RES_PARATR_LIST_AUTOFMT)) { - SwFormatAutoFormat format = aAttrSet.Get(RES_PARATR_LIST_AUTOFMT); - const std::shared_ptr<SfxItemSet>& handle = format.GetStyleHandle(); - aAttrSet.Put(*handle); + SwFormatAutoFormat format = aAttrSet.Get(RES_PARATR_LIST_AUTOFMT); + const std::shared_ptr<SfxItemSet>& handle = format.GetStyleHandle(); + aAttrSet.Put(*handle); } if( pBox->GetSaveNumFormatColor() ) { diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index f2e394b76e8b..577e1726d1e0 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -420,9 +420,9 @@ SwpHints::TryInsertNesting( SwTextNode & rNode, SwTextAttrNesting & rNewHint ) { if (!bNewSelfNestable && (nNewWhich == nOtherWhich)) { - // ruby and hyperlink: if there is nesting, _overwrite_ - OverwrittenExisting.push_back( - static_txtattr_cast<SwTextAttrNesting*>(pOther)); + // ruby and hyperlink: if there is nesting, _overwrite_ + OverwrittenExisting.push_back( + static_txtattr_cast<SwTextAttrNesting*>(pOther)); } else if ((nNewStart == nOtherStart) && pOther->HasDummyChar()) { diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index f97a61c2387a..5b372141f48a 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -537,9 +537,9 @@ bool SwViewShell::AddPaintRect( const SwRect & rRect ) { if( rSh.Imp() ) { - if ( rSh.IsPreview() && rSh.GetWin() ) - ::RepaintPagePreview( &rSh, rRect ); - else + if ( rSh.IsPreview() && rSh.GetWin() ) + ::RepaintPagePreview( &rSh, rRect ); + else bRet |= rSh.Imp()->AddPaintRect( rRect ); } } diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 6e6ed96981f7..2aa94c7059b5 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3081,10 +3081,10 @@ void WW8Export::WriteFkpPlcUsw() if ( pFibData ) { - pFib->m_fReadOnlyRecommended = - pFibData->getReadOnlyRecommended(); - pFib->m_fWriteReservation = - pFibData->getWriteReservation(); + pFib->m_fReadOnlyRecommended = + pFibData->getReadOnlyRecommended(); + pFib->m_fWriteReservation = + pFibData->getWriteReservation(); } pFib->Write( Strm() ); // FIB diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 3ed905061c9e..e44b629c06d0 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -5640,26 +5640,26 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) if( nPosNodeIdx < nMarkNodeIdx ) { - rSh.GetCursor()->GetPoint()->nNode = nPosNodeIdx; - rSh.GetCursor()->GetPoint()->nContent = nPosIdx; - rSh.GetCursor()->GetMark()->nNode = nPosNodeIdx; - rSh.GetCursor()->GetMark()->nContent = - rSh.GetCursor()->GetContentNode()->Len(); + rSh.GetCursor()->GetPoint()->nNode = nPosNodeIdx; + rSh.GetCursor()->GetPoint()->nContent = nPosIdx; + rSh.GetCursor()->GetMark()->nNode = nPosNodeIdx; + rSh.GetCursor()->GetMark()->nContent = + rSh.GetCursor()->GetContentNode()->Len(); } else if( nPosNodeIdx == nMarkNodeIdx ) { - rSh.GetCursor()->GetPoint()->nNode = nPosNodeIdx; - rSh.GetCursor()->GetPoint()->nContent = nPosIdx; - rSh.GetCursor()->GetMark()->nNode = nMarkNodeIdx; - rSh.GetCursor()->GetMark()->nContent = nMarkIdx; + rSh.GetCursor()->GetPoint()->nNode = nPosNodeIdx; + rSh.GetCursor()->GetPoint()->nContent = nPosIdx; + rSh.GetCursor()->GetMark()->nNode = nMarkNodeIdx; + rSh.GetCursor()->GetMark()->nContent = nMarkIdx; } else { - rSh.GetCursor()->GetMark()->nNode = nMarkNodeIdx; - rSh.GetCursor()->GetMark()->nContent = nMarkIdx; - rSh.GetCursor()->GetPoint()->nNode = nMarkNodeIdx; - rSh.GetCursor()->GetPoint()->nContent = - rSh.GetCursor()->GetContentNode( false )->Len(); + rSh.GetCursor()->GetMark()->nNode = nMarkNodeIdx; + rSh.GetCursor()->GetMark()->nContent = nMarkIdx; + rSh.GetCursor()->GetPoint()->nNode = nMarkNodeIdx; + rSh.GetCursor()->GetPoint()->nContent = + rSh.GetCursor()->GetContentNode( false )->Len(); } rSh.EndCursorMove( true ); |