include/vcl/weldutils.hxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 5a5bb1b02dca3960ba58c70e3b595fa678550604
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Tue Sep 22 11:42:41 2020 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Tue Sep 22 12:08:04 2020 +0200

    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.kagan...@collabora.com>
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

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);
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to