summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-20 11:27:10 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 12:37:44 +0100
commit61b224f392eb856bf4cfa0c04c68202a463cbdbf (patch)
tree77a28e38763bc5f9d95e2c278601d31dc6fbf65d /sd/source/ui
parentf1d9eef4163e88a3cb6360178b52ce441e65d8ae (diff)
vclwidget: fixup locally allocated vcl::Window objects
They need to be wrapped in ScopedVclPtr in order to be disposed properly. Change-Id: Ib64dba353774f54711e4de7f5d15d859c6a4dc7e
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx2
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx2
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx2
-rw-r--r--sd/source/ui/dlg/LayerTabBar.cxx2
-rw-r--r--sd/source/ui/dlg/PhotoAlbumDialog.cxx4
-rw-r--r--sd/source/ui/dlg/animobjs.cxx2
-rw-r--r--sd/source/ui/dlg/brkdlg.cxx2
-rw-r--r--sd/source/ui/dlg/custsdlg.cxx4
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx2
-rw-r--r--sd/source/ui/dlg/tpoption.cxx2
-rw-r--r--sd/source/ui/func/fuinsert.cxx2
-rw-r--r--sd/source/ui/func/fuinsfil.cxx6
-rw-r--r--sd/source/ui/func/fulinend.cxx2
-rw-r--r--sd/source/ui/func/fupage.cxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsClipboard.cxx2
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx2
-rw-r--r--sd/source/ui/view/Outliner.cxx8
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx2
-rw-r--r--sd/source/ui/view/drviews2.cxx6
-rw-r--r--sd/source/ui/view/drviews6.cxx2
-rw-r--r--sd/source/ui/view/drviews9.cxx2
-rw-r--r--sd/source/ui/view/drviewsi.cxx2
22 files changed, 31 insertions, 31 deletions
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index a21d4f67b53e..f0aba1483ff3 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -1548,7 +1548,7 @@ void CustomAnimationEffectTabPage::openSoundFileDialog()
{
OUString aStrWarning(SD_RESSTR(STR_WARNING_NOSOUNDFILE));
aStrWarning = aStrWarning.replaceFirst("%", aFile);
- VclPtr<WarningBox> aWarningBox(new WarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, aStrWarning ));
+ ScopedVclPtr<WarningBox> aWarningBox(new WarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, aStrWarning ));
aWarningBox->SetModalInputMode (true);
bQuitLoop = aWarningBox->Execute() != RET_RETRY;
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 370ef4964297..9a5a28549b0b 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -743,7 +743,7 @@ void SlideTransitionPane::openSoundFileDialog()
{
OUString aStrWarning(SD_RESSTR(STR_WARNING_NOSOUNDFILE));
aStrWarning = aStrWarning.replaceFirst("%", aFile);
- VclPtr<WarningBox> aWarningBox(new WarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, aStrWarning ));
+ ScopedVclPtr<WarningBox> aWarningBox(new WarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, aStrWarning ));
aWarningBox->SetModalInputMode (true);
bQuitLoop = (aWarningBox->Execute() != RET_RETRY);
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 09887ec32a94..9ac354940fb1 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -694,7 +694,7 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool bForeward)
// Pop up question box that asks the user whether to wrap around.
// The dialog is made modal with respect to the whole application.
- VclPtr<QueryBox> aQuestionBox (new QueryBox( NULL, (WB_YES_NO | WB_DEF_YES), SD_RESSTR(nStringId)));
+ ScopedVclPtr<QueryBox> aQuestionBox (new QueryBox( NULL, (WB_YES_NO | WB_DEF_YES), SD_RESSTR(nStringId)));
aQuestionBox->SetImage( QueryBox::GetStandardImage() );
if (aQuestionBox->Execute() != RET_YES)
break;
diff --git a/sd/source/ui/dlg/LayerTabBar.cxx b/sd/source/ui/dlg/LayerTabBar.cxx
index 14b88f9ea422..955854324725 100644
--- a/sd/source/ui/dlg/LayerTabBar.cxx
+++ b/sd/source/ui/dlg/LayerTabBar.cxx
@@ -203,7 +203,7 @@ TabBarAllowRenamingReturnCode LayerTabBar::AllowRenaming()
(rLayerAdmin.GetLayer( aNewName, false ) && aLayerName != aNewName) )
{
// Name already exists
- VclPtr<WarningBox> aWarningBox(new WarningBox( &pDrViewSh->GetViewFrame()->GetWindow(), WinBits( WB_OK ),
+ ScopedVclPtr<WarningBox> aWarningBox(new WarningBox( &pDrViewSh->GetViewFrame()->GetWindow(), WinBits( WB_OK ),
SD_RESSTR( STR_WARN_NAME_DUPLICATE ) ));
aWarningBox->Execute();
bOK = false;
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 2f79921609e9..ddc8b9b9fb90 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -105,7 +105,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl)
{
if (pImagesLst->GetEntryCount() == 0)
{
- VclPtr<WarningBox> aWarning(new WarningBox(this, WB_OK, SD_RESSTR(STR_PHOTO_ALBUM_EMPTY_WARNING)));
+ ScopedVclPtr<WarningBox> aWarning(new WarningBox(this, WB_OK, SD_RESSTR(STR_PHOTO_ALBUM_EMPTY_WARNING)));
aWarning->Execute();
}
else
@@ -462,7 +462,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl)
}
else
{
- VclPtr<InfoBox> aInfo(new InfoBox(this, OUString("Function is not implemented!")));
+ ScopedVclPtr<InfoBox> aInfo(new InfoBox(this, OUString("Function is not implemented!")));
aInfo->Execute();
}
EndDialog();
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 6b79455d35ff..3fcebfbff8e9 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -455,7 +455,7 @@ IMPL_LINK( AnimationWindow, ClickRemoveBitmapHdl, void *, pBtn )
}
else // delete everything
{
- VclPtr<WarningBox> aWarnBox(new WarningBox( this, WB_YES_NO, SD_RESSTR( STR_ASK_DELETE_ALL_PICTURES ) ));
+ ScopedVclPtr<WarningBox> aWarnBox(new WarningBox( this, WB_YES_NO, SD_RESSTR( STR_ASK_DELETE_ALL_PICTURES ) ));
short nReturn = aWarnBox->Execute();
if( nReturn == RET_YES )
diff --git a/sd/source/ui/dlg/brkdlg.cxx b/sd/source/ui/dlg/brkdlg.cxx
index 2bd293b12059..4cd524707300 100644
--- a/sd/source/ui/dlg/brkdlg.cxx
+++ b/sd/source/ui/dlg/brkdlg.cxx
@@ -103,7 +103,7 @@ IMPL_LINK( BreakDlg, UpDate, void*, nInit )
// update status bar or show a error message?
if(nInit == reinterpret_cast<void*>(1L))
{
- VclPtr<MessageDialog> aErrBox(new MessageDialog(this, SD_RESSTR(STR_BREAK_FAIL)));
+ ScopedVclPtr<MessageDialog> aErrBox(new MessageDialog(this, SD_RESSTR(STR_BREAK_FAIL)));
aErrBox->Execute();
}
else
diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx
index b6c290586403..00cec79e80a2 100644
--- a/sd/source/ui/dlg/custsdlg.cxx
+++ b/sd/source/ui/dlg/custsdlg.cxx
@@ -126,7 +126,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
if( p == m_pBtnNew )
{
pCustomShow = NULL;
- VclPtr<SdDefineCustomShowDlg> aDlg(new SdDefineCustomShowDlg( this, rDoc, pCustomShow ));
+ ScopedVclPtr<SdDefineCustomShowDlg> aDlg(new SdDefineCustomShowDlg( this, rDoc, pCustomShow ));
if( aDlg->Execute() == RET_OK )
{
if( pCustomShow )
@@ -154,7 +154,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
{
DBG_ASSERT( pCustomShowList, "pCustomShowList does not exist" );
pCustomShow = (*pCustomShowList)[ nPos ];
- VclPtr<SdDefineCustomShowDlg> aDlg(new SdDefineCustomShowDlg( this, rDoc, pCustomShow ));
+ ScopedVclPtr<SdDefineCustomShowDlg> aDlg(new SdDefineCustomShowDlg( this, rDoc, pCustomShow ));
if( aDlg->Execute() == RET_OK )
{
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 02bedafa2cad..9afcdcfc7176 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -1012,7 +1012,7 @@ SdDrawDocument* SdPageObjsTLB::GetBookmarkDoc(SfxMedium* pMed)
if ( !mpBookmarkDoc )
{
- VclPtr<MessageDialog> aErrorBox(new MessageDialog(this, SD_RESSTR(STR_READ_DATA_ERROR)));
+ ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(this, SD_RESSTR(STR_READ_DATA_ERROR)));
aErrorBox->Execute();
mpMedium = 0; //On failure the SfxMedium is invalid
}
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 6faf6e5efb63..4f4e783515e6 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -373,7 +373,7 @@ int SdTpOptionsMisc::DeactivatePage( SfxItemSet* pActiveSet )
FillItemSet( pActiveSet );
return LEAVE_PAGE;
}
- VclPtr<WarningBox> aWarnBox(new WarningBox( GetParent(), WB_YES_NO, SD_RESSTR( STR_WARN_SCALE_FAIL ) ));
+ ScopedVclPtr<WarningBox> aWarnBox(new WarningBox( GetParent(), WB_YES_NO, SD_RESSTR( STR_WARN_SCALE_FAIL ) ));
if( aWarnBox->Execute() == RET_YES )
return KEEP_PAGE;
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index d47f025ff538..72a5bc118e0a 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -151,7 +151,7 @@ void FuInsertGraphic::DoExecute( SfxRequest& )
// really store as link only?
if( SvtMiscOptions().ShowLinkWarningDialog() )
{
- VclPtr<SvxLinkWarningDialog> aWarnDlg(new SvxLinkWarningDialog(mpWindow,aDlg.GetPath()));
+ ScopedVclPtr<SvxLinkWarningDialog> aWarnDlg(new SvxLinkWarningDialog(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 e47b22a797de..fa683dbe7d94 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -281,7 +281,7 @@ void FuInsertFile::DoExecute( SfxRequest& rReq )
if( !bInserted )
{
- VclPtr<MessageDialog> aErrorBox(new MessageDialog(mpWindow, SD_RESSTR( STR_READ_DATA_ERROR)));
+ ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(mpWindow, SD_RESSTR( STR_READ_DATA_ERROR)));
aErrorBox->Execute();
delete pMedium;
}
@@ -431,7 +431,7 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium)
if (nErr || pOutliner->GetEditEngine().GetText().isEmpty())
{
- VclPtr<MessageDialog> aErrorBox(new MessageDialog(mpWindow, SD_RESSTR(STR_READ_DATA_ERROR)));
+ ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(mpWindow, SD_RESSTR(STR_READ_DATA_ERROR)));
aErrorBox->Execute();
}
else
@@ -575,7 +575,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
if (nErr || pOutliner->GetEditEngine().GetText().isEmpty())
{
- VclPtr<MessageDialog> aErrorBox(new MessageDialog(mpWindow, SD_RESSTR(STR_READ_DATA_ERROR)));
+ ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(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 cc94ac446bff..16a3bae4f3b4 100644
--- a/sd/source/ui/func/fulinend.cxx
+++ b/sd/source/ui/func/fulinend.cxx
@@ -138,7 +138,7 @@ void FuLineEnd::DoExecute( SfxRequest& )
}
else
{
- VclPtr<WarningBox> aWarningBox(new WarningBox( mpWindow, WinBits( WB_OK ),
+ ScopedVclPtr<WarningBox> aWarningBox(new WarningBox( mpWindow, WinBits( WB_OK ),
SD_RESSTR( STR_WARN_NAME_DUPLICATE ) ) );
aWarningBox->Execute();
}
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 670bbff5802b..4143f0c0892d 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -351,7 +351,7 @@ const SfxItemSet* FuPage::ExecuteDialog( ::vcl::Window* pParent )
// notice-masterpage (at the moment)
if( ePageKind != PK_NOTES )
{
- VclPtr<MessBox> aQuestionBox (new MessBox(
+ ScopedVclPtr<MessBox> aQuestionBox (new MessBox(
pParent,
WB_YES_NO | WB_DEF_YES,
SD_RESSTR(STR_PAGE_BACKGROUND_TITLE),
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index 92a880853d19..c3f3bad8043c 100644
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -287,7 +287,7 @@ sal_Int32 Clipboard::GetInsertionPosition (::vcl::Window* pWindow)
else if (mrController.GetFocusManager().IsFocusShowing())
{
// Use the focus to determine the insertion position.
- VclPtr<SdInsertPasteDlg> aDialog (new SdInsertPasteDlg(pWindow));
+ ScopedVclPtr<SdInsertPasteDlg> aDialog (new SdInsertPasteDlg(pWindow));
if (aDialog->Execute() == RET_OK)
{
nInsertPosition = mrController.GetFocusManager().GetFocusedPageIndex();
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 20b2df7c70f0..ba7826b19d39 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1301,7 +1301,7 @@ public:
// Show warning that the orientation could not be set.
if (pViewShell)
{
- VclPtr<WarningBox> aWarnBox(new WarningBox(
+ ScopedVclPtr<WarningBox> aWarnBox(new WarningBox(
pViewShell->GetActiveWindow(),
(WinBits)(WB_OK_CANCEL | WB_DEF_CANCEL),
SD_RESSTR(STR_WARN_PRINTFORMAT_FAILURE)));
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index b46951154485..c14c68f1793a 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -1068,7 +1068,7 @@ void Outliner::ShowEndOfSearchDialog (void)
// Show the message in an info box that is modal with respect to the
// whole application.
- VclPtr<MessageDialog> aInfoBox(new MessageDialog(NULL, aString, VCL_MESSAGE_INFO));
+ ScopedVclPtr<MessageDialog> aInfoBox(new MessageDialog(NULL, aString, VCL_MESSAGE_INFO));
ShowModalMessageBox (*aInfoBox.get());
@@ -1109,7 +1109,7 @@ bool Outliner::ShowWrapArroundDialog (void)
// Pop up question box that asks the user whether to wrap around.
// The dialog is made modal with respect to the whole application.
- VclPtr<QueryBox> aQuestionBox (new QueryBox(
+ ScopedVclPtr<QueryBox> aQuestionBox (new QueryBox(
NULL,
WB_YES_NO | WB_DEF_YES,
SD_RESSTR(nStringId)));
@@ -1157,7 +1157,7 @@ void Outliner::PrepareSpellCheck (void)
{
mbError = true;
mbEndOfSearch = true;
- VclPtr<MessageDialog> aErrorBox (new MessageDialog(NULL,
+ ScopedVclPtr<MessageDialog> aErrorBox (new MessageDialog(NULL,
SD_RESSTR(STR_NOLANGUAGE)));
ShowModalMessageBox (*aErrorBox.get());
}
@@ -1376,7 +1376,7 @@ bool Outliner::HandleFailedSearch (void)
if (HasNoPreviousMatch ())
{
// No match found in the whole presentation. Tell the user.
- VclPtr<InfoBox> aInfoBox (new InfoBox(NULL, SD_RESSTR(STR_SAR_NOT_FOUND)));
+ ScopedVclPtr<InfoBox> aInfoBox (new InfoBox(NULL, SD_RESSTR(STR_SAR_NOT_FOUND)));
ShowModalMessageBox (*aInfoBox.get());
}
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 03ba2b10588a..fefb13b71b41 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -533,7 +533,7 @@ sal_uInt16 ViewShellBase::SetPrinter (
bool bScaleAll = false;
if ( bIsAPI )
{
- VclPtr<WarningBox> aWarnBox (new WarningBox(
+ ScopedVclPtr<WarningBox> aWarnBox (new WarningBox(
GetWindow(),
(WinBits)(WB_YES_NO | WB_DEF_YES),
SD_RESSTR(STR_SCALE_OBJS_TO_PAGE)));
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index e442aeb9be15..f780db94fcd6 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -993,7 +993,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if( pObj && pObj->ISA( SdrGrafObj ) && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP )
{
SdrGrafObj* pGraphicObj = static_cast<SdrGrafObj*>(pObj);
- VclPtr<CompressGraphicsDialog> dialog(new CompressGraphicsDialog( GetParentWindow(), pGraphicObj, GetViewFrame()->GetBindings() ) );
+ ScopedVclPtr<CompressGraphicsDialog> dialog(new CompressGraphicsDialog( GetParentWindow(), pGraphicObj, GetViewFrame()->GetBindings() ) );
if ( dialog->Execute() == RET_OK )
{
SdrGrafObj* pNewObject = dialog->GetCompressedSdrGrafObj();
@@ -1422,7 +1422,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
|| aLayerName.isEmpty() )
{
// name already exists
- VclPtr<WarningBox> aWarningBox (new WarningBox(
+ ScopedVclPtr<WarningBox> aWarningBox (new WarningBox(
GetParentWindow(),
WinBits( WB_OK ),
SD_RESSTR(STR_WARN_NAME_DUPLICATE)));
@@ -1591,7 +1591,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
aLayerName != aOldLayerName) || aLayerName.isEmpty() )
{
// name already exists
- VclPtr<WarningBox> aWarningBox (new WarningBox(
+ ScopedVclPtr<WarningBox> aWarningBox (new WarningBox(
GetParentWindow(),
WinBits( WB_OK ),
SD_RESSTR(STR_WARN_NAME_DUPLICATE)));
diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx
index c76556e9a177..adffc746bf5c 100644
--- a/sd/source/ui/view/drviews6.cxx
+++ b/sd/source/ui/view/drviews6.cxx
@@ -294,7 +294,7 @@ void DrawViewShell::ExecBmpMask( SfxRequest& rReq )
if( pNewObj->IsLinkedGraphic() )
{
- VclPtr<MessageDialog> aQueryBox(new MessageDialog( (vcl::Window*) GetActiveWindow(),"QueryUnlinkImageDialog","modules/sdraw/ui/queryunlinkimagedialog.ui") );
+ ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog( (vcl::Window*) GetActiveWindow(),"QueryUnlinkImageDialog","modules/sdraw/ui/queryunlinkimagedialog.ui") );
if (RET_YES == aQueryBox->Execute())
pNewObj->ReleaseGraphicLink();
diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx
index 66745078a240..19bd115c7a85 100644
--- a/sd/source/ui/view/drviews9.cxx
+++ b/sd/source/ui/view/drviews9.cxx
@@ -87,7 +87,7 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq)
Graphic aGraphic( pGalleryItem->GetGraphic() );
// reduce size if necessary
- VclPtr<Window> aWindow(GetActiveWindow());
+ ScopedVclPtr<Window> aWindow(new Window(GetActiveWindow()));
aWindow->SetMapMode(aGraphic.GetPrefMapMode());
Size aSizePix = aWindow->LogicToPixel(aGraphic.GetPrefSize());
aWindow->SetMapMode( MapMode(MAP_100TH_MM) );
diff --git a/sd/source/ui/view/drviewsi.cxx b/sd/source/ui/view/drviewsi.cxx
index e15f19627216..f926b7ebac46 100644
--- a/sd/source/ui/view/drviewsi.cxx
+++ b/sd/source/ui/view/drviewsi.cxx
@@ -164,7 +164,7 @@ void DrawViewShell::AssignFrom3DWindow()
}
else
{
- VclPtr<InfoBox> aInfoBox (new InfoBox(
+ ScopedVclPtr<InfoBox> aInfoBox (new InfoBox(
GetActiveWindow(),
SD_RESSTR(STR_ACTION_NOTPOSSIBLE)));
aInfoBox->Execute();