diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-06-20 11:58:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-06-20 14:03:21 +0200 |
commit | 86a827da7c71305be81624d25220d125ef00137a (patch) | |
tree | 344b645598a73375e0c27ceb506d0894fa72f54b /sc | |
parent | 50f3443d59d457da8dd19e0520f317851f050469 (diff) |
loplugin:unusedfields
Change-Id: I4bc67811e228b4806db9f9b9bf9fb0de0eb36de2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169263
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xestyle.cxx | 17 | ||||
-rw-r--r-- | sc/source/filter/inc/PivotTableFormat.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/inc/xestyle.hxx | 1 | ||||
-rw-r--r-- | sc/source/filter/oox/PivotTableFormat.cxx | 1 |
4 files changed, 9 insertions, 12 deletions
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 4254fccf91db..7d7e4bb0e71c 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -3068,6 +3068,7 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot ) : XclExpRoot( rRoot ), mpKeywordTable( new NfKeywordTable ) { + sal_Int32 nDxfId = 0; // Special number formatter for conversion. SvNumberFormatterPtr xFormatter(new SvNumberFormatter( comphelper::getProcessComponentContext(), LANGUAGE_ENGLISH_US )); xFormatter->FillKeywordTableForExcel( *mpKeywordTable ); @@ -3091,21 +3092,21 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot ) // Does not matter it is text color or cell background color for (auto& rColor : aFilterEntries.getBackgroundColors()) { - if (!maColorToDxfId.emplace(rColor, mnDxfId).second) + if (!maColorToDxfId.emplace(rColor, nDxfId).second) continue; std::unique_ptr<XclExpCellArea> pExpCellArea(new XclExpCellArea(rColor, 0)); maDxf.push_back(std::make_unique<XclExpDxf>(rRoot, std::move(pExpCellArea))); - mnDxfId++; + nDxfId++; } for (auto& rColor : aFilterEntries.getTextColors()) { - if (!maColorToDxfId.emplace(rColor, mnDxfId).second) + if (!maColorToDxfId.emplace(rColor, nDxfId).second) continue; std::unique_ptr<XclExpCellArea> pExpCellArea(new XclExpCellArea(rColor, 0)); maDxf.push_back(std::make_unique<XclExpDxf>(rRoot, std::move(pExpCellArea))); - mnDxfId++; + nDxfId++; } } } @@ -3139,7 +3140,7 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot ) aStyleName = pEntry->GetStyleName(); } - if (maStyleNameToDxfId.emplace(aStyleName, mnDxfId).second) + if (maStyleNameToDxfId.emplace(aStyleName, nDxfId).second) { SfxStyleSheetBase* pStyle = rRoot.GetDoc().GetStyleSheetPool()->Find(aStyleName, SfxStyleFamily::Para); if(!pStyle) @@ -3147,7 +3148,7 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot ) SfxItemSet& rSet = pStyle->GetItemSet(); fillDxfFrom(rSet, xFormatter); - mnDxfId++; + nDxfId++; } } @@ -3170,8 +3171,8 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot ) SfxItemSet& rItemSet = rFormat.pPattern->GetItemSet(); fillDxfFrom(rItemSet, xFormatter); - maPatternToDxfId.emplace(rFormat.pPattern.get(), mnDxfId); - mnDxfId++; + maPatternToDxfId.emplace(rFormat.pPattern.get(), nDxfId); + nDxfId++; } } } diff --git a/sc/source/filter/inc/PivotTableFormat.hxx b/sc/source/filter/inc/PivotTableFormat.hxx index 3a7b56cf423b..6d876147af9e 100644 --- a/sc/source/filter/inc/PivotTableFormat.hxx +++ b/sc/source/filter/inc/PivotTableFormat.hxx @@ -71,8 +71,6 @@ public: class PivotTableReference : public WorkbookHelper { public: - PivotTableFormat const& mrFormat; - std::optional<sal_uInt32> mnField; std::optional<sal_uInt32> mnCount; bool mbSelected = true; diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx index 740c892dcb68..fc2e0858be33 100644 --- a/sc/source/filter/inc/xestyle.hxx +++ b/sc/source/filter/inc/xestyle.hxx @@ -770,7 +770,6 @@ public: private: typedef std::vector< std::unique_ptr<XclExpDxf> > DxfContainer; - sal_Int32 mnDxfId = 0; std::map<OUString, sal_Int32> maStyleNameToDxfId; std::map<Color, sal_Int32> maColorToDxfId; std::map<ScPatternAttr*, sal_Int32> maPatternToDxfId; diff --git a/sc/source/filter/oox/PivotTableFormat.cxx b/sc/source/filter/oox/PivotTableFormat.cxx index 7d17be0ba0ec..51b44596ea23 100644 --- a/sc/source/filter/oox/PivotTableFormat.cxx +++ b/sc/source/filter/oox/PivotTableFormat.cxx @@ -127,7 +127,6 @@ PivotTableReference& PivotTableFormat::createReference() PivotTableReference::PivotTableReference(const PivotTableFormat& rFormat) : WorkbookHelper(rFormat) - , mrFormat(rFormat) { } void PivotTableReference::importReference(const oox::AttributeList& rAttribs) |