diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-18 14:09:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-19 07:58:15 +0200 |
commit | e61e4e56994c22221dcc0e9f4c2cb62fd63ac823 (patch) | |
tree | d38359c4e9a3de7112075244d7013907ce135d4f /sc | |
parent | ba80f637b82ef5df7c650ec301ca9ebb5f678f44 (diff) |
clang-tidy readability-misleading-indentation
Change-Id: I4673fc7c694924b41d048a1918ddb8b0e0af1f79
Reviewed-on: https://gerrit.libreoffice.org/61935
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/dpoutput.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/opencl/op_financial.cxx | 8 | ||||
-rw-r--r-- | sc/source/core/opencl/op_math.cxx | 66 | ||||
-rw-r--r-- | sc/source/core/opencl/op_statistical.cxx | 37 | ||||
-rw-r--r-- | sc/source/filter/lotus/lotform.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/vba/vbafont.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaworksheets.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/preview.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/tabview.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwshf.cxx | 43 |
11 files changed, 93 insertions, 93 deletions
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index bb66f56c8b6e..3449e6bf2eab 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -256,7 +256,7 @@ void ScDPOutputImpl::OutputBlockFrame ( SCCOL nStartCol, SCROW nStartRow, SCCOL else aBox.SetLine(&aLine, SvxBoxItemLine::RIGHT); - if ( nEndRow == mnTabEndRow ) //bottom + if ( nEndRow == mnTabEndRow ) //bottom aBox.SetLine(&aOutLine, SvxBoxItemLine::BOTTOM); else aBox.SetLine(&aLine, SvxBoxItemLine::BOTTOM); diff --git a/sc/source/core/opencl/op_financial.cxx b/sc/source/core/opencl/op_financial.cxx index 960175eb3709..c276e680f8ba 100644 --- a/sc/source/core/opencl/op_financial.cxx +++ b/sc/source/core/opencl/op_financial.cxx @@ -2374,10 +2374,10 @@ void OpNPV::GenSlidingWindowFunction(std::stringstream &ss, //while (i-- > 1) for (size_t i = 1; i < vSubArguments.size(); i++) { - FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); - assert(pCur); - if (pCur->GetType() == formula::svDoubleVectorRef) - { + FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); + assert(pCur); + if (pCur->GetType() == formula::svDoubleVectorRef) + { const formula::DoubleVectorRefToken* pDVR = static_cast<const formula::DoubleVectorRefToken *>(pCur); size_t nCurWindowSize = pDVR->GetRefRowSize(); diff --git a/sc/source/core/opencl/op_math.cxx b/sc/source/core/opencl/op_math.cxx index 62968ce75369..7f8305ecf708 100644 --- a/sc/source/core/opencl/op_math.cxx +++ b/sc/source/core/opencl/op_math.cxx @@ -2700,7 +2700,7 @@ void OpConvert::GenSlidingWindowFunction( void OpProduct::GenSlidingWindowFunction(std::stringstream &ss, const std::string &sSymName, SubArguments &vSubArguments) { - ss << "\ndouble " << sSymName; + ss << "\ndouble " << sSymName; ss << "_"<< BinFuncName() <<"( "; for (size_t i = 0; i < vSubArguments.size(); i++) { @@ -2722,52 +2722,52 @@ void OpProduct::GenSlidingWindowFunction(std::stringstream &ss, static_cast<const formula::DoubleVectorRefToken *>(pCur); size_t nCurWindowSize = pDVR->GetRefRowSize(); - ss << " for (int i = "; - if (!pDVR->IsStartFixed() && pDVR->IsEndFixed()) - { + ss << " for (int i = "; + if (!pDVR->IsStartFixed() && pDVR->IsEndFixed()) + { ss << "gid0; i < " << pDVR->GetArrayLength(); ss << " && i < " << nCurWindowSize << "; i++)\n"; ss << " {\n"; - } - else if (pDVR->IsStartFixed() && !pDVR->IsEndFixed()) - { + } + else if (pDVR->IsStartFixed() && !pDVR->IsEndFixed()) + { ss << "0; i < " << pDVR->GetArrayLength(); ss << " && i < gid0+" << nCurWindowSize << "; i++)\n"; ss << " {\n"; - } - else if (!pDVR->IsStartFixed() && !pDVR->IsEndFixed()) - { + } + else if (!pDVR->IsStartFixed() && !pDVR->IsEndFixed()) + { ss << "0; i + gid0 < " << pDVR->GetArrayLength(); ss << " && i < " << nCurWindowSize << "; i++)\n"; ss << " {\n"; - } - else if (pDVR->IsStartFixed() && pDVR->IsEndFixed()) - { + } + else if (pDVR->IsStartFixed() && pDVR->IsEndFixed()) + { ss << "0; i < " << pDVR->GetArrayLength() << "; i++)\n"; ss << " {\n"; - } - ss << "if(!isnan("<<rArg->GenSlidingWindowDeclRef()<<"))\n"; - ss << "product = product*"; - ss << rArg->GenSlidingWindowDeclRef()<<";\n"; - ss << " }\n"; } - else if (pCur->GetType() == formula::svSingleVectorRef) - { - ss << "if(!isnan("<<rArg->GenSlidingWindowDeclRef()<<"))\n"; - ss << "product = product*"; - ss << rArg->GenSlidingWindowDeclRef()<<";\n"; + ss << "if(!isnan("<<rArg->GenSlidingWindowDeclRef()<<"))\n"; + ss << "product = product*"; + ss << rArg->GenSlidingWindowDeclRef()<<";\n"; + ss << " }\n"; + } + else if (pCur->GetType() == formula::svSingleVectorRef) + { + ss << "if(!isnan("<<rArg->GenSlidingWindowDeclRef()<<"))\n"; + ss << "product = product*"; + ss << rArg->GenSlidingWindowDeclRef()<<";\n"; - } - else - { - ss << "if(!isnan("<<rArg->GenSlidingWindowDeclRef()<<"))\n"; - ss << "product = product*"; - ss << rArg->GenSlidingWindowDeclRef()<<";\n"; - } } - ss << " return product;\n"; - ss << "}"; + else + { + ss << "if(!isnan("<<rArg->GenSlidingWindowDeclRef()<<"))\n"; + ss << "product = product*"; + ss << rArg->GenSlidingWindowDeclRef()<<";\n"; + } + } + ss << " return product;\n"; + ss << "}"; } void OpAverageIf::GenSlidingWindowFunction(std::stringstream &ss, const std::string &sSymName, SubArguments &vSubArguments) @@ -2904,7 +2904,7 @@ void OpAverageIf::GenSlidingWindowFunction(std::stringstream &ss, ss << " }\n"; } } - else + else { CheckSubArgumentIsNan(ss,vSubArguments, 0); ss << " if ( isequal( tmp0 , tmp1 ) ) \n"; diff --git a/sc/source/core/opencl/op_statistical.cxx b/sc/source/core/opencl/op_statistical.cxx index afe9de6a5ee8..79d27e5ef5e7 100644 --- a/sc/source/core/opencl/op_statistical.cxx +++ b/sc/source/core/opencl/op_statistical.cxx @@ -3959,30 +3959,29 @@ void OpChiInv::GenSlidingWindowFunction( if (!pDVR->IsStartFixed() && pDVR->IsEndFixed()) { ss << "gid0; i < " << pDVR->GetArrayLength(); ss << " && i < " << nCurWindowSize << "; i++){\n"; - } else if (pDVR->IsStartFixed() && !pDVR->IsEndFixed()) { + } else if (pDVR->IsStartFixed() && !pDVR->IsEndFixed()) { ss << "0; i < " << pDVR->GetArrayLength(); ss << " && i < gid0+"<< nCurWindowSize << "; i++){\n"; - } else if (!pDVR->IsStartFixed() && !pDVR->IsEndFixed()){ + } else if (!pDVR->IsStartFixed() && !pDVR->IsEndFixed()){ ss << "0; i + gid0 < " << pDVR->GetArrayLength(); ss << " && i < "<< nCurWindowSize << "; i++){\n"; - } - else { + } else { ss << "0; i < "<< nCurWindowSize << "; i++){\n"; - } } - else if (pCur->GetType() == formula::svSingleVectorRef) - { + } + else if (pCur->GetType() == formula::svSingleVectorRef) + { const formula::SingleVectorRefToken* pSVR = static_cast< const formula::SingleVectorRefToken* >(pCur); ss << "if (gid0 < " << pSVR->GetArrayLength() << "){\n"; - } - else if (pCur->GetType() == formula::svDouble) - { - ss << "{\n"; - } + } + else if (pCur->GetType() == formula::svDouble) + { + ss << "{\n"; + } - if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) - { + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) + { ss << "if (isnan("; ss << vSubArguments[i]->GenSlidingWindowDeclRef(); ss << "))\n"; @@ -3990,13 +3989,13 @@ void OpChiInv::GenSlidingWindowFunction( ss << "else\n"; ss <<"tmp"<<i<<"="<<vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n}\n"; - } - else - { + } + else + { ss << "tmp"<<i<<"="<<vSubArguments[i]->GenSlidingWindowDeclRef(); ss << ";\n"; - } - } + } + } ss << " tmp1 = floor(tmp1);"; ss << " if (tmp1 < 1.0 || tmp0 <= 0.0 || tmp0 > 1.0 )\n"; ss << " {\n"; diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx index f25fc57e1562..f696c063e6d0 100644 --- a/sc/source/filter/lotus/lotform.cxx +++ b/sc/source/filter/lotus/lotform.cxx @@ -639,7 +639,7 @@ void LotusToSc::Convert( std::unique_ptr<ScTokenArray>& rpErg, sal_Int32& rRest else aStack << aPool.Store( ScfTools::ReadLongDouble( aIn ) ); break; case FT_Snum: - if ( bWK123 ) + if ( bWK123 ) { sal_uInt32 nValue; @@ -654,7 +654,7 @@ void LotusToSc::Convert( std::unique_ptr<ScTokenArray>& rpErg, sal_Int32& rRest aStack << aPool.Store( SnumToDouble( nVal ) ); } break; - default: + default: SAL_WARN( "sc.filter", "*LotusToSc::Convert(): unknown enum!" ); } } diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index dc1dc0cac7bc..faff13dda9f7 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -1690,9 +1690,9 @@ bool ScAccessibleSpreadsheet::GetFormulaCurrentFocusCell(ScAddress &addr) uno::Reference < XAccessible > ScAccessibleSpreadsheet::GetActiveCell() { if( m_mapSelectionSend.find( maActiveCell ) != m_mapSelectionSend.end() ) - return m_mapSelectionSend[maActiveCell]; - else - return getAccessibleCellAt(maActiveCell.Row(), maActiveCell .Col()); + return m_mapSelectionSend[maActiveCell]; + else + return getAccessibleCellAt(maActiveCell.Row(), maActiveCell .Col()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx index 1d82ded74aad..bd0f410de6fe 100644 --- a/sc/source/ui/vba/vbafont.cxx +++ b/sc/source/ui/vba/vbafont.cxx @@ -79,12 +79,12 @@ ScVbaFont::setColorIndex( const uno::Any& _colorindex ) // handled properly here if ( !nIndex || ( nIndex == excel::XlColorIndex::xlColorIndexAutomatic ) ) - { + { nIndex = 1; // check default ( assume black ) - ScVbaFont_BASE::setColorIndex( uno::makeAny( nIndex ) ); - } - else - ScVbaFont_BASE::setColorIndex( _colorindex ); + ScVbaFont_BASE::setColorIndex( uno::makeAny( nIndex ) ); + } + else + ScVbaFont_BASE::setColorIndex( _colorindex ); } uno::Any SAL_CALL diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx index 46b2bc880c58..81870ab6a3a6 100644 --- a/sc/source/ui/vba/vbaworksheets.cxx +++ b/sc/source/ui/vba/vbaworksheets.cxx @@ -230,7 +230,7 @@ ScVbaWorksheets::Add( const uno::Any& Before, const uno::Any& After, if ( Before.hasValue() ) { - if ( Before >>= xBeforeAfterSheet ) + if ( Before >>= xBeforeAfterSheet ) aStringSheet = xBeforeAfterSheet->getName(); else Before >>= aStringSheet; @@ -238,7 +238,7 @@ ScVbaWorksheets::Add( const uno::Any& Before, const uno::Any& After, if (aStringSheet.isEmpty() && After.hasValue() ) { - if ( After >>= xBeforeAfterSheet ) + if ( After >>= xBeforeAfterSheet ) aStringSheet = xBeforeAfterSheet->getName(); else After >>= aStringSheet; diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index ec9206921c9c..0438ce1467f4 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -890,7 +890,7 @@ void ScPreview::DoInvalidate() // If the whole GetState of the shell is called // The Invalidate must come behind asynchronously - if (bInGetState) + if (bInGetState) Application::PostUserEvent( LINK( this, ScPreview, InvalidateHdl ), nullptr, true ); else StaticInvalidate(); // Immediately diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index acb9a8ba3d57..7e7e40b95fd6 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -441,8 +441,8 @@ void ScTabView::DoResize( const Point& rOffset, const Size& rSize, bool bInner ) { nTabSize = pTabControl->GetSizePixel().Width(); - if ( aViewData.GetHSplitMode() != SC_SPLIT_FIX ) // left Scrollbar - { + if ( aViewData.GetHSplitMode() != SC_SPLIT_FIX ) // left Scrollbar + { if (nTabSize > nSizeLt-SC_SCROLLBAR_MIN) nTabSize = nSizeLt-SC_SCROLLBAR_MIN; if (nTabSize < SC_TABBAR_MIN) diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index ba955827015d..e0fbd782619b 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -795,38 +795,39 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); for (; itr != itrEnd; ++itr) + { + if ( !pDoc->IsTabProtected(*itr) ) { - if ( !pDoc->IsTabProtected(*itr) ) - { - ScUndoTabColorInfo aTabColorInfo(*itr); - aTabColorInfo.maNewTabBgColor = aSelectedColor; - pTabColorList->push_back(aTabColorInfo); - } + ScUndoTabColorInfo aTabColorInfo(*itr); + aTabColorInfo.maNewTabBgColor = aSelectedColor; + pTabColorList->push_back(aTabColorInfo); } - bDone = SetTabBgColor( *pTabColorList ); } - else - { - bDone = SetTabBgColor( aSelectedColor, nCurrentTab ); //ScViewFunc.SetTabBgColor - } - if ( bDone ) - { - rReq.AppendItem( SvxColorItem( aTabBgColor, nSlot ) ); - rReq.Done(); - } - else + bDone = SetTabBgColor( *pTabColorList ); + } + else + { + bDone = SetTabBgColor( aSelectedColor, nCurrentTab ); //ScViewFunc.SetTabBgColor + } + + if ( bDone ) + { + rReq.AppendItem( SvxColorItem( aTabBgColor, nSlot ) ); + rReq.Done(); + } + else + { + if( rReq.IsAPI() ) { - if( rReq.IsAPI() ) - { #if HAVE_FEATURE_SCRIPTING - StarBASIC::Error( ERRCODE_BASIC_SETPROP_FAILED ); + StarBASIC::Error( ERRCODE_BASIC_SETPROP_FAILED ); #endif - } } } } } } + } break; case FID_TAB_EVENTS: |