From 164d8e3b1aa660d65c1af9570e67b66520bd953a Mon Sep 17 00:00:00 2001 From: melikeyurtoglu Date: Thu, 3 Nov 2016 02:35:00 +0200 Subject: tdf#91222 VclBuilder constructor cleanup Change-Id: I53bca2a9113862b8e7058937e231721c5f81a9de Signed-off-by: melikeyurtoglu Reviewed-on: https://gerrit.libreoffice.org/30511 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- cui/source/customize/acccfg.cxx | 11 +---------- cui/source/customize/cfgutil.cxx | 22 ++-------------------- cui/source/customize/macropg.cxx | 11 +---------- cui/source/customize/selector.cxx | 22 ++-------------------- cui/source/dialogs/colorpicker.cxx | 33 +++------------------------------ cui/source/dialogs/cuigrfflt.cxx | 13 +------------ cui/source/dialogs/hlmarkwn.cxx | 9 +-------- cui/source/tabpages/grfpage.cxx | 9 +-------- 8 files changed, 12 insertions(+), 118 deletions(-) (limited to 'cui') diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index ae7d1cc5d26f..1c98ae853757 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -664,16 +664,7 @@ void SfxAccCfgLBoxString_Impl::Paint(const Point& aPos, SvTreeListBox& /*rDevice } -VCL_BUILDER_DECL_FACTORY(SfxAccCfgTabListBox) -{ - WinBits nWinBits = WB_TABSTOP; - - OString sBorder = VclBuilder::extractCustomProperty(rMap); - if (!sBorder.isEmpty()) - nWinBits |= WB_BORDER; - - rRet = VclPtr::Create(pParent, nWinBits); -} +VCL_BUILDER_FACTORY_CONSTRUCTOR(SfxAccCfgTabListBox_Impl, WB_TABSTOP) SfxAccCfgTabListBox_Impl::~SfxAccCfgTabListBox_Impl() { diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 1019821766e0..1209658c0d60 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -258,16 +258,7 @@ SfxConfigFunctionListBox::SfxConfigFunctionListBox(vcl::Window* pParent, WinBits GetModel()->SetSortMode( SortAscending ); } -VCL_BUILDER_DECL_FACTORY(SfxConfigFunctionListBox) -{ - WinBits nWinBits = WB_TABSTOP; - - OString sBorder = VclBuilder::extractCustomProperty(rMap); - if (!sBorder.isEmpty()) - nWinBits |= WB_BORDER; - - rRet = VclPtr::Create(pParent, nWinBits); -} +VCL_BUILDER_FACTORY_CONSTRUCTOR(SfxConfigFunctionListBox, WB_TABSTOP) SfxConfigFunctionListBox::~SfxConfigFunctionListBox() { @@ -398,16 +389,7 @@ SfxConfigGroupListBox::SfxConfigGroupListBox(vcl::Window* pParent, WinBits nStyl SetNodeBitmaps( pImp->m_collapsedImage, pImp->m_expandedImage ); } -VCL_BUILDER_DECL_FACTORY(SfxConfigGroupListBox) -{ - WinBits nWinBits = WB_TABSTOP; - - OString sBorder = VclBuilder::extractCustomProperty(rMap); - if (!sBorder.isEmpty()) - nWinBits |= WB_BORDER; - - rRet = VclPtr::Create(pParent, nWinBits); -} +VCL_BUILDER_FACTORY_CONSTRUCTOR(SfxConfigGroupListBox, WB_TABSTOP) SfxConfigGroupListBox::~SfxConfigGroupListBox() { diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 7ff2f551da7a..4575e9ffa4e2 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -153,16 +153,7 @@ void MacroEventListBox::dispose() Control::dispose(); } -VCL_BUILDER_DECL_FACTORY(MacroEventListBox) -{ - WinBits nWinBits = WB_TABSTOP; - - OString sBorder = VclBuilder::extractCustomProperty(rMap); - if (!sBorder.isEmpty()) - nWinBits |= WB_BORDER; - - rRet = VclPtr::Create(pParent, nWinBits); -} +VCL_BUILDER_FACTORY_CONSTRUCTOR(MacroEventListBox, WB_TABSTOP) Size MacroEventListBox::GetOptimalSize() const { diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index 17cb9f160e5e..f578c716d9ee 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -88,16 +88,7 @@ SvxConfigFunctionListBox::SvxConfigFunctionListBox(vcl::Window* pParent, WinBits LINK( this, SvxConfigFunctionListBox, TimerHdl ) ); } -VCL_BUILDER_DECL_FACTORY(SvxConfigFunctionListBox) -{ - WinBits nWinBits = WB_TABSTOP; - - OString sBorder = VclBuilder::extractCustomProperty(rMap); - if (!sBorder.isEmpty()) - nWinBits |= WB_BORDER; - - rRet = VclPtr::Create(pParent, nWinBits); -} +VCL_BUILDER_FACTORY_CONSTRUCTOR(SvxConfigFunctionListBox, WB_TABSTOP) SvxConfigFunctionListBox::~SvxConfigFunctionListBox() { @@ -225,16 +216,7 @@ SvxConfigGroupListBox::SvxConfigGroupListBox(vcl::Window* pParent, WinBits nStyl ); } -VCL_BUILDER_DECL_FACTORY(SvxConfigGroupListBox) -{ - WinBits nWinBits = WB_TABSTOP; - - OString sBorder = VclBuilder::extractCustomProperty(rMap); - if (!sBorder.isEmpty()) - nWinBits |= WB_BORDER; - - rRet = VclPtr::Create(pParent, nWinBits); -} +VCL_BUILDER_FACTORY_CONSTRUCTOR(SvxConfigGroupListBox, WB_TABSTOP) SvxConfigGroupListBox::~SvxConfigGroupListBox() { diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index 5591310489c7..5299989c9e57 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -166,16 +166,7 @@ ColorPreviewControl::ColorPreviewControl(vcl::Window* pParent, WinBits nStyle) { } -VCL_BUILDER_DECL_FACTORY(ColorPreviewControl) -{ - WinBits nBits = 0; - - OString sBorder = VclBuilder::extractCustomProperty(rMap); - if (!sBorder.isEmpty()) - nBits |= WB_BORDER; - - rRet = VclPtr::Create(pParent, nBits); -} +VCL_BUILDER_FACTORY_CONSTRUCTOR(ColorPreviewControl, 0) void ColorPreviewControl::SetColor( const Color& rCol ) { @@ -263,16 +254,7 @@ void ColorFieldControl::dispose() Control::dispose(); } -VCL_BUILDER_DECL_FACTORY(ColorFieldControl) -{ - WinBits nBits = 0; - - OString sBorder = VclBuilder::extractCustomProperty(rMap); - if (!sBorder.isEmpty()) - nBits |= WB_BORDER; - - rRet = VclPtr::Create(pParent, nBits); -} +VCL_BUILDER_FACTORY_CONSTRUCTOR(ColorFieldControl, 0) Size ColorFieldControl::GetOptimalSize() const { @@ -665,16 +647,7 @@ void ColorSliderControl::dispose() Control::dispose(); } -VCL_BUILDER_DECL_FACTORY(ColorSliderControl) -{ - WinBits nBits = 0; - - OString sBorder = VclBuilder::extractCustomProperty(rMap); - if (!sBorder.isEmpty()) - nBits |= WB_BORDER; - - rRet = VclPtr::Create(pParent, nBits); -} +VCL_BUILDER_FACTORY_CONSTRUCTOR(ColorSliderControl, 0) void ColorSliderControl::UpdateBitmap() { diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx index 43217dc39d96..c6928c25e029 100644 --- a/cui/source/dialogs/cuigrfflt.cxx +++ b/cui/source/dialogs/cuigrfflt.cxx @@ -38,18 +38,7 @@ GraphicPreviewWindow::GraphicPreviewWindow(vcl::Window* pParent, { } - -VCL_BUILDER_DECL_FACTORY(GraphicPreviewWindow) -{ - WinBits nWinBits = WB_TABSTOP; - - OString sBorder = VclBuilder::extractCustomProperty(rMap); - if (!sBorder.isEmpty()) - nWinBits |= WB_BORDER; - - rRet = VclPtr::Create(pParent, nWinBits); -} - +VCL_BUILDER_FACTORY_CONSTRUCTOR(GraphicPreviewWindow, WB_TABSTOP) Size GraphicPreviewWindow::GetOptimalSize() const { diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx index f2087cc4840e..a7d6d2f3681d 100644 --- a/cui/source/dialogs/hlmarkwn.cxx +++ b/cui/source/dialogs/hlmarkwn.cxx @@ -84,14 +84,7 @@ void SvxHlmarkTreeLBox::dispose() SvTreeListBox::dispose(); } -VCL_BUILDER_DECL_FACTORY(SvxHlmarkTreeLBox) -{ - WinBits nWinStyle = WB_TABSTOP; - OString sBorder = VclBuilder::extractCustomProperty(rMap); - if (!sBorder.isEmpty()) - nWinStyle |= WB_BORDER; - rRet = VclPtr::Create(pParent, nWinStyle); -} +VCL_BUILDER_FACTORY_CONSTRUCTOR(SvxHlmarkTreeLBox, WB_TABSTOP) Size SvxHlmarkTreeLBox::GetOptimalSize() const { diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 0e0965819b27..a6972ef572ee 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -777,14 +777,7 @@ Size SvxCropExample::GetOptimalSize() const return LogicToPixel(Size(78, 78), MapUnit::MapAppFont); } -VCL_BUILDER_DECL_FACTORY(SvxCropExample) -{ - WinBits nWinStyle = 0; - OString sBorder = VclBuilder::extractCustomProperty(rMap); - if (!sBorder.isEmpty()) - nWinStyle |= WB_BORDER; - rRet = VclPtr::Create(pParent, nWinStyle); -} +VCL_BUILDER_FACTORY_CONSTRUCTOR(SvxCropExample, 0) void SvxCropExample::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) { -- cgit