summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-05-28 13:23:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-05-28 13:26:22 +0100
commitf438d84fd91a7174d748d870854974bc97b35d8c (patch)
tree1a4e5e5fab4eb03ca5943bd5a71048e5e8dfd2e6 /sd/source
parent74baee744c8ff5b3a34c40ed16803d07f3f5fc2d (diff)
Related: fdo#79142 make SetName default to Reindexing
Change-Id: I408042bc7bf1a5a955203d65d2c68ebf9527b9b5 (cherry picked from commit 05e2fd162ef86ebe4ea2a2a679cabeae33e844f0)
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/core/drawdoc4.cxx1
-rw-r--r--sd/source/core/stlpool.cxx12
-rw-r--r--sd/source/core/stlsheet.cxx8
3 files changed, 9 insertions, 12 deletions
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 061ac8d4cc04..c2e5f57466ab 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -1103,7 +1103,6 @@ void SdDrawDocument::RenameLayoutTemplate(const OUString& rOldLayoutName, const
aReplList.push_back(aReplData);
pSheet->SetName(aSheetName);
- mxStyleSheetPool.get()->Reindex();
}
pSheet = aIter.Next();
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 84e970a96f8e..17ca4f09caee 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -1038,16 +1038,18 @@ void SdStyleSheetPool::UpdateStdNames()
// Sheet does exist: old sheet has to be removed
aEraseList.push_back( pStyle );
}
- Reindex();
}
}
}
}
- // styles that could not be renamed, must be removed
- for ( size_t i = 0, n = aEraseList.size(); i < n; ++i )
- Remove( aEraseList[ i ] );
- Reindex();
+ if (!aEraseList.empty())
+ {
+ // styles that could not be renamed, must be removed
+ for ( size_t i = 0, n = aEraseList.size(); i < n; ++i )
+ Remove( aEraseList[ i ] );
+ Reindex();
+ }
}
// Set new SvxNumBulletItem for the respective style sheet
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 215c7ec92604..2e26e7b57e21 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -628,15 +628,11 @@ bool SdStyleSheet::HasClearParentSupport() const
return true;
}
-
-
-bool SdStyleSheet::SetName( const OUString& rName )
+bool SdStyleSheet::SetName(const OUString& rName, bool bReindexNow)
{
- return SfxStyleSheet::SetName( rName );
+ return SfxStyleSheet::SetName(rName, bReindexNow);
}
-
-
void SdStyleSheet::SetHelpId( const OUString& r, sal_uLong nId )
{
SfxStyleSheet::SetHelpId( r, nId );