diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/ui/config/optload.cxx | 6 | ||||
-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 | 5 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/table/tautofmt.cxx | 2 | ||||
-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 |
13 files changed, 19 insertions, 20 deletions
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 424760646e80..9f2442475bc8 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); + rRet = VclPtr<SwCaptionPreview>::Create(pParent, nBits); } void SwCaptionPreview::Init() @@ -940,9 +940,9 @@ 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; + rRet = pComboBox; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index a9c122664ca4..7e9046d2008d 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); + rRet = 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..df9817f77684 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); + rRet = 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); + rRet = 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..03ed69ac663b 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); + rRet = 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..615ff1ee1629 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -1276,10 +1276,9 @@ 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; + rRet = pListBox; } bool SelectionListBox::PreNotify( NotifyEvent& rNEvt ) diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 2bac0f544ae7..0204ed3fc33f 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); + rRet = 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..96a61e4f3800 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); + rRet = VclPtr<AutoFmtPreview>::Create(pParent, nWinStyle); } void AutoFmtPreview::Resize() 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) |