diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-11-05 20:35:09 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-11-06 09:53:04 +0100 |
commit | a5b3211f072d982e1ee136e864f153836c76a5ca (patch) | |
tree | 5a84e41458aa7a1bf3c1e700b96c3b8e647af8ac /sc/source/core/data/stlpool.cxx | |
parent | 538a3463f424adae8b48db50ca11f27704fe0be2 (diff) |
tdf#134161: Revert "tdf#132137 Rename Default Style in Calc."
This reverts 4111ed76906bf6be05b704bf52fa91353dfef183
the document would also hang if
define STR_STYLENAME_STANDARD NC_("STR_STYLENAME_STANDARD", "Default");
is replaced by
define STR_STYLENAME_STANDARD NC_("STR_STYLENAME_STANDARD", "DefaultTest");
meaning somewhere in the code 'Default' is harcoded
as git grep "\"Default\"" sc/source/ shows
Reverting for now so we can backport it to libreoffice-7-0
while a better solution is provided for tdf#132137
Some other problems of the reverted commit are mentioned
in comment 4 and comment 5 of tdf#134161
I'm adding a unittest in another commit so this one
can be easily reverted in the future
Change-Id: Ib7c4a99ff4957eba7ec0b644e989c7a08b46f2a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105381
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/source/core/data/stlpool.cxx')
-rw-r--r-- | sc/source/core/data/stlpool.cxx | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index 59de29c849de..d1e831e0dd88 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -84,10 +84,7 @@ 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_CELL) + OUString::number( nAdd ); - if ( Find( aNewName, eFam ) == nullptr ) - return SfxStyleSheetPool::Make(aNewName, eFam, mask); - aNewName = ScResId(STR_STYLENAME_STANDARD_PAGE) + OUString::number( nAdd ); + OUString aNewName = ScResId(STR_STYLENAME_STANDARD) + OUString::number( nAdd ); if ( Find( aNewName, eFam ) == nullptr ) return SfxStyleSheetPool::Make(aNewName, eFam, mask); } @@ -104,8 +101,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_CELL) != rName ) - pSheet->SetParent( ScResId(STR_STYLENAME_STANDARD_CELL) ); + if ( eFamily == SfxStyleFamily::Para && ScResId(STR_STYLENAME_STANDARD) != rName ) + pSheet->SetParent( ScResId(STR_STYLENAME_STANDARD) ); return pSheet; } @@ -190,8 +187,8 @@ void ScStyleSheetPool::CopyStdStylesFrom( ScStyleSheetPool* pSrcPool ) { // Copy Default styles - CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD_CELL), SfxStyleFamily::Para ); - CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD_PAGE), SfxStyleFamily::Page ); + CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD), SfxStyleFamily::Para ); + CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD), SfxStyleFamily::Page ); CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_REPORT), SfxStyleFamily::Page ); } @@ -232,7 +229,7 @@ void ScStyleSheetPool::CreateStandardStyles() SvxBoxItem aBoxItem ( ATTR_BORDER ); SvxBoxInfoItem aBoxInfoItem ( ATTR_BORDER_INNER ); - OUString aStrStandard = ScResId(STR_STYLENAME_STANDARD_CELL); + OUString aStrStandard = ScResId(STR_STYLENAME_STANDARD); // Cell format templates: @@ -267,8 +264,6 @@ 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: // 1. Standard |