summaryrefslogtreecommitdiffstats
path: root/cui/source/options
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-18 20:48:34 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-18 21:58:58 +0100
commit354df32a6da2557ac9edc0937b0032406bc6ba15 (patch)
treef64defae98df2693b7a4feeecae2cd1f64d8c764 /cui/source/options
parentchart2: convert new to ::Create. (diff)
downloadcore-354df32a6da2557ac9edc0937b0032406bc6ba15.tar.gz
core-354df32a6da2557ac9edc0937b0032406bc6ba15.zip
cui: convert new to ::Create.
Change-Id: Ifad69772a4954f14772cca9eeae913e546eff477
Diffstat (limited to 'cui/source/options')
-rw-r--r--cui/source/options/certpath.cxx2
-rw-r--r--cui/source/options/fontsubs.cxx2
-rw-r--r--cui/source/options/optaboutconfig.cxx4
-rw-r--r--cui/source/options/optcolor.cxx16
-rw-r--r--cui/source/options/optdict.cxx3
-rw-r--r--cui/source/options/optfltr.cxx2
-rw-r--r--cui/source/options/optinet2.cxx4
-rw-r--r--cui/source/options/optjava.cxx6
-rw-r--r--cui/source/options/optopencl.cxx4
-rw-r--r--cui/source/options/optpath.cxx2
-rw-r--r--cui/source/options/treeopt.cxx3
-rw-r--r--cui/source/options/webconninfo.cxx2
12 files changed, 25 insertions, 25 deletions
diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx
index 7ce171170875..03d8b77d66c4 100644
--- a/cui/source/options/certpath.cxx
+++ b/cui/source/options/certpath.cxx
@@ -35,7 +35,7 @@ CertPathDialog::CertPathDialog(vcl::Window* pParent)
m_pCertPathListContainer->set_width_request(aSize.Width());
m_pCertPathListContainer->set_height_request(aSize.Height());
m_pCertPathList =
- new svx::SvxRadioButtonListBox(*m_pCertPathListContainer, 0);
+ VclPtr<svx::SvxRadioButtonListBox>::Create(*m_pCertPathListContainer, 0);
m_sAddDialogText = get<FixedText>("certdir")->GetText();
m_sManual = get<FixedText>("manual")->GetText();
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 5fc134c5afa3..ac77289109ce 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -62,7 +62,7 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( vcl::Window* pParent,
pCheckLBContainer->set_width_request(aControlSize.Width());
pCheckLBContainer->set_height_request(aControlSize.Height());
- m_pCheckLB = new SvxFontSubstCheckListBox(*pCheckLBContainer, 0);
+ m_pCheckLB = VclPtr<SvxFontSubstCheckListBox>::Create(*pCheckLBContainer, 0);
m_pCheckLB->SetHelpId(HID_OFA_FONT_SUBST_CLB);
m_pCheckLB->SetStyle(m_pCheckLB->GetStyle()|WB_HSCROLL|WB_VSCROLL);
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index 2e8be40b8109..851753d932c8 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -130,7 +130,7 @@ CuiAboutConfigTabPage::CuiAboutConfigTabPage( vcl::Window* pParent/*, const SfxI
m_pSearchBtn( get<PushButton>("searchButton") ),
m_pSearchEdit( get<Edit>("searchEntry") ),
m_vectorOfModified(),
- m_pPrefBox( new SvSimpleTable(*m_pPrefCtrl, WB_SCROLL | WB_HSCROLL | WB_VSCROLL ) )
+ m_pPrefBox( VclPtr<SvSimpleTable>::Create(*m_pPrefCtrl, WB_SCROLL | WB_HSCROLL | WB_VSCROLL ) )
{
Size aControlSize(LogicToPixel(Size(385, 230), MAP_APPFONT));
m_pPrefCtrl->set_width_request(aControlSize.Width());
@@ -564,7 +564,7 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl )
else if( sPropertyType == "hyper" )
limit = HYPER_LEN_LIMIT;
- CuiAboutConfigValueDialog* pValueDialog = new CuiAboutConfigValueDialog(0, sDialogValue, limit);
+ VclPtrInstance<CuiAboutConfigValueDialog> pValueDialog(nullptr, sDialogValue, limit);
if( pValueDialog->Execute() == RET_OK )
{
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 4c5834d463d7..f65e4a84f4e2 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -292,7 +292,7 @@ ColorConfigWindow_Impl::Chapter::Chapter(FixedText* pText, bool bShow)
ColorConfigWindow_Impl::Chapter::Chapter(vcl::Window *pGrid,
unsigned nYPos, const OUString& rDisplayName)
{
- m_pText = new FixedText(pGrid, WB_LEFT|WB_VCENTER|WB_3DLOOK);
+ m_pText = VclPtr<FixedText>::Create(pGrid, WB_LEFT|WB_VCENTER|WB_3DLOOK);
m_pText->set_font_attribute("weight", "bold");
m_pText->set_grid_width(3);
m_pText->set_grid_left_attach(0);
@@ -346,19 +346,19 @@ ColorConfigWindow_Impl::Entry::Entry( vcl::Window *pGrid, unsigned nYPos,
: m_bOwnsWidgets(true)
, m_aDefaultColor(rColorEntry.getDefaultColor())
{
- m_pText = new FixedText(pGrid, WB_LEFT|WB_VCENTER|WB_3DLOOK);
+ m_pText = VclPtr<FixedText>::Create(pGrid, WB_LEFT|WB_VCENTER|WB_3DLOOK);
m_pText->set_grid_left_attach(0);
m_pText->set_grid_top_attach(nYPos);
m_pText->set_margin_left(6 + nCheckBoxLabelOffset);
m_pText->SetText(rColorEntry.getDisplayName());
WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP|WB_DROPDOWN;
- m_pColorList = new ColorListBox(pGrid, nWinBits);
+ m_pColorList = VclPtr<ColorListBox>::Create(pGrid, nWinBits);
m_pColorList->EnableAutoSize(true);
m_pColorList->set_grid_left_attach(1);
m_pColorList->set_grid_top_attach(nYPos);
- m_pPreview = new vcl::Window(pGrid, WB_BORDER);
+ m_pPreview = VclPtr<vcl::Window>::Create(pGrid, WB_BORDER);
m_pPreview->set_grid_left_attach(2);
m_pPreview->set_grid_top_attach(nYPos);
m_pPreview->set_margin_right(6);
@@ -869,11 +869,11 @@ ColorConfigCtrl_Impl::ColorConfigCtrl_Impl(vcl::Window* pParent)
, pColorConfig(0)
, pExtColorConfig(0)
{
- m_pHeaderHB = new HeaderBar(this, WB_BUTTONSTYLE | WB_BOTTOMBORDER);
+ m_pHeaderHB = VclPtr<HeaderBar>::Create(this, WB_BUTTONSTYLE | WB_BOTTOMBORDER);
- m_pBody = new VclHBox(this);
- m_pScrollWindow = new ColorConfigWindow_Impl(m_pBody);
- m_pVScroll = new ScrollBar(m_pBody, WB_VERT);
+ m_pBody = VclPtr<VclHBox>::Create(this);
+ m_pScrollWindow = VclPtr<ColorConfigWindow_Impl>::Create(m_pBody);
+ m_pVScroll = VclPtr<ScrollBar>::Create(m_pBody, WB_VERT);
m_pScrollWindow->Init(m_pVScroll, m_pHeaderHB);
m_pBody->set_hexpand(true);
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index 5c25b4de3615..4d154e26f0f0 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -225,8 +225,7 @@ IMPL_LINK_NOARG_INLINE_END(SvxNewDictionaryDialog, ModifyHdl_Impl)
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxDictEdit(vcl::Window *pParent, VclBuilder::stringmap&)
{
WinBits nWinStyle = WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK;
- SvxDictEdit *pEdit = new SvxDictEdit(pParent, nWinStyle);
- return pEdit;
+ return new SvxDictEdit(pParent, nWinStyle);
};
SvxEditDictionaryDialog::SvxEditDictionaryDialog(
diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index 4b56daa9145f..4e649d401f77 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -164,7 +164,7 @@ OfaMSFilterTabPage2::OfaMSFilterTabPage2( vcl::Window* pParent, const SfxItemSet
m_pCheckLBContainer->set_width_request(aControlSize.Width());
m_pCheckLBContainer->set_height_request(aControlSize.Height());
- m_pCheckLB = new MSFltrSimpleTable(*m_pCheckLBContainer);
+ m_pCheckLB = VclPtr<MSFltrSimpleTable>::Create(*m_pCheckLBContainer);
static long aStaticTabs[] = { 3, 0, 20, 40 };
m_pCheckLB->SvSimpleTable::SetTabs( aStaticTabs );
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 766a4748f44c..79298f0bc0e2 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -676,7 +676,7 @@ void SvxSecurityTabPage::dispose()
IMPL_LINK_NOARG(SvxSecurityTabPage, SecurityOptionsHdl)
{
if ( !mpSecOptDlg )
- mpSecOptDlg = new svx::SecurityOptionsDialog( this, mpSecOptions );
+ mpSecOptDlg = VclPtr<svx::SecurityOptionsDialog>::Create( this, mpSecOptions );
mpSecOptDlg->Execute();
return 0;
}
@@ -817,7 +817,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, ShowPasswordsHdl)
IMPL_LINK_NOARG(SvxSecurityTabPage, CertPathPBHdl)
{
if (!mpCertPathDlg)
- mpCertPathDlg = new CertPathDialog(this);
+ mpCertPathDlg = VclPtr<CertPathDialog>::Create(this);
OUString sOrig = mpCertPathDlg->getDirectory();
short nRet = mpCertPathDlg->Execute();
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 98eb903ba218..38b232ac4342 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -161,7 +161,7 @@ SvxJavaOptionsPage::SvxJavaOptionsPage( vcl::Window* pParent, const SfxItemSet&
aControlSize = LogicToPixel(aControlSize, MAP_APPFONT);
pJavaListContainer->set_width_request(aControlSize.Width());
pJavaListContainer->set_height_request(aControlSize.Height());
- m_pJavaList = new SvxJavaListBox(*pJavaListContainer, m_sAccessibilityText);
+ m_pJavaList = VclPtr<SvxJavaListBox>::Create(*pJavaListContainer, m_sAccessibilityText);
long aStaticTabs[]= { 4, 0, 0, 0, 0 };
@@ -306,7 +306,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ParameterHdl_Impl)
Sequence< OUString > aParameterList;
if ( !m_pParamDlg )
{
- m_pParamDlg = new SvxJavaParameterDlg( this );
+ m_pParamDlg = VclPtr<SvxJavaParameterDlg>::Create( this );
javaFrameworkError eErr = jfw_getVMParameters( &m_parParameters, &m_nParamSize );
if ( JFW_E_NONE == eErr && m_parParameters && m_nParamSize > 0 )
{
@@ -356,7 +356,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ClassPathHdl_Impl)
if ( !m_pPathDlg )
{
- m_pPathDlg = new SvxJavaClassPathDlg( this );
+ m_pPathDlg = VclPtr<SvxJavaClassPathDlg>::Create( this );
javaFrameworkError eErr = jfw_getUserClassPath( &m_pClassPath );
if ( JFW_E_NONE == eErr && m_pClassPath )
{
diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx
index e83dcde59a61..d8b6af402ec9 100644
--- a/cui/source/options/optopencl.cxx
+++ b/cui/source/options/optopencl.cxx
@@ -72,8 +72,8 @@ SvxOpenCLTabPage::SvxOpenCLTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
mpWhiteListDelete->SetClickHdl(LINK(this, SvxOpenCLTabPage, WhiteListDeleteHdl));
WinBits nBits = WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP;
- mpBlackList = new SvSimpleTable( *mpBlackListTable, nBits );
- mpWhiteList = new SvSimpleTable( *mpWhiteListTable, nBits );
+ mpBlackList = VclPtr<SvSimpleTable>::Create( *mpBlackListTable, nBits );
+ mpWhiteList = VclPtr<SvSimpleTable>::Create( *mpWhiteListTable, nBits );
HeaderBar &rBlBar = mpBlackList->GetTheHeaderBar();
HeaderBar &rWiBar = mpWhiteList->GetTheHeaderBar();
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index dd87bbc7eca0..dbcb5d1b20b7 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -214,7 +214,7 @@ SvxPathTabPage::SvxPathTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
m_pPathCtrl->set_width_request(aControlSize.Width());
m_pPathCtrl->set_height_request(aControlSize.Height());
WinBits nBits = WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP;
- pPathBox = new svx::OptHeaderTabListBox( *m_pPathCtrl, nBits );
+ pPathBox = VclPtr<svx::OptHeaderTabListBox>::Create( *m_pPathCtrl, nBits );
HeaderBar &rBar = pPathBox->GetTheHeaderBar();
rBar.SetSelectHdl( LINK( this, SvxPathTabPage, HeaderSelect_Impl ) );
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 02e2f17c82da..2267d16775ad 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1088,7 +1088,8 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
m_xContainerWinProvider = awt::ContainerWindowProvider::create( ::comphelper::getProcessComponentContext() );
}
- pPageInfo->m_pExtPage = new ExtensionsTabPage(
+ pPageInfo->m_pExtPage = VclPtr<ExtensionsTabPage>::Create(
+
pTabBox, 0, pPageInfo->m_sPageURL, pPageInfo->m_sEventHdl, m_xContainerWinProvider );
}
diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx
index f6d6cd5e9e40..17c630c7819f 100644
--- a/cui/source/options/webconninfo.cxx
+++ b/cui/source/options/webconninfo.cxx
@@ -111,7 +111,7 @@ WebConnectionInfoDialog::WebConnectionInfoDialog(vcl::Window* pParent)
get(m_pChangeBtn, "change");
SvSimpleTableContainer *pPasswordsLBContainer = get<SvSimpleTableContainer>("logins");
- m_pPasswordsLB = new PasswordTable(*pPasswordsLBContainer, 0);
+ m_pPasswordsLB = VclPtr<PasswordTable>::Create(*pPasswordsLBContainer, 0);
long aStaticTabs[]= { 2, 0, 0 };
m_pPasswordsLB->SetTabs( aStaticTabs );