summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-09-03 12:54:48 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-09-03 22:24:23 +0200
commite44db461ca135fcbef7854c7304c894b65fcd497 (patch)
treebf24b37c2abdbddcde0eaee322d09c61c93569e7 /sfx2
parent446f4b086ccd4cdb9524637e4808dbe6b7d40f7e (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 'sfx2')
-rw-r--r--sfx2/source/appl/newhelp.cxx10
-rw-r--r--sfx2/source/sidebar/SidebarToolBox.cxx4
2 files changed, 14 insertions, 0 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 6a77c164a1b0..c34308afb72d 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -287,6 +287,8 @@ ContentListBox_Impl::ContentListBox_Impl(vcl::Window* pParent, WinBits nStyle)
extern "C" SAL_DLLPUBLIC_EXPORT void makeContentListBox(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(makeContentListBox)>);
WinBits nWinStyle = WB_TABSTOP;
OUString sBorder = BuilderUtils::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
@@ -472,6 +474,8 @@ IndexBox_Impl::IndexBox_Impl(vcl::Window* pParent, WinBits nStyle)
extern "C" SAL_DLLPUBLIC_EXPORT void makeIndexBox(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(makeIndexBox)>);
WinBits nWinBits = WB_CLIPCHILDREN|WB_LEFT|WB_VCENTER|WB_3DLOOK;
OUString sBorder = BuilderUtils::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
@@ -848,6 +852,8 @@ void IndexTabPage_Impl::OpenKeyword()
extern "C" SAL_DLLPUBLIC_EXPORT void makeSearchBox(VclPtr<vcl::Window> & rRet, const VclPtr<vcl::Window> & pParent, VclBuilder::stringmap &)
{
+ static_assert(std::is_same_v<std::remove_pointer_t<VclBuilder::customMakeWidget>,
+ decltype(makeSearchBox)>);
WinBits nWinBits = WB_CLIPCHILDREN|WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_SIMPLEMODE|WB_DROPDOWN;
VclPtrInstance<SearchBox_Impl> pComboBox(pParent, nWinBits);
pComboBox->EnableAutoSize(true);
@@ -879,6 +885,8 @@ void SearchBox_Impl::Select()
extern "C" SAL_DLLPUBLIC_EXPORT void makeSearchResultsBox(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(makeSearchResultsBox)>);
WinBits nWinBits = WB_CLIPCHILDREN|WB_LEFT|WB_VCENTER|WB_3DLOOK;
OUString sBorder = BuilderUtils::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
@@ -1137,6 +1145,8 @@ BookmarksBox_Impl::BookmarksBox_Impl(vcl::Window* pParent, WinBits nStyle)
extern "C" SAL_DLLPUBLIC_EXPORT void makeBookmarksBox(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(makeBookmarksBox)>);
WinBits nWinBits = WB_CLIPCHILDREN|WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_SIMPLEMODE;
OUString sBorder = BuilderUtils::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx
index c3f7ea376782..2aead2974987 100644
--- a/sfx2/source/sidebar/SidebarToolBox.cxx
+++ b/sfx2/source/sidebar/SidebarToolBox.cxx
@@ -333,6 +333,8 @@ public:
extern "C" SAL_DLLPUBLIC_EXPORT void makeSidebarToolBox(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(makeSidebarToolBox)>);
VclPtrInstance<SidebarToolBox> pBox(pParent);
pBox->InitToolBox(rMap);
rRet = pBox;
@@ -340,6 +342,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT void makeSidebarToolBox(VclPtr<vcl::Window> & rR
extern "C" SAL_DLLPUBLIC_EXPORT void makeNotebookbarToolBox(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(makeNotebookbarToolBox)>);
VclPtrInstance<NotebookbarToolBox> pBox(pParent);
pBox->InitToolBox(rMap);
rRet = pBox;