diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-24 15:19:59 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-24 15:19:59 +0000 |
commit | 533f390e609da2f4b0e644a543746a767f1bba62 (patch) | |
tree | 7750511f16c763240a7f36e61502c2442860f8d9 /sc | |
parent | 8e375ba24da264cc4d711b535c547a2546435475 (diff) |
coverity#1265796 Dereference null return value
Change-Id: I779dacdb7fb18ba8148e932b4dc684d08f824cbe
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/imapwrap.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/view/imapwrap.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsh9.cxx | 7 |
3 files changed, 4 insertions, 15 deletions
diff --git a/sc/source/ui/view/imapwrap.cxx b/sc/source/ui/view/imapwrap.cxx index ee2c8f8e0549..423fb2314a60 100644 --- a/sc/source/ui/view/imapwrap.cxx +++ b/sc/source/ui/view/imapwrap.cxx @@ -27,16 +27,6 @@ sal_uInt16 ScIMapChildWindowId() return SvxIMapDlgChildWindow::GetChildWindowId(); } -SvxIMapDlg* ScGetIMapDlg() -{ - //! pass view frame here and in SVXIMAPDLG() - SfxViewFrame* pViewFrm = SfxViewFrame::Current(); - if (pViewFrm && pViewFrm->HasChildWindow(SvxIMapDlgChildWindow::GetChildWindowId())) - return SVXIMAPDLG(); - else - return NULL; -} - void ScIMapDlgSet( const Graphic& rGraphic, const ImageMap* pImageMap, const TargetList* pTargetList, void* pEditingObj ) { diff --git a/sc/source/ui/view/imapwrap.hxx b/sc/source/ui/view/imapwrap.hxx index 592f1c74a5ac..c3733f5c8158 100644 --- a/sc/source/ui/view/imapwrap.hxx +++ b/sc/source/ui/view/imapwrap.hxx @@ -28,8 +28,6 @@ class Graphic; class ImageMap; class SvxIMapDlg; -SvxIMapDlg * ScGetIMapDlg(); - sal_uInt16 ScIMapChildWindowId(); ImageMap const & ScIMapDlgGetMap(SvxIMapDlg * pDlg); diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx index 6cfbc9656b86..07dd2e13c3d5 100644 --- a/sc/source/ui/view/tabvwsh9.cxx +++ b/sc/source/ui/view/tabvwsh9.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <svx/imapdlg.hxx> #include <svx/svdmark.hxx> #include <svx/svdview.hxx> #include <svx/gallery.hxx> @@ -106,7 +107,7 @@ void ScTabViewShell::ExecImageMap( SfxRequest& rReq ) if ( pThisFrame->HasChildWindow( nId ) ) { - SvxIMapDlg* pDlg = ScGetIMapDlg(); + SvxIMapDlg* pDlg = GetIMapDlg(); if ( pDlg ) { SdrView* pDrView = GetSdrView(); @@ -131,7 +132,7 @@ void ScTabViewShell::ExecImageMap( SfxRequest& rReq ) if ( pMark ) { SdrObject* pSdrObj = pMark->GetMarkedSdrObj(); - SvxIMapDlg* pDlg = ScGetIMapDlg(); + SvxIMapDlg* pDlg = GetIMapDlg(); if ( ScIMapDlgGetObj(pDlg) == (void*) pSdrObj ) { @@ -192,7 +193,7 @@ void ScTabViewShell::GetImageMapState( SfxItemSet& rSet ) { const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList(); if ( rMarkList.GetMarkCount() == 1 ) - if ( ScIMapDlgGetObj(ScGetIMapDlg()) == + if ( ScIMapDlgGetObj(GetIMapDlg()) == (void*) rMarkList.GetMark(0)->GetMarkedSdrObj() ) bDisable = false; } |