summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-05-05 15:40:30 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-05-05 20:14:30 +0200
commitf572f4f5e8ea3058b85c8aed7ee2647e4362de74 (patch)
tree155a2ed3c71d9acc9691cc0d4ec79a7bca13e71f /svl
parentc9d0890cecbf00dd2c6066f7ceeaa82611cf1e73 (diff)
if we create a new style remove any old style with the same name
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 <caolanm@redhat.com>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/items/style.cxx4
1 files changed, 2 insertions, 2 deletions
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 );