summaryrefslogtreecommitdiff
path: root/svx
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-11 15:12:08 +0100
commit9f016bd69422bdfb4cf7c4f5e57356eb98db2d8c (patch)
treec32e463b68bad8cfc1ab9f69792b8c10071515bf /svx
parente7473c692cad4c19f1d9eadd2547df4a50875baf (diff)
Switch VclBuilder constructors to use VclPtr.
Change-Id: Id35a86eb52bbde6ca09a5e61a0b1a79b23be8faf
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/checklbx.cxx2
-rw-r--r--svx/source/dialog/connctrl.cxx2
-rw-r--r--svx/source/dialog/dlgctrl.cxx12
-rw-r--r--svx/source/dialog/fntctrl.cxx3
-rw-r--r--svx/source/dialog/fontlb.cxx2
-rw-r--r--svx/source/dialog/frmdirlbox.cxx2
-rw-r--r--svx/source/dialog/frmsel.cxx2
-rw-r--r--svx/source/dialog/graphctl.cxx2
-rw-r--r--svx/source/dialog/langbox.cxx4
-rw-r--r--svx/source/dialog/measctrl.cxx2
-rw-r--r--svx/source/dialog/relfld.cxx15
-rw-r--r--svx/source/dialog/txencbox.cxx7
-rw-r--r--svx/source/gallery2/galctrl.cxx2
-rw-r--r--svx/source/tbxctrls/SvxColorValueSet.cxx2
14 files changed, 25 insertions, 34 deletions
diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx
index 66527a7132fb..fb86f8c0ee46 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 new SvxCheckListBox(pParent, nWinStyle);
+ return VclPtr<SvxCheckListBox>::Create(pParent, nWinStyle);
}
void SvxCheckListBox::SetNormalStaticImage(const Image& rNormalStaticImage)
diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx
index a130f9f858fa..d24326dfe89b 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 new SvxXConnectionPreview(pParent, nWinStyle);
+ return VclPtr<SvxXConnectionPreview>::Create(pParent, nWinStyle);
}
SvxXConnectionPreview::~SvxXConnectionPreview()
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index ad7c410a690d..1019bf43b19b 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;
- ColorLB *pListBox = new ColorLB(pParent, nWinBits);
+ VclPtrInstance<ColorLB> pListBox(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;
- HatchingLB *pListBox = new HatchingLB(pParent, nWinStyle);
+ VclPtrInstance<HatchingLB> pListBox(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;
- GradientLB *pListBox = new GradientLB(pParent, nWinStyle);
+ VclPtrInstance<GradientLB> pListBox(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;
- BitmapLB *pListBox = new BitmapLB(pParent, nWinStyle);
+ VclPtrInstance<BitmapLB> pListBox(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;
- LineLB *pListBox = new LineLB(pParent, nWinBits);
+ VclPtrInstance<LineLB> pListBox(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;
- LineEndLB *pListBox = new LineEndLB(pParent, nWinBits);
+ VclPtrInstance<LineEndLB> pListBox(pParent, nWinBits);
pListBox->EnableAutoSize(true);
return pListBox;
}
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index a1bb1d4c8289..820a6d3b57c9 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -496,8 +496,7 @@ VCL_BUILDER_DECL_FACTORY(SvxFontPrevWindow)
OString sBorder = VclBuilder::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinStyle |= WB_BORDER;
- SvxFontPrevWindow *pWindow = new SvxFontPrevWindow(pParent, nWinStyle);
- return pWindow;
+ return VclPtr<SvxFontPrevWindow>::Create(pParent, nWinStyle);
}
SvxFontPrevWindow::~SvxFontPrevWindow()
diff --git a/svx/source/dialog/fontlb.cxx b/svx/source/dialog/fontlb.cxx
index 625bbd37f7ac..59f8a598880c 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 new SvxFontListBox(pParent, nWinStyle);
+ return VclPtr<SvxFontListBox>::Create(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 ef87c9f98c10..237d8e58e19a 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;
- FrameDirectionListBox* pListBox = new FrameDirectionListBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK|WB_TABSTOP);
+ VclPtrInstance<FrameDirectionListBox> pListBox(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 567bc36b9e13..50a09fe5bc91 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 new FrameSelector(pParent);
+ return VclPtr<FrameSelector>::Create(pParent);
}
void FrameSelector::Initialize( FrameSelFlags nFlags )
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index f1b3a9e51717..ab5369939dbf 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 new GraphCtrl(pParent, nWinStyle);
+ return VclPtr<GraphCtrl>::Create(pParent, nWinStyle);
}
GraphCtrl::~GraphCtrl()
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 9311c53b9207..d61862794f66 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;
- SvxLanguageBox *pLanguageBox = new SvxLanguageBox(pParent, nBits);
+ VclPtrInstance<SvxLanguageBox> pLanguageBox(pParent, nBits);
pLanguageBox->EnableAutoSize(true);
return pLanguageBox;
}
@@ -124,7 +124,7 @@ VCL_BUILDER_DECL_FACTORY(SvxLanguageComboBox)
nBits |= WB_DROPDOWN;
else
nBits |= WB_BORDER;
- SvxLanguageComboBox *pLanguageBox = new SvxLanguageComboBox(pParent, nBits);
+ VclPtrInstance<SvxLanguageComboBox> pLanguageBox(pParent, nBits);
pLanguageBox->EnableAutoSize(true);
return pLanguageBox;
}
diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx
index a9c3a9e3f70c..e07b932e2169 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 new SvxXMeasurePreview(pParent, nWinStyle);
+ return VclPtr<SvxXMeasurePreview>::Create(pParent, nWinStyle);
}
Size SvxXMeasurePreview::GetOptimalSize() const
diff --git a/svx/source/dialog/relfld.cxx b/svx/source/dialog/relfld.cxx
index 6e177aa02cb2..de7734408b0b 100644
--- a/svx/source/dialog/relfld.cxx
+++ b/svx/source/dialog/relfld.cxx
@@ -18,9 +18,7 @@
*/
#include "svx/relfld.hxx"
-#include "vcl/builder.hxx"
-
-
+#include "vcl/builderfactory.hxx"
SvxRelativeField::SvxRelativeField(
vcl::Window *const pParent, WinBits const nBits, FieldUnit const eUnit)
@@ -39,17 +37,16 @@ SvxRelativeField::SvxRelativeField(
SetMax( 9999 );
}
-extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL
-makeSvxRelativeField(vcl::Window *const pParent, VclBuilder::stringmap & rMap)
+VCL_BUILDER_DECL_FACTORY(SvxRelativeField)
{
OString const custom(VclBuilder::extractCustomProperty(rMap));
FieldUnit const eUnit(VclBuilder::detectUnit(custom));
- SvxRelativeField *const pRet = new SvxRelativeField(pParent,
- WB_BORDER | WB_SPIN | WB_REPEAT | WB_LEFT | WB_GROUP, eUnit);
- return pRet;
+ return VclPtr<SvxRelativeField>::Create(pParent,
+ WB_BORDER | WB_SPIN | WB_REPEAT |
+ WB_LEFT | WB_GROUP,
+ eUnit);
}
-
void SvxRelativeField::Modify()
{
MetricField::Modify();
diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx
index c038a5d365d2..8cf6dcc5d3f9 100644
--- a/svx/source/dialog/txencbox.cxx
+++ b/svx/source/dialog/txencbox.cxx
@@ -48,15 +48,12 @@ VCL_BUILDER_DECL_FACTORY(SvxTextEncodingBox)
OString sBorder = VclBuilder::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinBits |= WB_BORDER;
- SvxTextEncodingBox *pListBox = new SvxTextEncodingBox(pParent, nWinBits);
+ VclPtrInstance<SvxTextEncodingBox> pListBox(pParent, nWinBits);
if (bDropdown)
pListBox->EnableAutoSize(true);
-
return pListBox;
}
-
-
SvxTextEncodingBox::~SvxTextEncodingBox()
{
disposeOnce();
@@ -68,8 +65,6 @@ 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 ba1d4b9a899a..3a45e8571608 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 new GalleryPreview(pParent, nWinBits);
+ return VclPtr<GalleryPreview>::Create(pParent, nWinBits);
}
Size GalleryPreview::GetOptimalSize() const
diff --git a/svx/source/tbxctrls/SvxColorValueSet.cxx b/svx/source/tbxctrls/SvxColorValueSet.cxx
index ef448a40720a..cec4efc10128 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 new SvxColorValueSet(pParent, nWinBits);
+ return VclPtr<SvxColorValueSet>::Create(pParent, nWinBits);
}
sal_uInt32 SvxColorValueSet::getMaxRowCount()