diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-02-06 14:34:10 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-02-06 14:34:10 -0500 |
commit | e42792b63dbb136a7bcefe485e7b2936df2a0975 (patch) | |
tree | 7efb408ad9067ccc4bfc9abf7b7baa48f68def8f /svl | |
parent | I think it's time we had a real method for this... (diff) | |
download | core-e42792b63dbb136a7bcefe485e7b2936df2a0975.tar.gz core-e42792b63dbb136a7bcefe485e7b2936df2a0975.zip |
Perhaps it will help to set the pointer to NULL when the item is not set.
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/itemset.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index f094d9351509..6ef14458f953 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -548,7 +548,10 @@ SfxItemState SfxItemSet::GetItemState( sal_uInt16 nWhich, bool SfxItemSet::HasItem(sal_uInt16 nWhich, const SfxPoolItem*& rpItem) const { - return SFX_ITEM_SET == GetItemState(nWhich, true, &rpItem); + bool bRet = SFX_ITEM_SET == GetItemState(nWhich, true, &rpItem); + if (!bRet) + rpItem = NULL; + return bRet; } // ----------------------------------------------------------------------- |