diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-02-07 11:18:31 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-02-07 11:19:20 -0500 |
commit | 8e6e880949b3f603c3d26ab5467cb417b92ae2be (patch) | |
tree | 722220e7c814576f4a5f66b6555018ab8d6921e3 /svl | |
parent | 66fa759bb6d8199404b482512d7609ba47265ae8 (diff) |
Have SfxItemSet::HasItem take an optional pointer-to-pointer.
To make it clear that the second argument is optional.
Diffstat (limited to 'svl')
-rw-r--r-- | svl/inc/svl/itemset.hxx | 2 | ||||
-rw-r--r-- | svl/source/items/itemset.cxx | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/svl/inc/svl/itemset.hxx b/svl/inc/svl/itemset.hxx index e9393654d5c1..2b019e223ddc 100644 --- a/svl/inc/svl/itemset.hxx +++ b/svl/inc/svl/itemset.hxx @@ -134,7 +134,7 @@ public: sal_Bool bSrchInParent = sal_True, const SfxPoolItem **ppItem = 0 ) const; - bool HasItem(sal_uInt16 nWhich, const SfxPoolItem*& rpItem) const; + bool HasItem(sal_uInt16 nWhich, const SfxPoolItem** ppItem = NULL) const; virtual void DisableItem(sal_uInt16 nWhich); virtual void InvalidateItem( sal_uInt16 nWhich ); diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index 6ef14458f953..b526749bec48 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -546,11 +546,11 @@ SfxItemState SfxItemSet::GetItemState( sal_uInt16 nWhich, return eRet; } -bool SfxItemSet::HasItem(sal_uInt16 nWhich, const SfxPoolItem*& rpItem) const +bool SfxItemSet::HasItem(sal_uInt16 nWhich, const SfxPoolItem** ppItem) const { - bool bRet = SFX_ITEM_SET == GetItemState(nWhich, true, &rpItem); - if (!bRet) - rpItem = NULL; + bool bRet = SFX_ITEM_SET == GetItemState(nWhich, true, ppItem); + if (!bRet && ppItem) + *ppItem = NULL; return bRet; } |