diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-05-09 21:15:13 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-05-09 21:39:57 +0100 |
commit | 266ce1cd530b4ccb2f6ca8c58553da150e9ef40d (patch) | |
tree | f691950917301a23d129635b4b841dea5095fec2 /dbaccess | |
parent | 4a0cf72f40e9545d367f48617c2834146d7bec1a (diff) |
tdf#91052 - more macros for 'make' constructors.
Change-Id: Id05266810760f73db2daba10d1efa14aa9f88dd9
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/control/RelationControl.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/ui/control/SqlNameEdit.cxx | 13 | ||||
-rw-r--r-- | dbaccess/source/ui/control/charsetlistbox.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/control/curledit.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/control/opendoccontrols.cxx | 12 | ||||
-rw-r--r-- | dbaccess/source/ui/control/tabletree.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/indexdialog.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/indexfieldscontrol.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WNameMatch.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WTypeSelect.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/LimitBox.cxx | 8 |
11 files changed, 27 insertions, 49 deletions
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx index b7bdad487f80..4988943f8af0 100644 --- a/dbaccess/source/ui/control/RelationControl.cxx +++ b/dbaccess/source/ui/control/RelationControl.cxx @@ -22,7 +22,7 @@ #include <svtools/editbrowsebox.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <tools/diagnose_ex.h> -#include <vcl/builder.hxx> +#include <vcl/builderfactory.hxx> #include "TableConnectionData.hxx" #include "TableConnection.hxx" #include "TableWindow.hxx" @@ -140,10 +140,7 @@ namespace dbaui { } - extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeORelationControl(vcl::Window *pParent, VclBuilder::stringmap &) - { - return new ORelationControl(pParent); - } + VCL_BUILDER_FACTORY(ORelationControl) void ORelationControl::Init(const TTableConnectionData::value_type& _pConnData) { diff --git a/dbaccess/source/ui/control/SqlNameEdit.cxx b/dbaccess/source/ui/control/SqlNameEdit.cxx index bd3fd01c8f09..2816c9866241 100644 --- a/dbaccess/source/ui/control/SqlNameEdit.cxx +++ b/dbaccess/source/ui/control/SqlNameEdit.cxx @@ -18,7 +18,7 @@ */ #include "SqlNameEdit.hxx" -#include <vcl/builder.hxx> +#include <vcl/builderfactory.hxx> namespace dbaui { @@ -81,14 +81,9 @@ namespace dbaui } } -extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeOSQLNameEdit(vcl::Window *pParent, VclBuilder::stringmap &) -{ - return new dbaui::OSQLNameEdit(pParent); -} +using namespace dbaui; -extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeOSQLNameComboBox(vcl::Window *pParent, VclBuilder::stringmap &) -{ - return new dbaui::OSQLNameComboBox(pParent); -} +VCL_BUILDER_FACTORY(OSQLNameEdit) +VCL_BUILDER_FACTORY(OSQLNameComboBox) /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/control/charsetlistbox.cxx b/dbaccess/source/ui/control/charsetlistbox.cxx index d7a510b4e255..e7f427bcc89a 100644 --- a/dbaccess/source/ui/control/charsetlistbox.cxx +++ b/dbaccess/source/ui/control/charsetlistbox.cxx @@ -19,6 +19,7 @@ #include "charsetlistbox.hxx" +#include <vcl/builderfactory.hxx> #include <svl/itemset.hxx> #include <svl/stritem.hxx> #include <osl/diagnose.h> @@ -38,10 +39,7 @@ namespace dbaui } } - extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeCharSetListBox(vcl::Window *pParent) - { - return new CharSetListBox(pParent); - } + VCL_BUILDER_FACTORY(CharSetListBox) void CharSetListBox::SelectEntryByIanaName( const OUString& _rIanaName ) { diff --git a/dbaccess/source/ui/control/curledit.cxx b/dbaccess/source/ui/control/curledit.cxx index 917e8870c43a..35b58d9154ec 100644 --- a/dbaccess/source/ui/control/curledit.cxx +++ b/dbaccess/source/ui/control/curledit.cxx @@ -20,6 +20,7 @@ #include "curledit.hxx" #include <vcl/svapp.hxx> #include <vcl/settings.hxx> +#include <vcl/builderfactory.hxx> #include <osl/diagnose.h> namespace dbaui @@ -33,8 +34,9 @@ OConnectionURLEdit::OConnectionURLEdit(vcl::Window* _pParent, WinBits _nBits,boo { } -extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeConnectionURLEdit(vcl::Window *pParent) +VCL_BUILDER_DECL_FACTORY(ConnectionURLEdit) { + (void)rMap; return new OConnectionURLEdit(pParent, WB_BORDER, false); } diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx index 72f664e7c4cc..65f1421b279f 100644 --- a/dbaccess/source/ui/control/opendoccontrols.cxx +++ b/dbaccess/source/ui/control/opendoccontrols.cxx @@ -37,7 +37,7 @@ #include <tools/urlobj.hxx> #include <svl/filenotation.hxx> #include <osl/diagnose.h> -#include <vcl/builder.hxx> +#include <vcl/builderfactory.hxx> namespace dbaui { @@ -162,10 +162,7 @@ namespace dbaui impl_init( _pAsciiModuleName ); } - extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeOpenDocumentButton( vcl::Window *pParent, VclBuilder::stringmap & ) - { - return new OpenDocumentButton( pParent, "com.sun.star.sdb.OfficeDatabaseDocument" ); - } + VCL_BUILDER_FACTORY_ARGS( OpenDocumentButton, "com.sun.star.sdb.OfficeDatabaseDocument" ); void OpenDocumentButton::impl_init( const sal_Char* _pAsciiModuleName ) { @@ -192,10 +189,7 @@ namespace dbaui impl_init( _pAsciiModuleName ); } - extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeOpenDocumentListBox( vcl::Window *pParent, VclBuilder::stringmap & ) - { - return new OpenDocumentListBox( pParent, "com.sun.star.sdb.OfficeDatabaseDocument" ); - } + VCL_BUILDER_FACTORY_ARGS( OpenDocumentListBox, "com.sun.star.sdb.OfficeDatabaseDocument" ); void OpenDocumentListBox::impl_init( const sal_Char* _pAsciiModuleName ) { diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index 1d0eddbbfc2a..8b54d8d4b673 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -23,6 +23,7 @@ #include "dbu_control.hrc" #include <vcl/layout.hxx> #include <vcl/menu.hxx> +#include <vcl/builderfactory.hxx> #include <connectivity/dbtools.hxx> #include <comphelper/types.hxx> #include "dbustrings.hrc" @@ -74,7 +75,7 @@ OTableTreeListBox::OTableTreeListBox(vcl::Window* pParent, WinBits nWinStyle) implSetDefaultImages(); } -extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeOTableTreeListBox(vcl::Window *pParent, VclBuilder::stringmap &rMap) +VCL_BUILDER_DECL_FACTORY(OTableTreeListBox) { WinBits nWinStyle = 0; OString sBorder = VclBuilder::extractCustomProperty(rMap); diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index dea680bfd952..9cdfc13d15bf 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -28,6 +28,7 @@ #include "indexcollection.hxx" #include <vcl/layout.hxx> #include <vcl/settings.hxx> +#include <vcl/builderfactory.hxx> #include <com/sun/star/sdb/SQLContext.hpp> #include "UITools.hxx" #include <svtools/imgdef.hxx> @@ -158,10 +159,7 @@ namespace dbaui return bReturn; } - extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeDbaIndexList(vcl::Window *pParent, VclBuilder::stringmap &) - { - return new DbaIndexList (pParent, WB_BORDER); - } + VCL_BUILDER_FACTORY_ARGS(DbaIndexList, WB_BORDER) // DbaIndexDialog DbaIndexDialog::DbaIndexDialog( vcl::Window* _pParent, const Sequence< OUString >& _rFieldNames, diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx index 67e2811d6848..50d91c8f5244 100644 --- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx +++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx @@ -22,7 +22,7 @@ #include <osl/diagnose.h> #include "dbaccess_helpid.hrc" #include <vcl/settings.hxx> -#include <vcl/builder.hxx> +#include <vcl/builderfactory.hxx> namespace dbaui { @@ -103,8 +103,9 @@ namespace dbaui GetDataWindow().SetUniqueId( UID_DLGINDEX_INDEXDETAILS_MAIN ); } - extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeDbaIndexFieldsControl(vcl::Window *pParent, VclBuilder::stringmap &) + VCL_BUILDER_DECL_FACTORY(DbaIndexFieldsControl) { + (void)rMap; return new IndexFieldsControl (pParent, WB_BORDER | WB_NOTABSTOP); } diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx index c533db6fce9f..a2634ebce764 100644 --- a/dbaccess/source/ui/misc/WNameMatch.cxx +++ b/dbaccess/source/ui/misc/WNameMatch.cxx @@ -25,6 +25,7 @@ #include "dbu_misc.hrc" #include <vcl/scrbar.hxx> #include <vcl/settings.hxx> +#include <vcl/builderfactory.hxx> #include "svtools/treelistentry.hxx" #include <com/sun/star/sdbc/DataType.hpp> @@ -372,10 +373,7 @@ OColumnTreeBox::OColumnTreeBox( vcl::Window* pParent, WinBits nBits ) SetSelectionMode( SINGLE_SELECTION ); } -extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeOColumnTreeBox(vcl::Window *pParent, VclBuilder::stringmap &) -{ - return new OColumnTreeBox(pParent); -} +VCL_BUILDER_FACTORY(OColumnTreeBox) void OColumnTreeBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr, const Image& rImg1, const Image& rImg2, SvLBoxButtonKind eButtonKind) { diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx index e294f324b62a..fad658bb2d87 100644 --- a/dbaccess/source/ui/misc/WTypeSelect.cxx +++ b/dbaccess/source/ui/misc/WTypeSelect.cxx @@ -31,6 +31,7 @@ #include "sqlmessage.hxx" #include "FieldControls.hxx" #include <vcl/layout.hxx> +#include <vcl/builderfactory.hxx> #include "dbaccess_slotid.hrc" @@ -401,10 +402,7 @@ void OWizTypeSelectList::setPrimaryKey(OFieldDescription* _pFieldDescr, sal_uInt SetEntryData(_nPos,_pFieldDescr); } -extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeOWizTypeSelectList(vcl::Window *pParent, VclBuilder::stringmap &) -{ - return new OWizTypeSelectList(pParent); -} +VCL_BUILDER_FACTORY(OWizTypeSelectList) bool OWizTypeSelectList::PreNotify( NotifyEvent& rEvt ) { diff --git a/dbaccess/source/ui/querydesign/LimitBox.cxx b/dbaccess/source/ui/querydesign/LimitBox.cxx index 4cd42066f4a6..445d0380a91f 100644 --- a/dbaccess/source/ui/querydesign/LimitBox.cxx +++ b/dbaccess/source/ui/querydesign/LimitBox.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <vcl/builder.hxx> +#include <vcl/builderfactory.hxx> #include "LimitBox.hxx" #include "dbu_qry.hrc" #include "moduledbu.hxx" @@ -108,11 +108,7 @@ void LimitBox::LoadDefaultLimits() } } -extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeLimitBox( vcl::Window *pParent, VclBuilder::stringmap & ) -{ - return new LimitBox( pParent, WB_DROPDOWN | WB_VSCROLL ); -} - +VCL_BUILDER_FACTORY_ARGS( LimitBox, WB_DROPDOWN | WB_VSCROLL ) } ///dbaui namespace |