summaryrefslogtreecommitdiff
path: root/include/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-01-13 09:14:39 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-01-14 11:51:06 +0100
commit94c1f5cfb96a826220b64608cf0ada76d3bdde31 (patch)
tree15c3db39b12440bb5079a28dfe1001983ab9f8f5 /include/sfx2
parent9bb9fb43a69dd7c0afe864caadb8bb9d45207479 (diff)
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@VToolboxController@svt@@VXServiceInfo@lang@star@sun@com@@@cppu@@UAA?AVAny@uno@star@sun@com@@ABVType@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@VToolboxController@svt@@VXServiceInfo@lang@star@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@VToolboxController@svt@@VXServiceInfo@lang@star@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. Change-Id: I74c4318e6216001f18d0cf5ed63e78ba2ab13cd3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86664 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/sfx2')
-rw-r--r--include/sfx2/charmapcontrol.hxx8
-rw-r--r--include/sfx2/charmappopup.hxx19
2 files changed, 17 insertions, 10 deletions
diff --git a/include/sfx2/charmapcontrol.hxx b/include/sfx2/charmapcontrol.hxx
index 4c0501c0abfd..e6a8f672eef8 100644
--- a/include/sfx2/charmapcontrol.hxx
+++ b/include/sfx2/charmapcontrol.hxx
@@ -24,16 +24,18 @@
#include <sfx2/dllapi.h>
#include <sfx2/tbxctrl.hxx>
#include <sfx2/charwin.hxx>
+#include <svtools/toolbarmenu.hxx>
#include <vcl/button.hxx>
#include <deque>
+class CharmapPopup;
+
namespace com::sun::star::frame { class XFrame; }
-class SfxCharmapCtrl final : public SfxPopupWindow
+class SfxCharmapCtrl final : public svtools::ToolbarPopup
{
public:
- explicit SfxCharmapCtrl(sal_uInt16 nId, vcl::Window* pParent,
- const css::uno::Reference< css::frame::XFrame >& rFrame);
+ explicit SfxCharmapCtrl(CharmapPopup* pControl, vcl::Window* pParent);
virtual ~SfxCharmapCtrl() override;
diff --git a/include/sfx2/charmappopup.hxx b/include/sfx2/charmappopup.hxx
index d896acd45e45..a691327104b6 100644
--- a/include/sfx2/charmappopup.hxx
+++ b/include/sfx2/charmappopup.hxx
@@ -20,19 +20,24 @@
#ifndef INCLUDED_SFX2_INC_CHARMAPPOPUP_HXX
#define INCLUDED_SFX2_INC_CHARMAPPOPUP_HXX
-#include <sfx2/tbxctrl.hxx>
+#include <svtools/popupwindowcontroller.hxx>
#include <sfx2/dllapi.h>
-class SFX2_DLLPUBLIC CharmapPopup final : public SfxToolBoxControl
+class SFX2_DLLPUBLIC CharmapPopup final : public svt::PopupWindowController
{
public:
- SFX_DECL_TOOLBOX_CONTROL();
-
- CharmapPopup(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
+ CharmapPopup(const css::uno::Reference<css::uno::XComponentContext>& rContext);
virtual ~CharmapPopup() override;
- virtual VclPtr<SfxPopupWindow> CreatePopupWindow() override;
- virtual void SAL_CALL execute( sal_Int16 /*KeyModifier*/ ) override;
+ using svt::ToolboxController::createPopupWindow;
+ virtual VclPtr<vcl::Window> createPopupWindow( vcl::Window* pParent ) override;
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& rArguments ) override;
};
#endif