29#include <com/sun/star/container/XNameAccess.hpp>
30#include <com/sun/star/ui/XAcceleratorConfiguration.hpp>
32#include <com/sun/star/io/XInputStream.hpp>
33#include <com/sun/star/io/XOutputStream.hpp>
34#include <com/sun/star/util/XChangesListener.hpp>
37#include <com/sun/star/form/XReset.hpp>
55 css::ui::XAcceleratorConfiguration >
66 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
93 virtual css::uno::Sequence< css::awt::KeyEvent > SAL_CALL
getAllKeyEvents()
override;
97 virtual void SAL_CALL
setKeyEvent(
const css::awt::KeyEvent& aKeyEvent,
98 const OUString& sCommand )
override;
100 virtual void SAL_CALL
removeKeyEvent(
const css::awt::KeyEvent& aKeyEvent)
override;
102 virtual css::uno::Sequence< css::awt::KeyEvent > SAL_CALL
getKeyEventsByCommand(
const OUString& sCommand)
override;
109 virtual void SAL_CALL
reload()
override;
111 virtual void SAL_CALL
store()
override;
113 virtual void SAL_CALL
storeToStorage(
const css::uno::Reference< css::embed::XStorage >& xStorage)
override;
120 virtual void SAL_CALL
setStorage(
const css::uno::Reference< css::embed::XStorage >& xStorage)
override;
125 virtual void SAL_CALL
addConfigurationListener(
const css::uno::Reference< css::ui::XUIConfigurationListener >& xListener)
override;
127 virtual void SAL_CALL
removeConfigurationListener(
const css::uno::Reference< css::ui::XUIConfigurationListener >& xListener)
override;
131 virtual void SAL_CALL
reset()
override;
133 virtual void SAL_CALL
addResetListener(
const css::uno::Reference< css::form::XResetListener >& xListener)
override;
135 virtual void SAL_CALL
removeResetListener(
const css::uno::Reference< css::form::XResetListener >& xListener)
override;
163 void impl_ts_load(
const css::uno::Reference< css::io::XInputStream >& xStream);
170 void impl_ts_save(
const css::uno::Reference< css::io::XOutputStream >& xStream);
195 css::util::XChangesListener,
197 css::ui::XAcceleratorConfiguration >
208 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
210 css::uno::Reference< css::container::XNameAccess >
m_xCfg;
231 virtual css::uno::Sequence< css::awt::KeyEvent > SAL_CALL
getAllKeyEvents()
override;
235 virtual void SAL_CALL
setKeyEvent(
const css::awt::KeyEvent& aKeyEvent,
236 const OUString& sCommand )
override;
238 virtual void SAL_CALL
removeKeyEvent(
const css::awt::KeyEvent& aKeyEvent)
override;
240 virtual css::uno::Sequence< css::awt::KeyEvent > SAL_CALL
getKeyEventsByCommand(
const OUString& sCommand)
override;
247 virtual void SAL_CALL
reload()
override;
249 virtual void SAL_CALL
store()
override;
251 virtual void SAL_CALL
storeToStorage(
const css::uno::Reference< css::embed::XStorage >& xStorage)
override;
258 virtual void SAL_CALL
setStorage(
const css::uno::Reference< css::embed::XStorage >& xStorage)
override;
263 virtual void SAL_CALL
addConfigurationListener(
const css::uno::Reference< css::ui::XUIConfigurationListener >& xListener)
override;
265 virtual void SAL_CALL
removeConfigurationListener(
const css::uno::Reference< css::ui::XUIConfigurationListener >& xListener)
override;
269 virtual void SAL_CALL
reset()
override;
271 virtual void SAL_CALL
addResetListener(
const css::uno::Reference< css::form::XResetListener >& xListener)
override;
273 virtual void SAL_CALL
removeResetListener(
const css::uno::Reference< css::form::XResetListener >& xListener)
override;
276 virtual void SAL_CALL
changesOccurred(
const css::util::ChangesEvent& aEvent)
override;
279 virtual void SAL_CALL
disposing(
const css::lang::EventObject& aEvent)
override;
299 void impl_ts_load(
bool bPreferred,
const css::uno::Reference< css::container::XNameAccess >& xCfg);
302 void insertKeyToConfiguration(
const css::awt::KeyEvent& aKeyEvent,
const OUString& sCommand,
const bool bPreferred);
305 void reloadChanged(
const OUString& sPrimarySecondary, std::u16string_view sGlobalModules,
const OUString& sModule,
const OUString& sKey);
implements a cache for any accelerator configuration.
virtual OUString SAL_CALL getCommandByKeyEvent(const css::awt::KeyEvent &aKeyEvent) override
virtual ~XCUBasedAcceleratorConfiguration() override
OUString m_sGlobalOrModules
AcceleratorCache m_aPrimaryReadCache
virtual void SAL_CALL reload() override
virtual void SAL_CALL removeConfigurationListener(const css::uno::Reference< css::ui::XUIConfigurationListener > &xListener) override
void reloadChanged(const OUString &sPrimarySecondary, std::u16string_view sGlobalModules, const OUString &sModule, const OUString &sKey)
virtual void SAL_CALL removeKeyEvent(const css::awt::KeyEvent &aKeyEvent) override
virtual void SAL_CALL addConfigurationListener(const css::uno::Reference< css::ui::XUIConfigurationListener > &xListener) override
virtual void SAL_CALL removeCommandFromAllKeyEvents(const OUString &sCommand) override
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPreferredKeyEventsForCommandList(const css::uno::Sequence< OUString > &lCommandList) override
virtual sal_Bool SAL_CALL isModified() override
virtual css::uno::Sequence< css::awt::KeyEvent > SAL_CALL getAllKeyEvents() override
virtual void SAL_CALL removeResetListener(const css::uno::Reference< css::form::XResetListener > &xListener) override
virtual css::uno::Sequence< css::awt::KeyEvent > SAL_CALL getKeyEventsByCommand(const OUString &sCommand) override
css::uno::Reference< css::container::XNameAccess > m_xCfg
virtual void SAL_CALL storeToStorage(const css::uno::Reference< css::embed::XStorage > &xStorage) override
std::unique_ptr< AcceleratorCache > m_pSecondaryWriteCache
void insertKeyToConfiguration(const css::awt::KeyEvent &aKeyEvent, const OUString &sCommand, const bool bPreferred)
virtual sal_Bool SAL_CALL hasStorage() override
AcceleratorCache m_aSecondaryReadCache
virtual void SAL_CALL setKeyEvent(const css::awt::KeyEvent &aKeyEvent, const OUString &sCommand) override
void removeKeyFromConfiguration(const css::awt::KeyEvent &aKeyEvent, const bool bPreferred)
std::unique_ptr< AcceleratorCache > m_pPrimaryWriteCache
virtual void SAL_CALL disposing(const css::lang::EventObject &aEvent) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
the global uno service manager.
AcceleratorCache & impl_getCFG(bool bPreferred, bool bWriteAccessRequested=false)
XCUBasedAcceleratorConfiguration(css::uno::Reference< css::uno::XComponentContext > xContext)
void impl_ts_save(bool bPreferred)
virtual void SAL_CALL addResetListener(const css::uno::Reference< css::form::XResetListener > &xListener) override
virtual sal_Bool SAL_CALL isReadOnly() override
virtual void SAL_CALL changesOccurred(const css::util::ChangesEvent &aEvent) override
virtual void SAL_CALL reset() override
OUString impl_ts_getLocale() const
return the current office locale.
virtual void SAL_CALL store() override
void impl_ts_load(bool bPreferred, const css::uno::Reference< css::container::XNameAccess > &xCfg)
virtual void SAL_CALL setStorage(const css::uno::Reference< css::embed::XStorage > &xStorage) override
implements a read/write access to the accelerator configuration.
virtual void SAL_CALL removeCommandFromAllKeyEvents(const OUString &sCommand) override
virtual void SAL_CALL setStorage(const css::uno::Reference< css::embed::XStorage > &xStorage) override
virtual sal_Bool SAL_CALL isModified() override
virtual void SAL_CALL store() override
std::unique_ptr< AcceleratorCache > m_pWriteCache
used to implement the copy on write pattern!
virtual void SAL_CALL removeResetListener(const css::uno::Reference< css::form::XResetListener > &xListener) override
virtual void SAL_CALL reset() override
virtual void SAL_CALL setKeyEvent(const css::awt::KeyEvent &aKeyEvent, const OUString &sCommand) override
virtual void SAL_CALL removeConfigurationListener(const css::uno::Reference< css::ui::XUIConfigurationListener > &xListener) override
virtual css::uno::Sequence< css::awt::KeyEvent > SAL_CALL getKeyEventsByCommand(const OUString &sCommand) override
AcceleratorCache & impl_getCFG(bool bWriteAccessRequested=false)
returns a reference to one of our internal cache members.
virtual ~XMLBasedAcceleratorConfiguration() override
virtual void SAL_CALL addConfigurationListener(const css::uno::Reference< css::ui::XUIConfigurationListener > &xListener) override
virtual void SAL_CALL reload() override
PresetHandler m_aPresetHandler
used to: i ) copy configuration files from the share to the user layer ii ) provide access to these c...
virtual sal_Bool SAL_CALL hasStorage() override
virtual void SAL_CALL addResetListener(const css::uno::Reference< css::form::XResetListener > &xListener) override
OUString impl_ts_getLocale() const
return the current office locale.
void impl_ts_save(const css::uno::Reference< css::io::XOutputStream > &xStream)
save a configuration set, using the given stream.
XMLBasedAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext > &xContext)
css::uno::Reference< css::uno::XComponentContext > m_xContext
the global uno service manager.
virtual sal_Bool SAL_CALL isReadOnly() override
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPreferredKeyEventsForCommandList(const css::uno::Sequence< OUString > &lCommandList) override
virtual void SAL_CALL removeKeyEvent(const css::awt::KeyEvent &aKeyEvent) override
void impl_ts_load(const css::uno::Reference< css::io::XInputStream > &xStream)
load a configuration set, using the given stream.
virtual void SAL_CALL storeToStorage(const css::uno::Reference< css::embed::XStorage > &xStorage) override
AcceleratorCache m_aReadCache
contains the cached configuration data
virtual css::uno::Sequence< css::awt::KeyEvent > SAL_CALL getAllKeyEvents() override
virtual OUString SAL_CALL getCommandByKeyEvent(const css::awt::KeyEvent &aKeyEvent) override
constexpr OUStringLiteral CFG_ENTRY_GLOBAL
constexpr OUStringLiteral CFG_ENTRY_MODULES
constexpr OUStringLiteral CFG_ENTRY_PRIMARY