diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-09-03 12:54:48 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-09-03 22:24:23 +0200 |
commit | e44db461ca135fcbef7854c7304c894b65fcd497 (patch) | |
tree | bf24b37c2abdbddcde0eaee322d09c61c93569e7 /svtools | |
parent | 446f4b086ccd4cdb9524637e4808dbe6b7d40f7e (diff) |
Ensure that VCL builder entry points use proper function type
This removes duplicating typedefs from NotebookBarAddonsMerger,
and removes dependency of include/vcl/builder.hxx on
include/vcl/NotebookBarAddonsMerger.hxx.
Change-Id: Ica5787c934d1b8ce21623f28ce155337637fdf54
Reviewed-on: https://gerrit.libreoffice.org/78549
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/fileview.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 6 | ||||
-rw-r--r-- | svtools/source/control/inettbc.cxx | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 23a32c0590b9..4c979935d108 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -881,6 +881,8 @@ void SvtFileView::dispose() extern "C" SAL_DLLPUBLIC_EXPORT void makeSvtFileView(VclPtr<vcl::Window> & rRet, const VclPtr<vcl::Window> & pParent, VclBuilder::stringmap & rMap) { + static_assert(std::is_same_v<std::remove_pointer_t<VclBuilder::customMakeWidget>, + decltype(makeSvtFileView)>); WinBits nBits = WB_CLIPCHILDREN|WB_LEFT|WB_VCENTER|WB_3DLOOK; bool bDropdown = BuilderUtils::extractDropdown(rMap); diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index d731cacf8cf3..860186e80a3a 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -341,6 +341,8 @@ FontNameBox::FontNameBox( vcl::Window* pParent, WinBits nWinStyle ) : extern "C" SAL_DLLPUBLIC_EXPORT void makeFontNameBox(VclPtr<vcl::Window> & rRet, const VclPtr<vcl::Window> & pParent, VclBuilder::stringmap & rMap) { + static_assert(std::is_same_v<std::remove_pointer_t<VclBuilder::customMakeWidget>, + decltype(makeFontNameBox)>); bool bDropdown = BuilderUtils::extractDropdown(rMap); WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP; if (bDropdown) @@ -727,6 +729,8 @@ Size FontStyleBox::GetOptimalSize() const extern "C" SAL_DLLPUBLIC_EXPORT void makeFontStyleBox(VclPtr<vcl::Window> & rRet, const VclPtr<vcl::Window> & pParent, VclBuilder::stringmap & rMap) { + static_assert(std::is_same_v<std::remove_pointer_t<VclBuilder::customMakeWidget>, + decltype(makeFontStyleBox)>); bool bDropdown = BuilderUtils::extractDropdown(rMap); WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP; if (bDropdown) @@ -927,6 +931,8 @@ FontSizeBox::FontSizeBox( vcl::Window* pParent, WinBits nWinSize ) : extern "C" SAL_DLLPUBLIC_EXPORT void makeFontSizeBox(VclPtr<vcl::Window> & rRet, const VclPtr<vcl::Window> & pParent, VclBuilder::stringmap & rMap) { + static_assert(std::is_same_v<std::remove_pointer_t<VclBuilder::customMakeWidget>, + decltype(makeFontSizeBox)>); bool bDropdown = BuilderUtils::extractDropdown(rMap); WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP; if (bDropdown) diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index e40b8f703fe1..9d3c130f8880 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -1414,6 +1414,8 @@ SvtURLBox::SvtURLBox( vcl::Window* pParent, WinBits _nStyle, INetProtocol eSmart extern "C" SAL_DLLPUBLIC_EXPORT void makeSvtURLBox(VclPtr<vcl::Window> & rRet, const VclPtr<vcl::Window> & pParent, VclBuilder::stringmap &) { + static_assert(std::is_same_v<std::remove_pointer_t<VclBuilder::customMakeWidget>, + decltype(makeSvtURLBox)>); WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP| WB_DROPDOWN|WB_AUTOHSCROLL; VclPtrInstance<SvtURLBox> pListBox(pParent, nWinBits, INetProtocol::NotValid, false); |