summaryrefslogtreecommitdiff
path: root/sc
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 /sc
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 'sc')
-rw-r--r--sc/qa/unit/opencl-test.cxx14
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx4
-rw-r--r--sc/source/filter/excel/xestream.cxx2
-rw-r--r--sc/source/filter/lotus/tool.cxx4
-rw-r--r--sc/source/ui/dataprovider/datatransformation.cxx2
-rw-r--r--sc/source/ui/vba/vbaformat.cxx21
-rw-r--r--sc/source/ui/view/tabvwshf.cxx2
-rw-r--r--sc/source/ui/view/viewfunc.cxx2
8 files changed, 27 insertions, 24 deletions
diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx
index abf87e6b33bd..f72300da02f3 100644
--- a/sc/qa/unit/opencl-test.cxx
+++ b/sc/qa/unit/opencl-test.cxx
@@ -3837,19 +3837,19 @@ void ScOpenCLTest::testMathFormulaSumProduct()
double fLibre = rDoc.GetValue(ScAddress(2,i,0));
double fExcel = rDocRes.GetValue(ScAddress(2,i,0));
if ( i == 1 )
- CPPUNIT_ASSERT_DOUBLES_EQUAL(82, fLibre, fabs(0.0001*fExcel));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(82, fLibre, fabs(0.0001*fExcel));
else if ( i == 2 )
- CPPUNIT_ASSERT_DOUBLES_EQUAL(113, fLibre, fabs(0.0001*fExcel));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(113, fLibre, fabs(0.0001*fExcel));
else if ( i == 4 )
- CPPUNIT_ASSERT_DOUBLES_EQUAL(175, fLibre, fabs(0.0001*fExcel));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(175, fLibre, fabs(0.0001*fExcel));
else if ( i == 5 )
- CPPUNIT_ASSERT_DOUBLES_EQUAL(206, fLibre, fabs(0.0001*fExcel));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(206, fLibre, fabs(0.0001*fExcel));
else if ( i == 6 )
- CPPUNIT_ASSERT_DOUBLES_EQUAL(237, fLibre, fabs(0.0001*fExcel));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(237, fLibre, fabs(0.0001*fExcel));
else if ( i == 7 )
- CPPUNIT_ASSERT_DOUBLES_EQUAL(268, fLibre, fabs(0.0001*fExcel));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(268, fLibre, fabs(0.0001*fExcel));
else
- CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel));
}
}
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 05deff486faa..24815b4937b1 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -1782,7 +1782,9 @@ public:
if (NumericRange* NR =
dynamic_cast<NumericRange*>(vSubArguments[i].get()))
{
- bool needBody; NR->GenReductionLoopHeader(ss, needBody); if (!needBody)
+ bool needBody;
+ NR->GenReductionLoopHeader(ss, needBody);
+ if (!needBody)
continue;
}
else if (ParallelNumericRange* PNR =
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 2a2518840828..19115bc86d68 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -482,7 +482,7 @@ void XclExpBiff8Encrypter::GetSalt( sal_uInt8 pnSalt[16] ) const
void XclExpBiff8Encrypter::GetDocId( sal_uInt8 pnDocId[16] ) const
{
if ( sizeof( mpnDocId ) == 16 )
- memcpy( pnDocId, mpnDocId, 16 );
+ memcpy( pnDocId, mpnDocId, 16 );
}
void XclExpBiff8Encrypter::Encrypt( SvStream& rStrm, sal_uInt8 nData )
diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx
index ab65dbe732d3..5c5d307198a3 100644
--- a/sc/source/filter/lotus/tool.cxx
+++ b/sc/source/filter/lotus/tool.cxx
@@ -135,9 +135,9 @@ double Snum32ToDouble( sal_uInt32 nValue )
if (temp)
{
if (nValue & 0x00000010)
- fValue /= pow(double(10), temp);
+ fValue /= pow(double(10), temp);
else
- fValue *= pow(double(10), temp);
+ fValue *= pow(double(10), temp);
}
if (nValue & 0x00000020)
diff --git a/sc/source/ui/dataprovider/datatransformation.cxx b/sc/source/ui/dataprovider/datatransformation.cxx
index 8e073a382745..01a541e110d8 100644
--- a/sc/source/ui/dataprovider/datatransformation.cxx
+++ b/sc/source/ui/dataprovider/datatransformation.cxx
@@ -486,7 +486,7 @@ void NumberTransformation::Transform(ScDocument& rDoc) const
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
if(rtl::math::isSignBitSet(nVal))
- rDoc.SetValue(rCol, nRow, 0, -1 * nVal);
+ rDoc.SetValue(rCol, nRow, 0, -1 * nVal);
}
}
}
diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx
index ce5bddd12505..6f65b444df3c 100644
--- a/sc/source/ui/vba/vbaformat.cxx
+++ b/sc/source/ui/vba/vbaformat.cxx
@@ -704,16 +704,17 @@ ScVbaFormat< Ifc... >::getReadingOrder( )
{
text::WritingMode aWritingMode = text::WritingMode_LR_TB;
if ( ( mxPropertySet->getPropertyValue(sWritingMode) ) >>= aWritingMode )
- switch (aWritingMode){
- case text::WritingMode_LR_TB:
- NRetReadingOrder <<= excel::Constants::xlLTR;
- break;
- case text::WritingMode_RL_TB:
- NRetReadingOrder <<= excel::Constants::xlRTL;
- break;
- default:
- NRetReadingOrder <<= excel::Constants::xlRTL;
- }
+ switch (aWritingMode)
+ {
+ case text::WritingMode_LR_TB:
+ NRetReadingOrder <<= excel::Constants::xlLTR;
+ break;
+ case text::WritingMode_RL_TB:
+ NRetReadingOrder <<= excel::Constants::xlRTL;
+ break;
+ default:
+ NRetReadingOrder <<= excel::Constants::xlRTL;
+ }
}
}
catch (const uno::Exception& )
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 1926f0727a18..00f85a151662 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -903,7 +903,7 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet )
|| !pDoc->IsDocEditable()
|| nVis < 2
|| nTabSelCount == nTabCount)
- rSet.DisableItem( nWhich );
+ rSet.DisableItem( nWhich );
}
}
break;
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index a2218c8ddcbf..7ed93ac0b0b4 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -2282,7 +2282,7 @@ void ScViewFunc::SetWidthOrHeight(
pDocSh->UpdateOle(&GetViewData());
if( !pDocSh->IsReadOnly() )
- aModificator.SetDocumentModified();
+ aModificator.SetDocumentModified();
}
if ( bWidth )