19#ifndef INCLUDED_VBAHELPER_SOURCE_VBAHELPER_VBACOMMANDBARHELPER_HXX
20#define INCLUDED_VBAHELPER_SOURCE_VBAHELPER_VBACOMMANDBARHELPER_HXX
22#include <com/sun/star/frame/XModel.hpp>
23#include <com/sun/star/uno/XComponentContext.hpp>
24#include <com/sun/star/ui/XUIConfigurationManager.hpp>
25#include <com/sun/star/container/XIndexAccess.hpp>
26#include <com/sun/star/container/XNameAccess.hpp>
27#include <com/sun/star/frame/XLayoutManager.hpp>
52 css::uno::Reference< css::uno::XComponentContext >
mxContext;
53 css::uno::Reference< css::frame::XModel >
mxModel;
54 css::uno::Reference< css::ui::XUIConfigurationManager >
m_xDocCfgMgr;
55 css::uno::Reference< css::ui::XUIConfigurationManager >
m_xAppCfgMgr;
62 bool hasToolbar(
const OUString& sResourceUrl, std::u16string_view sName );
65 VbaCommandBarHelper( css::uno::Reference< css::uno::XComponentContext > xContext, css::uno::Reference< css::frame::XModel > xModel );
67 const css::uno::Reference< css::frame::XModel >&
getModel()
const {
return mxModel; }
75 css::uno::Reference< css::container::XIndexAccess >
getSettings(
const OUString& sResourceUrl );
79 void ApplyTempChange(
const OUString& sResourceUrl,
const css::uno::Reference< css::container::XIndexAccess >& xSettings);
86 OUString
findToolbarByName(
const css::uno::Reference< css::container::XNameAccess >& xNameAccess,
const OUString& sName );
88 static sal_Int32
findControlByName(
const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, std::u16string_view sName,
bool bMenu );
static sal_Int32 findControlByName(const css::uno::Reference< css::container::XIndexAccess > &xIndexAccess, std::u16string_view sName, bool bMenu)
css::uno::Reference< css::frame::XModel > mxModel
css::uno::Reference< css::ui::XUIConfigurationManager > m_xAppCfgMgr
void removeSettings(const OUString &sResourceUrl)
css::uno::Reference< css::container::XIndexAccess > getSettings(const OUString &sResourceUrl)
bool hasToolbar(const OUString &sResourceUrl, std::u16string_view sName)
VbaCommandBarHelper(css::uno::Reference< css::uno::XComponentContext > xContext, css::uno::Reference< css::frame::XModel > xModel)
void ApplyTempChange(const OUString &sResourceUrl, const css::uno::Reference< css::container::XIndexAccess > &xSettings)
css::uno::Reference< css::container::XNameAccess > m_xWindowState
css::uno::Reference< css::frame::XLayoutManager > getLayoutManager() const
css::uno::Reference< css::uno::XComponentContext > mxContext
static OUString generateCustomURL()
const css::uno::Reference< css::frame::XModel > & getModel() const
css::uno::Reference< css::ui::XUIConfigurationManager > m_xDocCfgMgr
OUString findToolbarByName(const css::uno::Reference< css::container::XNameAccess > &xNameAccess, const OUString &sName)
const OUString & getModuleId() const
const css::uno::Reference< css::container::XNameAccess > & getPersistentWindowState() const
constexpr OUStringLiteral ITEM_DESCRIPTOR_ISVISIBLE
constexpr char16_t ITEM_TOOLBAR_URL[]
constexpr OUStringLiteral CUSTOM_TOOLBAR_STR
constexpr OUStringLiteral ITEM_DESCRIPTOR_STYLE
std::shared_ptr< VbaCommandBarHelper > VbaCommandBarHelperRef
constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL
constexpr OUStringLiteral ITEM_DESCRIPTOR_TYPE
constexpr OUStringLiteral ITEM_DESCRIPTOR_UINAME
constexpr OUStringLiteral CUSTOM_MENU_STR
constexpr OUStringLiteral ITEM_DESCRIPTOR_HELPURL
constexpr OUStringLiteral ITEM_DESCRIPTOR_ENABLED
constexpr OUStringLiteral ITEM_DESCRIPTOR_LABEL
constexpr OUStringLiteral ITEM_MENUBAR_URL
constexpr OUStringLiteral ITEM_DESCRIPTOR_CONTAINER