summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-17 13:15:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-17 13:16:01 +0200
commit7cfbe5ad4fa351228c4764d9a7231024a97212c4 (patch)
treece8cf2d22947ee8deb68dfcc8d4c05c7df4c5e3a /svl
parent278eabab2b5bdc95a51d501fcdb46c216ded3baa (diff)
fix bug in SfxItemSet::ClearItem
resulting from commit 2757ee9fe610e253e4ccc37423fa420004d0f388 used std::map in SfxItemSet where I failed to notice that the nWhich parameter was being re-used as a loop variable. This bug was spotted by Jochen Nitschke Change-Id: Ifb43dfb84261ecbcf88e5b312b8ec24cf7c3dce9
Diffstat (limited to 'svl')
-rw-r--r--svl/source/items/itemset.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 5de52ce8c8dc..468ecb75f06d 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -292,8 +292,8 @@ sal_uInt16 SfxItemSet::ClearItem( sal_uInt16 nWhich )
aTmp.swap(m_aItems);
for (auto & rPair : aTmp)
{
- // Due to the assertions in the sub calls, we need to do this
const SfxPoolItem *pItemToClear = rPair.second;
+ nWhich = rPair.first;
if ( !IsInvalidItem(pItemToClear) )
{