diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-18 15:59:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-19 13:25:54 +0100 |
commit | be94207ecb88a9005ee6624e354d70c9613d7653 (patch) | |
tree | e57c6534adaea7930e7eac95f3b77c4e37ac452e /sc | |
parent | 7d9a5d886f4ba5c61d3c5602a9825510c68eea41 (diff) |
new loplugin:emptyif
Change-Id: I1092115a0ceb3a5e6680a4b724b129f98a892c42
Reviewed-on: https://gerrit.libreoffice.org/48128
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/opencl/op_addin.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/opencl/op_financial.cxx | 32 | ||||
-rw-r--r-- | sc/source/core/opencl/op_math.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/opencl/op_statistical.cxx | 71 | ||||
-rw-r--r-- | sc/source/core/tool/address.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/oox/extlstcontext.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/inc/prevwsh.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/view/prevwsh.cxx | 9 | ||||
-rw-r--r-- | sc/source/ui/view/tabcont.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwshc.cxx | 4 |
10 files changed, 27 insertions, 114 deletions
diff --git a/sc/source/core/opencl/op_addin.cxx b/sc/source/core/opencl/op_addin.cxx index 6a9ef06ed9a1..8b906ae5938a 100644 --- a/sc/source/core/opencl/op_addin.cxx +++ b/sc/source/core/opencl/op_addin.cxx @@ -220,9 +220,7 @@ void OpGestep::GenSlidingWindowFunction( { ss << " {\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; diff --git a/sc/source/core/opencl/op_financial.cxx b/sc/source/core/opencl/op_financial.cxx index cec37d9a5dd0..3d4691f26047 100644 --- a/sc/source/core/opencl/op_financial.cxx +++ b/sc/source/core/opencl/op_financial.cxx @@ -124,9 +124,7 @@ vSubArguments) { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss <<" temp="<<vSubArguments[i]->GenSlidingWindowDeclRef(); @@ -2334,9 +2332,7 @@ void OpPMT::GenSlidingWindowFunction(std::stringstream &ss, { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss <<" temp="<<vSubArguments[i]->GenSlidingWindowDeclRef(); @@ -2528,9 +2524,7 @@ void OpPrice::GenSlidingWindowFunction(std::stringstream &ss, { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; @@ -2626,9 +2620,7 @@ void OpOddlprice::GenSlidingWindowFunction(std::stringstream &ss, { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; @@ -2725,9 +2717,7 @@ void OpOddlyield::GenSlidingWindowFunction(std::stringstream &ss, { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; @@ -2805,9 +2795,7 @@ void OpPriceDisc::GenSlidingWindowFunction(std::stringstream &ss, { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; @@ -2867,9 +2855,7 @@ void OpNper::GenSlidingWindowFunction(std::stringstream &ss, { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; @@ -2944,9 +2930,7 @@ void OpPPMT::GenSlidingWindowFunction(std::stringstream &ss, { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " arg="; diff --git a/sc/source/core/opencl/op_math.cxx b/sc/source/core/opencl/op_math.cxx index eb9a740bb09a..04ca06b2e27d 100644 --- a/sc/source/core/opencl/op_math.cxx +++ b/sc/source/core/opencl/op_math.cxx @@ -159,9 +159,7 @@ void OpMROUND::GenSlidingWindowFunction(std::stringstream &ss, { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " tmp="; diff --git a/sc/source/core/opencl/op_statistical.cxx b/sc/source/core/opencl/op_statistical.cxx index 762ab2a275a5..524eb5ca012e 100644 --- a/sc/source/core/opencl/op_statistical.cxx +++ b/sc/source/core/opencl/op_statistical.cxx @@ -1156,9 +1156,7 @@ void OpExponDist::GenSlidingWindowFunction(std::stringstream &ss, { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; @@ -1245,9 +1243,7 @@ void OpFdist::GenSlidingWindowFunction(std::stringstream &ss, { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; @@ -3198,9 +3194,7 @@ void OpNegbinomdist::GenSlidingWindowFunction( { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; @@ -3694,9 +3688,7 @@ void OpConfidence::GenSlidingWindowFunction(std::stringstream& ss, { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; @@ -3768,9 +3760,7 @@ void OpCritBinom::GenSlidingWindowFunction(std::stringstream& ss, { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; @@ -3996,9 +3986,7 @@ void OpChiInv::GenSlidingWindowFunction( { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << "if (isnan("; @@ -4121,9 +4109,7 @@ void OpNormsdist::GenSlidingWindowFunction( { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; @@ -4181,9 +4167,7 @@ void OpPermut::GenSlidingWindowFunction( { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; @@ -4291,9 +4275,7 @@ void OpPhi::GenSlidingWindowFunction( { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; @@ -4350,9 +4332,7 @@ void OpNorminv::GenSlidingWindowFunction( { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; @@ -4562,9 +4542,7 @@ void OpNormsinv:: GenSlidingWindowFunction { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; @@ -5761,9 +5739,7 @@ void OpChiDist::GenSlidingWindowFunction( { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; @@ -5871,9 +5847,7 @@ void OpBinomdist::GenSlidingWindowFunction( { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; @@ -6803,9 +6777,7 @@ void OpPoisson::GenSlidingWindowFunction( { ss << "{\n"; } - else - { - } + if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; @@ -7347,10 +7319,7 @@ void OpBetainv::GenSlidingWindowFunction( { ss << "{\n"; } - else - { - } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { ss << " if (isnan("; @@ -7771,9 +7740,6 @@ void OpMinA::GenSlidingWindowFunction( ss << " {\n"; isMixed = svDoubleDouble; } - else - { - } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { @@ -7921,9 +7887,6 @@ vSubArguments) ss << " {\n"; isMixed = svDoubleDouble; } - else - { - } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { @@ -8060,9 +8023,6 @@ vSubArguments) ss << " {\n"; isMixed = svDoubleDouble; } - else - { - } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { @@ -8210,9 +8170,6 @@ vSubArguments) ss << " {\n"; isMixed = svDoubleDouble; } - else - { - } if(ocPush==vSubArguments[i]->GetFormulaToken()->GetOpCode()) { diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index 7576c3b9f020..37d04b4e432e 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -1851,9 +1851,7 @@ void ScRange::ParseRows( const OUString& rStr, { if( p[0] == ':') { - if( nullptr != (p = lcl_a1_get_row( p+1, &aEnd, &ignored, nullptr))) - { - } + p = lcl_a1_get_row( p+1, &aEnd, &ignored, nullptr); } else { @@ -1868,9 +1866,9 @@ void ScRange::ParseRows( const OUString& rStr, { if( p[0] == ':') { - if( (p[1] == 'R' || p[1] == 'r') && - nullptr != (p = lcl_r1c1_get_row( p+1, rDetails, &aEnd, &ignored ))) + if( p[1] == 'R' || p[1] == 'r' ) { + p = lcl_r1c1_get_row( p+1, rDetails, &aEnd, &ignored ); } } else diff --git a/sc/source/filter/oox/extlstcontext.cxx b/sc/source/filter/oox/extlstcontext.cxx index 3f29d5256688..b5b39510ed76 100644 --- a/sc/source/filter/oox/extlstcontext.cxx +++ b/sc/source/filter/oox/extlstcontext.cxx @@ -171,11 +171,6 @@ void ExtConditionalFormattingContext::onEndElement() rExtFormats.push_back(o3tl::make_unique<ExtCfCondFormat>(aRange, maEntries)); } break; - case XLS14_TOKEN(cfRule): - if (mpCurrentRule) - { - } - break; default: break; } diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx index 8d0f4591d4f3..14d2f613b464 100644 --- a/sc/source/ui/inc/prevwsh.hxx +++ b/sc/source/ui/inc/prevwsh.hxx @@ -62,7 +62,6 @@ private: protected: virtual void Activate(bool bMDI) override; - virtual void Deactivate(bool bMDI) override; virtual void AdjustPosSizePixel( const Point &rPos, const Size &rSize ) override; virtual void InnerResizePixel( const Point &rOfs, const Size &rSize, bool inplaceEditModeChange ) override; diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 2bab27e4f3c1..bf6f282aa4e1 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -543,15 +543,6 @@ void ScPreviewShell::Activate(bool bMDI) } } -void ScPreviewShell::Deactivate(bool bMDI) -{ - SfxViewShell::Deactivate(bMDI); - - if (bMDI) - { - } -} - void ScPreviewShell::Execute( SfxRequest& rReq ) { sal_uInt16 nSlot = rReq.GetSlot(); diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx index 1aba21d2cf9a..874a22464c7a 100644 --- a/sc/source/ui/view/tabcont.cxx +++ b/sc/source/ui/view/tabcont.cxx @@ -398,9 +398,6 @@ void ScTabControl::UpdateStatus() for (i=0; i<nCount; i++) SelectPage( static_cast<sal_uInt16>(i)+1, rMark.GetTableSelect(i) ); } - else - { - } } void ScTabControl::SetSheetLayoutRTL( bool bSheetRTL ) diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx index 2b31c3024800..f7503752280d 100644 --- a/sc/source/ui/view/tabvwshc.cxx +++ b/sc/source/ui/view/tabvwshc.cxx @@ -113,10 +113,6 @@ void ScTabViewShell::SwitchBetweenRefDialogs(SfxModelessDialog* pDialog) SC_MOD()->SetRefDialog( nId, pWnd == nullptr ); } - else - { - - } } VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog( |