[Libreoffice-commits] core.git: include/svl svl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue May 5 12:47:06 UTC 2020
include/svl/style.hxx | 2 +-
svl/source/items/style.cxx | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
New commits:
commit d78f53a31d050ac63c33a7219ef464d9906a37b8
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue May 5 11:36:46 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue May 5 14:46:25 2020 +0200
pass SfxStyleFamily explicitly to SfxStyleSheetBasePool::ChangeParent
Change-Id: I7bc570899170b7a21e4d54e58d7a8ada0f79b918
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93469
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/svl/style.hxx b/include/svl/style.hxx
index 808dbd2ef186..85be6cc124ba 100644
--- a/include/svl/style.hxx
+++ b/include/svl/style.hxx
@@ -237,7 +237,7 @@ protected:
SfxStyleFamily nSearchFamily;
SfxStyleSearchBits nMask;
- void ChangeParent( const OUString&, const OUString&, bool bVirtual = true );
+ void ChangeParent(const OUString& rOld, const OUString& rNew, SfxStyleFamily eFamily, bool bVirtual = true);
virtual SfxStyleSheetBase* Create( const OUString&, SfxStyleFamily, SfxStyleSearchBits );
virtual SfxStyleSheetBase* Create( const SfxStyleSheetBase& );
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 9650cead61eb..e6e1adf23cb9 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -178,7 +178,7 @@ bool SfxStyleSheetBase::SetName(const OUString& rName, bool bReIndexNow)
m_pPool->SetSearchMask(nFamily);
if ( !aName.isEmpty() )
- m_pPool->ChangeParent( aName, rName, false );
+ m_pPool->ChangeParent(aName, rName, nFamily, false);
if ( aFollow == aName )
aFollow = rName;
@@ -729,7 +729,7 @@ void SfxStyleSheetBasePool::Remove( SfxStyleSheetBase* p )
return;
// Adapt all styles which have this style as parent
- ChangeParent( p->GetName(), p->GetParent() );
+ ChangeParent(p->GetName(), p->GetParent(), p->GetFamily());
// #120015# Do not dispose, the removed StyleSheet may still be used in
// existing SdrUndoAttrObj incarnations. Rely on refcounting for disposal,
@@ -801,9 +801,10 @@ void SfxStyleSheetBasePool::Clear()
void SfxStyleSheetBasePool::ChangeParent(const OUString& rOld,
const OUString& rNew,
+ SfxStyleFamily eFamily,
bool bVirtual)
{
- for( SfxStyleSheetBase* p = First(GetSearchFamily()); p; p = Next() )
+ for( SfxStyleSheetBase* p = First(eFamily); p; p = Next() )
{
if( p->GetParent() == rOld )
{
More information about the Libreoffice-commits
mailing list