summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-15 11:27:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-16 08:45:17 +0200
commit98c4cd372bf0e9d4b5b129405f5af4562d8a0f64 (patch)
treef3aae749f01d0453a227b922a6ad3217171700d7 /sc
parent666901bc82fab69f9a80b564f97b5456d0ef684e (diff)
loplugin:unusedfields improve write-only analysis
by whitelisting a couple of methods we know only write to their parameters Change-Id: Id7aef9c03c23d10c27707b21eb9a0db4a6c2757c Reviewed-on: https://gerrit.libreoffice.org/37647 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/filtopt.hxx2
-rw-r--r--sc/source/core/data/table1.cxx6
-rw-r--r--sc/source/core/tool/filtopt.cxx12
-rw-r--r--sc/source/filter/lotus/lotfilter.hxx3
-rw-r--r--sc/source/filter/lotus/op.cxx3
5 files changed, 5 insertions, 21 deletions
diff --git a/sc/inc/filtopt.hxx b/sc/inc/filtopt.hxx
index b1c48c6dc9bc..9c1a81e66281 100644
--- a/sc/inc/filtopt.hxx
+++ b/sc/inc/filtopt.hxx
@@ -29,8 +29,6 @@ class SC_DLLPUBLIC ScFilterOptions : public utl::ConfigItem
{
private:
bool bWK3Flag;
- double fExcelColScale;
- double fExcelRowScale;
virtual void ImplCommit() override;
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index a2712f1696c9..96737e18a512 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -149,12 +149,10 @@ struct SetRowHeightOnlyFunc : public OptimalHeightsFuncObjBase
struct SetRowHeightRangeFunc : public OptimalHeightsFuncObjBase
{
ScTable* mpTab;
- double mnPPTX;
double mnPPTY;
- SetRowHeightRangeFunc(ScTable* pTab, double nPPTX, double nPPTY) :
+ SetRowHeightRangeFunc(ScTable* pTab, double nPPTY) :
mpTab(pTab),
- mnPPTX(nPPTX),
mnPPTY(nPPTY)
{}
@@ -499,7 +497,7 @@ bool ScTable::SetOptimalHeight(
GetOptimalHeightsInColumn(rCxt, aCol, nStartRow, nEndRow, pProgress, nProgressStart);
rCxt.getHeightArray().enableTreeSearch(true);
- SetRowHeightRangeFunc aFunc(this, rCxt.getPPTX(), rCxt.getPPTY());
+ SetRowHeightRangeFunc aFunc(this, rCxt.getPPTY());
bool bChanged = SetOptimalHeightsToRows(rCxt, aFunc, pRowFlags, nStartRow, nEndRow);
if ( pProgress != pOuterProgress )
diff --git a/sc/source/core/tool/filtopt.cxx b/sc/source/core/tool/filtopt.cxx
index 05f112b9a4d2..9108e609d704 100644
--- a/sc/source/core/tool/filtopt.cxx
+++ b/sc/source/core/tool/filtopt.cxx
@@ -29,15 +29,11 @@ using namespace css::uno;
#define CFGPATH_FILTER "Office.Calc/Filter/Import"
-#define SCFILTOPT_COLSCALE 0
-#define SCFILTOPT_ROWSCALE 1
#define SCFILTOPT_WK3 2
ScFilterOptions::ScFilterOptions() :
ConfigItem( CFGPATH_FILTER ),
- bWK3Flag( false ),
- fExcelColScale( 0 ),
- fExcelRowScale( 0 )
+ bWK3Flag( false )
{
Sequence<OUString> aNames { "MS_Excel/ColScale", // SCFILTOPT_COLSCALE
"MS_Excel/RowScale", // SCFILTOPT_ROWSCALE
@@ -54,12 +50,6 @@ ScFilterOptions::ScFilterOptions() :
{
switch(nProp)
{
- case SCFILTOPT_COLSCALE:
- pValues[nProp] >>= fExcelColScale;
- break;
- case SCFILTOPT_ROWSCALE:
- pValues[nProp] >>= fExcelRowScale;
- break;
case SCFILTOPT_WK3:
bWK3Flag = ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] );
break;
diff --git a/sc/source/filter/lotus/lotfilter.hxx b/sc/source/filter/lotus/lotfilter.hxx
index 3b3634a08d5d..c7bdeda44642 100644
--- a/sc/source/filter/lotus/lotfilter.hxx
+++ b/sc/source/filter/lotus/lotfilter.hxx
@@ -43,8 +43,6 @@ struct LotusContext
LOTUS_ROOT* pLotusRoot;
std::map<sal_uInt16, ScPatternAttr> aLotusPatternPool;
- sal_uInt8 nDefaultFormat; // -> op.cpp, standard cell format
-
SvxHorJustifyItem *pAttrRight, *pAttrLeft, *pAttrCenter, *pAttrRepeat, *pAttrStandard;
ScProtectionAttr* pAttrUnprot;
@@ -57,7 +55,6 @@ struct LotusContext
, pDoc(nullptr)
, pLotusRoot(nullptr)
- , nDefaultFormat(0)
, pAttrRight(nullptr)
, pAttrLeft(nullptr)
, pAttrCenter(nullptr)
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index 0f0b2ad4c180..8b8aa079471d 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -308,7 +308,8 @@ void OP_Window1(LotusContext& rContext, SvStream& r, sal_uInt16 n)
{
r.SeekRel( 4 ); // skip Cursor Pos
- r.ReadUChar(rContext.nDefaultFormat);
+ sal_uInt8 nDefaultFormat; // -> op.cpp, standard cell format
+ r.ReadUChar(nDefaultFormat);
r.SeekRel( 1 ); // skip 'unused'