summaryrefslogtreecommitdiff
path: root/svl/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-04-23 20:23:29 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-27 07:21:45 +0000
commit9eb2e683ab051edd0bce18841f0ac05df5038854 (patch)
tree71e7a4d4b8389c09ff17024fceaed94668751082 /svl/source
parentfd964e3b9f60bf2043fdc39ab8161a586049b481 (diff)
tdf#34465 remove calls to SfxItemSet::Put(const SfxPoolItem&, sal_uInt16)
and put an assert in SfxPoolItem::SetWhich() so nothing new creeps in. Change-Id: I6497650fa61ffb2b6941ffff2d471c8f117be1df Reviewed-on: https://gerrit.libreoffice.org/24324 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svl/source')
-rw-r--r--svl/source/items/itemprop.cxx2
-rw-r--r--svl/source/items/poolitem.cxx9
2 files changed, 10 insertions, 1 deletions
diff --git a/svl/source/items/itemprop.cxx b/svl/source/items/itemprop.cxx
index 2fe99b544210..639c1f357153 100644
--- a/svl/source/items/itemprop.cxx
+++ b/svl/source/items/itemprop.cxx
@@ -251,7 +251,7 @@ void SfxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry& rEn
throw IllegalArgumentException();
}
// apply new item
- rSet.Put( *pNewItem, rEntry.nWID );
+ rSet.Put( *pNewItem );
}
}
diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx
index 4c3bb3415e1b..c5595615d2d2 100644
--- a/svl/source/items/poolitem.cxx
+++ b/svl/source/items/poolitem.cxx
@@ -195,6 +195,15 @@ void SfxPoolItem::dumpAsXml(xmlTextWriterPtr pWriter) const
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
xmlTextWriterEndElement(pWriter);
}
+
+SfxPoolItem* SfxPoolItem::CloneSetWhich( sal_uInt16 nNewWhich ) const
+{
+ SfxPoolItem* pItem = Clone();
+ pItem->SetWhich(nNewWhich);
+ return pItem;
+}
+
+
SfxPoolItem* SfxVoidItem::CreateDefault()
{
return new SfxVoidItem(0);