diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-28 13:23:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-28 13:25:12 +0100 |
commit | 05e2fd162ef86ebe4ea2a2a679cabeae33e844f0 (patch) | |
tree | 08aa4bbfd2962bdcef7aa0024293e3b975efa119 /sd | |
parent | 7b9b57b41936eea673eb678407ed817856ba0912 (diff) |
Related: fdo#79142 make SetName default to Reindexing
Change-Id: I408042bc7bf1a5a955203d65d2c68ebf9527b9b5
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/stlsheet.hxx | 2 | ||||
-rw-r--r-- | sd/source/core/drawdoc4.cxx | 1 | ||||
-rw-r--r-- | sd/source/core/stlpool.cxx | 12 | ||||
-rw-r--r-- | sd/source/core/stlsheet.cxx | 8 |
4 files changed, 10 insertions, 13 deletions
diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx index cad63a7d5163..0811142fa1d2 100644 --- a/sd/inc/stlsheet.hxx +++ b/sd/inc/stlsheet.hxx @@ -60,7 +60,7 @@ public: virtual bool HasFollowSupport() const SAL_OVERRIDE; virtual bool HasParentSupport() const SAL_OVERRIDE; virtual bool HasClearParentSupport() const SAL_OVERRIDE; - virtual bool SetName( const OUString& ) SAL_OVERRIDE; + virtual bool SetName(const OUString& rNewName, bool bReindexNow = true) SAL_OVERRIDE; virtual void SetHelpId( const OUString& r, sal_uLong nId ) SAL_OVERRIDE; void AdjustToFontHeight(SfxItemSet& rSet, bool bOnlyMissingItems = true); 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 0c7fff4a7d01..3d1ee5627b1f 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 c19cba34dd75..eb7862fa50fa 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -625,15 +625,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 ); |