From 39e969ac53b7e0b2c4889a3f910d97521ec4251f Mon Sep 17 00:00:00 2001 From: Anshu Date: Mon, 2 Aug 2021 04:52:42 -0700 Subject: Refactoring Change-Id: I0863c4afb5dfce549dbcbdae4b8a63068e5d7331 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119878 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sfx2/source/inc/templdgi.hxx | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'sfx2/source/inc/templdgi.hxx') diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index daedd86de98c..d555f7404277 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -86,7 +86,6 @@ protected: sal_uInt16 nActFamily; // Id in the ToolBox = Position - 1 sal_uInt16 nActFilter; // FilterIdx - SfxStyleSearchBits nAppFilter; // Filter, which has set the application (for automatic) bool bIsWater :1; bool bUpdate :1; @@ -104,15 +103,12 @@ protected: Link m_aStyleListNewMenu; Link m_aStyleListWaterCan; Link m_aStyleListHasSelectedStyle; - Link m_aStyleListUpdateStyles; Link m_aStyleListUpdateFamily; Link m_aStyleListNotify; Link m_aStyleListUpdateStyleDependents; Link m_aStyleListEnableTreeDrag; - Link m_aStyleListFilterSelect; Link m_aStyleListEnableDelete; Link m_aStyleListSetWaterCanState; - Link m_aStyleListFamilySelect; Link m_aStyleListSetFamily; DECL_LINK(FilterSelectHdl, weld::ComboBox&, void ); @@ -138,7 +134,7 @@ protected: DECL_LINK(ReadResource_Hdl, StyleList&, void); DECL_LINK(ClearResource_Hdl, void*, void); - DECL_LINK(SaveSelection_Hdl, void*, SfxObjectShell*); + DECL_LINK(SaveSelection_Hdl, StyleList&, SfxObjectShell*); DECL_LINK(LoadFactoryStyleFilter_Hdl, SfxObjectShell const*, sal_Int32); DECL_LINK(UpdateStyles_Hdl, StyleFlags, void); DECL_LINK(UpdateFamily_Hdl, StyleList&, void); @@ -158,7 +154,7 @@ public: // Used in StyleList::UpdateStyles, StyleList::Update // Whenever a new family(Eg. Character, List etc.) is selected it comes into action - void FamilySelect(sal_uInt16 nId, bool bPreviewRefresh = false); + void FamilySelect(sal_uInt16 nId, StyleList& rStyleList, bool bPreviewRefresh = false); // Constructor SfxCommonTemplateDialog_Impl(SfxBindings* pB, weld::Container*, weld::Builder* pBuilder); @@ -193,12 +189,8 @@ public: // This is used when a style is selected void SelectStyle(const OUString& rStyle, bool bIsCallback, StyleList& rStyleList); - // Dialog and StyleList have their own copies of variable nAppFilter. - // When a filter is applied, it comes into action and updates the value of nAppFilter - void SetApplicationFilter(SfxStyleSearchBits filter) { nAppFilter = filter; } - // Dialog and StyleList have their own copies of variable nActFilter. - // When a filter is applied, it comes into action and updates the value of nActFilter - void SetFilterByIndex(sal_uInt16 filter) { nActFilter = filter; } + //When a new document is created, it comes into action + void IsUpdate(bool bDoUpdate, StyleList&); // This function return the value of bUpdate in Stylelist // This value is used in StyleList's Notify @@ -214,15 +206,11 @@ public: void connect_stylelist_execute_new_menu(const Link& rLink) { m_aStyleListNewMenu = rLink; } void connect_stylelist_for_watercan(const Link& rLink) { m_aStyleListWaterCan = rLink; } void connect_stylelist_has_selected_style(const Link& rLink); - void connect_stylelist_update_styles(const Link rLink) { m_aStyleListUpdateStyles = rLink; } - void connect_stylelist_update_family(const Link rLink) { m_aStyleListUpdateFamily = rLink; } void connect_stylelist_update_style_dependents(const Link& rLink); void connect_stylelist_enable_tree_drag(const Link rLink); void connect_stylelist_notify(const Link rLink) { m_aStyleListNotify = rLink; } - void connect_stylelist_filter_select(Link rLink); void connect_stylelist_enable_delete(const Link rLink); void connect_stylelist_set_water_can_state(const Link rLink); - void connect_family_select(const Link rLink); void connect_set_family(const Link rLink) { m_aStyleListSetFamily = rLink; } }; -- cgit