summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-02-27 10:05:41 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-02-27 12:57:26 +0000
commite0e61322778ca76bd0a8b16e2a3763e430a2c07e (patch)
treec092800430d38f13778550b99789ef7382779e5b /sc
parente874ace32b6cce60de8becca5bd5d137f3996fc8 (diff)
coverity#1187641 Unchecked return value
Change-Id: I6aa43041c503f2a897733d1f0ac8e013a96029dd
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/viewfun7.cxx34
1 files changed, 16 insertions, 18 deletions
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index 032802374a30..9c4fa208e2ca 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -384,29 +384,27 @@ bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
// style for other objects
if(pScDrawView)
{
- SdrObject* pPickObj = 0;
SdrPageView* pPageView = pScDrawView->GetSdrPageView();
if(pPageView)
{
- pScDrawView->PickObj(rPos, pScDrawView->getHitTolLog(), pPickObj, pPageView);
- }
-
- if(pPickObj)
- {
- const OUString aBeginUndo(ScGlobal::GetRscString(STR_UNDO_DRAGDROP));
- SdrObject* pResult = pScDrawView->ApplyGraphicToObject(
- *pPickObj,
- rGraphic,
- aBeginUndo,
- rFile,
- rFilter);
-
- if(pResult)
+ SdrObject* pPickObj = 0;
+ if (pScDrawView->PickObj(rPos, pScDrawView->getHitTolLog(), pPickObj, pPageView))
{
- // we are done; mark the modified/new object
- pScDrawView->MarkObj(pResult, pScDrawView->GetSdrPageView());
- return true;
+ const OUString aBeginUndo(ScGlobal::GetRscString(STR_UNDO_DRAGDROP));
+ SdrObject* pResult = pScDrawView->ApplyGraphicToObject(
+ *pPickObj,
+ rGraphic,
+ aBeginUndo,
+ rFile,
+ rFilter);
+
+ if (pResult)
+ {
+ // we are done; mark the modified/new object
+ pScDrawView->MarkObj(pResult, pScDrawView->GetSdrPageView());
+ return true;
+ }
}
}
}