diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-05-11 14:02:42 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-05-12 09:40:38 +0100 |
commit | 936a49646738452f7331ed9a47ac015db9ee7295 (patch) | |
tree | 7dff1a6db99e3e28b8bc2226d07b29d5f2b5cd0b /sw/source/uibase | |
parent | ab81e3bff2a1844be67209bc8947d539edbaf8e6 (diff) |
Switch VclBuilder constructors to use VclPtr.
Change-Id: Id35a86eb52bbde6ca09a5e61a0b1a79b23be8faf
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/cctrl/actctrl.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/dbui/dbtree.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/dbui/mailmergehelper.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/misc/numberingtypelistbox.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/utlui/condedit.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/numfmtlb.cxx | 4 |
6 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/uibase/cctrl/actctrl.cxx b/sw/source/uibase/cctrl/actctrl.cxx index 119dbb39c3af..a0f1bd7ce87b 100644 --- a/sw/source/uibase/cctrl/actctrl.cxx +++ b/sw/source/uibase/cctrl/actctrl.cxx @@ -65,7 +65,7 @@ void ReturnActionEdit::KeyInput( const KeyEvent& rEvt) VCL_BUILDER_DECL_FACTORY(ReturnActionEdit) { VclBuilder::ensureDefaultWidthChars(rMap); - return new ReturnActionEdit(pParent, WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK); + rRet = VclPtr<ReturnActionEdit>::Create(pParent, WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx index 0e9fa0d0f28e..72e0e1da7f59 100644 --- a/sw/source/uibase/dbui/dbtree.cxx +++ b/sw/source/uibase/dbui/dbtree.cxx @@ -186,7 +186,7 @@ VCL_BUILDER_DECL_FACTORY(SwDBTreeList) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nStyle |= WB_BORDER; - return new SwDBTreeList(pParent, nStyle); + rRet = VclPtr<SwDBTreeList>::Create(pParent, nStyle); } Size SwDBTreeList::GetOptimalSize() const diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx index d827f70e472f..80082ed32d56 100644 --- a/sw/source/uibase/dbui/mailmergehelper.cxx +++ b/sw/source/uibase/dbui/mailmergehelper.cxx @@ -213,7 +213,7 @@ VCL_BUILDER_DECL_FACTORY(SwAddressPreview) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; - return new SwAddressPreview(pParent, nWinStyle); + rRet = VclPtr<SwAddressPreview>::Create(pParent, nWinStyle); } void SwAddressPreview::positionScrollBar() diff --git a/sw/source/uibase/misc/numberingtypelistbox.cxx b/sw/source/uibase/misc/numberingtypelistbox.cxx index 30b6b05a6640..52847602751f 100644 --- a/sw/source/uibase/misc/numberingtypelistbox.cxx +++ b/sw/source/uibase/misc/numberingtypelistbox.cxx @@ -58,9 +58,9 @@ bool SwNumberingTypeListBox::set_property(const OString &rKey, const OString &rV VCL_BUILDER_DECL_FACTORY(SwNumberingTypeListBox) { (void)rMap; - SwNumberingTypeListBox *pListBox = new SwNumberingTypeListBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK|WB_TABSTOP); + VclPtrInstance<SwNumberingTypeListBox> pListBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK|WB_TABSTOP); pListBox->EnableAutoSize(true); - return pListBox; + rRet = pListBox; } SwNumberingTypeListBox::~SwNumberingTypeListBox() diff --git a/sw/source/uibase/utlui/condedit.cxx b/sw/source/uibase/utlui/condedit.cxx index 907ac1f4d5e0..fd11e8a5b8a0 100644 --- a/sw/source/uibase/utlui/condedit.cxx +++ b/sw/source/uibase/utlui/condedit.cxx @@ -37,7 +37,7 @@ ConditionEdit::ConditionEdit(vcl::Window* pParent, WinBits nStyle) VCL_BUILDER_DECL_FACTORY(ConditionEdit) { VclBuilder::ensureDefaultWidthChars(rMap); - return new ConditionEdit(pParent, WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK); + rRet = VclPtr<ConditionEdit>::Create(pParent, WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK); } // Drop possible, respectively format known? diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx index 32bab7f225b7..953032b7d73d 100644 --- a/sw/source/uibase/utlui/numfmtlb.cxx +++ b/sw/source/uibase/utlui/numfmtlb.cxx @@ -80,12 +80,12 @@ VCL_BUILDER_DECL_FACTORY(NumFormatListBox) else nBits |= WB_BORDER; - NumFormatListBox* pListBox = new NumFormatListBox(pParent, nBits|WB_SIMPLEMODE); + VclPtrInstance<NumFormatListBox> pListBox(pParent, nBits|WB_SIMPLEMODE); if (bDropdown) pListBox->EnableAutoSize(true); - return pListBox; + rRet = pListBox; } void NumFormatListBox::Init(short nFormatType, bool bUsrFmts) |