diff options
author | Srijan Bhatia <srijanbhatiasun@gmail.com> | 2020-06-02 18:09:20 +0530 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2020-06-10 12:55:17 +0200 |
commit | 4111ed76906bf6be05b704bf52fa91353dfef183 (patch) | |
tree | 7c506823622481efa5eea7bccc9fe6f214acb717 /sc/source/core/data/stlpool.cxx | |
parent | f66fbd4fb5fd557d6065aeea987b3dafdc30a430 (diff) |
tdf#132137 Rename Default Style in Calc.
Change-Id: I0f7c5ffc64b2387fbb63bb5724594480d3135f58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95484
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'sc/source/core/data/stlpool.cxx')
-rw-r--r-- | sc/source/core/data/stlpool.cxx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index 9dc911258d68..7d3da5eb3e0d 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -83,7 +83,10 @@ SfxStyleSheetBase& ScStyleSheetPool::Make( const OUString& rName, sal_uInt32 nCount = GetIndexedStyleSheets().GetNumberOfStyleSheets(); for ( sal_uInt32 nAdd = 1; nAdd <= nCount; nAdd++ ) { - OUString aNewName = ScResId(STR_STYLENAME_STANDARD) + OUString::number( nAdd ); + OUString aNewName = ScResId(STR_STYLENAME_STANDARD_CELL) + OUString::number( nAdd ); + if ( Find( aNewName, eFam ) == nullptr ) + return SfxStyleSheetPool::Make(aNewName, eFam, mask); + aNewName = ScResId(STR_STYLENAME_STANDARD_PAGE) + OUString::number( nAdd ); if ( Find( aNewName, eFam ) == nullptr ) return SfxStyleSheetPool::Make(aNewName, eFam, mask); } @@ -96,8 +99,8 @@ SfxStyleSheetBase* ScStyleSheetPool::Create( const OUString& rName, SfxStyleSearchBits nMaskP ) { ScStyleSheet* pSheet = new ScStyleSheet( rName, *this, eFamily, nMaskP ); - if ( eFamily == SfxStyleFamily::Para && ScResId(STR_STYLENAME_STANDARD) != rName ) - pSheet->SetParent( ScResId(STR_STYLENAME_STANDARD) ); + if ( eFamily == SfxStyleFamily::Para && ScResId(STR_STYLENAME_STANDARD_CELL) != rName ) + pSheet->SetParent( ScResId(STR_STYLENAME_STANDARD_CELL) ); return pSheet; } @@ -182,8 +185,8 @@ void ScStyleSheetPool::CopyStdStylesFrom( ScStyleSheetPool* pSrcPool ) { // Copy Default styles - CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD), SfxStyleFamily::Para ); - CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD), SfxStyleFamily::Page ); + CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD_CELL), SfxStyleFamily::Para ); + CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD_PAGE), SfxStyleFamily::Page ); CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_REPORT), SfxStyleFamily::Page ); } @@ -224,7 +227,7 @@ void ScStyleSheetPool::CreateStandardStyles() SvxBoxItem aBoxItem ( ATTR_BORDER ); SvxBoxInfoItem aBoxInfoItem ( ATTR_BORDER_INNER ); - OUString aStrStandard = ScResId(STR_STYLENAME_STANDARD); + OUString aStrStandard = ScResId(STR_STYLENAME_STANDARD_CELL); // Cell format templates: @@ -259,6 +262,7 @@ void ScStyleSheetPool::CreateStandardStyles() // if ( eCtl == LANGUAGE_THAI ) // pSet->Put( SvxFontHeightItem( 300, 100, ATTR_CTL_FONT_HEIGHT ) ); // 15 pt + aStrStandard = ScResId(STR_STYLENAME_STANDARD_PAGE); // Page format template: |