23#include <com/sun/star/lang/XServiceInfo.hpp>
29#include <com/sun/star/util/XChangesNotifier.hpp>
41typedef ::cppu::ImplInheritanceHelper<
43 css::lang::XServiceInfo > ModuleAcceleratorConfiguration_BASE;
45class ModuleAcceleratorConfiguration :
public ModuleAcceleratorConfiguration_BASE
59 ModuleAcceleratorConfiguration(
60 const css::uno::Reference< css::uno::XComponentContext >& xContext,
61 const css::uno::Sequence< css::uno::Any >& lArguments);
65 return "com.sun.star.comp.framework.ModuleAcceleratorConfiguration";
75 return {
"com.sun.star.ui.ModuleAcceleratorConfiguration"};
83 css::uno::Reference< css::util::XChangesListener > m_xCfgListener;
86ModuleAcceleratorConfiguration::ModuleAcceleratorConfiguration(
87 const css::uno::Reference< css::uno::XComponentContext >& xContext,
88 const css::uno::Sequence< css::uno::Any >& lArguments)
89 : ModuleAcceleratorConfiguration_BASE(xContext)
94 if (lArguments.getLength() == 1 && (lArguments[0] >>= sModule))
100 m_sModule = lArgs.getUnpackedValueOrDefault(
"ModuleIdentifier", OUString());
104 if (m_sModule.isEmpty())
105 throw css::uno::RuntimeException(
106 "The module dependent accelerator configuration service was initialized with an empty module identifier!",
110void ModuleAcceleratorConfiguration::fillCache()
114 m_sModuleCFG = m_sModule;
130 XCUBasedAcceleratorConfiguration::reload();
132 css::uno::Reference< css::util::XChangesNotifier > xBroadcaster(m_xCfg, css::uno::UNO_QUERY_THROW);
134 xBroadcaster->addChangesListener(m_xCfgListener);
136 catch(
const css::uno::RuntimeException&)
138 catch(
const css::uno::Exception&)
144extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
146 css::uno::XComponentContext *context,
147 css::uno::Sequence<css::uno::Any>
const &arguments)
150 css::uno::XInterface *acquired_inst = cppu::acquire(inst.get());
154 return acquired_inst;
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_framework_ModuleAcceleratorConfiguration_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &arguments)
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr OUStringLiteral CFG_ENTRY_MODULES