summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/fileview.cxx6
-rw-r--r--svtools/source/contnr/svtabbx.cxx2
-rw-r--r--svtools/source/contnr/treelistbox.cxx2
-rw-r--r--svtools/source/control/ctrlbox.cxx20
-rw-r--r--svtools/source/control/inettbc.cxx4
-rw-r--r--svtools/source/control/urlcontrol.cxx4
-rw-r--r--svtools/source/control/valueset.cxx2
7 files changed, 18 insertions, 22 deletions
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 60e53181b427..ada14a38cf21 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -1130,18 +1130,14 @@ VCL_BUILDER_DECL_FACTORY(SvtFileView)
if (bDropdown)
nBits |= WB_DROPDOWN;
- return new SvtFileView(pParent, nBits, true, true);
+ rRet = VclPtr<SvtFileView>::Create(pParent, nBits, true, true);
}
-
-
Size SvtFileView::GetOptimalSize() const
{
return LogicToPixel(Size(208, 50), MAP_APPFONT);
}
-
-
OUString SvtFileView::GetURL( SvTreeListEntry* pEntry )
{
OUString aURL;
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index 66aa72561d4d..a6385ad288f0 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -102,7 +102,7 @@ VCL_BUILDER_DECL_FACTORY(SvTabListBox)
OString sBorder = VclBuilder::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinStyle |= WB_BORDER;
- return new SvTabListBox(pParent, nWinStyle);
+ rRet = VclPtr<SvTabListBox>::Create(pParent, nWinStyle);
}
SvTabListBox::~SvTabListBox()
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 097adedd94f0..5d7ec97391e4 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -440,7 +440,7 @@ VCL_BUILDER_DECL_FACTORY(SvTreeListBox)
OString sBorder = VclBuilder::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinStyle |= WB_BORDER;
- return new SvTreeListBox(pParent, nWinStyle);
+ rRet = VclPtr<SvTreeListBox>::Create(pParent, nWinStyle);
}
void SvTreeListBox::Clear()
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 2be6e63e770f..96cfd804d857 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -110,10 +110,10 @@ VCL_BUILDER_DECL_FACTORY(ColorListBox)
WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP;
if (bDropdown)
nWinBits |= WB_DROPDOWN;
- ColorListBox *pListBox = new ColorListBox(pParent, nWinBits);
+ VclPtrInstance<ColorListBox> pListBox(pParent, nWinBits);
if (bDropdown)
pListBox->EnableAutoSize(true);
- return pListBox;
+ rRet = pListBox;
}
ColorListBox::~ColorListBox()
@@ -742,10 +742,10 @@ VCL_BUILDER_DECL_FACTORY(LineListBox)
WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP;
if (bDropdown)
nWinBits |= WB_DROPDOWN;
- LineListBox *pListBox = new LineListBox(pParent, nWinBits);
+ VclPtrInstance<LineListBox> pListBox(pParent, nWinBits);
if (bDropdown)
pListBox->EnableAutoSize(true);
- return pListBox;
+ rRet = pListBox;
}
LineListBox::~LineListBox()
@@ -945,10 +945,10 @@ VCL_BUILDER_DECL_FACTORY(FontNameBox)
WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP;
if (bDropdown)
nWinBits |= WB_DROPDOWN;
- FontNameBox *pListBox = new FontNameBox(pParent, nWinBits);
+ VclPtrInstance<FontNameBox> pListBox(pParent, nWinBits);
if (bDropdown)
pListBox->EnableAutoSize(true);
- return pListBox;
+ rRet = pListBox;
}
FontNameBox::~FontNameBox()
@@ -1333,10 +1333,10 @@ VCL_BUILDER_DECL_FACTORY(FontStyleBox)
WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP;
if (bDropdown)
nWinBits |= WB_DROPDOWN;
- FontStyleBox *pListBox = new FontStyleBox(pParent, nWinBits);
+ VclPtrInstance<FontStyleBox> pListBox(pParent, nWinBits);
if (bDropdown)
pListBox->EnableAutoSize(true);
- return pListBox;
+ rRet = pListBox;
}
void FontStyleBox::Select()
@@ -1529,10 +1529,10 @@ VCL_BUILDER_DECL_FACTORY(FontSizeBox)
WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP;
if (bDropdown)
nWinBits |= WB_DROPDOWN;
- FontSizeBox* pListBox = new FontSizeBox(pParent, nWinBits);
+ VclPtrInstance<FontSizeBox> pListBox(pParent, nWinBits);
if (bDropdown)
pListBox->EnableAutoSize(true);
- return pListBox;
+ rRet = pListBox;
}
void FontSizeBox::ImplInit()
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index fe9a3ac034e8..6f669b0cc985 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -868,9 +868,9 @@ VCL_BUILDER_DECL_FACTORY(SvtURLBox)
(void)rMap;
WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP|
WB_DROPDOWN|WB_AUTOSIZE|WB_AUTOHSCROLL;
- SvtURLBox* pListBox = new SvtURLBox(pParent, nWinBits, INetProtocol::NotValid, false);
+ VclPtrInstance<SvtURLBox> pListBox(pParent, nWinBits, INetProtocol::NotValid, false);
pListBox->EnableAutoSize(true);
- return pListBox;
+ rRet = pListBox;
}
diff --git a/svtools/source/control/urlcontrol.cxx b/svtools/source/control/urlcontrol.cxx
index 8a268d75e4c8..00864126fe0c 100644
--- a/svtools/source/control/urlcontrol.cxx
+++ b/svtools/source/control/urlcontrol.cxx
@@ -36,9 +36,9 @@ namespace svt
(void)rMap;
WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP|
WB_DROPDOWN|WB_AUTOSIZE|WB_AUTOHSCROLL;
- OFileURLControl* pListBox = new OFileURLControl(pParent, nWinBits);
+ VclPtrInstance<OFileURLControl> pListBox(pParent, nWinBits);
pListBox->EnableAutoSize(true);
- return pListBox;
+ rRet = pListBox;
}
bool OFileURLControl::PreNotify( NotifyEvent& _rNEvt )
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 85caf5543386..ff7351ca1a87 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -111,7 +111,7 @@ VCL_BUILDER_DECL_FACTORY(ValueSet)
if (!sBorder.isEmpty())
nWinBits |= WB_BORDER;
- return new ValueSet(pParent, nWinBits);
+ rRet = VclPtr<ValueSet>::Create(pParent, nWinBits);
}
ValueSet::ValueSet( vcl::Window* pParent, const ResId& rResId, bool bDisableTransientChildren ) :