[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/svtools svtools/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 2 16:58:45 UTC 2020
include/svtools/popupwindowcontroller.hxx | 10 ++++++++--
svtools/source/uno/popupwindowcontroller.cxx | 2 +-
2 files changed, 9 insertions(+), 3 deletions(-)
New commits:
commit c5f85e8229852cf3edcef6836880a113658ef1c2
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jan 13 09:14:39 2020 +0000
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Nov 2 17:58:08 2020 +0100
rework SfxCharmapCtrl to be a PopupWindowController
With MSVC, the changes to include/sfx2/charmappopup.hxx would cause spurious
> isvt.lib(svtlo.dll) : error LNK2005: "public: virtual class com::sun::star::uno::Any __cdecl cppu::ImplInheritanceHelper<class svt::ToolboxController,class com::sun::star::lang::XServiceInfo>::queryInterface(class com::sun::star::uno::Type const &)" (?queryInterface@?$ImplInheritanceHelper at VToolboxController@svt@@VXServiceInfo at lang@star at sun@com@@@cppu@@UAA?AVAny at uno@star at sun@com@@ABVType at 4567@@Z) already defined in classificationcontroller.o
> isvt.lib(svtlo.dll) : error LNK2005: "public: virtual void __cdecl cppu::ImplInheritanceHelper<class svt::ToolboxController,class com::sun::star::lang::XServiceInfo>::acquire(void)" (?acquire@?$ImplInheritanceHelper at VToolboxController@svt@@VXServiceInfo at lang@star at sun@com@@@cppu@@UAAXXZ) already defined in classificationcontroller.o
> isvt.lib(svtlo.dll) : error LNK2005: "public: virtual void __cdecl cppu::ImplInheritanceHelper<class svt::ToolboxController,class com::sun::star::lang::XServiceInfo>::release(void)" (?release@?$ImplInheritanceHelper at VToolboxController@svt@@VXServiceInfo at lang@star at sun@com@@@cppu@@UAAXXZ) already defined in classificationcontroller.o
when linking Library_sfx (and which appears to be unrelated to the (implicit)
/INCREMENTAL since 9739c37d8ad7c6fca269709674a6975fa7ebd191 "enable incremental
linking on windows"), which requires the HACK in
include/svtools/popupwindowcontroller.hxx.
(cherry picked from commit 94c1f5cfb96a826220b64608cf0ada76d3bdde31)
[ Picked just the MSVC hack, nothing else, this seems to be needed for
my local MSVC build, but strangely it's not needed on Jenkins. ]
Change-Id: I74c4318e6216001f18d0cf5ed63e78ba2ab13cd3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105187
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/include/svtools/popupwindowcontroller.hxx b/include/svtools/popupwindowcontroller.hxx
index 41de1cbee9c7..719f79f6200c 100644
--- a/include/svtools/popupwindowcontroller.hxx
+++ b/include/svtools/popupwindowcontroller.hxx
@@ -36,8 +36,14 @@ namespace svt
{
class PopupWindowControllerImpl;
-class SVT_DLLPUBLIC PopupWindowController : public cppu::ImplInheritanceHelper< svt::ToolboxController,
- css::lang::XServiceInfo >
+//HACK to avoid duplicate ImplInheritanceHelper symbols with MSVC:
+class SAL_DLLPUBLIC_TEMPLATE PopupWindowController_Base:
+ public cppu::ImplInheritanceHelper<svt::ToolboxController, css::lang::XServiceInfo>
+{
+ using ImplInheritanceHelper::ImplInheritanceHelper;
+};
+
+class SVT_DLLPUBLIC PopupWindowController : public PopupWindowController_Base
{
public:
PopupWindowController( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
diff --git a/svtools/source/uno/popupwindowcontroller.cxx b/svtools/source/uno/popupwindowcontroller.cxx
index 14f1cfc382f5..a909de5eda04 100644
--- a/svtools/source/uno/popupwindowcontroller.cxx
+++ b/svtools/source/uno/popupwindowcontroller.cxx
@@ -156,7 +156,7 @@ IMPL_LINK( PopupWindowControllerImpl, WindowEventListener, VclWindowEvent&, rWin
PopupWindowController::PopupWindowController( const Reference< uno::XComponentContext >& rxContext,
const Reference< frame::XFrame >& xFrame,
const OUString& aCommandURL )
-: ImplInheritanceHelper( rxContext, xFrame, aCommandURL )
+: PopupWindowController_Base( rxContext, xFrame, aCommandURL )
, mxImpl( new PopupWindowControllerImpl() )
{
}
More information about the Libreoffice-commits
mailing list