summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-09-22 11:42:41 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2020-09-22 12:08:04 +0200
commit5a5bb1b02dca3960ba58c70e3b595fa678550604 (patch)
tree017a51a3037404bc7d89d8d71e290f6c984e08d8 /include
parent8c716704df4aaa83fcd198cc8d92cd3e1e542de9 (diff)
Fix symbols already defined MSVC link error
... after af90b8089405d6f042207f5639e750f08798ae92, which made VCL to instantiate exported implementation of the template. Fixes the error: ivcl.lib(vcllo.dll) : error LNK2005: "public: virtual void __cdecl cppu::WeakImplHelper<class com::sun::star::frame::XStatusListener>::acquire(void)" (?acquire@?$WeakImplHelper@VXStatusListener@frame@star@sun@com@@@cppu@@UEAAXXZ) already defined in helpinterceptor.o Modelled after 013f84d06f7ad76d72b863170891589c3504508c. Change-Id: I40ba226d95ad2f1fda177839d9468d6861ca54c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103144 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/weldutils.hxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/vcl/weldutils.hxx b/include/vcl/weldutils.hxx
index 7d22a456119e..0c892427f45d 100644
--- a/include/vcl/weldutils.hxx
+++ b/include/vcl/weldutils.hxx
@@ -159,9 +159,14 @@ public:
}
};
-class VCL_DLLPUBLIC WidgetStatusListener final
+// don't export to avoid duplicate WeakImplHelper definitions with MSVC
+class SAL_DLLPUBLIC_TEMPLATE WidgetStatusListener_Base
: public cppu::WeakImplHelper<css::frame::XStatusListener>
{
+};
+
+class VCL_DLLPUBLIC WidgetStatusListener final : public WidgetStatusListener_Base
+{
public:
WidgetStatusListener(weld::Widget* widget, const OUString& rCommand);