summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/cfg.cxx2
-rw-r--r--cui/source/dialogs/passwdomdlg.cxx4
-rw-r--r--cui/source/dialogs/scriptdlg.cxx3
-rw-r--r--cui/source/options/optchart.cxx4
-rw-r--r--cui/source/options/optlingu.cxx4
-rw-r--r--cui/source/tabpages/tpbitmap.cxx13
-rw-r--r--cui/source/tabpages/tpcolor.cxx20
-rw-r--r--cui/source/tabpages/tpgradnt.cxx14
-rw-r--r--cui/source/tabpages/tphatch.cxx14
-rw-r--r--cui/source/tabpages/tplnedef.cxx27
-rw-r--r--cui/source/tabpages/tplneend.cxx25
11 files changed, 64 insertions, 66 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 032cabb939bc..44228cbd1961 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -2393,7 +2393,7 @@ short SvxMenuConfigPage::QueryReset()
OUString label = replaceSaveInName( msg, saveInName );
- ScopedVclPtr<QueryBox> qbox(new QueryBox( this, WB_YES_NO, label ));
+ ScopedVclPtrInstance<QueryBox> qbox( this, WB_YES_NO, label );
return qbox->Execute();
}
diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx
index e59e58183181..eade758348a5 100644
--- a/cui/source/dialogs/passwdomdlg.cxx
+++ b/cui/source/dialogs/passwdomdlg.cxx
@@ -101,8 +101,8 @@ IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG
m_pPasswdToModifyED->GetText().isEmpty();
if (bInvalidState)
{
- ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(m_pParent,
- m_bIsPasswordToModify? m_aInvalidStateForOkButton : m_aInvalidStateForOkButton_v2));
+ ScopedVclPtrInstance<MessageDialog> aErrorBox(m_pParent,
+ m_bIsPasswordToModify? m_aInvalidStateForOkButton : m_aInvalidStateForOkButton_v2);
aErrorBox->Execute();
}
else // check for mismatched passwords...
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index c4c5b0df039c..0727f440c121 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -1498,11 +1498,10 @@ IMPL_LINK( SvxScriptErrorDialog, ShowDialog, OUString*, pMessage )
message = OUString( CUI_RES( RID_SVXSTR_ERROR_TITLE ) );
}
- VclPtr<MessageDialog> pBox = new MessageDialog(NULL, message, VCL_MESSAGE_WARNING);
+ ScopedVclPtrInstance<MessageDialog> pBox( nullptr, message, VCL_MESSAGE_WARNING );
pBox->SetText( CUI_RES( RID_SVXSTR_ERROR_TITLE ) );
pBox->Execute();
- pBox.disposeAndClear();
delete pMessage;
return 0;
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 87c5dd0af3cf..68fe0181527f 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -231,8 +231,8 @@ IMPL_LINK( SvxDefaultColorOptPage, RemoveChartColor, PushButton*, pButton )
{
OSL_ENSURE(pColorConfig->GetColorList().size() > 1, "don't delete the last chart color");
- ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(pButton, "QueryDeleteChartColorDialog",
- "cui/ui/querydeletechartcolordialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aQuery(pButton, "QueryDeleteChartColorDialog",
+ "cui/ui/querydeletechartcolordialog.ui");
if (RET_YES == aQuery->Execute())
{
pColorConfig->GetColorList().remove( nIndex );
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 018204399319..4ad9c3879284 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1673,8 +1673,8 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn )
}
else if (m_pLinguDicsDelPB == pBtn)
{
- ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(this, "QueryDeleteDictionaryDialog",
- "cui/ui/querydeletedictionarydialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aQuery(this, "QueryDeleteDictionaryDialog",
+ "cui/ui/querydeletedictionarydialog.ui");
if (RET_NO == aQuery->Execute())
return 0;
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index b3b183dab918..fb789dcf02f9 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -446,10 +446,10 @@ long SvxBitmapTabPage::CheckChanges_Impl()
{
ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage();
- ScopedVclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
- SVX_RES( RID_SVXSTR_BITMAP ),
- CUI_RES( RID_SVXSTR_ASK_CHANGE_BITMAP ),
- &aWarningBoxImage ));
+ ScopedVclPtrInstance<SvxMessDialog> aMessDlg( GetParentDialog(),
+ SVX_RES( RID_SVXSTR_BITMAP ),
+ CUI_RES( RID_SVXSTR_ASK_CHANGE_BITMAP ),
+ &aWarningBoxImage );
DBG_ASSERT(aMessDlg, "Dialog creation failed!");
aMessDlg->SetButtonText( MESS_BTN_1, ResId( RID_SVXSTR_CHANGE, rMgr ) );
aMessDlg->SetButtonText( MESS_BTN_2, ResId( RID_SVXSTR_ADD, rMgr ) );
@@ -728,9 +728,10 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickModifyHdl_Impl)
}
else
{
- ScopedVclPtr<MessageDialog> aBox( new MessageDialog(GetParentDialog()
+ ScopedVclPtrInstance<MessageDialog> aBox(
+ GetParentDialog()
,"DuplicateNameDialog"
- ,"cui/ui/queryduplicatedialog.ui"));
+ ,"cui/ui/queryduplicatedialog.ui");
aBox->Execute();
}
}
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 736f68224e6a..ff323782ec3d 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -539,10 +539,10 @@ long SvxColorTabPage::CheckChanges_Impl()
{
ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage();
- ScopedVclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
- SVX_RESSTR( RID_SVXSTR_COLOR ),
- ResId( RID_SVXSTR_ASK_CHANGE_COLOR, rMgr ),
- &aWarningBoxImage ));
+ ScopedVclPtrInstance<SvxMessDialog> aMessDlg( GetParentDialog(),
+ SVX_RESSTR( RID_SVXSTR_COLOR ),
+ ResId( RID_SVXSTR_ASK_CHANGE_COLOR, rMgr ),
+ &aWarningBoxImage );
aMessDlg->SetButtonText( MESS_BTN_1,
ResId( RID_SVXSTR_CHANGE, rMgr ) );
aMessDlg->SetButtonText( MESS_BTN_2,
@@ -705,9 +705,9 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl)
// if yes, it is repeated and a new name is demanded
if ( !bDifferent )
{
- ScopedVclPtr<MessageDialog> aWarningBox(new MessageDialog( GetParentDialog()
- ,"DuplicateNameDialog"
- ,"cui/ui/queryduplicatedialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aWarningBox( GetParentDialog()
+ ,"DuplicateNameDialog"
+ ,"cui/ui/queryduplicatedialog.ui");
aWarningBox->Execute();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
@@ -776,9 +776,9 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickModifyHdl_Impl)
// if yes, it is repeated and a new name is demanded
if ( !bDifferent )
{
- ScopedVclPtr<MessageDialog> aWarningBox(new MessageDialog( GetParentDialog()
- ,"DuplicateNameDialog"
- ,"cui/ui/queryduplicatedialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aWarningBox( GetParentDialog()
+ ,"DuplicateNameDialog"
+ ,"cui/ui/queryduplicatedialog.ui");
aWarningBox->Execute();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 7a388909ebca..daec497a531b 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -291,10 +291,10 @@ long SvxGradientTabPage::CheckChanges_Impl()
{
ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage();
- ScopedVclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
- SVX_RESSTR( RID_SVXSTR_GRADIENT ),
- CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_GRADIENT ),
- &aWarningBoxImage ));
+ ScopedVclPtrInstance<SvxMessDialog> aMessDlg( GetParentDialog(),
+ SVX_RESSTR( RID_SVXSTR_GRADIENT ),
+ CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_GRADIENT ),
+ &aWarningBoxImage );
DBG_ASSERT(aMessDlg, "Dialog creation failed!");
aMessDlg->SetButtonText( MESS_BTN_1,
OUString( ResId( RID_SVXSTR_CHANGE, rMgr ) ) );
@@ -589,9 +589,9 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickModifyHdl_Impl)
}
else
{
- ScopedVclPtr<MessageDialog> aBox( new MessageDialog( GetParentDialog()
- ,"DuplicateNameDialog"
- ,"cui/ui/queryduplicatedialog.ui") );
+ ScopedVclPtrInstance<MessageDialog> aBox( GetParentDialog()
+ ,"DuplicateNameDialog"
+ ,"cui/ui/queryduplicatedialog.ui" );
aBox->Execute();
}
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index d3f1aa33f3bd..800c18bd77ac 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -261,10 +261,10 @@ long SvxHatchTabPage::CheckChanges_Impl()
{
ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage();
- ScopedVclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
- SVX_RESSTR( RID_SVXSTR_HATCH ),
- CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_HATCH ),
- &aWarningBoxImage ));
+ ScopedVclPtrInstance<SvxMessDialog> aMessDlg( GetParentDialog(),
+ SVX_RESSTR( RID_SVXSTR_HATCH ),
+ CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_HATCH ),
+ &aWarningBoxImage );
DBG_ASSERT(aMessDlg, "Dialog creation failed!");
aMessDlg->SetButtonText( MESS_BTN_1,
OUString( ResId( RID_SVXSTR_CHANGE, rMgr ) ) );
@@ -627,9 +627,9 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickModifyHdl_Impl)
}
else
{
- ScopedVclPtr<MessageDialog> aBox(new MessageDialog( GetParentDialog()
- ,"DuplicateNameDialog"
- ,"cui/ui/queryduplicatedialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aBox( GetParentDialog()
+ ,"DuplicateNameDialog"
+ ,"cui/ui/queryduplicatedialog.ui" );
aBox->Execute();
}
}
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 9f1b5ebf3c82..81c0fdb70f75 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -246,10 +246,10 @@ void SvxLineDefTabPage::CheckChanges_Impl()
{
ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage();
- ScopedVclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
- SVX_RESSTR( RID_SVXSTR_LINESTYLE ),
- OUString( ResId( RID_SVXSTR_ASK_CHANGE_LINESTYLE, rMgr ) ),
- &aWarningBoxImage ));
+ ScopedVclPtrInstance<SvxMessDialog> aMessDlg( GetParentDialog(),
+ SVX_RESSTR( RID_SVXSTR_LINESTYLE ),
+ OUString( ResId( RID_SVXSTR_ASK_CHANGE_LINESTYLE, rMgr ) ),
+ &aWarningBoxImage );
DBG_ASSERT(aMessDlg, "Dialog creation failed!");
aMessDlg->SetButtonText( MESS_BTN_1, OUString( ResId( RID_SVXSTR_CHANGE, rMgr ) ) );
aMessDlg->SetButtonText( MESS_BTN_2, OUString( ResId( RID_SVXSTR_ADD, rMgr ) ) );
@@ -618,10 +618,9 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickAddHdl_Impl)
}
else
{
-
- ScopedVclPtr<MessageDialog> aBox(new MessageDialog( GetParentDialog()
- ,"DuplicateNameDialog"
- ,"cui/ui/queryduplicatedialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aBox( GetParentDialog()
+ ,"DuplicateNameDialog"
+ ,"cui/ui/queryduplicatedialog.ui" );
aBox->Execute();
}
}
@@ -697,9 +696,9 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickModifyHdl_Impl)
}
else
{
- ScopedVclPtr<MessageDialog> aBox(new MessageDialog( GetParentDialog()
- ,"DuplicateNameDialog"
- ,"cui/ui/queryduplicatedialog.ui") );
+ ScopedVclPtrInstance<MessageDialog> aBox( GetParentDialog()
+ ,"DuplicateNameDialog"
+ ,"cui/ui/queryduplicatedialog.ui" );
aBox->Execute();
}
}
@@ -715,9 +714,9 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickDeleteHdl_Impl)
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
- ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog()
- ,"AskDelLineStyleDialog"
- ,"cui/ui/querydeletelinestyledialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aQueryBox( GetParentDialog()
+ ,"AskDelLineStyleDialog"
+ ,"cui/ui/querydeletelinestyledialog.ui" );
if ( aQueryBox->Execute() == RET_YES )
{
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index b1fa34570a92..6b43ba93e4c1 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -206,10 +206,9 @@ void SvxLineEndDefTabPage::CheckChanges_Impl()
if( aString != m_pLbLineEnds->GetSelectEntry() )
{
- ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog()
- ,"AskChangeLineEndDialog"
- ,"cui/ui/querychangelineenddialog.ui"));
-
+ ScopedVclPtrInstance<MessageDialog> aQueryBox( GetParentDialog()
+ ,"AskChangeLineEndDialog"
+ ,"cui/ui/querychangelineenddialog.ui" );
if ( aQueryBox->Execute() == RET_YES )
ClickModifyHdl_Impl( this );
}
@@ -343,9 +342,9 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickModifyHdl_Impl)
// if yes, repeat and demand a new name
if ( !bDifferent )
{
- ScopedVclPtr<MessageDialog> aWarningBox(new MessageDialog( GetParentDialog()
- ,"DuplicateNameDialog"
- ,"cui/ui/queryduplicatedialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aWarningBox( GetParentDialog()
+ ,"DuplicateNameDialog"
+ ,"cui/ui/queryduplicatedialog.ui" );
aWarningBox->Execute();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
@@ -497,9 +496,9 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl)
}
else
{
- ScopedVclPtr<MessageDialog> aBox(new MessageDialog( GetParentDialog()
- ,"DuplicateNameDialog"
- ,"cui/ui/queryduplicatedialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aBox( GetParentDialog()
+ ,"DuplicateNameDialog"
+ ,"cui/ui/queryduplicatedialog.ui" );
aBox->Execute();
}
}
@@ -525,9 +524,9 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickDeleteHdl_Impl)
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
- ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog()
- ,"AskDelLineEndDialog"
- ,"cui/ui/querydeletelineenddialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aQueryBox( GetParentDialog()
+ ,"AskDelLineEndDialog"
+ ,"cui/ui/querydeletelineenddialog.ui" );
if ( aQueryBox->Execute() == RET_YES )
{