diff options
author | Varun Dhall <varun.dhall@studentpartner.com> | 2017-08-17 01:57:59 +0530 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-08-17 10:54:59 +0200 |
commit | 006a7b50546c57e260245d4630de565705f2fc38 (patch) | |
tree | c913778b89039c85f0ebeea86bf7a5da11175b9b /svl | |
parent | a82af43b526c9eca38f74f51d9af0c99c62f8121 (diff) |
Removing unused serialisation code
Change-Id: I86911c77f0831d448ff803afae2a74ec55ad4dd8
Reviewed-on: https://gerrit.libreoffice.org/41233
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/inc/poolio.hxx | 32 | ||||
-rw-r--r-- | svl/source/items/itempool.cxx | 21 | ||||
-rw-r--r-- | svl/source/items/macitem.cxx | 14 |
3 files changed, 1 insertions, 66 deletions
diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx index 22189d6923fc..8695dfe8b69e 100644 --- a/svl/source/inc/poolio.hxx +++ b/svl/source/inc/poolio.hxx @@ -38,29 +38,6 @@ static const sal_uInt32 SFX_ITEMS_DIRECT = 0xffffffff; static const sal_uInt32 SFX_ITEMS_NULL = 0xfffffff0; // instead StoreSurrogate static const sal_uInt32 SFX_ITEMS_DEFAULT = 0xfffffffe; -struct SfxPoolVersion_Impl -{ - sal_uInt16 _nVer; - sal_uInt16 _nStart, _nEnd; - const sal_uInt16* _pMap; - - SfxPoolVersion_Impl( sal_uInt16 nVer, sal_uInt16 nStart, sal_uInt16 nEnd, - const sal_uInt16 *pMap ) - : _nVer( nVer ), - _nStart( nStart ), - _nEnd( nEnd ), - _pMap( pMap ) - {} - SfxPoolVersion_Impl( const SfxPoolVersion_Impl &rOrig ) - : _nVer( rOrig._nVer ), - _nStart( rOrig._nStart ), - _nEnd( rOrig._nEnd ), - _pMap( rOrig._pMap ) - {} -}; - -typedef std::shared_ptr< SfxPoolVersion_Impl > SfxPoolVersion_ImplPtr; - /** * This array contains a set of SfxPoolItems, if those items are * poolable then each item has a unique set of properties, and we @@ -106,13 +83,9 @@ struct SfxItemPool_Impl sal_uInt16* mpPoolRanges; sal_uInt16 mnStart; sal_uInt16 mnEnd; - sal_uInt16 mnFileFormatVersion; - sal_uInt16 nVersion; sal_uInt16 nInitRefCount; // 1, during load, may be 2 - sal_uInt16 nVerStart, nVerEnd; // WhichRange in versions MapUnit eDefMetric; bool bInSetItem; - bool mbPersistentRefCounts; SfxItemPool_Impl( SfxItemPool* pMaster, const OUString& rName, sal_uInt16 nStart, sal_uInt16 nEnd ) : maPoolItems(nEnd - nStart + 1) @@ -124,14 +97,9 @@ struct SfxItemPool_Impl , mpPoolRanges(nullptr) , mnStart(nStart) , mnEnd(nEnd) - , mnFileFormatVersion(0) - , nVersion(0) , nInitRefCount(0) - , nVerStart(0) - , nVerEnd(0) , eDefMetric(MapUnit::MapCM) , bInSetItem(false) - , mbPersistentRefCounts(false) { DBG_ASSERT(mnStart, "Start-Which-Id must be greater 0" ); } diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx index 98983b6922d2..58f422cc3f7c 100644 --- a/svl/source/items/itempool.cxx +++ b/svl/source/items/itempool.cxx @@ -168,19 +168,16 @@ SfxItemPool::SfxItemPool sal_uInt16 nEndWhich, /* Last WhichId of the Pool */ const SfxItemInfo* pInfo, /* SID Map and Item flags */ std::vector<SfxPoolItem*>* - pDefaults, /* Pointer to static Defaults; + pDefaults /* Pointer to static Defaults; is directly referenced by the Pool, but no transfer of ownership */ - bool bLoadRefCounts /* Load RefCounts or set to 1? */ ) : pItemInfos(pInfo), pImpl( new SfxItemPool_Impl( this, rName, nStartWhich, nEndWhich ) ) { pImpl->eDefMetric = MapUnit::MapTwip; - pImpl->nVersion = 0; pImpl->nInitRefCount = 1; pImpl->bInSetItem = false; - pImpl->mbPersistentRefCounts = bLoadRefCounts; if ( pDefaults ) SetDefaults(pDefaults); @@ -205,10 +202,8 @@ SfxItemPool::SfxItemPool pImpl( new SfxItemPool_Impl( this, rPool.pImpl->aName, rPool.pImpl->mnStart, rPool.pImpl->mnEnd ) ) { pImpl->eDefMetric = rPool.pImpl->eDefMetric; - pImpl->nVersion = rPool.pImpl->nVersion; pImpl->nInitRefCount = 1; pImpl->bInSetItem = false; - pImpl->mbPersistentRefCounts = rPool.pImpl->mbPersistentRefCounts; // Take over static Defaults if ( bCloneStaticDefaults ) @@ -963,20 +958,6 @@ sal_uInt16 SfxItemPool::GetTrueSlotId( sal_uInt16 nWhich ) const return pItemInfos[nWhich - pImpl->mnStart]._nSID; } -/** - * You must call this function to set the file format version after - * concatenating your secondary-pools but before you store any - * pool, itemset or item. Only set the version at the master pool, - * never at any secondary pool. - */ -void SfxItemPool::SetFileFormatVersion( sal_uInt16 nFileFormatVersion ) -{ - DBG_ASSERT( this == pImpl->mpMaster, - "SfxItemPool::SetFileFormatVersion() but not a master pool" ); - for ( SfxItemPool *pPool = this; pPool; pPool = pPool->pImpl->mpSecondary ) - pPool->pImpl->mnFileFormatVersion = nFileFormatVersion; -} - void SfxItemPool::dumpAsXml(xmlTextWriterPtr pWriter) const { xmlTextWriterStartElement(pWriter, BAD_CAST("SfxItemPool")); diff --git a/svl/source/items/macitem.cxx b/svl/source/items/macitem.cxx index 01a4ebd82993..7c4beb9f249a 100644 --- a/svl/source/items/macitem.cxx +++ b/svl/source/items/macitem.cxx @@ -245,20 +245,6 @@ bool SvxMacroItem::GetPresentation } -SvStream& SvxMacroItem::Store( SvStream& rStrm , sal_uInt16 ) const -{ - return aMacroTable.Write( rStrm ); -} - - -SfxPoolItem* SvxMacroItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) const -{ - SvxMacroItem* pAttr = new SvxMacroItem( Which() ); - pAttr->aMacroTable.Read( rStrm, nVersion ); - return pAttr; -} - - void SvxMacroItem::SetMacro( SvMacroItemId nEvent, const SvxMacro& rMacro ) { aMacroTable.Insert( nEvent, rMacro); |