summaryrefslogtreecommitdiff
path: root/sc/source/ui/drawfunc
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/drawfunc')
-rw-r--r--sc/source/ui/drawfunc/fuins1.cxx4
-rw-r--r--sc/source/ui/drawfunc/fupoor.cxx3
-rw-r--r--sc/source/ui/drawfunc/graphsh.cxx6
3 files changed, 6 insertions, 7 deletions
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index d53741d617e9..43b8f0616b54 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -271,8 +271,8 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
// really store as link only?
if( bAsLink && SvtMiscOptions().ShowLinkWarningDialog() )
{
- SvxLinkWarningDialog aWarnDlg(pWin,aFileName);
- if( aWarnDlg.Execute() != RET_OK )
+ ScopedVclPtrInstance< SvxLinkWarningDialog > aWarnDlg(pWin,aFileName);
+ if( aWarnDlg->Execute() != RET_OK )
bAsLink = false; // don't store as link
}
diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx
index aab43720b1c8..46b4132fc7be 100644
--- a/sc/source/ui/drawfunc/fupoor.cxx
+++ b/sc/source/ui/drawfunc/fupoor.cxx
@@ -53,8 +53,7 @@ FuPoor::~FuPoor()
{
aDragTimer.Stop();
aScrollTimer.Stop();
-
- delete pDialog;
+ pDialog.disposeAndClear();
}
void FuPoor::Activate()
diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx
index b98f92be1f57..f8c2be9ca17b 100644
--- a/sc/source/ui/drawfunc/graphsh.cxx
+++ b/sc/source/ui/drawfunc/graphsh.cxx
@@ -200,10 +200,10 @@ void ScGraphicShell::ExecuteCompressGraphic( SfxRequest& )
if( pObj && pObj->ISA( SdrGrafObj ) && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP )
{
SdrGrafObj* pGraphicObj = static_cast<SdrGrafObj*>(pObj);
- CompressGraphicsDialog dialog( GetViewData()->GetDialogParent(), pGraphicObj, GetViewData()->GetBindings() );
- if ( dialog.Execute() == RET_OK )
+ ScopedVclPtrInstance< CompressGraphicsDialog > dialog( GetViewData()->GetDialogParent(), pGraphicObj, GetViewData()->GetBindings() );
+ if ( dialog->Execute() == RET_OK )
{
- SdrGrafObj* pNewObject = dialog.GetCompressedSdrGrafObj();
+ SdrGrafObj* pNewObject = dialog->GetCompressedSdrGrafObj();
SdrPageView* pPageView = pView->GetSdrPageView();
OUString aUndoString = pView->GetDescriptionOfMarkedObjects() + " Compress";
pView->BegUndo( aUndoString );