[Libreoffice-commits] .: svl/source

Kohei Yoshida kohei at kemper.freedesktop.org
Mon Feb 6 11:34:28 PST 2012


 svl/source/items/itemset.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit e42792b63dbb136a7bcefe485e7b2936df2a0975
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Mon Feb 6 14:34:10 2012 -0500

    Perhaps it will help to set the pointer to NULL when the item is not set.

diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index f094d93..6ef1445 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;
 }
 
 // -----------------------------------------------------------------------


More information about the Libreoffice-commits mailing list