From 82c37453482e6b8bd6ab7b7e96b1257a1d5b0699 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 17 Jan 2015 13:12:52 +0200 Subject: SfxItemHandle is only used in one place, so inline it Change-Id: Ie54e0699312b6c072d2b162a068cffdf960be4d0 --- svl/source/items/poolitem.cxx | 44 ------------------------------------------- 1 file changed, 44 deletions(-) (limited to 'svl') diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx index 3a0e9f8cd9be..0e2a8d93bb2a 100644 --- a/svl/source/items/poolitem.cxx +++ b/svl/source/items/poolitem.cxx @@ -256,50 +256,6 @@ SfxPoolItem* SfxVoidItem::Clone(SfxItemPool *) const return new SfxVoidItem(*this); } -// SfxInvalidItem - -SfxItemHandle::SfxItemHandle(SfxPoolItem &rItem): - pRef(new sal_uInt16(1)), - pItem(rItem.Clone()) -{ -} - - -SfxItemHandle::SfxItemHandle(const SfxItemHandle &rCopy): - pRef(rCopy.pRef), - pItem(rCopy.pItem) -{ - ++(*pRef); -} - - -const SfxItemHandle &SfxItemHandle::operator=(const SfxItemHandle &rCopy) -{ - if(&rCopy == this || pItem == rCopy.pItem) - return *this; - --(*pRef); - if(!(*pRef)) - { - delete pItem; - pItem = 0; - } - pRef = rCopy.pRef; - ++(*pRef); - pItem = rCopy.pItem; - return *this; -} - - -SfxItemHandle::~SfxItemHandle() -{ - --(*pRef); - if(!(*pRef)) { - delete pRef; pRef = 0; - delete pItem; pItem = 0; - } -} - - bool SfxPoolItem::ScaleMetrics( long /*lMult*/, long /*lDiv*/ ) { return false; -- cgit