From f572f4f5e8ea3058b85c8aed7ee2647e4362de74 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 5 May 2020 15:40:30 +0100 Subject: if we create a new style remove any old style with the same name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit surely the current searchmask should have no effect on the remove seeing as a new style is going to be created unilaterally Change-Id: I4a8d05be26a3a2711ae6f377f034a9155100e831 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93496 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- svl/source/items/style.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'svl') diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index 1a747985cef7..17266a5b809a 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -592,7 +592,7 @@ SfxStyleSheetBasePool::~SfxStyleSheetBasePool() bool SfxStyleSheetBasePool::SetParent(SfxStyleFamily eFam, const OUString& rStyle, const OUString& rParent) { - SfxStyleSheetIterator aIter(this,eFam,SfxStyleSearchBits::All); + SfxStyleSheetIterator aIter(this, eFam, SfxStyleSearchBits::All); SfxStyleSheetBase *pStyle = aIter.Find(rStyle); OSL_ENSURE(pStyle, "Template not found. Writer with solar <2541?"); if(pStyle) @@ -653,7 +653,7 @@ SfxStyleSheetBase& SfxStyleSheetBasePool::Make( const OUString& rName, SfxStyleF */ void SfxStyleSheetBasePool::Add( const SfxStyleSheetBase& rSheet ) { - SfxStyleSheetIterator aIter(this, rSheet.GetFamily(), nMask); + SfxStyleSheetIterator aIter(this, rSheet.GetFamily(), SfxStyleSearchBits::All); SfxStyleSheetBase* pOld = aIter.Find( rSheet.GetName() ); if (pOld) { Remove( pOld ); -- cgit