diff options
Diffstat (limited to 'sd/source/ui/view/drviewsg.cxx')
-rw-r--r-- | sd/source/ui/view/drviewsg.cxx | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/sd/source/ui/view/drviewsg.cxx b/sd/source/ui/view/drviewsg.cxx index b989b84105c7..aaf3d3d7fa09 100644 --- a/sd/source/ui/view/drviewsg.cxx +++ b/sd/source/ui/view/drviewsg.cxx @@ -47,28 +47,28 @@ void DrawViewShell::ExecIMap( SfxRequest const & rReq ) if(HasCurrentFunction(SID_PRESENTATION) ) return; - if ( rReq.GetSlot() == SID_IMAP_EXEC ) - { - SdrMark* pMark = mpDrawView->GetMarkedObjectList().GetMark(0); + if ( rReq.GetSlot() != SID_IMAP_EXEC ) + return; - if ( pMark ) - { - SdrObject* pSdrObj = pMark->GetMarkedSdrObj(); - SvxIMapDlg* pDlg = ViewShell::Implementation::GetImageMapDialog(); + SdrMark* pMark = mpDrawView->GetMarkedObjectList().GetMark(0); - if ( pDlg->GetEditingObject() == static_cast<void*>(pSdrObj) ) - { - const ImageMap& rImageMap = pDlg->GetImageMap(); - SdIMapInfo* pIMapInfo = SdDrawDocument::GetIMapInfo( pSdrObj ); + if ( !pMark ) + return; - if ( !pIMapInfo ) - pSdrObj->AppendUserData( std::unique_ptr<SdrObjUserData>(new SdIMapInfo( rImageMap )) ); - else - pIMapInfo->SetImageMap( rImageMap ); + SdrObject* pSdrObj = pMark->GetMarkedSdrObj(); + SvxIMapDlg* pDlg = ViewShell::Implementation::GetImageMapDialog(); - GetDoc()->SetChanged(); - } - } + if ( pDlg->GetEditingObject() == static_cast<void*>(pSdrObj) ) + { + const ImageMap& rImageMap = pDlg->GetImageMap(); + SdIMapInfo* pIMapInfo = SdDrawDocument::GetIMapInfo( pSdrObj ); + + if ( !pIMapInfo ) + pSdrObj->AppendUserData( std::unique_ptr<SdrObjUserData>(new SdIMapInfo( rImageMap )) ); + else + pIMapInfo->SetImageMap( rImageMap ); + + GetDoc()->SetChanged(); } } @@ -193,20 +193,20 @@ void DrawViewShell::ExecOptionsBar( SfxRequest& rReq ) break; } - if( !bDefault ) - { - pOptions->StoreConfig(); + if( bDefault ) + return; - // Saves the configuration IMMEDIATELY - // SfxGetpApp()->SaveConfiguration(); - WriteFrameViewData(); + pOptions->StoreConfig(); - mpFrameView->Update( pOptions ); - ReadFrameViewData( mpFrameView ); + // Saves the configuration IMMEDIATELY + // SfxGetpApp()->SaveConfiguration(); + WriteFrameViewData(); - Invalidate( nSlot ); - rReq.Done(); - } + mpFrameView->Update( pOptions ); + ReadFrameViewData( mpFrameView ); + + Invalidate( nSlot ); + rReq.Done(); } |