diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2015-11-07 22:01:20 +0200 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2015-11-11 15:43:36 +0200 |
commit | c65e00d908a2dcf47d3ff925d09e336d9b0939f7 (patch) | |
tree | 1d015ff5e376c0298825b44d6443187671be4166 /cui/source/inc | |
parent | 899453aa8407fca8a93d51f12ad4e335d1beeb62 (diff) |
tdf#93837 Make customization actually work
Change-Id: I004c9ad3a7d389228b9bb532a1b2c5d6294f7e42
Diffstat (limited to 'cui/source/inc')
-rw-r--r-- | cui/source/inc/cfg.hxx | 45 |
1 files changed, 36 insertions, 9 deletions
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index b4cbaa0ff54f..9066bad31a56 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -95,6 +95,17 @@ private: static css::uno::Reference < css::ui::XImageManager >* xDefaultImgMgr; +protected: + + void ApplyMenu( + css::uno::Reference< css::container::XIndexContainer >& rMenuBar, + css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory, + SvxConfigEntry *pMenuData = nullptr ); + + bool LoadSubMenus( + const css::uno::Reference< css::container::XIndexAccess >& xMenuSettings, + const OUString& rBaseTitle, SvxConfigEntry* pParentData ); + public: SaveInData( @@ -170,15 +181,6 @@ private: css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory, SvTreeListEntry *pParent = nullptr ); - void ApplyMenu( - css::uno::Reference< css::container::XIndexContainer >& rNewMenuBar, - css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory, - SvxConfigEntry *pMenuData = nullptr ); - - bool LoadSubMenus( - const css::uno::Reference< css::container::XIndexAccess >& xMenuBarSettings, - const OUString& rBaseTitle, SvxConfigEntry* pParentData ); - public: MenuSaveInData( @@ -198,6 +200,26 @@ public: bool Apply() override; }; +class ContextMenuSaveInData : public SaveInData +{ +private: + std::unique_ptr< SvxConfigEntry > m_pRootEntry; + +public: + ContextMenuSaveInData( + const css::uno::Reference< css::ui::XUIConfigurationManager >& xCfgMgr, + const css::uno::Reference< css::ui::XUIConfigurationManager >& xParentCfgMgr, + const OUString& aModuleId, bool bIsDocConfig ); + virtual ~ContextMenuSaveInData(); + + SvxEntries* GetEntries() override; + void SetEntries( SvxEntries* pNewEntries ) override; + bool HasSettings() override; + bool HasURL( const OUString& rURL ) override; + void Reset() override; + bool Apply() override; +}; + class SvxConfigEntry { private: @@ -213,6 +235,7 @@ private: bool bIsUserDefined; bool bIsMain; bool bIsParentData; + bool bIsModified; /// toolbar specific properties bool bIsVisible; @@ -238,6 +261,7 @@ public: bIsUserDefined( false ), bIsMain( false ), bIsParentData( false ), + bIsModified( false ), bIsVisible( true ), nStyle( 0 ), mpEntries( nullptr ) @@ -270,6 +294,9 @@ public: void SetParentData( bool bValue = true ) { bIsParentData = bValue; } bool IsParentData() { return bIsParentData; } + void SetModified( bool bValue = true ) { bIsModified = bValue; } + bool IsModified() { return bIsModified; } + bool IsMovable(); bool IsDeletable(); bool IsRenamable(); |