summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-11-06 09:04:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-11-06 10:47:15 +0100
commit9e087d4a3011aa98de6151aeda9cbb40b1fd21ef (patch)
tree0d6219941df2857fd63e1d9f913214af6804fb2e /sc/source
parentd746e6f7cbc9e7225b965c1b506a0050dd386e53 (diff)
loplugin:unusedvariablecheck tweak to find more stuff
but leave the tweak commented out, since it generates false positives Change-Id: Iaf3f92414d2618f8780561f98765e33e282afe0c Reviewed-on: https://gerrit.libreoffice.org/82121 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/funcdesc.cxx11
-rw-r--r--sc/source/filter/oox/sheetdatabuffer.cxx1
-rw-r--r--sc/source/filter/qpro/qproform.cxx2
-rw-r--r--sc/source/ui/vba/vbapagesetup.cxx1
-rw-r--r--sc/source/ui/view/dbfunc3.cxx1
5 files changed, 4 insertions, 12 deletions
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index 4679f3e029b4..abeccaba4b9f 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -88,11 +88,7 @@ struct ScFuncDescCore
sal_uInt8 const aOptionalArgs[7];
};
-class ScFuncRes
-{
-public:
- ScFuncRes(const ScFuncDescCore &rEntry, ScFuncDesc*, bool& rbSuppressed);
-};
+static void ScFuncRes(const ScFuncDescCore &rEntry, ScFuncDesc*, bool& rbSuppressed);
// class ScFuncDesc:
ScFuncDesc::ScFuncDesc() :
@@ -815,7 +811,7 @@ ScFunctionList::ScFunctionList()
pDesc = new ScFuncDesc;
bool bSuppressed = false;
- ScFuncRes aSubRes(*pEntry, pDesc, bSuppressed);
+ ScFuncRes(*pEntry, pDesc, bSuppressed);
// Instead of dealing with this exceptional case at 1001 places
// we simply don't add an entirely suppressed function to the
// list and delete it.
@@ -1185,8 +1181,7 @@ sal_Unicode ScFunctionMgr::getSingleToken(const formula::IFunctionManager::EToke
return 0;
}
-// class ScFuncRes:
-ScFuncRes::ScFuncRes(const ScFuncDescCore &rEntry, ScFuncDesc* pDesc, bool& rbSuppressed)
+static void ScFuncRes(const ScFuncDescCore &rEntry, ScFuncDesc* pDesc, bool& rbSuppressed)
{
const sal_uInt16 nOpCode = rEntry.nOpCode;
sal_uInt16 nFunctionFlags = rEntry.nFunctionFlags;
diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx
index cd7ff12d8d3c..03b35ef76e35 100644
--- a/sc/source/filter/oox/sheetdatabuffer.cxx
+++ b/sc/source/filter/oox/sheetdatabuffer.cxx
@@ -257,7 +257,6 @@ void SheetDataBuffer::setFormulaCell( const CellModel& rModel, const ApiTokenSeq
reading the formula definition it will be retried to insert the
formula via retryPendingSharedFormulaCell(). */
ScAddress aTokenAddr( aTokenInfo.First.Column, aTokenInfo.First.Row, aTokenInfo.First.Sheet );
- BinAddress aBaseAddr( aTokenAddr );
aTokens = resolveSharedFormula( aTokenAddr );
if( !aTokens.hasElements() )
{
diff --git a/sc/source/filter/qpro/qproform.cxx b/sc/source/filter/qpro/qproform.cxx
index 142d09945e54..175f098463eb 100644
--- a/sc/source/filter/qpro/qproform.cxx
+++ b/sc/source/filter/qpro/qproform.cxx
@@ -72,7 +72,7 @@ void QProToSc::DoFunc( DefTokenId eOc, sal_uInt16 nArgs, const sal_Char* pExtStr
{
TokenId eParam[ nBufSize ];
sal_Int32 nCount;
- TokenId nPush, nPush1;
+ TokenId nPush;
bool bAddIn = false;
diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx
index f06dbbe701b9..15b27350acdb 100644
--- a/sc/source/ui/vba/vbapagesetup.cxx
+++ b/sc/source/ui/vba/vbapagesetup.cxx
@@ -69,7 +69,6 @@ OUString SAL_CALL ScVbaPageSetup::getPrintArea()
const uno::Sequence< table::CellRangeAddress > aSeq = xPrintAreas->getPrintAreas();
if( aSeq.hasElements() )
{
- ScAddress::Details aDetails( formula::FormulaGrammar::CONV_XL_A1, 0, 0 );
ScRangeList aRangeList;
for( const auto& rRange : aSeq )
{
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 32875638d6cb..d25183400750 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -965,7 +965,6 @@ void ScDBFunc::DateGroupDataPilot( const ScDPNumGroupInfo& rInfo, sal_Int32 nPar
{
// create date group dimensions
- ScDPNumGroupInfo aEmpty;
bool bFirst = true;
sal_Int32 nMask = 1;
for (sal_uInt16 nBit=0; nBit<32; nBit++)