summaryrefslogtreecommitdiff
path: root/svl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-08 13:01:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-08 20:56:30 +0200
commit61d49afadb2badc7572b04c73ee682afde1d2e7b (patch)
treeab72148a48dc97ef4fcf01218358e5e75b72a835 /svl/source
parentfac539889e32e5e47ca6b6da0a588abbe4cbe066 (diff)
loplugin:unusedmethods
Change-Id: Id66cf12e3a59aeed1b9a7a111b841e30b248635b Reviewed-on: https://gerrit.libreoffice.org/40876 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl/source')
-rw-r--r--svl/source/inc/poolio.hxx3
-rw-r--r--svl/source/items/itempool.cxx6
-rw-r--r--svl/source/items/poolio.cxx41
3 files changed, 1 insertions, 49 deletions
diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx
index 036a353e9fe0..22be488f726f 100644
--- a/svl/source/inc/poolio.hxx
+++ b/svl/source/inc/poolio.hxx
@@ -111,7 +111,6 @@ struct SfxItemPool_Impl
sal_uInt16 nLoadingVersion;
sal_uInt16 nInitRefCount; // 1, during load, may be 2
sal_uInt16 nVerStart, nVerEnd; // WhichRange in versions
- sal_uInt16 nStoringStart, nStoringEnd; // Range to be saved
sal_uInt8 nMajorVer, nMinorVer; // The Pool itself
MapUnit eDefMetric;
bool bInSetItem;
@@ -134,8 +133,6 @@ struct SfxItemPool_Impl
, nInitRefCount(0)
, nVerStart(0)
, nVerEnd(0)
- , nStoringStart(0)
- , nStoringEnd(0)
, nMajorVer(0)
, nMinorVer(0)
, eDefMetric(MapUnit::MapCM)
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index a914bd6d24c5..f39b2dc17853 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -184,8 +184,6 @@ SfxItemPool::SfxItemPool
pImpl->nVerStart = pImpl->mnStart;
pImpl->nVerEnd = pImpl->mnEnd;
pImpl->bInSetItem = false;
- pImpl->nStoringStart = nStartWhich;
- pImpl->nStoringEnd = nEndWhich;
pImpl->mbPersistentRefCounts = bLoadRefCounts;
if ( pDefaults )
@@ -218,8 +216,6 @@ SfxItemPool::SfxItemPool
pImpl->nVerStart = rPool.pImpl->nVerStart;
pImpl->nVerEnd = rPool.pImpl->nVerEnd;
pImpl->bInSetItem = false;
- pImpl->nStoringStart = pImpl->mnStart;
- pImpl->nStoringEnd = pImpl->mnEnd;
pImpl->mbPersistentRefCounts = rPool.pImpl->mbPersistentRefCounts;
// Take over static Defaults
@@ -996,8 +992,6 @@ void SfxItemPool::SetFileFormatVersion( sal_uInt16 nFileFormatVersion )
pPool->pImpl->mnFileFormatVersion = nFileFormatVersion;
}
-const SfxItemPool* SfxItemPool::pStoringPool_ = nullptr;
-
void SfxItemPool::dumpAsXml(xmlTextWriterPtr pWriter) const
{
xmlTextWriterStartElement(pWriter, BAD_CAST("SfxItemPool"));
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index 62f9ddbfe1d0..54b6d5e5bdf5 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -58,17 +58,6 @@ void SfxPoolItemArray_Impl::ReHash()
}
}
-/**
- * Returns the <SfxItemPool> that is being saved.
- * This should only be used in very exceptional cases e.g.
- * when guaranteeing file format compatibility:
- * When overriding a <SfxPoolItem::Store()> getting additional data from the Pool
- */
-const SfxItemPool* SfxItemPool::GetStoringPool()
-{
- return pStoringPool_;
-}
-
static sal_uInt16 convertSfxItemKindToUInt16(SfxItemKind eKind)
{
switch (eKind)
@@ -179,7 +168,6 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
// Every Pool as a whole is a record
SfxMiniRecordWriter aPoolRec( &rStream, SFX_ITEMPOOL_REC );
- pStoringPool_ = this;
// Single header (content version and name)
{
@@ -306,7 +294,6 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
}
// Write out additional Pools
- pStoringPool_ = nullptr;
aPoolRec.Close();
if ( !rStream.GetError() && pImpl->mpSecondary )
pImpl->mpSecondary->Store( rStream );
@@ -926,32 +913,6 @@ sal_uInt32 SfxItemPool::GetSurrogate(const SfxPoolItem *pItem) const
}
-bool SfxItemPool::IsInStoringRange( sal_uInt16 nWhich ) const
-{
- return nWhich >= pImpl->nStoringStart &&
- nWhich <= pImpl->nStoringEnd;
-}
-
-/**
- * This method allows for restricting the WhichRange, which is saved
- * by ItemSets of this Pool (and the Pool itself).
- * The method must be called before SfxItemPool::Store() and the values
- * must also be still set when the actual document (the ItemSets) is
- * being saved.
- *
- * Resetting it is not necessary, if this range is set correctly before
- * _every_ save, because its only accounted for when saving.
- *
- * We need to do this for the 3.1 format, because there's a bug in the
- * Pool loading method.
-*/
-void SfxItemPool::SetStoringRange( sal_uInt16 nFrom, sal_uInt16 nTo )
-{
- pImpl->nStoringStart = nFrom;
- pImpl->nStoringEnd = nTo;
-}
-
-
/**
* This method allows for the creation of new and incompatible WhichId
* Ranges or distributions. Pools that were saved with old versions
@@ -1168,7 +1129,7 @@ bool SfxItemPool::StoreItem( SvStream &rStream, const SfxPoolItem &rItem,
return false;
const SfxItemPool *pPool = this;
- while ( !pPool->IsInStoringRange(rItem.Which()) )
+ while ( !pPool->IsInRange(rItem.Which()) )
if ( nullptr == ( pPool = pPool->pImpl->mpSecondary ) )
return false;