24#include <com/sun/star/container/XIndexAccess.hpp>
25#include <com/sun/star/frame/XFrame.hpp>
26#include <com/sun/star/frame/XStatusListener.hpp>
27#include <com/sun/star/frame/XUIControllerFactory.hpp>
28#include <com/sun/star/frame/XSubToolbarController.hpp>
29#include <com/sun/star/frame/XLayoutManager.hpp>
30#include <com/sun/star/frame/XToolbarController.hpp>
31#include <com/sun/star/lang/XComponent.hpp>
32#include <com/sun/star/ui/XImageManager.hpp>
33#include <com/sun/star/uno/XComponentContext.hpp>
34#include <com/sun/star/util/XURLTransformer.hpp>
38#include <rtl/ustring.hxx>
49#include <unordered_map>
58class ImageOrientationController;
69 const OUString& rCommandURL,
70 const OUString& rTooltip,
71 const OUString& rLabel,
84 virtual void SetName(
const OUString& rName) = 0;
85 virtual void SetHelpId(
const OUString& rHelpId) = 0;
93 sal_uInt16 nFirstItem,
94 const OUString& rModuleIdentifier,
98 const OUString& rCommandURL,
99 const Image& rImage) = 0;
104typedef ::cppu::WeakImplHelper<
105 css::frame::XFrameActionListener,
106 css::lang::XComponent,
107 css::ui::XUIConfigurationListener
113 ToolBarManager(
const css::uno::Reference< css::uno::XComponentContext >& rxContext,
114 const css::uno::Reference< css::frame::XFrame >& rFrame,
115 OUString aResourceName,
117 ToolBarManager(
const css::uno::Reference< css::uno::XComponentContext >& rxContext,
118 const css::uno::Reference< css::frame::XFrame >& rFrame,
119 OUString aResourceName,
127 virtual void SAL_CALL
frameAction(
const css::frame::FrameActionEvent&
Action )
override;
130 virtual void SAL_CALL
disposing(
const css::lang::EventObject& Source )
override;
133 virtual void SAL_CALL
elementInserted(
const css::ui::ConfigurationEvent& Event )
override;
134 virtual void SAL_CALL
elementRemoved(
const css::ui::ConfigurationEvent& Event )
override;
135 virtual void SAL_CALL
elementReplaced(
const css::ui::ConfigurationEvent& Event )
override;
138 void SAL_CALL
dispose()
override;
139 void SAL_CALL
addEventListener(
const css::uno::Reference< XEventListener >& xListener )
override;
140 void SAL_CALL
removeEventListener(
const css::uno::Reference< XEventListener >& xListener )
override;
144 void FillToolbar(
const css::uno::Reference< css::container::XIndexAccess >& rToolBarData,
145 const css::uno::Reference< css::container::XIndexAccess >& rContextData,
146 const OUString& rContextToolbarName );
147 void FillAddonToolbar(
const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > >& rAddonToolbar );
172 css::uno::Reference< css::awt::XWindow >
xWindow;
176 void OnClick(
bool bUseExecute =
false);
197 void ToggleButton(
const OUString& rResourceName, std::u16string_view rCommand);
204 void UpdateController(
const css::uno::Reference< css::frame::XToolbarController >& xController);
215 typedef std::unordered_map< ToolBoxItemId, css::uno::Reference< css::frame::XStatusListener > >
ToolBarControllerMap;
235 css::uno::Reference< css::frame::XFrame >
m_xFrame;
239 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
::cppu::WeakImplHelper< css::frame::XFrameActionListener, css::lang::XComponent, css::ui::XUIConfigurationListener > ToolbarManager_Base
std::unordered_map< OUString, CommandInfo > CommandToInfoMap