summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/view/cellsh1.cxx4
-rw-r--r--sc/source/ui/view/cellsh3.cxx4
-rw-r--r--sc/source/ui/view/dbfunc.cxx4
-rw-r--r--sc/source/ui/view/spelleng.cxx4
-rw-r--r--sc/source/ui/view/viewfun2.cxx8
-rw-r--r--sc/source/ui/view/viewfun3.cxx4
-rw-r--r--sd/source/filter/html/pubdlg.cxx4
-rw-r--r--sd/source/ui/dlg/LayerTabBar.cxx4
-rw-r--r--sd/source/ui/func/fulinend.cxx4
-rw-r--r--sd/source/ui/func/fupage.cxx4
-rw-r--r--sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx6
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx4
-rw-r--r--sd/source/ui/view/Outliner.cxx8
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx4
-rw-r--r--sd/source/ui/view/drviews2.cxx8
-rw-r--r--sd/source/ui/view/drviewsi.cxx4
-rw-r--r--sfx2/source/appl/appopen.cxx4
-rw-r--r--sfx2/source/appl/openuriexternally.cxx4
-rw-r--r--sfx2/source/appl/sfxhelp.cxx2
-rw-r--r--sfx2/source/dialog/securitypage.cxx4
-rw-r--r--sfx2/source/dialog/templdlg.cxx8
-rw-r--r--sfx2/source/doc/guisaveas.cxx4
-rw-r--r--sfx2/source/doc/templatedlg.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx12
-rw-r--r--sfx2/source/view/viewprn.cxx6
-rw-r--r--starmath/source/unomodel.cxx2
-rw-r--r--svtools/source/java/javainteractionhandler.cxx4
-rw-r--r--svx/source/dialog/_contdlg.cxx5
-rw-r--r--svx/source/form/datanavi.cxx12
-rw-r--r--svx/source/form/fmshell.cxx4
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx4
-rw-r--r--svx/source/unodraw/recoveryui.cxx4
-rw-r--r--sw/source/core/view/viewsh.cxx4
-rw-r--r--sw/source/ui/config/optcomp.cxx4
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx8
-rw-r--r--sw/source/ui/envelp/labfmt.cxx4
-rw-r--r--sw/source/ui/index/cnttab.cxx10
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx4
-rw-r--r--sw/source/ui/misc/glossary.cxx4
-rw-r--r--sw/source/ui/table/tautofmt.cxx17
-rw-r--r--sw/source/uibase/app/docsh2.cxx4
-rw-r--r--sw/source/uibase/app/docst.cxx3
-rw-r--r--sw/source/uibase/shells/tabsh.cxx4
-rw-r--r--sw/source/uibase/shells/textsh1.cxx4
-rw-r--r--sw/source/uibase/uiview/view2.cxx8
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx4
-rw-r--r--sw/source/uibase/uno/SwXDocumentSettings.cxx2
-rw-r--r--uui/source/iahndl.cxx8
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx4
49 files changed, 124 insertions, 131 deletions
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index bf81d0cb7a2d..cc5206614a33 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2652,9 +2652,9 @@ void ScCellShell::ExecuteDataPilotDialog()
{
// confirm selection if it contains SubTotal cells
- ScopedVclPtr<QueryBox> aBox(new QueryBox( pTabViewShell->GetDialogParent(),
+ ScopedVclPtrInstance<QueryBox> aBox( pTabViewShell->GetDialogParent(),
WinBits(WB_YES_NO | WB_DEF_YES),
- ScGlobal::GetRscString(STR_DATAPILOT_SUBTOTAL) ) );
+ ScGlobal::GetRscString(STR_DATAPILOT_SUBTOTAL) );
if (aBox->Execute() == RET_NO)
bOK = false;
}
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 3e1c5f11cf51..dd1b2998eec5 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -422,8 +422,8 @@ void ScCellShell::Execute( SfxRequest& rReq )
}
else if( ! rReq.IsAPI() )
{
- ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(pTabViewShell->GetDialogParent(),
- ScGlobal::GetRscString(STR_NOAREASELECTED)));
+ ScopedVclPtrInstance<MessageDialog> aErrorBox(pTabViewShell->GetDialogParent(),
+ ScGlobal::GetRscString(STR_NOAREASELECTED));
aErrorBox->Execute();
}
}
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index a24860873774..83224c957fbb 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -383,8 +383,8 @@ void ScDBFunc::ToggleAutoFilter()
}
else
{
- ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(GetViewData().GetDialogParent(),
- ScGlobal::GetRscString(STR_ERR_AUTOFILTER)));
+ ScopedVclPtrInstance<MessageDialog> aErrorBox(GetViewData().GetDialogParent(),
+ ScGlobal::GetRscString(STR_ERR_AUTOFILTER));
aErrorBox->Execute();
}
}
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index 77b973186129..3ea3d0dfeafd 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -305,9 +305,9 @@ bool ScSpellingEngine::ShowTableWrapDialog()
{
vcl::Window* pParent = GetDialogParent();
ScWaitCursorOff aWaitOff( pParent );
- ScopedVclPtr<MessBox> aMsgBox(new MessBox( pParent, WinBits( WB_YES_NO | WB_DEF_YES ),
+ ScopedVclPtrInstance<MessBox> aMsgBox( pParent, WinBits( WB_YES_NO | WB_DEF_YES ),
ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ),
- ScGlobal::GetRscString( STR_SPELLING_BEGIN_TAB) ) );
+ ScGlobal::GetRscString( STR_SPELLING_BEGIN_TAB) );
return aMsgBox->Execute() == RET_YES;
}
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 563e8f232cf7..948a9744ab09 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1074,10 +1074,10 @@ bool ScViewFunc::MergeCells( bool bApi, bool& rDoContents, bool bRecord, bool bC
{
if (!bApi)
{
- ScopedVclPtr<MessBox> aBox(new MessBox( GetViewData().GetDialogParent(),
+ ScopedVclPtrInstance<MessBox> aBox( GetViewData().GetDialogParent(),
WinBits(WB_YES_NO_CANCEL | WB_DEF_NO),
ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ),
- ScGlobal::GetRscString( STR_MERGE_NOTEMPTY ) ) );
+ ScGlobal::GetRscString( STR_MERGE_NOTEMPTY ) );
sal_uInt16 nRetVal = aBox->Execute();
if ( nRetVal == RET_YES )
@@ -1771,9 +1771,9 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
aMsgStr += ScGlobal::GetRscString( STR_MSSG_SOLVE_4 );
}
- ScopedVclPtr<MessBox> aBox(new MessBox( GetViewData().GetDialogParent(),
+ ScopedVclPtrInstance<MessBox> aBox( GetViewData().GetDialogParent(),
WinBits(WB_YES_NO | WB_DEF_NO),
- ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), aMsgStr ) );
+ ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), aMsgStr );
sal_uInt16 nRetVal = aBox->Execute();
if ( RET_YES == nRetVal )
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index f71c915da523..9f1549a4412d 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1041,8 +1041,8 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
{
ScWaitCursorOff aWaitOff( GetFrameWin() );
OUString aMessage = ScGlobal::GetRscString( STR_PASTE_BIGGER );
- ScopedVclPtr<QueryBox> aBox(new QueryBox( GetViewData().GetDialogParent(),
- WinBits(WB_YES_NO | WB_DEF_NO), aMessage ) );
+ ScopedVclPtrInstance<QueryBox> aBox( GetViewData().GetDialogParent(),
+ WinBits(WB_YES_NO | WB_DEF_NO), aMessage );
if ( aBox->Execute() != RET_YES )
{
return false;
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index f8b1dbb297b8..415d65ac47d9 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -1177,8 +1177,8 @@ IMPL_LINK_NOARG(SdPublishingDlg, FinishHdl)
if (iter != m_aDesignList.end())
{
- ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(this, SD_RESSTR(STR_PUBDLG_SAMENAME),
- VCL_MESSAGE_ERROR, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance<MessageDialog> aErrorBox(this, SD_RESSTR(STR_PUBDLG_SAMENAME),
+ VCL_MESSAGE_ERROR, VCL_BUTTONS_YES_NO);
bRetry = aErrorBox->Execute() == RET_NO;
if(!bRetry)
diff --git a/sd/source/ui/dlg/LayerTabBar.cxx b/sd/source/ui/dlg/LayerTabBar.cxx
index 955854324725..ffe4099c1b8b 100644
--- a/sd/source/ui/dlg/LayerTabBar.cxx
+++ b/sd/source/ui/dlg/LayerTabBar.cxx
@@ -203,8 +203,8 @@ TabBarAllowRenamingReturnCode LayerTabBar::AllowRenaming()
(rLayerAdmin.GetLayer( aNewName, false ) && aLayerName != aNewName) )
{
// Name already exists
- ScopedVclPtr<WarningBox> aWarningBox(new WarningBox( &pDrViewSh->GetViewFrame()->GetWindow(), WinBits( WB_OK ),
- SD_RESSTR( STR_WARN_NAME_DUPLICATE ) ));
+ ScopedVclPtrInstance<WarningBox> aWarningBox( &pDrViewSh->GetViewFrame()->GetWindow(), WinBits( WB_OK ),
+ SD_RESSTR( STR_WARN_NAME_DUPLICATE ) );
aWarningBox->Execute();
bOK = false;
}
diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx
index 16a3bae4f3b4..b963b06e5cf8 100644
--- a/sd/source/ui/func/fulinend.cxx
+++ b/sd/source/ui/func/fulinend.cxx
@@ -138,8 +138,8 @@ void FuLineEnd::DoExecute( SfxRequest& )
}
else
{
- ScopedVclPtr<WarningBox> aWarningBox(new WarningBox( mpWindow, WinBits( WB_OK ),
- SD_RESSTR( STR_WARN_NAME_DUPLICATE ) ) );
+ ScopedVclPtrInstance<WarningBox> aWarningBox( 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 4143f0c0892d..f7d355f7d906 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -351,11 +351,11 @@ const SfxItemSet* FuPage::ExecuteDialog( ::vcl::Window* pParent )
// notice-masterpage (at the moment)
if( ePageKind != PK_NOTES )
{
- ScopedVclPtr<MessBox> aQuestionBox (new MessBox(
+ ScopedVclPtrInstance<MessBox> aQuestionBox (
pParent,
WB_YES_NO | WB_DEF_YES,
SD_RESSTR(STR_PAGE_BACKGROUND_TITLE),
- SD_RESSTR(STR_PAGE_BACKGROUND_TXT) ) );
+ SD_RESSTR(STR_PAGE_BACKGROUND_TXT) );
aQuestionBox->SetImage( QueryBox::GetStandardImage() );
bSetToAllPages = ( RET_YES == aQuestionBox->Execute() );
}
diff --git a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
index ea82e2a3804a..5f4199f153c1 100644
--- a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
+++ b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
@@ -134,10 +134,8 @@ void InsertionIndicatorOverlay::Create (
// Create virtual devices for bitmap and mask whose bitmaps later be
// combined to form the BitmapEx of the icon.
- ScopedVclPtr<VirtualDevice> pContent( new VirtualDevice (
- *mrSlideSorter.GetContentWindow(),
- 0,
- 0) );
+ ScopedVclPtrInstance<VirtualDevice> pContent(
+ *mrSlideSorter.GetContentWindow(), 0, 0);
pContent->SetOutputSizePixel(aIconSize);
pContent->SetFillColor();
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 59ed7a161fd5..d3e44fb3561e 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1301,10 +1301,10 @@ public:
// Show warning that the orientation could not be set.
if (pViewShell)
{
- ScopedVclPtr<WarningBox> aWarnBox(new WarningBox(
+ ScopedVclPtrInstance<WarningBox> aWarnBox(
pViewShell->GetActiveWindow(),
(WinBits)(WB_OK_CANCEL | WB_DEF_CANCEL),
- SD_RESSTR(STR_WARN_PRINTFORMAT_FAILURE)));
+ SD_RESSTR(STR_WARN_PRINTFORMAT_FAILURE));
if (aWarnBox->Execute() != RET_OK)
return;
}
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index c14c68f1793a..b9d97b12b19b 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -1109,10 +1109,10 @@ 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.
- ScopedVclPtr<QueryBox> aQuestionBox (new QueryBox(
+ ScopedVclPtrInstance<QueryBox> aQuestionBox (
NULL,
WB_YES_NO | WB_DEF_YES,
- SD_RESSTR(nStringId)));
+ SD_RESSTR(nStringId));
aQuestionBox->SetImage (QueryBox::GetStandardImage());
sal_uInt16 nBoxResult = ShowModalMessageBox(*aQuestionBox.get());
bDoWrapArround = (nBoxResult == RET_YES);
@@ -1157,8 +1157,8 @@ void Outliner::PrepareSpellCheck (void)
{
mbError = true;
mbEndOfSearch = true;
- ScopedVclPtr<MessageDialog> aErrorBox (new MessageDialog(NULL,
- SD_RESSTR(STR_NOLANGUAGE)));
+ ScopedVclPtrInstance<MessageDialog> aErrorBox (nullptr
+ SD_RESSTR(STR_NOLANGUAGE));
ShowModalMessageBox (*aErrorBox.get());
}
else if (eState != EE_SPELL_OK)
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index fefb13b71b41..b6a1e340c5aa 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -533,10 +533,10 @@ sal_uInt16 ViewShellBase::SetPrinter (
bool bScaleAll = false;
if ( bIsAPI )
{
- ScopedVclPtr<WarningBox> aWarnBox (new WarningBox(
+ ScopedVclPtrInstance<WarningBox> aWarnBox (
GetWindow(),
(WinBits)(WB_YES_NO | WB_DEF_YES),
- SD_RESSTR(STR_SCALE_OBJS_TO_PAGE)));
+ SD_RESSTR(STR_SCALE_OBJS_TO_PAGE));
bScaleAll = (aWarnBox->Execute() == RET_YES);
}
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index f780db94fcd6..3ea2b88a32de 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1422,10 +1422,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
|| aLayerName.isEmpty() )
{
// name already exists
- ScopedVclPtr<WarningBox> aWarningBox (new WarningBox(
+ ScopedVclPtrInstance<WarningBox> aWarningBox (
GetParentWindow(),
WinBits( WB_OK ),
- SD_RESSTR(STR_WARN_NAME_DUPLICATE)));
+ SD_RESSTR(STR_WARN_NAME_DUPLICATE));
aWarningBox->Execute();
}
else
@@ -1591,10 +1591,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
aLayerName != aOldLayerName) || aLayerName.isEmpty() )
{
// name already exists
- ScopedVclPtr<WarningBox> aWarningBox (new WarningBox(
+ ScopedVclPtrInstance<WarningBox> aWarningBox (
GetParentWindow(),
WinBits( WB_OK ),
- SD_RESSTR(STR_WARN_NAME_DUPLICATE)));
+ SD_RESSTR(STR_WARN_NAME_DUPLICATE));
aWarningBox->Execute();
}
else
diff --git a/sd/source/ui/view/drviewsi.cxx b/sd/source/ui/view/drviewsi.cxx
index f926b7ebac46..930e9b0305ce 100644
--- a/sd/source/ui/view/drviewsi.cxx
+++ b/sd/source/ui/view/drviewsi.cxx
@@ -164,9 +164,9 @@ void DrawViewShell::AssignFrom3DWindow()
}
else
{
- ScopedVclPtr<InfoBox> aInfoBox (new InfoBox(
+ ScopedVclPtrInstance<InfoBox> aInfoBox (
GetActiveWindow(),
- SD_RESSTR(STR_ACTION_NOTPOSSIBLE)));
+ SD_RESSTR(STR_ACTION_NOTPOSSIBLE));
aInfoBox->Execute();
}
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 2fcaa8ec9d94..b021cc1144fc 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -831,9 +831,9 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
SolarMutexGuard aGuard;
vcl::Window *pWindow = SfxGetpApp()->GetTopWindow();
- ScopedVclPtr<MessageDialog> aSecurityWarningBox(new MessageDialog(pWindow,
+ ScopedVclPtrInstance<MessageDialog> aSecurityWarningBox(pWindow,
SfxResId(STR_SECURITY_WARNING_NO_HYPERLINKS),
- VCL_MESSAGE_WARNING));
+ VCL_MESSAGE_WARNING);
aSecurityWarningBox->SetText( SfxResId(RID_SECURITY_WARNING_TITLE).toString() );
aSecurityWarningBox->Execute();
return;
diff --git a/sfx2/source/appl/openuriexternally.cxx b/sfx2/source/appl/openuriexternally.cxx
index 4dc04f206fdb..beb4deed9ec3 100644
--- a/sfx2/source/appl/openuriexternally.cxx
+++ b/sfx2/source/appl/openuriexternally.cxx
@@ -44,8 +44,8 @@ bool sfx2::openUriExternally(
"unexpected IllegalArgumentException: " + e.Message);
}
SolarMutexGuard g;
- ScopedVclPtr<MessageDialog> eb(new MessageDialog(
- SfxGetpApp()->GetTopWindow(), SfxResId(STR_NO_ABS_URI_REF)));
+ ScopedVclPtrInstance<MessageDialog> eb(
+ SfxGetpApp()->GetTopWindow(), SfxResId(STR_NO_ABS_URI_REF));
eb->set_primary_text(eb->get_primary_text().replaceFirst("$(ARG1)", uri));
eb->Execute();
} catch (css::system::SystemShellExecuteException &) {
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 148bb159ff10..25f0f099bd89 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -403,7 +403,7 @@ SfxHelpWindow_Impl* impl_createHelp(Reference< XFrame2 >& rHelpTask ,
// create all internal windows and sub frames ...
Reference< ::com::sun::star::awt::XWindow > xParentWindow = xHelpTask->getContainerWindow();
vcl::Window* pParentWindow = VCLUnoHelper::GetWindow( xParentWindow );
- VclPtr<SfxHelpWindow_Impl> pHelpWindow = new SfxHelpWindow_Impl( xHelpTask, pParentWindow, WB_DOCKBORDER );
+ VclPtrInstance<SfxHelpWindow_Impl> pHelpWindow( xHelpTask, pParentWindow, WB_DOCKBORDER );
Reference< ::com::sun::star::awt::XWindow > xHelpWindow = VCLUnoHelper::GetInterface( pHelpWindow );
Reference< XFrame > xHelpContent;
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index 0313bbfa0afd..6260f5aa2b38 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -335,8 +335,8 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, RecordChangesCBToggleHdl)
bool bAlreadyDone = false;
if (!m_bEndRedliningWarningDone)
{
- ScopedVclPtr<WarningBox> aBox(new WarningBox(m_rMyTabPage.GetParent(), WinBits(WB_YES_NO | WB_DEF_NO),
- m_aEndRedliningWarning ));
+ ScopedVclPtrInstance<WarningBox> aBox(m_rMyTabPage.GetParent(), WinBits(WB_YES_NO | WB_DEF_NO),
+ m_aEndRedliningWarning );
if (aBox->Execute() != RET_YES)
bAlreadyDone = true;
else
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index cbe8217dd03e..2274e61aa2d8 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1818,11 +1818,11 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl(void *)
if ( bUsedStyle )
{
#if defined UNX
- ScopedVclPtr<MessageDialog> aBox(new MessageDialog(SfxGetpApp()->GetTopWindow(), aMsg,
- VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance<MessageDialog> aBox(SfxGetpApp()->GetTopWindow(), aMsg,
+ VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
#else
- ScopedVclPtr<MessageDialog> aBox(new MessageDialog(GetWindow(), aMsg,
- VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance<MessageDialog> aBox(GetWindow(), aMsg,
+ VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
#endif
aApproved = aBox->Execute() == RET_YES;
}
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 3837720d1733..f6369f31b234 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -666,8 +666,8 @@ sal_Int8 ModelData_Impl::CheckSaveAcceptable( sal_Int8 nCurStatus )
{
// notify the user that SaveAs is going to be done
vcl::Window* pWin = SfxStoringHelper::GetModelWindow( m_xModel );
- ScopedVclPtr<MessageDialog> aMessageBox(new MessageDialog(pWin, SfxResId(STR_NEW_FILENAME_SAVE),
- VCL_MESSAGE_QUESTION, VCL_BUTTONS_OK_CANCEL));
+ ScopedVclPtrInstance<MessageDialog> aMessageBox(pWin, SfxResId(STR_NEW_FILENAME_SAVE),
+ VCL_MESSAGE_QUESTION, VCL_BUTTONS_OK_CANCEL);
if ( aMessageBox->Execute() == RET_OK )
nResult = STATUS_SAVEAS;
else
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 5d156eb7a43d..b943bb13bec9 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -638,7 +638,7 @@ IMPL_LINK(SfxTemplateManagerDlg, RepositoryMenuSelectHdl, Menu*, pMenu)
else
{
OUString aMsg(SfxResId(STR_MSG_ERROR_REPOSITORY_NAME).toString());
- aMsg = aMsg.replaceFirst("$1",xPlace->GetName());
+ aMsg = aMsg.replaceFirst("$1", xPlace->GetName());
ScopedVclPtrInstance<MessageDialog>(this, aMsg)->Execute();
}
}
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index adbea8f641b5..ca5002a58ffc 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -495,8 +495,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
if ( nOpenMode == SFX_STREAM_READWRITE && !rReq.IsAPI() )
{
// ::com::sun::star::sdbcx::User offering to open it as a template
- ScopedVclPtr<MessageDialog> aBox(new MessageDialog(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE),
- VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance<MessageDialog> aBox(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE),
+ VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
if ( RET_YES == aBox->Execute() )
{
SfxApplication* pApp = SfxGetpApp();
@@ -579,8 +579,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
if ( bDo && GetFrame().DocIsModified_Impl() &&
!rReq.IsAPI() && ( !pSilentItem || !pSilentItem->GetValue() ) )
{
- ScopedVclPtr<MessageDialog> aBox(new MessageDialog(&GetWindow(), SfxResId(STR_QUERY_LASTVERSION),
- VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance<MessageDialog> aBox(&GetWindow(), SfxResId(STR_QUERY_LASTVERSION),
+ VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
bDo = ( RET_YES == aBox->Execute() );
}
@@ -756,8 +756,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
if ( bForEdit && SID_EDITDOC == rReq.GetSlot() )
{
// ask user for opening as template
- ScopedVclPtr<MessageDialog> aBox(new MessageDialog(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE),
- VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance<MessageDialog> aBox(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE),
+ VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
if ( RET_YES == aBox->Execute() )
{
SfxAllItemSet aSet( pApp->GetPool() );
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 8877eb125cb3..b95ad307f1f4 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -451,8 +451,8 @@ IMPL_LINK_NOARG(SfxDialogExecutor_Impl, Execute)
return 0;
// Create Dialog
- VclPtr<SfxPrintOptionsDialog> pDlg(new SfxPrintOptionsDialog( static_cast<vcl::Window*>(_pSetupParent),
- _pViewSh, _pOptions ));
+ VclPtrInstance<SfxPrintOptionsDialog> pDlg( static_cast<vcl::Window*>(_pSetupParent),
+ _pViewSh, _pOptions );
if ( _bHelpDisabled )
pDlg->DisableHelp();
if ( pDlg->Execute() == RET_OK )
@@ -820,7 +820,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
nDialogRet = 0;
// execute PrinterSetupDialog
- VclPtr<PrinterSetupDialog> pPrintSetupDlg = new PrinterSetupDialog( GetWindow() );
+ VclPtrInstance<PrinterSetupDialog> pPrintSetupDlg( GetWindow() );
SfxDialogExecutor_Impl* pExecutor = 0;
if (pImp->m_bHasPrintOptions && HasPrintOptionsPage())
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index f9752e89292b..a44c414b8b25 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -607,7 +607,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
{
if ( !sPrinterName.isEmpty() )
{
- VclPtr<SfxPrinter> pNewPrinter = new SfxPrinter ( pPrinter->GetOptions().Clone(), sPrinterName );
+ VclPtrInstance<SfxPrinter> pNewPrinter( pPrinter->GetOptions().Clone(), sPrinterName );
if (pNewPrinter->IsKnown())
pDocSh->SetPrinter ( pNewPrinter );
else
diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx
index d280de9b32ab..c2d4ad299e7d 100644
--- a/svtools/source/java/javainteractionhandler.cxx
+++ b/svtools/source/java/javainteractionhandler.cxx
@@ -158,8 +158,8 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque
SolarMutexGuard aSolarGuard;
m_bJavaDisabled_Handled = true;
// Java disabled. Give user a chance to enable Java inside Office.
- ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog(NULL, "JavaDisabledDialog",
- "svt/ui/javadisableddialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aQueryBox(nullptr , "JavaDisabledDialog",
+ "svt/ui/javadisableddialog.ui");
nResult = aQueryBox->Execute();
if ( nResult == RET_YES )
{
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index 1c3112900601..ba659b0c2bed 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -520,9 +520,8 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx )
m_pStbStatus->Invalidate();
else if ( bGraphicLinked )
{
- ScopedVclPtr<MessageDialog> aQBox(new MessageDialog(this, "QueryUnlinkGraphicsDialog",
- "svx/ui/queryunlinkgraphicsdialog.ui"));
-
+ ScopedVclPtrInstance<MessageDialog> aQBox(this, "QueryUnlinkGraphicsDialog",
+ "svx/ui/queryunlinkgraphicsdialog.ui");
if (aQBox->Execute() != RET_YES)
{
bPipette = false;
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 3460eca90a89..ea4f4c6ad6b1 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -998,8 +998,8 @@ namespace svxform
{
SAL_WARN( "svx.form", "XFormsPage::RemoveEntry(): exception caught" );
}
- ScopedVclPtr<MessageDialog> aQBox(new MessageDialog(this, SVX_RES(nResId),
- VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance<MessageDialog> aQBox(this, SVX_RES(nResId),
+ VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
OUString sMessText = aQBox->get_primary_text();
sMessText = sMessText.replaceFirst( sSearch, sName);
aQBox->set_primary_text(sMessText);
@@ -1604,8 +1604,8 @@ namespace svxform
}
else if (sIdent == "modelsremove")
{
- ScopedVclPtr<MessageDialog> aQBox(new MessageDialog(this, SVX_RES( RID_STR_QRY_REMOVE_MODEL),
- VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance<MessageDialog> aQBox(this, SVX_RES( RID_STR_QRY_REMOVE_MODEL),
+ VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
OUString sText = aQBox->get_primary_text();
sText = sText.replaceFirst( MODELNAME, sSelectedModel );
aQBox->set_primary_text(sText);
@@ -1705,8 +1705,8 @@ namespace svxform
if ( pPage )
{
OUString sInstName = pPage->GetInstanceName();
- ScopedVclPtr<MessageDialog> aQBox(new MessageDialog(this, SVX_RES(RID_STR_QRY_REMOVE_INSTANCE),
- VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance<MessageDialog> aQBox(this, SVX_RES(RID_STR_QRY_REMOVE_INSTANCE),
+ VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
OUString sMessText = aQBox->get_primary_text();
sMessText = sMessText.replaceFirst( INSTANCENAME, sInstName );
aQBox->set_primary_text(sMessText);
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index b4645703e82f..69514c7d37a9 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -269,8 +269,8 @@ bool FmFormShell::PrepareClose(bool bUI)
if ( bModified && bUI )
{
- ScopedVclPtr<MessageDialog> aQry(new MessageDialog(NULL, "SaveModifiedDialog",
- "svx/ui/savemodifieddialog.ui"));
+ ScopedVclPtr<MessageDialog> aQry(nullptr, "SaveModifiedDialog",
+ "svx/ui/savemodifieddialog.ui");
switch (aQry->Execute())
{
case RET_NO:
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 1b80f0e4a2dd..c7306c0d7a00 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -732,9 +732,9 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
aCropDlgAttr.Put( SdrGrafCropItem( aLTSize.Width(), aLTSize.Height(),
aRBSize.Width(), aRBSize.Height() ) );
- ScopedVclPtr<SfxSingleTabDialog> aCropDialog(new SfxSingleTabDialog(
+ ScopedVclPtrInstance<SfxSingleTabDialog> aCropDialog(
SfxViewShell::Current() ? SfxViewShell::Current()->GetWindow() : NULL,
- aCropDlgAttr));
+ aCropDlgAttr);
const OUString aCropStr(SVX_RESSTR(RID_SVXSTR_GRAFCROP));
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx
index 2f3eebef0384..693cae055133 100644
--- a/svx/source/unodraw/recoveryui.cxx
+++ b/svx/source/unodraw/recoveryui.cxx
@@ -245,7 +245,7 @@ bool RecoveryUI::impl_doEmergencySave()
css::uno::Reference< css::frame::XStatusListener > xCore(pCore);
// create dialog for this operation and bind it to the used core service
- VclPtr<Dialog> xDialog(new svxdr::SaveDialog(m_pParentWindow, pCore));
+ VclPtrInstance<svxdr::SaveDialog> xDialog(m_pParentWindow, pCore);
// start the dialog
short nRet = xDialog->Execute();
@@ -260,7 +260,7 @@ void RecoveryUI::impl_doRecovery()
// create all needed dialogs for this operation
// and bind it to the used core service
- VclPtr<Dialog> xDialog(new svxdr::RecoveryDialog(m_pParentWindow, pCore));
+ VclPtrInstance<svxdr::RecoveryDialog> xDialog(m_pParentWindow, pCore);
// start the dialog
xDialog->Execute();
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index c7efe3c331eb..f39d145e1bcf 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -464,7 +464,7 @@ void SwViewShell::ImplUnlockPaint( bool bVirDev )
if ( (bInSizeNotify || bVirDev ) && VisArea().HasArea() )
{
//Refresh with virtual device to avoid flickering.
- VclPtr<VirtualDevice> pVout = new VirtualDevice( *mpOut );
+ VclPtrInstance<VirtualDevice> pVout( *mpOut );
pVout->SetMapMode( mpOut->GetMapMode() );
Size aSize( VisArea().SSize() );
aSize.Width() += 20;
@@ -1207,7 +1207,7 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect
//create virtual device and set.
const Size aPixSz = GetWin()->PixelToLogic(Size(1,1));
- VclPtr<VirtualDevice> pVout = new VirtualDevice( *GetWin() );
+ VclPtrInstance<VirtualDevice> pVout( *GetWin() );
pVout->SetLineColor( GetWin()->GetLineColor() );
pVout->SetFillColor( GetWin()->GetFillColor() );
MapMode aMapMode( GetWin()->GetMapMode() );
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index d187795f43a6..655114e865c2 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -319,8 +319,8 @@ IMPL_LINK_NOARG(SwCompatibilityOptPage, SelectHdl)
IMPL_LINK_NOARG(SwCompatibilityOptPage, UseAsDefaultHdl)
{
- ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(this, "QueryDefaultCompatDialog",
- "modules/swriter/ui/querydefaultcompatdialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aQuery(this, "QueryDefaultCompatDialog",
+ "modules/swriter/ui/querydefaultcompatdialog.ui");
if (aQuery->Execute() == RET_YES)
{
for ( vector< CompatibilityItem >::iterator pItem = m_pImpl->m_aList.begin();
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index 82f7116e43a9..bdb8992004c1 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -1077,8 +1077,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
if(m_pSubjectED->GetText().isEmpty())
{
- ScopedVclPtr<SwSendQueryBox_Impl> aQuery(new SwSendQueryBox_Impl(pButton, "SubjectDialog",
- "modules/swriter/ui/subjectdialog.ui"));
+ ScopedVclPtrInstance<SwSendQueryBox_Impl> aQuery(pButton, "SubjectDialog",
+ "modules/swriter/ui/subjectdialog.ui");
aQuery->SetIsEmptyTextAllowed(true);
aQuery->SetValue(m_sNoSubjectST);
if(RET_OK == aQuery->Execute())
@@ -1091,8 +1091,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
}
if(!bAsBody && m_pAttachmentED->GetText().isEmpty())
{
- ScopedVclPtr<SwSendQueryBox_Impl> aQuery(new SwSendQueryBox_Impl(pButton, "AttachNameDialog",
- "modules/swriter/ui/attachnamedialog.ui"));
+ ScopedVclPtrInstance<SwSendQueryBox_Impl> aQuery(pButton, "AttachNameDialog",
+ "modules/swriter/ui/attachnamedialog.ui");
aQuery->SetIsEmptyTextAllowed(false);
if(RET_OK == aQuery->Execute())
{
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index 3a4b9fdfb40b..ee31bc5d3841 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -649,8 +649,8 @@ IMPL_LINK_NOARG(SwSaveLabelDlg, OkHdl)
return 0;
}
- ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(this, "QuerySaveLabelDialog",
- "modules/swriter/ui/querysavelabeldialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aQuery(this, "QuerySaveLabelDialog",
+ "modules/swriter/ui/querysavelabeldialog.ui");
aQuery->set_primary_text(aQuery->get_primary_text().
replaceAll("%1", sMake).replaceAll("%2", sType));
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index e65a90414f75..ccf04859f8eb 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1478,9 +1478,9 @@ IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox)
IMPL_LINK(SwTOXSelectTabPage, AddStylesHdl, PushButton*, pButton)
{
- VclPtr<SwAddStylesDlg_Impl> pDlg(new SwAddStylesDlg_Impl(pButton,
- static_cast<SwMultiTOXTabDialog*>(GetTabDialog())->GetWrtShell(),
- aStyleArr));
+ VclPtr<SwAddStylesDlg_Impl> pDlg(pButton,
+ static_cast<SwMultiTOXTabDialog*>(GetTabDialog())->GetWrtShell(),
+ aStyleArr);
pDlg->Execute();
pDlg.reset();
ModifyHdl(0);
@@ -1514,8 +1514,8 @@ IMPL_LINK(SwTOXSelectTabPage, MenuExecuteHdl, Menu*, pMenu)
return 0;
}
- VclPtr<SwAutoMarkDlg_Impl> pAutoMarkDlg(new SwAutoMarkDlg_Impl(
- m_pAutoMarkPB, sAutoMarkURL, bNew ));
+ VclPtrInstance<SwAutoMarkDlg_Impl> pAutoMarkDlg(
+ m_pAutoMarkPB, sAutoMarkURL, bNew );
if( RET_OK != pAutoMarkDlg->Execute() && bNew )
sAutoMarkURL = sSaveAutoMarkURL;
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 159d3310830f..34ca667d31be 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -1248,9 +1248,9 @@ IMPL_LINK(SwAuthorMarkPane, CreateEntryHdl, PushButton*, pButton)
OUString sOldId = m_sCreatedEntry[0];
for(int i = 0; i < AUTH_FIELD_END; i++)
m_sCreatedEntry[i] = bCreate ? OUString() : m_sFields[i];
- ScopedVclPtr<SwCreateAuthEntryDlg_Impl> aDlg(new SwCreateAuthEntryDlg_Impl(pButton,
+ ScopedVclPtrInstance<SwCreateAuthEntryDlg_Impl> aDlg(pButton,
bCreate ? m_sCreatedEntry : m_sFields,
- *pSh, bNewEntry, bCreate));
+ *pSh, bNewEntry, bCreate);
if(bNewEntry)
{
aDlg->SetCheckNameHdl(LINK(this, SwAuthorMarkPane, IsEntryAllowedHdl));
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 985641c52f17..be6bf1546d8a 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -503,8 +503,8 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn )
else if (sItemIdent == "rename")
{
m_pShortNameEdit->SetText(pGlossaryHdl->GetGlossaryShortName(m_pNameED->GetText()));
- ScopedVclPtr<SwNewGlosNameDlg> pNewNameDlg(new SwNewGlosNameDlg(this, m_pNameED->GetText(),
- m_pShortNameEdit->GetText() ));
+ ScopedVclPtrInstance<SwNewGlosNameDlg> pNewNameDlg(this, m_pNameED->GetText(),
+ m_pShortNameEdit->GetText());
if( RET_OK == pNewNameDlg->Execute() &&
pGlossaryHdl->Rename( m_pShortNameEdit->GetText(),
pNewNameDlg->GetNewShort(),
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index 977d25f6743d..d4d92db414c9 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -315,10 +315,8 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl)
bool bOk = false, bFmtInserted = false;
while( !bOk )
{
- VclPtr<SwStringInputDlg> pDlg(new SwStringInputDlg( this,
- aStrTitle,
- aStrLabel,
- OUString() ));
+ VclPtrInstance<SwStringInputDlg> pDlg( this, aStrTitle,
+ aStrLabel, OUString() );
if( RET_OK == pDlg->Execute() )
{
const OUString aFormatName( pDlg->GetInputString() );
@@ -377,8 +375,8 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RemoveHdl)
aMessage += m_pLbFormat->GetSelectEntry();
aMessage += "\n";
- VclPtr<MessBox> pBox(new MessBox( this, WinBits( WB_OK_CANCEL ),
- aStrDelTitle, aMessage));
+ VclPtrInstance<MessBox> pBox( this, WinBits( WB_OK_CANCEL ),
+ aStrDelTitle, aMessage );
if ( pBox->Execute() == RET_OK )
{
@@ -412,10 +410,9 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl)
bool bOk = false;
while( !bOk )
{
- VclPtr<SwStringInputDlg> pDlg(new SwStringInputDlg( this,
- aStrRenameTitle,
- m_pLbFormat->GetSelectEntry(),
- OUString() ));
+ VclPtrInstance<SwStringInputDlg> pDlg( this, aStrRenameTitle,
+ m_pLbFormat->GetSelectEntry(),
+ OUString() );
if( pDlg->Execute() == RET_OK )
{
bool bFmtRenamed = false;
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index c42759275ea4..3a0f64b00ed8 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -608,8 +608,8 @@ void SwDocShell::Execute(SfxRequest& rReq)
const SfxFilter* pFlt = GetMedium()->GetFilter();
if(!pFlt || pFlt->GetUserData() != pHtmlFlt->GetUserData())
{
- ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(&pViewFrm->GetWindow(),
- "SaveAsHTMLDialog", "modules/swriter/ui/saveashtmldialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aQuery(&pViewFrm->GetWindow(),
+ "SaveAsHTMLDialog", "modules/swriter/ui/saveashtmldialog.ui");
if(RET_YES == aQuery->Execute())
bLocalHasName = false;
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index c9aa36fd544e..83640f5e6e17 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -356,8 +356,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
{
case SID_STYLE_NEW_BY_EXAMPLE:
{
- VclPtr<SfxNewStyleDlg> pDlg(new SfxNewStyleDlg( 0,
- *GetStyleSheetPool()));
+ VclPtrInstance<SfxNewStyleDlg> pDlg( 0, *GetStyleSheetPool());
if(RET_OK == pDlg->Execute())
{
aParam = pDlg->GetName();
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 2f1180061991..d3a0a500eab3 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -735,8 +735,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
break;
case TBLMERGE_TOOCOMPLEX:
{
- ScopedVclPtr<MessageDialog> aInfoBox(new MessageDialog( GetView().GetWindow(),
- SW_RES( STR_ERR_TABLE_MERGE ), VCL_MESSAGE_INFO ) );
+ ScopedVclPtrInstance<MessageDialog> aInfoBox( GetView().GetWindow(),
+ SW_RES( STR_ERR_TABLE_MERGE ), VCL_MESSAGE_INFO );
aInfoBox->Execute();
break;
}
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index b1dcea637cab..a3d46c0e1e55 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -257,9 +257,9 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
static short lcl_AskRedlineMode(vcl::Window *pWin)
{
- ScopedVclPtr<MessBox> aQBox(new MessBox( pWin, 0,
+ ScopedVclPtrInstance<MessBox> aQBox( pWin, 0,
OUString( SW_RES( STR_REDLINE_TITLE ) ),
- OUString( SW_RES( STR_REDLINE_MSG ) ) ) );
+ OUString( SW_RES( STR_REDLINE_MSG ) ) );
aQBox->SetImage( QueryBox::GetStandardImage() );
const sal_uInt16 nBtnFlags = BUTTONDIALOG_DEFBUTTON |
BUTTONDIALOG_OKBUTTON |
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index e408b3e81756..314eccf5e12e 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -2287,9 +2287,9 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
if ( lcl_NeedAdditionalDataSource( xDBContext ) )
{
// no data sources are available - create a new one
- ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(&GetViewFrame()->GetWindow(),
+ ScopedVclPtrInstance<MessageDialog> aQuery(&GetViewFrame()->GetWindow(),
"DataSourcesUnavailableDialog",
- "modules/swriter/ui/datasourcesunavailabledialog.ui"));
+ "modules/swriter/ui/datasourcesunavailabledialog.ui");
// no cancel allowed
if (RET_OK != aQuery->Execute())
return;
@@ -2336,9 +2336,9 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
OUString sSource;
if(!GetWrtShell().IsFieldDataSourceAvailable(sSource))
{
- ScopedVclPtr<MessageDialog> aWarning(new MessageDialog(&GetViewFrame()->GetWindow(),
+ ScopedVclPtrInstance<MessageDialog> aWarning(&GetViewFrame()->GetWindow(),
"WarnDataSourceDialog",
- "modules/swriter/ui/warndatasourcedialog.ui"));
+ "modules/swriter/ui/warndatasourcedialog.ui");
OUString sTmp(aWarning->get_primary_text());
aWarning->set_primary_text(sTmp.replaceFirst("%1", sSource));
if (RET_OK == aWarning->Execute())
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index af45b47ce266..f3b963724472 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -201,8 +201,8 @@ void SwView::ExecutePrint(SfxRequest& rReq)
if(!bSilent && !bFromMerge &&
SW_MOD()->GetModuleConfig()->IsAskForMailMerge() && pSh->IsAnyDatabaseFieldInDoc())
{
- ScopedVclPtr<MessageDialog> aBox(new MessageDialog(&GetEditWin(), "PrintMergeDialog",
- "modules/swriter/ui/printmergedialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aBox(&GetEditWin(), "PrintMergeDialog",
+ "modules/swriter/ui/printmergedialog.ui");
short nRet = aBox->Execute();
if(RET_YES == nRet)
{
diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx
index 9ae2d42068f2..9706e419618d 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx
@@ -388,7 +388,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
SfxPrinter* pPrinter = mpDoc->getIDocumentDeviceAccess().getPrinter( true );
if ( OUString ( pPrinter->GetName()) != sPrinterName )
{
- VclPtr<SfxPrinter> pNewPrinter = new SfxPrinter ( pPrinter->GetOptions().Clone(), sPrinterName );
+ VclPtrInstance<SfxPrinter> pNewPrinter( pPrinter->GetOptions().Clone(), sPrinterName );
assert (! pNewPrinter->isDisposed() );
if( pNewPrinter->IsKnown() )
{
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index ba0608021c35..f8ec35ec28f3 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -1059,8 +1059,8 @@ NameClashResolveDialogResult executeSimpleNameClashResolveDialog( vcl::Window *p
if ( !xManager.get() )
return ABORT;
- ScopedVclPtr<NameClashDialog> aDialog(new NameClashDialog(pParent, xManager.get(), rTargetFolderURL,
- rClashingName, rProposedNewName, bAllowOverwrite) );
+ ScopedVclPtrInstance<NameClashDialog> aDialog(pParent, xManager.get(), rTargetFolderURL,
+ rClashingName, rProposedNewName, bAllowOverwrite);
NameClashResolveDialogResult eResult = (NameClashResolveDialogResult) aDialog->Execute();
rProposedNewName = aDialog->getNewName();
@@ -1207,8 +1207,8 @@ UUIInteractionHelper::handleMacroConfirmRequest(
if ( pResMgr.get() )
{
bool bShowSignatures = aSignInfo.getLength() > 0;
- ScopedVclPtr<MacroWarning> aWarning(new MacroWarning(
- getParentProperty(), bShowSignatures, *pResMgr.get()) );
+ ScopedVclPtrInstance<MacroWarning> aWarning(
+ getParentProperty(), bShowSignatures, *pResMgr.get() );
aWarning->SetDocumentURL( aDocumentURL );
if ( aSignInfo.getLength() > 1 )
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index bacb9e441ceb..8f5a0362c9e0 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -222,8 +222,8 @@ bool DocumentDigitalSignatures::ImplViewSignatures(
DocumentSignatureMode eMode, bool bReadOnly ) throw (RuntimeException, std::exception)
{
bool bChanges = false;
- ScopedVclPtr<DigitalSignaturesDialog> aSignaturesDialog(new DigitalSignaturesDialog(
- NULL, mxCtx, eMode, bReadOnly, m_sODFVersion, m_bHasDocumentSignature));
+ ScopedVclPtrInstance<DigitalSignaturesDialog> aSignaturesDialog(
+ NULL, mxCtx, eMode, bReadOnly, m_sODFVersion, m_bHasDocumentSignature);
bool bInit = aSignaturesDialog->Init();
DBG_ASSERT( bInit, "Error initializing security context!" );
if ( bInit )