summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-05-11 14:02:42 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-05-12 09:40:38 +0100
commit936a49646738452f7331ed9a47ac015db9ee7295 (patch)
tree7dff1a6db99e3e28b8bc2226d07b29d5f2b5cd0b /sfx2
parentab81e3bff2a1844be67209bc8947d539edbaf8e6 (diff)
Switch VclBuilder constructors to use VclPtr.
Change-Id: Id35a86eb52bbde6ca09a5e61a0b1a79b23be8faf
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/newhelp.cxx18
-rw-r--r--sfx2/source/control/templateremoteview.cxx2
-rw-r--r--sfx2/source/doc/new.cxx2
3 files changed, 11 insertions, 11 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 3b261724f1d4..82fc78d3562a 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -297,7 +297,7 @@ VCL_BUILDER_DECL_FACTORY(ContentListBox)
OString sBorder = VclBuilder::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinStyle |= WB_BORDER;
- return new ContentListBox_Impl(pParent, nWinStyle);
+ rRet = VclPtr<ContentListBox_Impl>::Create(pParent, nWinStyle);
}
ContentListBox_Impl::~ContentListBox_Impl()
@@ -490,9 +490,9 @@ VCL_BUILDER_DECL_FACTORY(IndexBox)
OString sBorder = VclBuilder::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinBits |= WB_BORDER;
- IndexBox_Impl* pListBox = new IndexBox_Impl(pParent, nWinBits);
+ VclPtrInstance<IndexBox_Impl> pListBox(pParent, nWinBits);
pListBox->EnableAutoSize(true);
- return pListBox;
+ rRet = pListBox;
}
void IndexBox_Impl::UserDraw( const UserDrawEvent& rUDEvt )
@@ -875,9 +875,9 @@ VCL_BUILDER_DECL_FACTORY(SearchBox)
{
(void)rMap;
WinBits nWinBits = WB_CLIPCHILDREN|WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_SIMPLEMODE|WB_DROPDOWN;
- SearchBox_Impl* pComboBox = new SearchBox_Impl(pParent, nWinBits);
+ VclPtrInstance<SearchBox_Impl> pComboBox(pParent, nWinBits);
pComboBox->EnableAutoSize(true);
- return pComboBox;
+ rRet = pComboBox;
}
bool SearchBox_Impl::PreNotify( NotifyEvent& rNEvt )
@@ -910,9 +910,9 @@ VCL_BUILDER_DECL_FACTORY(SearchResultsBox)
OString sBorder = VclBuilder::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinBits |= WB_BORDER;
- SearchResultsBox_Impl* pListBox = new SearchResultsBox_Impl(pParent, nWinBits);
+ VclPtrInstance<SearchResultsBox_Impl> pListBox(pParent, nWinBits);
pListBox->EnableAutoSize(true);
- return pListBox;
+ rRet = pListBox;
}
bool SearchResultsBox_Impl::Notify( NotifyEvent& rNEvt )
@@ -1177,9 +1177,9 @@ VCL_BUILDER_DECL_FACTORY(BookmarksBox)
OString sBorder = VclBuilder::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinBits |= WB_BORDER;
- BookmarksBox_Impl* pListBox = new BookmarksBox_Impl(pParent, nWinBits);
+ VclPtrInstance<BookmarksBox_Impl> pListBox(pParent, nWinBits);
pListBox->EnableAutoSize(true);
- return pListBox;
+ rRet = pListBox;
}
BookmarksBox_Impl::~BookmarksBox_Impl()
diff --git a/sfx2/source/control/templateremoteview.cxx b/sfx2/source/control/templateremoteview.cxx
index ffc0b7b3b3f1..310dead38508 100644
--- a/sfx2/source/control/templateremoteview.cxx
+++ b/sfx2/source/control/templateremoteview.cxx
@@ -57,7 +57,7 @@ TemplateRemoteView::TemplateRemoteView (vcl::Window *pParent, WinBits nWinStyle,
VCL_BUILDER_DECL_FACTORY(TemplateRemoteView)
{
(void)rMap;
- return new TemplateRemoteView(pParent, WB_VSCROLL, false);
+ rRet = VclPtr<TemplateRemoteView>::Create(pParent, WB_VSCROLL, false);
}
void TemplateRemoteView::showRootRegion()
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index c9e8a2a12ecf..09f0fbe42bcc 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -119,7 +119,7 @@ void SfxPreviewWin_Impl::Paint( vcl::RenderContext& /*rRenderContext*/, const Re
VCL_BUILDER_DECL_FACTORY(SfxPreviewWin)
{
(void)rMap;
- return new SfxPreviewWin_Impl(pParent, 0);
+ rRet = VclPtr<SfxPreviewWin_Impl>::Create(pParent, 0);
}
class SfxNewFileDialog_Impl