diff options
Diffstat (limited to 'include/svx/verttexttbxctrl.hxx')
-rw-r--r-- | include/svx/verttexttbxctrl.hxx | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/include/svx/verttexttbxctrl.hxx b/include/svx/verttexttbxctrl.hxx index 157a1f85def9..12498068c467 100644 --- a/include/svx/verttexttbxctrl.hxx +++ b/include/svx/verttexttbxctrl.hxx @@ -19,37 +19,53 @@ #ifndef INCLUDED_SVX_VERTTEXTTBXCTRL_HXX #define INCLUDED_SVX_VERTTEXTTBXCTRL_HXX -#include <sfx2/tbxctrl.hxx> +#include <com/sun/star/lang/XServiceInfo.hpp> + +#include <cppuhelper/implbase.hxx> +#include <svtools/toolboxcontroller.hxx> + #include <svx/svxdllapi.h> +//HACK to avoid duplicate ImplInheritanceHelper symbols with MSVC: +class SAL_DLLPUBLIC_TEMPLATE SvxVertCTLTextTbxCtrl_Base: + public cppu::ImplInheritanceHelper<svt::ToolboxController, css::lang::XServiceInfo> +{ + using ImplInheritanceHelper::ImplInheritanceHelper; +}; + /* control to remove/insert cjk settings dependent vertical text toolbox item */ -class SvxVertCTLTextTbxCtrl : public SfxToolBoxControl +class SvxVertCTLTextTbxCtrl : public SvxVertCTLTextTbxCtrl_Base { public: - SvxVertCTLTextTbxCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); + explicit SvxVertCTLTextTbxCtrl(const css::uno::Reference<css::uno::XComponentContext>& rContext); + virtual ~SvxVertCTLTextTbxCtrl() override; - // XInitialization - virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& rArguments) override; + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() override = 0; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; - virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, - const SfxPoolItem* pState ) override; + // XStatusListener + virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent& rEvent) override; }; class SVX_DLLPUBLIC SvxCTLTextTbxCtrl final : public SvxVertCTLTextTbxCtrl { public: - SFX_DECL_TOOLBOX_CONTROL(); - SvxCTLTextTbxCtrl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); + SvxCTLTextTbxCtrl(const css::uno::Reference<css::uno::XComponentContext>& rContext); + + virtual OUString SAL_CALL getImplementationName() override; }; class SVX_DLLPUBLIC SvxVertTextTbxCtrl final : public SvxVertCTLTextTbxCtrl { public: - SFX_DECL_TOOLBOX_CONTROL(); - SvxVertTextTbxCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); + SvxVertTextTbxCtrl(const css::uno::Reference<css::uno::XComponentContext>& rContext); + + virtual OUString SAL_CALL getImplementationName() override; }; #endif |