From 50d9f755a9a2894c2f6e781a3e5ccb94278761b8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 4 Jul 2023 16:19:01 +0200 Subject: loplugin:constantparam Change-Id: I1925234e3f82adfa1f82755e9cef7e3e3bc00d04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153981 Tested-by: Noel Grandin Reviewed-by: Noel Grandin --- sfx2/source/dialog/templdlg.cxx | 9 +++------ sfx2/source/inc/templdgi.hxx | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 6b2c258a6aba..7f44bf64d366 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -505,7 +505,7 @@ void SfxCommonTemplateDialog_Impl::EnableHierarchical(bool const bEnable, StyleL // If bHierarchical, then the family can have changed // minus one since hierarchical is inserted at the start m_bWantHierarchical = false; // before FilterSelect - FilterSelect(mxFilterLb->get_active() - 1, true); + FilterSelect(mxFilterLb->get_active() - 1); } SelectStyle(aSelectedEntry, false, rStyleList); } @@ -513,12 +513,9 @@ void SfxCommonTemplateDialog_Impl::EnableHierarchical(bool const bEnable, StyleL // Other filters; can be switched by the users or as a result of new or // editing, if the current document has been assigned a different filter. void SfxCommonTemplateDialog_Impl::FilterSelect( - sal_uInt16 nEntry, // Idx of the new Filters - bool bForce) // Force update, even if the new filter is equal to the current + sal_uInt16 nEntry // Idx of the new Filters + ) { - if (nEntry == nActFilter && !bForce) - return; - nActFilter = nEntry; m_aStyleList.FilterSelect(nActFilter, true); } diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index a352b1e9b8e4..59c21f659bd6 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -108,7 +108,7 @@ protected: void Initialize(); void EnableHierarchical(bool, StyleList& rStyleList); - void FilterSelect( sal_uInt16 nFilterIdx, bool bForce ); + void FilterSelect( sal_uInt16 nFilterIdx ); void SetFamilyState( sal_uInt16 nSlotId, const SfxTemplateItem* ); void SetWaterCanState( const SfxBoolItem* pItem ); bool IsSafeForWaterCan() const; -- cgit