summaryrefslogtreecommitdiff
path: root/sc/source/core/data/stlpool.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/stlpool.cxx')
-rw-r--r--sc/source/core/data/stlpool.cxx16
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: