summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/gridwin5.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-11-12 17:07:22 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-11-14 08:52:21 +0000
commitaa3f954222a270d3e2fa531badd2fa7febd30338 (patch)
treef9921a240795044f00ce61718d052c26ebbc8ae0 /sc/source/ui/view/gridwin5.cxx
parent90a77e9c13eb9b2aa6e83653d9d2d1409bc47f36 (diff)
coverity#703927 Unchecked return value
make these less odd and simply return the thing they selected, rather than a bool that indicates that the rpObj arg was successfully set to non-null, so there's one flag to check not two which both mean the same thing. Change-Id: If70e412f98dea8b7114fb77f26a9c59aab93be50 Reviewed-on: https://gerrit.libreoffice.org/30794 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/view/gridwin5.cxx')
-rw-r--r--sc/source/ui/view/gridwin5.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index 2424bd7d54c4..8608aea834c2 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -340,15 +340,15 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
}
else
{
- SdrObject* pObj = nullptr;
SdrPageView* pPV = nullptr;
Point aMDPos = PixelToLogic( aPosPixel );
- if ( pDrView->PickObj(aMDPos, pDrView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER) )
+ SdrObject* pObj = pDrView->PickObj(aMDPos, pDrView->getHitTolLog(), pPV, SdrSearchOptions::ALSOONMASTER);
+ if (pObj)
{
if ( pObj->IsGroupObject() )
{
- SdrObject* pHit = nullptr;
- if ( pDrView->PickObj(aMDPos, pDrView->getHitTolLog(), pHit, pPV, SdrSearchOptions::DEEP ) )
+ SdrObject* pHit = pDrView->PickObj(aMDPos, pDrView->getHitTolLog(), pPV, SdrSearchOptions::DEEP);
+ if (pHit)
pObj = pHit;
}
ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj );