diff options
Diffstat (limited to 'sd/source/ui/func')
-rw-r--r-- | sd/source/ui/func/fuinsert.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fuinsfil.cxx | 12 | ||||
-rw-r--r-- | sd/source/ui/func/fulinend.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fupage.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/func/fupoor.cxx | 11 |
5 files changed, 20 insertions, 17 deletions
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index bd21323f0984..a12d8b2ed52a 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -151,8 +151,8 @@ void FuInsertGraphic::DoExecute( SfxRequest& ) // really store as link only? if( SvtMiscOptions().ShowLinkWarningDialog() ) { - SvxLinkWarningDialog aWarnDlg(mpWindow,aDlg.GetPath()); - if( aWarnDlg.Execute() != RET_OK ) + ScopedVclPtrInstance< SvxLinkWarningDialog > aWarnDlg(mpWindow,aDlg.GetPath()); + if( aWarnDlg->Execute() != RET_OK ) return; // don't store as link } diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index 7b554d2f74d7..c0bbd9f3deeb 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -317,8 +317,8 @@ void FuInsertFile::DoExecute( SfxRequest& rReq ) if( !bInserted ) { - MessageDialog aErrorBox(mpWindow, SD_RESSTR( STR_READ_DATA_ERROR)); - aErrorBox.Execute(); + ScopedVclPtrInstance< MessageDialog > aErrorBox(mpWindow, SD_RESSTR( STR_READ_DATA_ERROR)); + aErrorBox->Execute(); delete pMedium; } } @@ -467,8 +467,8 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium) if (nErr || pOutliner->GetEditEngine().GetText().isEmpty()) { - MessageDialog aErrorBox(mpWindow, SD_RESSTR(STR_READ_DATA_ERROR)); - aErrorBox.Execute(); + ScopedVclPtrInstance< MessageDialog > aErrorBox(mpWindow, SD_RESSTR(STR_READ_DATA_ERROR)); + aErrorBox->Execute(); } else { @@ -611,8 +611,8 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium) if (nErr || pOutliner->GetEditEngine().GetText().isEmpty()) { - MessageDialog aErrorBox(mpWindow, SD_RESSTR(STR_READ_DATA_ERROR)); - aErrorBox.Execute(); + ScopedVclPtrInstance< MessageDialog > aErrorBox(mpWindow, SD_RESSTR(STR_READ_DATA_ERROR)); + aErrorBox->Execute(); } else { diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx index e8f441cc7398..b963b06e5cf8 100644 --- a/sd/source/ui/func/fulinend.cxx +++ b/sd/source/ui/func/fulinend.cxx @@ -138,9 +138,9 @@ void FuLineEnd::DoExecute( SfxRequest& ) } else { - WarningBox aWarningBox( mpWindow, WinBits( WB_OK ), + ScopedVclPtrInstance<WarningBox> aWarningBox( mpWindow, WinBits( WB_OK ), SD_RESSTR( STR_WARN_NAME_DUPLICATE ) ); - aWarningBox.Execute(); + aWarningBox->Execute(); } } } diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index bbccfbcaa613..a099da6dc8ed 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -351,13 +351,13 @@ const SfxItemSet* FuPage::ExecuteDialog( ::vcl::Window* pParent ) // notice-masterpage (at the moment) if( ePageKind != PK_NOTES ) { - MessBox aQuestionBox ( + ScopedVclPtrInstance<MessBox> aQuestionBox ( pParent, WB_YES_NO | WB_DEF_YES, SD_RESSTR(STR_PAGE_BACKGROUND_TITLE), SD_RESSTR(STR_PAGE_BACKGROUND_TXT) ); - aQuestionBox.SetImage( QueryBox::GetStandardImage() ); - bSetToAllPages = ( RET_YES == aQuestionBox.Execute() ); + aQuestionBox->SetImage( QueryBox::GetStandardImage() ); + bSetToAllPages = ( RET_YES == aQuestionBox->Execute() ); } if( mbPageBckgrdDeleted ) diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index f522f6eba3f2..8ea8462ceedc 100644 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -100,10 +100,8 @@ FuPoor::~FuPoor() { aDragTimer.Stop(); aScrollTimer.Stop(); - aDelayToScrollTimer.Stop (); - - if (pDialog) - delete pDialog; + aDelayToScrollTimer.Stop(); + pDialog.disposeAndClear(); } void FuPoor::Activate() @@ -130,6 +128,11 @@ void FuPoor::Deactivate() if (mpWindow) mpWindow->ReleaseMouse (); } +void FuPoor::SetWindow(::sd::Window* pWin) +{ + mpWindow = pWin; +} + /** * scroll when approached the border of the window; is called by MouseMove */ |