diff options
Diffstat (limited to 'framework/inc/uielement/toolbarwrapper.hxx')
-rw-r--r-- | framework/inc/uielement/toolbarwrapper.hxx | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/framework/inc/uielement/toolbarwrapper.hxx b/framework/inc/uielement/toolbarwrapper.hxx index 60d5759f6316..6325c0b54183 100644 --- a/framework/inc/uielement/toolbarwrapper.hxx +++ b/framework/inc/uielement/toolbarwrapper.hxx @@ -17,31 +17,36 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_FRAMEWORK_INC_UIELEMENT_TOOLBARWRAPPER_HXX -#define INCLUDED_FRAMEWORK_INC_UIELEMENT_TOOLBARWRAPPER_HXX +#pragma once #include <helper/uiconfigelementwrapperbase.hxx> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/ui/XUIFunctionListener.hpp> +#include <com/sun/star/ui/XContextChangeEventListener.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include <rtl/ref.hxx> +#include <memory> -namespace framework +namespace weld { + class Builder; + class Container; + class Toolbar; +} +namespace framework +{ class ToolBarManager; -class ToolBarWrapper final : public css::ui::XUIFunctionListener, - public UIConfigElementWrapperBase + +class ToolBarWrapper final : public cppu::ImplInheritanceHelper<UIConfigElementWrapperBase, + css::ui::XUIFunctionListener, + css::ui::XContextChangeEventListener> { public: ToolBarWrapper( const css::uno::Reference< css::uno::XComponentContext >& xContext ); virtual ~ToolBarWrapper() override; - // XInterface - virtual void SAL_CALL acquire() throw() override; - virtual void SAL_CALL release() throw() override; - virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - // XComponent virtual void SAL_CALL dispose() override; @@ -60,6 +65,9 @@ class ToolBarWrapper final : public css::ui::XUIFunctionListener, // XUIFunctionListener virtual void SAL_CALL functionExecute( const OUString& aUIElementName, const OUString& aCommand ) override; + // XContextChangeEventListener + virtual void SAL_CALL notifyContextChangeEvent( const css::ui::ContextChangeEventObject& aEvent ) override; + // XEventListener using cppu::OPropertySetHelper::disposing; virtual void SAL_CALL disposing( const css::lang::EventObject& aEvent ) override; @@ -68,12 +76,15 @@ class ToolBarWrapper final : public css::ui::XUIFunctionListener, virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const css::uno::Any& aValue ) override; virtual void impl_fillNewData() override; - css::uno::Reference< css::lang::XComponent > m_xToolBarManager; + rtl::Reference< ToolBarManager > m_xToolBarManager; css::uno::Reference< css::uno::XComponentContext > m_xContext; + css::uno::Reference< css::ui::XUIElement > m_xSubElement; + + std::unique_ptr<weld::Builder> m_xBuilder; + std::unique_ptr<weld::Container> m_xTopLevel; + std::unique_ptr<weld::Toolbar> m_xWeldedToolbar; }; } -#endif // INCLUDED_FRAMEWORK_INC_UIELEMENT_TOOLBARWRAPPER_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |