diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-05-11 16:28:15 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-05-11 16:28:22 +0100 |
commit | 667910530deb61563d4812db0995da94e25220e5 (patch) | |
tree | 9e19a2c89c1b9ee8ae3610096d295e99873a3b5c /svx | |
parent | 7ac254048a5698e046bbb7deccd171cb3777af61 (diff) |
Revert "Switch VclBuilder constructors to use VclPtr."
Behaves oddly; not ready yet.
This reverts commit 9f016bd69422bdfb4cf7c4f5e57356eb98db2d8c.
Change-Id: I30d746eac29d1dbe78d3072b10d2e22c051e3f4e
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/checklbx.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/connctrl.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/dlgctrl.cxx | 12 | ||||
-rw-r--r-- | svx/source/dialog/fntctrl.cxx | 3 | ||||
-rw-r--r-- | svx/source/dialog/fontlb.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/frmdirlbox.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/frmsel.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/graphctl.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/langbox.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/measctrl.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/relfld.cxx | 15 | ||||
-rw-r--r-- | svx/source/dialog/txencbox.cxx | 7 | ||||
-rw-r--r-- | svx/source/gallery2/galctrl.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/SvxColorValueSet.cxx | 2 |
14 files changed, 34 insertions, 25 deletions
diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx index fb86f8c0ee46..66527a7132fb 100644 --- a/svx/source/dialog/checklbx.cxx +++ b/svx/source/dialog/checklbx.cxx @@ -37,7 +37,7 @@ VCL_BUILDER_DECL_FACTORY(SvxCheckListBox) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; - return VclPtr<SvxCheckListBox>::Create(pParent, nWinStyle); + return new SvxCheckListBox(pParent, nWinStyle); } void SvxCheckListBox::SetNormalStaticImage(const Image& rNormalStaticImage) diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx index d24326dfe89b..a130f9f858fa 100644 --- a/svx/source/dialog/connctrl.cxx +++ b/svx/source/dialog/connctrl.cxx @@ -52,7 +52,7 @@ VCL_BUILDER_DECL_FACTORY(SvxXConnectionPreview) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; - return VclPtr<SvxXConnectionPreview>::Create(pParent, nWinStyle); + return new SvxXConnectionPreview(pParent, nWinStyle); } SvxXConnectionPreview::~SvxXConnectionPreview() diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 1019bf43b19b..ad7c410a690d 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -1141,7 +1141,7 @@ VCL_BUILDER_DECL_FACTORY(ColorLB) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinBits |= WB_BORDER; - VclPtrInstance<ColorLB> pListBox(pParent, nWinBits); + ColorLB *pListBox = new ColorLB(pParent, nWinBits); pListBox->EnableAutoSize(true); return pListBox; } @@ -1193,7 +1193,7 @@ VCL_BUILDER_DECL_FACTORY(HatchingLB) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; - VclPtrInstance<HatchingLB> pListBox(pParent, nWinStyle); + HatchingLB *pListBox = new HatchingLB(pParent, nWinStyle); pListBox->EnableAutoSize(true); return pListBox; } @@ -1286,7 +1286,7 @@ VCL_BUILDER_DECL_FACTORY(GradientLB) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; - VclPtrInstance<GradientLB> pListBox(pParent, nWinStyle); + GradientLB *pListBox = new GradientLB(pParent, nWinStyle); pListBox->EnableAutoSize(true); return pListBox; } @@ -1402,7 +1402,7 @@ VCL_BUILDER_DECL_FACTORY(BitmapLB) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; - VclPtrInstance<BitmapLB> pListBox(pParent, nWinStyle); + BitmapLB *pListBox = new BitmapLB(pParent, nWinStyle); pListBox->EnableAutoSize(true); return pListBox; } @@ -1575,7 +1575,7 @@ VCL_BUILDER_DECL_FACTORY(LineLB) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinBits |= WB_BORDER; - VclPtrInstance<LineLB> pListBox(pParent, nWinBits); + LineLB *pListBox = new LineLB(pParent, nWinBits); pListBox->EnableAutoSize(true); return pListBox; } @@ -1673,7 +1673,7 @@ VCL_BUILDER_DECL_FACTORY(LineEndLB) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinBits |= WB_BORDER; - VclPtrInstance<LineEndLB> pListBox(pParent, nWinBits); + LineEndLB *pListBox = new LineEndLB(pParent, nWinBits); pListBox->EnableAutoSize(true); return pListBox; } diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index 820a6d3b57c9..a1bb1d4c8289 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -496,7 +496,8 @@ VCL_BUILDER_DECL_FACTORY(SvxFontPrevWindow) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; - return VclPtr<SvxFontPrevWindow>::Create(pParent, nWinStyle); + SvxFontPrevWindow *pWindow = new SvxFontPrevWindow(pParent, nWinStyle); + return pWindow; } SvxFontPrevWindow::~SvxFontPrevWindow() diff --git a/svx/source/dialog/fontlb.cxx b/svx/source/dialog/fontlb.cxx index 59f8a598880c..625bbd37f7ac 100644 --- a/svx/source/dialog/fontlb.cxx +++ b/svx/source/dialog/fontlb.cxx @@ -95,7 +95,7 @@ VCL_BUILDER_DECL_FACTORY(SvxFontListBox) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; - return VclPtr<SvxFontListBox>::Create(pParent, nWinStyle); + return new SvxFontListBox(pParent, nWinStyle); } void SvxFontListBox::InsertFontEntry( const OUString& rString, const vcl::Font& rFont, const Color* pColor ) diff --git a/svx/source/dialog/frmdirlbox.cxx b/svx/source/dialog/frmdirlbox.cxx index 237d8e58e19a..ef87c9f98c10 100644 --- a/svx/source/dialog/frmdirlbox.cxx +++ b/svx/source/dialog/frmdirlbox.cxx @@ -45,7 +45,7 @@ FrameDirectionListBox::FrameDirectionListBox( vcl::Window* pParent, WinBits nBit VCL_BUILDER_DECL_FACTORY(FrameDirectionListBox) { (void)rMap; - VclPtrInstance<FrameDirectionListBox> pListBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK|WB_TABSTOP); + FrameDirectionListBox* pListBox = new FrameDirectionListBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK|WB_TABSTOP); pListBox->EnableAutoSize(true); return pListBox; } diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index 50a09fe5bc91..567bc36b9e13 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -799,7 +799,7 @@ FrameSelector::~FrameSelector() VCL_BUILDER_DECL_FACTORY(SvxFrameSelector) { (void)rMap; - return VclPtr<FrameSelector>::Create(pParent); + return new FrameSelector(pParent); } void FrameSelector::Initialize( FrameSelFlags nFlags ) diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index ab5369939dbf..f1b3a9e51717 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -80,7 +80,7 @@ VCL_BUILDER_DECL_FACTORY(GraphCtrl) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; - return VclPtr<GraphCtrl>::Create(pParent, nWinStyle); + return new GraphCtrl(pParent, nWinStyle); } GraphCtrl::~GraphCtrl() diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index d61862794f66..9311c53b9207 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -111,7 +111,7 @@ VCL_BUILDER_DECL_FACTORY(SvxLanguageBox) nBits |= WB_DROPDOWN; else nBits |= WB_BORDER; - VclPtrInstance<SvxLanguageBox> pLanguageBox(pParent, nBits); + SvxLanguageBox *pLanguageBox = new SvxLanguageBox(pParent, nBits); pLanguageBox->EnableAutoSize(true); return pLanguageBox; } @@ -124,7 +124,7 @@ VCL_BUILDER_DECL_FACTORY(SvxLanguageComboBox) nBits |= WB_DROPDOWN; else nBits |= WB_BORDER; - VclPtrInstance<SvxLanguageComboBox> pLanguageBox(pParent, nBits); + SvxLanguageComboBox *pLanguageBox = new SvxLanguageComboBox(pParent, nBits); pLanguageBox->EnableAutoSize(true); return pLanguageBox; } diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx index e07b932e2169..a9c3a9e3f70c 100644 --- a/svx/source/dialog/measctrl.cxx +++ b/svx/source/dialog/measctrl.cxx @@ -68,7 +68,7 @@ VCL_BUILDER_DECL_FACTORY(SvxXMeasurePreview) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; - return VclPtr<SvxXMeasurePreview>::Create(pParent, nWinStyle); + return new SvxXMeasurePreview(pParent, nWinStyle); } Size SvxXMeasurePreview::GetOptimalSize() const diff --git a/svx/source/dialog/relfld.cxx b/svx/source/dialog/relfld.cxx index de7734408b0b..6e177aa02cb2 100644 --- a/svx/source/dialog/relfld.cxx +++ b/svx/source/dialog/relfld.cxx @@ -18,7 +18,9 @@ */ #include "svx/relfld.hxx" -#include "vcl/builderfactory.hxx" +#include "vcl/builder.hxx" + + SvxRelativeField::SvxRelativeField( vcl::Window *const pParent, WinBits const nBits, FieldUnit const eUnit) @@ -37,16 +39,17 @@ SvxRelativeField::SvxRelativeField( SetMax( 9999 ); } -VCL_BUILDER_DECL_FACTORY(SvxRelativeField) +extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL +makeSvxRelativeField(vcl::Window *const pParent, VclBuilder::stringmap & rMap) { OString const custom(VclBuilder::extractCustomProperty(rMap)); FieldUnit const eUnit(VclBuilder::detectUnit(custom)); - return VclPtr<SvxRelativeField>::Create(pParent, - WB_BORDER | WB_SPIN | WB_REPEAT | - WB_LEFT | WB_GROUP, - eUnit); + SvxRelativeField *const pRet = new SvxRelativeField(pParent, + WB_BORDER | WB_SPIN | WB_REPEAT | WB_LEFT | WB_GROUP, eUnit); + return pRet; } + void SvxRelativeField::Modify() { MetricField::Modify(); diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx index 8cf6dcc5d3f9..c038a5d365d2 100644 --- a/svx/source/dialog/txencbox.cxx +++ b/svx/source/dialog/txencbox.cxx @@ -48,12 +48,15 @@ VCL_BUILDER_DECL_FACTORY(SvxTextEncodingBox) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinBits |= WB_BORDER; - VclPtrInstance<SvxTextEncodingBox> pListBox(pParent, nWinBits); + SvxTextEncodingBox *pListBox = new SvxTextEncodingBox(pParent, nWinBits); if (bDropdown) pListBox->EnableAutoSize(true); + return pListBox; } + + SvxTextEncodingBox::~SvxTextEncodingBox() { disposeOnce(); @@ -65,6 +68,8 @@ void SvxTextEncodingBox::dispose() ListBox::dispose(); } + + sal_Int32 SvxTextEncodingBox::EncodingToPos_Impl( rtl_TextEncoding nEnc ) const { sal_Int32 nCount = GetEntryCount(); diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index 3a45e8571608..ba1d4b9a899a 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -54,7 +54,7 @@ VCL_BUILDER_DECL_FACTORY(GalleryPreview) OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinBits |= WB_BORDER; - return VclPtr<GalleryPreview>::Create(pParent, nWinBits); + return new GalleryPreview(pParent, nWinBits); } Size GalleryPreview::GetOptimalSize() const diff --git a/svx/source/tbxctrls/SvxColorValueSet.cxx b/svx/source/tbxctrls/SvxColorValueSet.cxx index cec4efc10128..ef448a40720a 100644 --- a/svx/source/tbxctrls/SvxColorValueSet.cxx +++ b/svx/source/tbxctrls/SvxColorValueSet.cxx @@ -37,7 +37,7 @@ VCL_BUILDER_DECL_FACTORY(SvxColorValueSet) if (!sBorder.isEmpty()) nWinBits |= WB_BORDER; - return VclPtr<SvxColorValueSet>::Create(pParent, nWinBits); + return new SvxColorValueSet(pParent, nWinBits); } sal_uInt32 SvxColorValueSet::getMaxRowCount() |