summaryrefslogtreecommitdiffstats
path: root/cui/source/options
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 /cui/source/options
parentvclptr: document the architecture, sample debugging, FAQ etc. (diff)
downloadcore-61b224f392eb856bf4cfa0c04c68202a463cbdbf.tar.gz
core-61b224f392eb856bf4cfa0c04c68202a463cbdbf.zip
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 'cui/source/options')
-rw-r--r--cui/source/options/dbregister.cxx4
-rw-r--r--cui/source/options/doclinkdialog.cxx6
-rw-r--r--cui/source/options/optchart.cxx2
-rw-r--r--cui/source/options/optcolor.cxx8
-rw-r--r--cui/source/options/optdict.cxx2
-rw-r--r--cui/source/options/optgdlg.cxx2
-rw-r--r--cui/source/options/optinet2.cxx6
-rw-r--r--cui/source/options/optjava.cxx10
-rw-r--r--cui/source/options/optlingu.cxx6
-rw-r--r--cui/source/options/optopencl.cxx2
-rw-r--r--cui/source/options/personalization.cxx2
11 files changed, 25 insertions, 25 deletions
diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx
index e719b47ca093..2170afbac74b 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -278,7 +278,7 @@ IMPL_LINK_NOARG(DbRegistrationOptionsPage, DeleteHdl)
SvTreeListEntry* pEntry = pPathBox->FirstSelected();
if ( pEntry )
{
- VclPtr<MessageDialog> aQuery(new MessageDialog(this, CUI_RES(RID_SVXSTR_QUERY_DELETE_CONFIRM), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(this, CUI_RES(RID_SVXSTR_QUERY_DELETE_CONFIRM), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
if ( aQuery->Execute() == RET_YES )
pPathBox->GetModel()->Remove(pEntry);
}
@@ -414,7 +414,7 @@ void DbRegistrationOptionsPage::insertNewEntry( const OUString& _sName,const OUS
void DbRegistrationOptionsPage::openLinkDialog(const OUString& _sOldName,const OUString& _sOldLocation,SvTreeListEntry* _pEntry)
{
- VclPtr<ODocumentLinkDialog> aDlg(new ODocumentLinkDialog(this,_pEntry == NULL));
+ ScopedVclPtr<ODocumentLinkDialog> aDlg(new ODocumentLinkDialog(this,_pEntry == NULL));
aDlg->setLink(_sOldName,_sOldLocation);
aDlg->setNameValidator(LINK( this, DbRegistrationOptionsPage, NameValidator ) );
diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx
index 7fbe47732ec7..3a5aa6758bf1 100644
--- a/cui/source/options/doclinkdialog.cxx
+++ b/cui/source/options/doclinkdialog.cxx
@@ -130,7 +130,7 @@ namespace svx
{
OUString sMsg = CUI_RES(STR_LINKEDDOC_DOESNOTEXIST);
sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText());
- VclPtr<MessageDialog> aError(new MessageDialog(this, sMsg));
+ ScopedVclPtr<MessageDialog> aError(new MessageDialog(this, sMsg));
aError->Execute();
return 0L;
} // if (!bFileExists)
@@ -139,7 +139,7 @@ namespace svx
{
OUString sMsg = CUI_RES(STR_LINKEDDOC_NO_SYSTEM_FILE);
sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText());
- VclPtr<MessageDialog> aError(new MessageDialog(this, sMsg));
+ ScopedVclPtr<MessageDialog> aError(new MessageDialog(this, sMsg));
aError->Execute();
return 0L;
}
@@ -151,7 +151,7 @@ namespace svx
{
OUString sMsg = CUI_RES(STR_NAME_CONFLICT);
sMsg = sMsg.replaceFirst("$file$", sCurrentText);
- VclPtr<MessageDialog> aError(new MessageDialog(this, sMsg, VCL_MESSAGE_INFO));
+ ScopedVclPtr<MessageDialog> aError(new MessageDialog(this, sMsg, VCL_MESSAGE_INFO));
aError->Execute();
m_pName->SetSelection(Selection(0,sCurrentText.getLength()));
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 9ca96f9b10a9..87c5dd0af3cf 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -231,7 +231,7 @@ IMPL_LINK( SvxDefaultColorOptPage, RemoveChartColor, PushButton*, pButton )
{
OSL_ENSURE(pColorConfig->GetColorList().size() > 1, "don't delete the last chart color");
- VclPtr<MessageDialog> aQuery(new MessageDialog(pButton, "QueryDeleteChartColorDialog",
+ ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(pButton, "QueryDeleteChartColorDialog",
"cui/ui/querydeletechartcolordialog.ui"));
if (RET_YES == aQuery->Execute())
{
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index bce0bfbb96ca..852d0272ca6d 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -553,8 +553,8 @@ void ColorConfigWindow_Impl::CreateEntries()
long nCheckBoxLabelOffset = 0;
{
OUString sSampleText("X");
- VclPtr<CheckBox> aCheckBox(new CheckBox(this));
- VclPtr<FixedText> aFixedText(new FixedText(this));
+ ScopedVclPtr<CheckBox> aCheckBox(new CheckBox(this));
+ ScopedVclPtr<FixedText> aFixedText(new FixedText(this));
aCheckBox->SetText(sSampleText);
aFixedText->SetText(sSampleText);
Size aCheckSize(aCheckBox->CalcMinimumSize(0x7fffffff));
@@ -628,7 +628,7 @@ void ColorConfigWindow_Impl::SetAppearance ()
OSL_ENSURE( vEntries.size() >= sizeof vEntryInfo / sizeof vEntryInfo[0], "wrong number of helpIDs for color listboxes" );
// creating a sample color listbox with the color entries
- VclPtr<ColorListBox> aSampleColorList(new ColorListBox(this));
+ ScopedVclPtr<ColorListBox> aSampleColorList(new ColorListBox(this));
{
XColorListRef const xColorTable = XColorList::CreateStdColorList();
for (sal_Int32 i = 0; i != xColorTable->Count(); ++i)
@@ -1205,7 +1205,7 @@ IMPL_LINK(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, PushButton*, pButton )
else
{
DBG_ASSERT(m_pColorSchemeLB->GetEntryCount() > 1, "don't delete the last scheme");
- VclPtr<MessageDialog> aQuery(new MessageDialog(pButton, CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(pButton, CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
aQuery->SetText(CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE_TITLE));
if(RET_YES == aQuery->Execute())
{
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index 02390097a49a..10620f302705 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -477,7 +477,7 @@ IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectLangHdl_Impl)
if ( nLang != nOldLang )
{
- VclPtr<MessageDialog> aBox(new MessageDialog(this, CUI_RES( RID_SVXSTR_CONFIRM_SET_LANGUAGE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtr<MessageDialog> aBox(new MessageDialog(this, CUI_RES( RID_SVXSTR_CONFIRM_SET_LANGUAGE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
OUString sTxt(aBox->get_primary_text());
sTxt = sTxt.replaceFirst( "%1", pAllDictsLB->GetSelectEntry() );
aBox->set_primary_text(sTxt);
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index ceb7c2f35bda..24bfe053914a 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1356,7 +1356,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet )
xProp->setPropertyValue(sUserLocaleKey, makeAny(aLangString));
Reference< XChangesBatch >(xProp, UNO_QUERY_THROW)->commitChanges();
// display info
- VclPtr<MessageDialog> aBox(new MessageDialog(this, CUI_RES(RID_SVXSTR_LANGUAGE_RESTART), VCL_MESSAGE_INFO));
+ ScopedVclPtr<MessageDialog> aBox(new MessageDialog(this, CUI_RES(RID_SVXSTR_LANGUAGE_RESTART), VCL_MESSAGE_INFO));
aBox->Execute();
// tell quickstarter to stop being a veto listener
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index f92b13c3a105..f7758fae2abe 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -706,7 +706,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, SavePasswordHdl)
}
else
{
- VclPtr<QueryBox> aQuery(new QueryBox( this, WB_YES_NO|WB_DEF_NO, m_sPasswordStoringDeactivateStr ));
+ ScopedVclPtr<QueryBox> aQuery(new QueryBox( this, WB_YES_NO|WB_DEF_NO, m_sPasswordStoringDeactivateStr ));
sal_uInt16 nRet = aQuery->Execute();
if( RET_YES == nRet )
@@ -803,7 +803,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, ShowPasswordsHdl)
if ( xMasterPasswd->isPersistentStoringAllowed() && xMasterPasswd->authorizateWithMasterPassword( Reference< task::XInteractionHandler>() ) )
{
- VclPtr<svx::WebConnectionInfoDialog> aDlg( new svx::WebConnectionInfoDialog(this) );
+ ScopedVclPtr<svx::WebConnectionInfoDialog> aDlg( new svx::WebConnectionInfoDialog(this) );
aDlg->Execute();
}
}
@@ -822,7 +822,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, CertPathPBHdl)
if (nRet == RET_OK && sOrig != mpCertPathDlg->getDirectory())
{
- VclPtr<MessageDialog> aWarnBox(new MessageDialog(this, CUI_RES(RID_SVXSTR_OPTIONS_RESTART), VCL_MESSAGE_INFO));
+ ScopedVclPtr<MessageDialog> aWarnBox(new MessageDialog(this, CUI_RES(RID_SVXSTR_OPTIONS_RESTART), VCL_MESSAGE_INFO));
aWarnBox->Execute();
}
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index fe3bd19c6fde..515b3c009b3b 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -336,7 +336,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ParameterHdl_Impl)
(void)eErr;
if ( bRunning )
{
- VclPtr<MessageDialog> aWarnBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO ));
+ ScopedVclPtr<MessageDialog> aWarnBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO ));
aWarnBox->Execute();
}
}
@@ -381,7 +381,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ClassPathHdl_Impl)
(void)eErr;
if ( bRunning )
{
- VclPtr<MessageDialog> aWarnBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO ));
+ ScopedVclPtr<MessageDialog> aWarnBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO ));
aWarnBox->Execute();
}
}
@@ -437,7 +437,7 @@ IMPL_LINK( SvxJavaOptionsPage, DialogClosedHdl, DialogClosedEvent*, pEvt )
IMPL_LINK_NOARG( SvxJavaOptionsPage, ExpertConfigHdl_Impl )
{
- VclPtr<CuiAboutConfigTabPage> m_pExpertConfigDlg = new CuiAboutConfigTabPage(this);
+ ScopedVclPtr<CuiAboutConfigTabPage> m_pExpertConfigDlg = new CuiAboutConfigTabPage(this);
m_pExpertConfigDlg->Reset();//initialize and reset function
if( RET_OK == m_pExpertConfigDlg->Execute() )
@@ -630,12 +630,12 @@ void SvxJavaOptionsPage::AddFolder( const OUString& _rFolder )
}
else if ( JFW_E_NOT_RECOGNIZED == eErr )
{
- VclPtr<MessageDialog> aErrBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_JRE_NOT_RECOGNIZED ) ));
+ ScopedVclPtr<MessageDialog> aErrBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_JRE_NOT_RECOGNIZED ) ));
aErrBox->Execute();
}
else if ( JFW_E_FAILED_VERSION == eErr )
{
- VclPtr<MessageDialog> aErrBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_JRE_FAILED_VERSION ) ));
+ ScopedVclPtr<MessageDialog> aErrBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_JRE_FAILED_VERSION ) ));
aErrBox->Execute();
}
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 53b3051bb07c..018204399319 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1596,7 +1596,7 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn )
pLinguData = new SvxLinguData_Impl;
SvxLinguData_Impl aOldLinguData( *pLinguData );
- VclPtr<SvxEditModulesDlg> aDlg(new SvxEditModulesDlg( this, *pLinguData ));
+ ScopedVclPtr<SvxEditModulesDlg> aDlg(new SvxEditModulesDlg( this, *pLinguData ));
if (aDlg->Execute() != RET_OK)
*pLinguData = aOldLinguData;
@@ -1673,7 +1673,7 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn )
}
else if (m_pLinguDicsDelPB == pBtn)
{
- VclPtr<MessageDialog> aQuery(new MessageDialog(this, "QueryDeleteDictionaryDialog",
+ ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(this, "QueryDeleteDictionaryDialog",
"cui/ui/querydeletedictionarydialog.ui"));
if (RET_NO == aQuery->Execute())
return 0;
@@ -1745,7 +1745,7 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn )
if(aData.HasNumericValue())
{
sal_uInt16 nRID = aData.GetEntryId();
- VclPtr<OptionsBreakSet> aDlg( new OptionsBreakSet(this, nRID) );
+ ScopedVclPtr<OptionsBreakSet> aDlg( new OptionsBreakSet(this, nRID) );
aDlg->GetNumericFld().SetValue( aData.GetNumericValue() );
if (RET_OK == aDlg->Execute() )
{
diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx
index 4454823969f7..fd029b6ed287 100644
--- a/cui/source/options/optopencl.cxx
+++ b/cui/source/options/optopencl.cxx
@@ -312,7 +312,7 @@ IMPL_LINK(ListEntryDialog, EditModifiedHdl, Edit*, pEdit)
void openListDialog(SvxOpenCLTabPage* pTabPage, OpenCLConfig::ImplMatcher& rEntry, const OString& rTag)
{
- VclPtr<ListEntryDialog> aDlg(new ListEntryDialog(pTabPage, rEntry, rTag));
+ ScopedVclPtr<ListEntryDialog> aDlg(new ListEntryDialog(pTabPage, rEntry, rTag));
if (aDlg->Execute() == RET_OK)
rEntry = aDlg->maEntry;
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index a232cea5e516..6b61f7890e8e 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -476,7 +476,7 @@ void SvxPersonalizationTabPage::LoadExtensionThemes()
IMPL_LINK( SvxPersonalizationTabPage, SelectPersona, PushButton*, /*pButton*/ )
{
- VclPtr<SelectPersonaDialog> aDialog( new SelectPersonaDialog(NULL) );
+ ScopedVclPtr<SelectPersonaDialog> aDialog( new SelectPersonaDialog(NULL) );
if ( aDialog->Execute() == RET_OK )
{