[Libreoffice-commits] core.git: sc/inc sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Dec 13 06:29:01 UTC 2018
sc/inc/dpgroup.hxx | 2 --
sc/source/core/data/dpgroup.cxx | 1 -
sc/source/filter/excel/read.cxx | 2 --
sc/source/filter/inc/excimp8.hxx | 3 ---
sc/source/filter/inc/lotrange.hxx | 5 ++---
sc/source/filter/inc/namebuff.hxx | 3 +--
sc/source/filter/inc/root.hxx | 1 -
sc/source/filter/lotus/lotimpop.cxx | 5 ++---
sc/source/filter/lotus/op.cxx | 4 ++--
sc/source/filter/lotus/tool.cxx | 24 ++++--------------------
sc/source/filter/xml/xmlimprt.hxx | 2 --
sc/source/filter/xml/xmlsubti.cxx | 1 -
12 files changed, 11 insertions(+), 42 deletions(-)
New commits:
commit c474fd56e1723002ce8e6388a74b902fdc8c5887
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Dec 12 13:17:52 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Dec 13 07:28:32 2018 +0100
loplugin:unusedfields in sc
Change-Id: I5c9e92f5aff6d8fcae7e6affe2977f5804133ea9
Reviewed-on: https://gerrit.libreoffice.org/65053
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx
index 149df70278cd..9952b7bf3639 100644
--- a/sc/inc/dpgroup.hxx
+++ b/sc/inc/dpgroup.hxx
@@ -125,8 +125,6 @@ class ScDPGroupTableData : public ScDPTableData
std::unique_ptr<ScDPNumGroupDimension[]>
pNumGroups; // array[nSourceCount]
ScDocument* const pDoc;
- std::unordered_set< OUString >
- aGroupNames;
void FillGroupValues(std::vector<SCROW>& rItems, const std::vector<long>& rDims);
virtual long GetSourceDim( long nDim ) override;
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index 4a07417e4981..37d184a07e41 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -485,7 +485,6 @@ void ScDPGroupTableData::AddGroupDimension( const ScDPGroupDimension& rGroup )
ScDPGroupDimension aNewGroup( rGroup );
aNewGroup.SetGroupDim( GetColumnCount() ); // new dimension will be at the end
aGroups.push_back( aNewGroup );
- aGroupNames.insert(aNewGroup.GetName());
}
void ScDPGroupTableData::SetNumGroupDimension( long nIndex, const ScDPNumGroupDimension& rGroup )
diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx
index 7933d75f5601..eaadc90acec2 100644
--- a/sc/source/filter/excel/read.cxx
+++ b/sc/source/filter/excel/read.cxx
@@ -1277,8 +1277,6 @@ ErrCode ImportExcel8::Read()
GetDoc().SetCodeName( *it, sTmpName );
// Record newly used codename
aCodeNames.push_back(sTmpName);
- // Record those we have created so they can be created in basic
- maAutoGeneratedCodeNames.push_back( sTmpName );
break;
}
}
diff --git a/sc/source/filter/inc/excimp8.hxx b/sc/source/filter/inc/excimp8.hxx
index da1eecdf196f..fc078b51ce16 100644
--- a/sc/source/filter/inc/excimp8.hxx
+++ b/sc/source/filter/inc/excimp8.hxx
@@ -56,9 +56,6 @@ public:
virtual void PostDocLoad() override;
private:
- // represents codename ( and associated modules )
- // not specified directly in the binary format
- std::vector<OUString> maAutoGeneratedCodeNames;
ExcScenarioList maScenList;
};
diff --git a/sc/source/filter/inc/lotrange.hxx b/sc/source/filter/inc/lotrange.hxx
index 1a6d4986d827..96dad2ac9099 100644
--- a/sc/source/filter/inc/lotrange.hxx
+++ b/sc/source/filter/inc/lotrange.hxx
@@ -87,18 +87,17 @@ inline bool LotusRange::IsSingle() const
class LotusRangeList
{
private:
- LOTUS_ROOT* m_pLotRoot;
LR_ID nIdCnt;
ScComplexRefData aComplRef;
std::vector<LotusRange*> maRanges;
public:
- LotusRangeList(LOTUS_ROOT* pLotRoot);
+ LotusRangeList();
~LotusRangeList();
inline sal_uInt16 GetIndex( SCCOL nCol, SCROW nRow );
inline sal_uInt16 GetIndex( SCCOL nColS, SCROW nRowS, SCCOL nColE, SCROW nRowE );
sal_uInt16 GetIndex( const LotusRange& );
- void Append( LotusRange* pLR, const OUString& rName );
+ void Append( LotusRange* pLR );
};
inline LR_ID LotusRangeList::GetIndex( SCCOL nCol, SCROW nRow )
diff --git a/sc/source/filter/inc/namebuff.hxx b/sc/source/filter/inc/namebuff.hxx
index 5cc550bc7c16..0288ec50da6b 100644
--- a/sc/source/filter/inc/namebuff.hxx
+++ b/sc/source/filter/inc/namebuff.hxx
@@ -91,14 +91,13 @@ private:
}
};
- LOTUS_ROOT* m_pLotRoot;
std::unique_ptr<ScTokenArray>
pScTokenArray;
sal_uInt16 nIntCount;
std::vector<Entry> maEntries;
public:
- RangeNameBufferWK3(LOTUS_ROOT* pLotRoot);
+ RangeNameBufferWK3();
~RangeNameBufferWK3();
void Add( const OUString& rName, const ScComplexRefData& rCRD );
inline void Add( const OUString& rName, const ScRange& aScRange );
diff --git a/sc/source/filter/inc/root.hxx b/sc/source/filter/inc/root.hxx
index 39fb408cf030..29c1f9bc3bfe 100644
--- a/sc/source/filter/inc/root.hxx
+++ b/sc/source/filter/inc/root.hxx
@@ -86,7 +86,6 @@ struct LOTUS_ROOT
{
ScDocument* pDoc;
LotusRangeList maRangeNames;
- ScRangeName* pScRangeName;
rtl_TextEncoding const eCharsetQ;
Lotus123Typ eFirstType;
Lotus123Typ eActType;
diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx
index abf7fc36fc69..4926d39d1ee7 100644
--- a/sc/source/filter/lotus/lotimpop.cxx
+++ b/sc/source/filter/lotus/lotimpop.cxx
@@ -43,12 +43,11 @@
LOTUS_ROOT::LOTUS_ROOT( ScDocument* pDocP, rtl_TextEncoding eQ )
:
pDoc( pDocP),
- maRangeNames( this ),
- pScRangeName( pDocP->GetRangeName()),
+ maRangeNames(),
eCharsetQ( eQ),
eFirstType( Lotus123Typ::X),
eActType( Lotus123Typ::X),
- pRngNmBffWK3( new RangeNameBufferWK3(this)),
+ pRngNmBffWK3( new RangeNameBufferWK3() ),
maAttrTable( this )
{
}
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index c6302eb90988..32186e5a4dcd 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -227,7 +227,7 @@ void OP_NamedRange(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/)
aTmp = ScfTools::ConvertToScDefinedName( aTmp );
- rContext.pLotusRoot->maRangeNames.Append( pRange, aTmp );
+ rContext.pLotusRoot->maRangeNames.Append( pRange );
}
}
@@ -265,7 +265,7 @@ void OP_SymphNamedRange(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/)
OUString aTmp( cBuf, strlen(cBuf), rContext.pLotusRoot->eCharsetQ );
aTmp = ScfTools::ConvertToScDefinedName( aTmp );
- rContext.pLotusRoot->maRangeNames.Append( pRange, aTmp );
+ rContext.pLotusRoot->maRangeNames.Append( pRange );
}
}
diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx
index 062411b2f531..76407baa9724 100644
--- a/sc/source/filter/lotus/tool.cxx
+++ b/sc/source/filter/lotus/tool.cxx
@@ -369,8 +369,7 @@ LotusRange::LotusRange( const LotusRange& rCpy )
Copy( rCpy );
}
-LotusRangeList::LotusRangeList(LOTUS_ROOT* pLotRoot)
- : m_pLotRoot(pLotRoot)
+LotusRangeList::LotusRangeList()
{
aComplRef.InitFlags();
@@ -409,7 +408,7 @@ LR_ID LotusRangeList::GetIndex( const LotusRange &rRef )
return ID_FAIL;
}
-void LotusRangeList::Append( LotusRange* pLR, const OUString& rName )
+void LotusRangeList::Append( LotusRange* pLR )
{
SAL_WARN_IF( !pLR, "sc.filter", "*LotusRangeList::Append(): no pointer!" );
maRanges.push_back(pLR);
@@ -431,19 +430,13 @@ void LotusRangeList::Append( LotusRange* pLR, const OUString& rName )
aTokArray.AddDoubleReference( aComplRef );
}
- ScRangeData* pData = new ScRangeData(
- m_pLotRoot->pDoc, rName, aTokArray );
-
- m_pLotRoot->pScRangeName->insert( pData );
-
pLR->SetId( nIdCnt );
nIdCnt++;
}
-RangeNameBufferWK3::RangeNameBufferWK3(LOTUS_ROOT* pLotRoot)
- : m_pLotRoot(pLotRoot)
- , pScTokenArray( new ScTokenArray )
+RangeNameBufferWK3::RangeNameBufferWK3()
+ : pScTokenArray( new ScTokenArray )
{
nIntCount = 1;
}
@@ -475,14 +468,10 @@ void RangeNameBufferWK3::Add( const OUString& rOrgName, const ScComplexRefData&
aInsert.bSingleRef = false;
}
- ScRangeData* pData = new ScRangeData( m_pLotRoot->pDoc, aScName, *pScTokenArray );
-
aInsert.nRelInd = nIntCount;
- pData->SetIndex( nIntCount );
nIntCount++;
maEntries.push_back( aInsert );
- m_pLotRoot->pScRangeName->insert( pData );
}
bool RangeNameBufferWK3::FindRel( const OUString& rRef, sal_uInt16& rIndex )
@@ -536,13 +525,8 @@ bool RangeNameBufferWK3::FindAbs( const OUString& rRef, sal_uInt16& rIndex )
pScTokenArray->AddDoubleReference( itr->aScComplexRefDataRel );
}
- ScRangeData* pData = new ScRangeData( m_pLotRoot->pDoc, itr->aScAbsName, *pScTokenArray );
-
rIndex = itr->nAbsInd = nIntCount;
- pData->SetIndex( rIndex );
nIntCount++;
-
- m_pLotRoot->pScRangeName->insert( pData );
}
return true;
diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx
index d64f0160bc88..6adf49bee4e5 100644
--- a/sc/source/filter/xml/xmlimprt.hxx
+++ b/sc/source/filter/xml/xmlimprt.hxx
@@ -268,7 +268,6 @@ class ScXMLImport: public SvXMLImport
std::unique_ptr<ScMyImpDetectiveOpArray> pDetectiveOpArray;
std::unique_ptr<SolarMutexGuard> pSolarMutexGuard;
- std::vector<OUString> aTableStyles;
std::unique_ptr<XMLNumberFormatAttributesExportHelper> pNumberFormatAttributesExportHelper;
std::unique_ptr<ScMyStyleNumberFormats> pStyleNumberFormats;
css::uno::Reference <css::util::XNumberFormats> xNumberFormats;
@@ -388,7 +387,6 @@ public:
virtual void SetViewSettings(const css::uno::Sequence<css::beans::PropertyValue>& aViewProps) override;
virtual void SetConfigurationSettings(const css::uno::Sequence<css::beans::PropertyValue>& aConfigProps) override;
- void SetTableStyle(const OUString& rValue) { aTableStyles.push_back(rValue); }
ScMyStylesImportHelper* GetStylesImportHelper() { return pStylesImportHelper.get(); }
sal_Int32 SetCurrencySymbol(const sal_Int32 nKey, const OUString& rCurrency);
bool IsCurrencySymbol(const sal_Int32 nNumberFormat, const OUString& sCurrencySymbol, const OUString& sBankSymbol);
diff --git a/sc/source/filter/xml/xmlsubti.cxx b/sc/source/filter/xml/xmlsubti.cxx
index dcaba94ba129..06ebc1814f64 100644
--- a/sc/source/filter/xml/xmlsubti.cxx
+++ b/sc/source/filter/xml/xmlsubti.cxx
@@ -120,7 +120,6 @@ void ScMyTables::NewSheet(const OUString& sTableName, const OUString& sStyleName
else
pDoc->SetTabNameOnLoad(maCurrentCellPos.Tab(), sTableName);
- rImport.SetTableStyle(sStyleName);
xCurrentSheet = getCurrentSheet(rImport.GetModel(), maCurrentCellPos.Tab());
if (xCurrentSheet.is())
{
More information about the Libreoffice-commits
mailing list