diff options
author | Jan Holesovsky <kendy@suse.cz> | 2013-04-10 10:37:48 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2013-04-10 10:39:54 +0200 |
commit | 5d67919a5810cf05d6fe53dc14f2b1f073c56719 (patch) | |
tree | 3fbb79de1d0a547e5d720df47903e52e264e1b84 /framework/inc | |
parent | Kill copy'n'paste. (diff) | |
download | core-5d67919a5810cf05d6fe53dc14f2b1f073c56719.tar.gz core-5d67919a5810cf05d6fe53dc14f2b1f073c56719.zip |
Kill the ToolBar class, move the needed bits directly to ToolBox.
Change-Id: I6aaa396931ce613be64026b53372dc24c6189724
Diffstat (limited to 'framework/inc')
12 files changed, 61 insertions, 107 deletions
diff --git a/framework/inc/uielement/addonstoolbarmanager.hxx b/framework/inc/uielement/addonstoolbarmanager.hxx index eb6b1db2af5c..53384bb92428 100644 --- a/framework/inc/uielement/addonstoolbarmanager.hxx +++ b/framework/inc/uielement/addonstoolbarmanager.hxx @@ -37,20 +37,18 @@ #include <cppuhelper/weak.hxx> #include <cppuhelper/interfacecontainer.hxx> -#include <vcl/toolbox.hxx> - +class ToolBox; namespace framework { -class ToolBar; class AddonsToolBarManager : public ToolBarManager { public: AddonsToolBarManager( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, const OUString& rResourceName, - ToolBar* pToolBar ); + ToolBox* pToolBar ); virtual ~AddonsToolBarManager(); // XComponent diff --git a/framework/inc/uielement/buttontoolbarcontroller.hxx b/framework/inc/uielement/buttontoolbarcontroller.hxx index 328b3c3949fa..368062dff5a8 100644 --- a/framework/inc/uielement/buttontoolbarcontroller.hxx +++ b/framework/inc/uielement/buttontoolbarcontroller.hxx @@ -30,15 +30,16 @@ #include <com/sun/star/frame/ControlCommand.hpp> #include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/frame/XToolbarController.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> #include <comphelper/broadcasthelper.hxx> #include <cppuhelper/weak.hxx> -#include <vcl/toolbox.hxx> + +class ToolBox; namespace framework { -class ToolBar; class ButtonToolbarController : public ::com::sun::star::frame::XStatusListener, public ::com::sun::star::frame::XToolbarController, public ::com::sun::star::lang::XInitialization, @@ -49,7 +50,7 @@ class ButtonToolbarController : public ::com::sun::star::frame::XStatusListener, { public: ButtonToolbarController( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, - ToolBox* pToolBar, + ToolBox* pToolBar, const OUString& aCommand ); virtual ~ButtonToolbarController(); diff --git a/framework/inc/uielement/comboboxtoolbarcontroller.hxx b/framework/inc/uielement/comboboxtoolbarcontroller.hxx index 8fa205f86742..442dcd968803 100644 --- a/framework/inc/uielement/comboboxtoolbarcontroller.hxx +++ b/framework/inc/uielement/comboboxtoolbarcontroller.hxx @@ -26,10 +26,11 @@ #include <uielement/complextoolbarcontroller.hxx> +#include <vcl/event.hxx> + namespace framework { -class ToolBar; class ComboBoxControl; class IComboBoxListener diff --git a/framework/inc/uielement/complextoolbarcontroller.hxx b/framework/inc/uielement/complextoolbarcontroller.hxx index 3d28cf6688a5..9bb3848ef362 100644 --- a/framework/inc/uielement/complextoolbarcontroller.hxx +++ b/framework/inc/uielement/complextoolbarcontroller.hxx @@ -27,8 +27,10 @@ #include <com/sun/star/frame/XControlNotificationListener.hpp> #include <svtools/toolboxcontroller.hxx> +#include <tools/link.hxx> -#include <vcl/toolbox.hxx> +class ToolBox; +class Window; namespace framework { @@ -48,15 +50,13 @@ struct NotifyInfo ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > aInfoSeq; }; -class ToolBar; - class ComplexToolbarController : public svt::ToolboxController { public: ComplexToolbarController( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, - ToolBox* pToolBar, + ToolBox* pToolBar, sal_uInt16 nID, const OUString& aCommand ); virtual ~ComplexToolbarController(); diff --git a/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx b/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx index 6757d11b90ca..5886de1c3793 100644 --- a/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx +++ b/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx @@ -25,13 +25,13 @@ #include <com/sun/star/frame/ControlCommand.hpp> #include <uielement/complextoolbarcontroller.hxx> -#include <vcl/toolbox.hxx> #include <vcl/lstbox.hxx> +class ToolBox; + namespace framework { -class ToolBar; class ListBoxControl; class IListBoxListener @@ -53,9 +53,9 @@ class DropdownToolbarController : public IListBoxListener, public: DropdownToolbarController( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, - ToolBox* pToolBar, - sal_uInt16 nID, - sal_Int32 nWidth, + ToolBox* pToolBar, + sal_uInt16 nID, + sal_Int32 nWidth, const OUString& aCommand ); virtual ~DropdownToolbarController(); diff --git a/framework/inc/uielement/edittoolbarcontroller.hxx b/framework/inc/uielement/edittoolbarcontroller.hxx index 590581920ab2..c231d0d6b091 100644 --- a/framework/inc/uielement/edittoolbarcontroller.hxx +++ b/framework/inc/uielement/edittoolbarcontroller.hxx @@ -25,13 +25,13 @@ #include <com/sun/star/frame/ControlCommand.hpp> #include <uielement/complextoolbarcontroller.hxx> -#include <vcl/toolbox.hxx> #include <vcl/edit.hxx> +class ToolBox; + namespace framework { -class ToolBar; class EditControl; class IEditListener @@ -54,9 +54,9 @@ class EditToolbarController : public IEditListener, public: EditToolbarController( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, - ToolBox* pToolBar, - sal_uInt16 nID, - sal_Int32 nWidth, + ToolBox* pToolBar, + sal_uInt16 nID, + sal_Int32 nWidth, const OUString& aCommand ); virtual ~EditToolbarController(); diff --git a/framework/inc/uielement/generictoolbarcontroller.hxx b/framework/inc/uielement/generictoolbarcontroller.hxx index 2eb1697971f9..7ece0f1c6dbf 100644 --- a/framework/inc/uielement/generictoolbarcontroller.hxx +++ b/framework/inc/uielement/generictoolbarcontroller.hxx @@ -21,23 +21,24 @@ #define __FRAMEWORK_UIELEMENT_GENERICTOOLBARCONTROLLER_HXX_ #include <svtools/toolboxcontroller.hxx> -#include <vcl/toolbox.hxx> #include <memory> +#include <tools/link.hxx> + class PopupMenu; +class ToolBox; namespace framework { struct ExecuteInfo; -class ToolBar; class GenericToolbarController : public svt::ToolboxController { public: GenericToolbarController( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, ToolBox* pToolBar, - sal_uInt16 nID, + sal_uInt16 nID, const OUString& aCommand ); virtual ~GenericToolbarController(); @@ -50,7 +51,7 @@ class GenericToolbarController : public svt::ToolboxController // XStatusListener virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); - DECL_STATIC_LINK( GenericToolbarController, ExecuteHdl_Impl, ExecuteInfo* ); + DECL_STATIC_LINK( GenericToolbarController, ExecuteHdl_Impl, ExecuteInfo* ); protected: ToolBox* m_pToolbar; @@ -70,7 +71,7 @@ class MenuToolbarController : public GenericToolbarController MenuToolbarController( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, ToolBox* pToolBar, - sal_uInt16 nID, + sal_uInt16 nID, const OUString& aCommand, const OUString& aModuleIdentifier, const com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess >& xMenuDesc ); diff --git a/framework/inc/uielement/imagebuttontoolbarcontroller.hxx b/framework/inc/uielement/imagebuttontoolbarcontroller.hxx index c5066d8d4034..751351577bc3 100644 --- a/framework/inc/uielement/imagebuttontoolbarcontroller.hxx +++ b/framework/inc/uielement/imagebuttontoolbarcontroller.hxx @@ -25,21 +25,21 @@ #include <com/sun/star/frame/ControlCommand.hpp> #include <uielement/complextoolbarcontroller.hxx> -#include <vcl/toolbox.hxx> #include <vcl/image.hxx> +class ToolBox; + namespace framework { -class ToolBar; class ImageButtonToolbarController : public ComplexToolbarController { public: ImageButtonToolbarController( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, - ToolBox* pToolBar, - sal_uInt16 nID, + ToolBox* pToolBar, + sal_uInt16 nID, const OUString& aCommand ); virtual ~ImageButtonToolbarController(); diff --git a/framework/inc/uielement/spinfieldtoolbarcontroller.hxx b/framework/inc/uielement/spinfieldtoolbarcontroller.hxx index ca30f4f17f50..d54b26541241 100644 --- a/framework/inc/uielement/spinfieldtoolbarcontroller.hxx +++ b/framework/inc/uielement/spinfieldtoolbarcontroller.hxx @@ -25,13 +25,13 @@ #include <com/sun/star/frame/ControlCommand.hpp> #include <uielement/complextoolbarcontroller.hxx> -#include <vcl/toolbox.hxx> #include <vcl/spinfld.hxx> +class ToolBox; + namespace framework { -class ToolBar; class SpinfieldControl; class ISpinfieldListener @@ -60,9 +60,9 @@ class SpinfieldToolbarController : public ISpinfieldListener, public: SpinfieldToolbarController( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, - ToolBox* pToolBar, - sal_uInt16 nID, - sal_Int32 nWidth, + ToolBox* pToolBar, + sal_uInt16 nID, + sal_Int32 nWidth, const OUString& aCommand ); virtual ~SpinfieldToolbarController(); diff --git a/framework/inc/uielement/togglebuttontoolbarcontroller.hxx b/framework/inc/uielement/togglebuttontoolbarcontroller.hxx index a33e226aad5b..ab8e6b4c13c6 100644 --- a/framework/inc/uielement/togglebuttontoolbarcontroller.hxx +++ b/framework/inc/uielement/togglebuttontoolbarcontroller.hxx @@ -25,13 +25,14 @@ #include <com/sun/star/frame/ControlCommand.hpp> #include <uielement/complextoolbarcontroller.hxx> -#include <vcl/toolbox.hxx> -#include <vcl/image.hxx> +#include <tools/link.hxx> + +class Menu; +class ToolBox; namespace framework { -class ToolBar; class ToggleButtonToolbarController : public ComplexToolbarController { @@ -45,9 +46,9 @@ class ToggleButtonToolbarController : public ComplexToolbarController ToggleButtonToolbarController( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, - ToolBox* pToolBar, - sal_uInt16 nID, - Style eStyle, + ToolBox* pToolBar, + sal_uInt16 nID, + Style eStyle, const OUString& aCommand ); virtual ~ToggleButtonToolbarController(); diff --git a/framework/inc/uielement/toolbar.hxx b/framework/inc/uielement/toolbar.hxx deleted file mode 100644 index b7ac587ae595..000000000000 --- a/framework/inc/uielement/toolbar.hxx +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef __FRAMEWORK_UIELEMENT_TOOLBAR_HXX_ -#define __FRAMEWORK_UIELEMENT_TOOLBAR_HXX_ - -#include <vcl/toolbox.hxx> - -namespace framework -{ - -class ToolBarManager; -class ToolBar : public ToolBox -{ - public: - ToolBar( Window* pParent, WinBits nWinBits ); - virtual ~ToolBar(); - - virtual void Command ( const CommandEvent& rCEvt ); - virtual void StateChanged( StateChangedType nType ); - virtual void DataChanged( const DataChangedEvent& rDCEvt ); - - // Provide additional handlers to support external implementations - void SetCommandHdl( const Link& aLink ) { m_aCommandHandler = aLink; } - const Link& GetCommandHdl() const { return m_aCommandHandler; } - void SetStateChangedHdl( const Link& aLink ) { m_aStateChangedHandler = aLink; } - const Link& GetStateChangedHdl() const { return m_aStateChangedHandler; } - void SetDataChangedHdl( const Link& aLink ) { m_aDataChangedHandler = aLink; } - const Link& GetDataChangedHdl() { return m_aDataChangedHandler; } - - private: - Link m_aCommandHandler; - Link m_aStateChangedHandler; - Link m_aDataChangedHandler; -}; - -} - -#endif // __FRAMEWORK_UIELEMENT_TOOLBAR_HXX_ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx index 572bb6bff30b..3e058689df7e 100644 --- a/framework/inc/uielement/toolbarmanager.hxx +++ b/framework/inc/uielement/toolbarmanager.hxx @@ -43,18 +43,22 @@ #include <com/sun/star/ui/ItemStyle.hpp> #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/ui/XAcceleratorConfiguration.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> #include <rtl/ustring.hxx> #include <cppuhelper/weak.hxx> #include <cppuhelper/interfacecontainer.hxx> -#include <vcl/toolbox.hxx> -#include <vcl/accel.hxx> +#include <tools/link.hxx> +#include <vcl/window.hxx> +#include <vcl/timer.hxx> + +class PopupMenu; +class ToolBox; namespace framework { -class ToolBar; class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener , public ::com::sun::star::frame::XStatusListener , public ::com::sun::star::lang::XComponent , @@ -67,7 +71,7 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener ToolBarManager( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, const OUString& rResourceName, - ToolBar* pToolBar ); + ToolBox* pToolBar ); virtual ~ToolBarManager(); // XInterface, XTypeProvider, XServiceInfo @@ -175,6 +179,7 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener typedef BaseHash< SubToolBarControllerVector > SubToolBarToSubToolBarControllerMap; typedef ::boost::unordered_map< sal_uInt16, ::com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess > > MenuDescriptionMap; + bool m_bDisposed : 1, m_bSmallSymbols : 1, m_bModuleIdentified : 1, @@ -183,10 +188,14 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener m_bUpdateControllers : 1, m_bImageOrientationRegistered : 1, m_bImageMirrored : 1; - long m_lImageRotation; - ToolBar* m_pToolBar; - OUString m_aModuleIdentifier; - OUString m_aResourceName; + + long m_lImageRotation; + + ToolBox* m_pToolBar; + + OUString m_aModuleIdentifier; + OUString m_aResourceName; + com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer; com::sun::star::uno::Reference< com::sun::star::frame::XFrame > m_xFrame; com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > m_xUICommandLabels; |