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-11 15:12:08 +0100 |
commit | 9f016bd69422bdfb4cf7c4f5e57356eb98db2d8c (patch) | |
tree | c32e463b68bad8cfc1ab9f69792b8c10071515bf /sw/source/ui | |
parent | e7473c692cad4c19f1d9eadd2547df4a50875baf (diff) |
Switch VclBuilder constructors to use VclPtr.
Change-Id: Id35a86eb52bbde6ca09a5e61a0b1a79b23be8faf
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/config/optload.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/dbui/createaddresslistdialog.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmaddressblockpage.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/fldui/FldRefTreeListBox.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldvar.cxx | 3 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/table/tautofmt.cxx | 2 |
7 files changed, 9 insertions, 10 deletions
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 424760646e80..8efc4a547827 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -394,7 +394,7 @@ VCL_BUILDER_DECL_FACTORY(SwCaptionPreview) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nBits |= WB_BORDER; - return new SwCaptionPreview(pParent, nBits); + return VclPtr<SwCaptionPreview>::Create(pParent, nBits); } void SwCaptionPreview::Init() @@ -940,7 +940,7 @@ VCL_BUILDER_DECL_FACTORY(CaptionComboBox) bool bDropdown = VclBuilder::extractDropdown(rMap); if (bDropdown) nBits |= WB_DROPDOWN; - CaptionComboBox* pComboBox = new CaptionComboBox(pParent, nBits); + VclPtrInstance<CaptionComboBox> pComboBox(pParent, nBits); pComboBox->EnableAutoSize(true); return pComboBox; } diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index a9c122664ca4..dffdc5977e1d 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -111,7 +111,7 @@ SwAddressControl_Impl::SwAddressControl_Impl(vcl::Window* pParent, WinBits nBits VCL_BUILDER_DECL_FACTORY(SwAddressControlImpl) { (void)rMap; - return new SwAddressControl_Impl(pParent, WB_BORDER | WB_DIALOGCONTROL); + return VclPtr<SwAddressControl_Impl>::Create(pParent, WB_BORDER | WB_DIALOGCONTROL); } SwAddressControl_Impl::~SwAddressControl_Impl() diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 2c25df2e318d..0beb28e1abde 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -1292,7 +1292,7 @@ VCL_BUILDER_DECL_FACTORY(DDListBox) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; - return new DDListBox(pParent, nWinStyle); + return VclPtr<DDListBox>::Create(pParent, nWinStyle); } void DDListBox::SetAddressDialog(SwCustomizeAddressBlockDialog *pParent) @@ -1354,7 +1354,7 @@ VCL_BUILDER_DECL_FACTORY(AddressMultiLineEdit) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; - return new AddressMultiLineEdit(pParent, nWinStyle); + return VclPtr<AddressMultiLineEdit>::Create(pParent, nWinStyle); } void AddressMultiLineEdit::SetAddressDialog(SwCustomizeAddressBlockDialog *pParent) diff --git a/sw/source/ui/fldui/FldRefTreeListBox.cxx b/sw/source/ui/fldui/FldRefTreeListBox.cxx index c84b5c45e73b..313b42bbf0e2 100644 --- a/sw/source/ui/fldui/FldRefTreeListBox.cxx +++ b/sw/source/ui/fldui/FldRefTreeListBox.cxx @@ -34,7 +34,7 @@ VCL_BUILDER_DECL_FACTORY(SwFldRefTreeListBox) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; - return new SwFldRefTreeListBox(pParent, nWinStyle); + return VclPtr<SwFldRefTreeListBox>::Create(pParent, nWinStyle); } void SwFldRefTreeListBox::RequestHelp( const HelpEvent& rHEvt ) diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 8da46a400a26..9528c1870025 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -1276,9 +1276,8 @@ VCL_BUILDER_DECL_FACTORY(SelectionListBox) if (!sBorder.isEmpty()) nBits |= WB_BORDER; - SelectionListBox* pListBox = new SelectionListBox(pParent, nBits|WB_SIMPLEMODE); + VclPtrInstance<SelectionListBox> pListBox(pParent, nBits|WB_SIMPLEMODE); pListBox->EnableAutoSize(true); - return pListBox; } diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 2bac0f544ae7..f9f3e029f7f7 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1765,7 +1765,7 @@ VCL_BUILDER_DECL_FACTORY(SwIdxTreeListBox) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; - return new SwIdxTreeListBox(pParent, nWinStyle); + return VclPtr<SwIdxTreeListBox>::Create(pParent, nWinStyle); } void SwIdxTreeListBox::RequestHelp( const HelpEvent& rHEvt ) diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 3332023cd12f..439057f1215b 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -539,7 +539,7 @@ VCL_BUILDER_DECL_FACTORY(AutoFmtPreview) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; - return new AutoFmtPreview(pParent, nWinStyle); + return VclPtr<AutoFmtPreview>::Create(pParent, nWinStyle); } void AutoFmtPreview::Resize() |