29#include <com/sun/star/beans/XPropertySet.hpp>
30#include <com/sun/star/configuration/theDefaultProvider.hpp>
31#include <com/sun/star/container/XNameAccess.hpp>
32#include <com/sun/star/container/XContainer.hpp>
50 std::u16string_view aCommandURL, std::u16string_view aModuleName )
52 return OUString::Concat(aCommandURL) +
"-" + aModuleName;
58 m_aPropCommand(
"Command" ),
59 m_aPropModule(
"Module" ),
60 m_aPropController(
"Controller" ),
61 m_aPropValue(
"Value" ),
62 m_sRoot(
std::move(_sRoot)),
73 if ( xContainer.is() )
83 return pIter->second.m_aImplementationName;
84 else if ( !rModule.empty() )
91 return pIter->second.m_aImplementationName;
103 return pIter->second.m_aValue;
104 else if ( !rModule.empty() )
111 return pIter->second.m_aValue;
118 std::u16string_view rCommandURL,
119 std::u16string_view rModule,
120 const OUString& rServiceSpecifier )
129 std::u16string_view rCommandURL,
130 std::u16string_view rModule )
193 std::unique_lock aLock(
m_mutex );
205 catch (
const WrappedTargetException& )
218 uno::Reference< container::XContainer > xContainer(
m_xConfigAccess, uno::UNO_QUERY );
222 if ( xContainer.is() )
240 for ( OUString
const &
name : aPopupMenuControllers )
252 catch (
const NoSuchElementException& )
255 catch (
const WrappedTargetException& )
264 aElement >>= xPropertySet;
266 if ( !xPropertySet.is() )
274 xPropertySet->getPropertyValue(
m_aPropValue ) >>= aValue;
276 catch (
const css::beans::UnknownPropertyException& )
280 catch (
const css::lang::WrappedTargetException& )
void updateConfigurationDataImpl()
virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent &Event) override
ConfigurationAccess_ControllerFactory(const css::uno::Reference< css::uno::XComponentContext > &rxContext, OUString _sRoot)
css::uno::Reference< css::lang::XMultiServiceFactory > m_xConfigProvider
void readConfigurationData()
void removeServiceFromCommandModule(std::u16string_view rCommandURL, std::u16string_view rModule)
MenuControllerMap m_aMenuControllerMap
css::uno::Reference< css::container::XNameAccess > m_xConfigAccess
bool m_bConfigAccessInitialized
OUString getServiceFromCommandModule(std::u16string_view rCommandURL, std::u16string_view rModule) const
virtual ~ConfigurationAccess_ControllerFactory() override
void addServiceToCommandModule(std::u16string_view rCommandURL, std::u16string_view rModule, const OUString &rServiceSpecifier)
css::uno::Reference< css::container::XContainerListener > m_xConfigAccessListener
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
OUString getValueFromCommandModule(std::u16string_view rCommandURL, std::u16string_view rModule) const
OUString m_aPropController
virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent &Event) override
virtual void SAL_CALL elementInserted(const css::container::ContainerEvent &Event) override
bool impl_getElementProps(const css::uno::Any &aElement, OUString &aCommand, OUString &aModule, OUString &aServiceSpecifier, OUString &aValue) const
css::uno::Sequence< css::uno::Any > InitAnyPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
constexpr OUStringLiteral SERVICENAME_CFGREADACCESS
static OUString getHashKeyFromStrings(std::u16string_view aCommandURL, std::u16string_view aModuleName)
OUString m_aImplementationName
bool m_bConfigAccessInitialized