[Libreoffice-commits] core.git: svl/source
Noel Grandin
noel.grandin at collabora.co.uk
Tue Jan 17 11:16:43 UTC 2017
svl/source/items/itemset.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 7cfbe5ad4fa351228c4764d9a7231024a97212c4
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Tue Jan 17 13:15:00 2017 +0200
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
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 5de52ce..468ecb7 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) )
{
More information about the Libreoffice-commits
mailing list