sc/inc/globstr.hrc | 3 +-- sc/qa/extras/scautoformatobj.cxx | 2 +- sc/qa/extras/scautoformatsobj.cxx | 2 +- sc/qa/uitest/calc_tests6/tdf91726.py | 4 ++-- sc/source/core/data/attarray.cxx | 2 +- sc/source/core/data/docpool.cxx | 2 +- sc/source/core/data/documen8.cxx | 2 +- sc/source/core/data/document.cxx | 7 +------ sc/source/core/data/dpoutput.cxx | 2 +- sc/source/core/data/patattr.cxx | 2 +- sc/source/core/data/stlpool.cxx | 16 ++++++---------- sc/source/core/data/stlsheet.cxx | 4 +--- sc/source/core/data/table1.cxx | 2 +- sc/source/core/data/table5.cxx | 2 +- sc/source/core/tool/autoform.cxx | 4 ++-- sc/source/core/tool/stylehelper.cxx | 4 ++-- sc/source/filter/excel/impop.cxx | 2 +- sc/source/filter/excel/xestyle.cxx | 4 ++-- sc/source/filter/excel/xistyle.cxx | 6 +++--- sc/source/filter/excel/xltools.cxx | 4 ++-- sc/source/filter/html/htmlexp.cxx | 2 +- sc/source/filter/oox/stylesbuffer.cxx | 6 +++--- sc/source/ui/condformat/condformatdlgentry.cxx | 2 +- sc/source/ui/docshell/docsh4.cxx | 2 +- sc/source/ui/unoobj/cellsuno.cxx | 4 ++-- sc/source/ui/unoobj/styleuno.cxx | 2 +- 26 files changed, 41 insertions(+), 53 deletions(-)
New commits: commit 7002053174aed5c3a7b1fe5b1785011080aa6cbe Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Fri Nov 6 09:57:39 2020 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue Nov 10 12:07:21 2020 +0100 Revert "tdf#132137 Rename Default Style in Calc." This reverts commit 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: Ifabc133b8f72547fb506da0925df97f1b006291c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105390 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc index 063d51a3d2ec..d393739292e5 100644 --- a/sc/inc/globstr.hrc +++ b/sc/inc/globstr.hrc @@ -269,8 +269,7 @@ #define STR_EXPORT_DBF NC_("STR_EXPORT_DBF", "DBase export") #define STR_EXPORT_DIF NC_("STR_EXPORT_DIF", "Dif Export") #define STR_IMPORT_DIF NC_("STR_IMPORT_DIF", "Dif Import") -#define STR_STYLENAME_STANDARD_CELL NC_("STR_STYLENAME_STANDARD", "Default Cell Style") -#define STR_STYLENAME_STANDARD_PAGE NC_("STR_STYLENAME_STANDARD", "Default Page Style") +#define STR_STYLENAME_STANDARD NC_("STR_STYLENAME_STANDARD", "Default") #define STR_STYLENAME_RESULT NC_("STR_STYLENAME_RESULT", "Result") #define STR_STYLENAME_RESULT1 NC_("STR_STYLENAME_RESULT1", "Result2") #define STR_STYLENAME_HEADLINE NC_("STR_STYLENAME_HEADLINE", "Heading") diff --git a/sc/qa/extras/scautoformatobj.cxx b/sc/qa/extras/scautoformatobj.cxx index 23abaa956f1c..76db8c6a3592 100644 --- a/sc/qa/extras/scautoformatobj.cxx +++ b/sc/qa/extras/scautoformatobj.cxx @@ -88,7 +88,7 @@ ScAutoFormatObj::ScAutoFormatObj() : CalcUnoApiTest("/sc/qa/extras/testdocuments") , XElementAccess(cppu::UnoType<beans::XPropertySet>::get()) , XIndexAccess(16) - , XNamed("Default Cell Style") + , XNamed("Default") , XServiceInfo("ScAutoFormatObj", "com.sun.star.sheet.TableAutoFormat") { } diff --git a/sc/qa/extras/scautoformatsobj.cxx b/sc/qa/extras/scautoformatsobj.cxx index 769478608506..ed799c018ef4 100644 --- a/sc/qa/extras/scautoformatsobj.cxx +++ b/sc/qa/extras/scautoformatsobj.cxx @@ -89,7 +89,7 @@ ScAutoFormatsObj::ScAutoFormatsObj() : CalcUnoApiTest("/sc/qa/extras/testdocuments") , XElementAccess(cppu::UnoType<container::XNamed>::get()) , XIndexAccess(2) - , XNameAccess("Default Cell Style") + , XNameAccess("Default") , XNameContainer("ScAutoFormatsObj") , XNameReplace("ScAutoFormatsObj") , XServiceInfo("stardiv.StarCalc.ScAutoFormatsObj", "com.sun.star.sheet.TableAutoFormats") diff --git a/sc/qa/uitest/calc_tests6/tdf91726.py b/sc/qa/uitest/calc_tests6/tdf91726.py index 4dccc7c697ec..38703cb7e34a 100644 --- a/sc/qa/uitest/calc_tests6/tdf91726.py +++ b/sc/qa/uitest/calc_tests6/tdf91726.py @@ -28,7 +28,7 @@ class tdf91726(UITestCase): xadd = xDialog.getChild("add") def handle_name_dlg(dialog): nameEntry = dialog.getChild("name_entry") - nameEntry.executeAction("TYPE", mkPropertyValues({"TEXT":"Default Cell Style"})) + nameEntry.executeAction("TYPE", mkPropertyValues({"TEXT":"Default"})) xOKBtn = dialog.getChild("ok") def handle_error_dlg(dialog2): #Error message: You have entered an invalid name. @@ -43,7 +43,7 @@ class tdf91726(UITestCase): xDialog = self.xUITest.getTopFocusWindow() nameEntry = xDialog.getChild("name_entry") #back to name dialog, LO should not crash - self.assertEqual(get_state_as_dict(nameEntry)["Text"], "Default Cell Style") + self.assertEqual(get_state_as_dict(nameEntry)["Text"], "Default") xCanceltn = xDialog.getChild("cancel") self.ui_test.close_dialog_through_button(xCanceltn) diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx index a4c57ca4f0b0..8944e23ed61c 100644 --- a/sc/source/core/data/attarray.cxx +++ b/sc/source/core/data/attarray.cxx @@ -1823,7 +1823,7 @@ void ScAttrArray::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBo pDocument->GetPool()->Remove(*mvData[nPos].pPattern); pNewPattern->SetStyleSheet( static_cast<ScStyleSheet*>( pDocument->GetStyleSheetPool()-> - Find( ScResId(STR_STYLENAME_STANDARD_CELL), + Find( ScResId(STR_STYLENAME_STANDARD), SfxStyleFamily::Para, SfxStyleSearchBits::Auto | SfxStyleSearchBits::ScStandard ) ) ); mvData[nPos].pPattern = &pDocument->GetPool()->Put(*pNewPattern); diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx index 325b6988e184..3325a36e6ff9 100644 --- a/sc/source/core/data/docpool.cxx +++ b/sc/source/core/data/docpool.cxx @@ -279,7 +279,7 @@ ScDocumentPool::ScDocumentPool() // TODO: Write additional method ScGlobal::IsInit() or somesuch // or detect whether this is the Secondary Pool for a MessagePool if ( ScGlobal::GetEmptyBrushItem() ) - mvPoolDefaults[ ATTR_PATTERN - ATTR_STARTINDEX ] = new ScPatternAttr( std::move(pSet), ScResId(STR_STYLENAME_STANDARD_CELL) ); + mvPoolDefaults[ ATTR_PATTERN - ATTR_STARTINDEX ] = new ScPatternAttr( std::move(pSet), ScResId(STR_STYLENAME_STANDARD) ); else mvPoolDefaults[ ATTR_PATTERN - ATTR_STARTINDEX ] = new ScPatternAttr( std::move(pSet), STRING_STANDARD ); // FIXME: without name? diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 293e66552d75..85ecfd3d94a9 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -333,7 +333,7 @@ bool ScDocument::RemovePageStyleInUse( const OUString& rStyle ) if ( maTabs[i]->GetPageStyle() == rStyle ) { bWasInUse = true; - maTabs[i]->SetPageStyle( ScResId(STR_STYLENAME_STANDARD_PAGE) ); + maTabs[i]->SetPageStyle( ScResId(STR_STYLENAME_STANDARD) ); } return bWasInUse; diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index fb8c040ba5c3..ad292b70b7e2 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -4967,12 +4967,7 @@ void ScDocument::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool b ( pStyleSheet, bRemoved, pDev, nPPTX, nPPTY, rZoomX, rZoomY ); } - if ( pStyleSheet && pStyleSheet->GetName() == ScResId(STR_STYLENAME_STANDARD_CELL) ) - { - // update attributes for all note objects - ScDetectiveFunc::UpdateAllComments( *this ); - } - else if ( pStyleSheet && pStyleSheet->GetName() == ScResId(STR_STYLENAME_STANDARD_PAGE) ) + if ( pStyleSheet && pStyleSheet->GetName() == ScResId(STR_STYLENAME_STANDARD) ) { // update attributes for all note objects ScDetectiveFunc::UpdateAllComments( *this ); diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index 4bc67a0fcf8d..ee5c9f32952d 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -298,7 +298,7 @@ void lcl_SetStyleById(ScDocument* pDoc, SCTAB nTab, pStyle = static_cast<ScStyleSheet*>( &pStlPool->Make( aStyleName, SfxStyleFamily::Para, SfxStyleSearchBits::UserDefined ) ); - pStyle->SetParent( ScResId(STR_STYLENAME_STANDARD_CELL) ); + pStyle->SetParent( ScResId(STR_STYLENAME_STANDARD) ); SfxItemSet& rSet = pStyle->GetItemSet(); if (strcmp(pStrId, STR_PIVOT_STYLENAME_RESULT) == 0 || strcmp(pStrId, STR_PIVOT_STYLENAME_TITLE) == 0){ rSet.Put( SvxWeightItem( WEIGHT_BOLD, ATTR_FONT_WEIGHT ) ); diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index 005cfe23fc3e..3ac2bdcf4f96 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -1014,7 +1014,7 @@ static SfxStyleSheetBase* lcl_CopyStyleToPool // if necessary create derivative Styles, if not available: - if ( (ScResId(STR_STYLENAME_STANDARD_CELL) != aStrParent || ScResId(STR_STYLENAME_STANDARD_PAGE) != aStrParent) && + if ( ScResId(STR_STYLENAME_STANDARD) != aStrParent && aStrSrcStyle != aStrParent && !pDestPool->Find( aStrParent, eFamily ) ) { diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index 7d3da5eb3e0d..9dc911258d68 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -83,10 +83,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); } @@ -99,8 +96,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; } @@ -185,8 +182,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 ); } @@ -227,7 +224,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: @@ -262,7 +259,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: diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx index 1fc3a540d3d6..6175712c5c0a 100644 --- a/sc/source/core/data/stlsheet.cxx +++ b/sc/source/core/data/stlsheet.cxx @@ -281,9 +281,7 @@ void ScStyleSheet::Notify( SfxBroadcaster&, const SfxHint& rHint ) bool ScStyleSheet::SetName(const OUString& rNew, bool bReindexNow) { OUString aFileStdName = STRING_STANDARD; - if ( rNew == aFileStdName && aFileStdName != ScResId(STR_STYLENAME_STANDARD_CELL) ) - return false; - else if ( rNew == aFileStdName && aFileStdName != ScResId(STR_STYLENAME_STANDARD_PAGE) ) + if ( rNew == aFileStdName && aFileStdName != ScResId(STR_STYLENAME_STANDARD) ) return false; else return SfxStyleSheet::SetName(rNew, bReindexNow); diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index 078e4dffb074..16e6e5d594d5 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -236,7 +236,7 @@ ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const OUString& rNewName, aCodeName( rNewName ), nLinkRefreshDelay( 0 ), nLinkMode( ScLinkMode::NONE ), - aPageStyle( ScResId(STR_STYLENAME_STANDARD_PAGE) ), + aPageStyle( ScResId(STR_STYLENAME_STANDARD) ), nRepeatStartX( SCCOL_REPEAT_NONE ), nRepeatEndX( SCCOL_REPEAT_NONE ), nRepeatStartY( SCROW_REPEAT_NONE ), diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx index 1370d77f56d3..189cad4c7328 100644 --- a/sc/source/core/data/table5.cxx +++ b/sc/source/core/data/table5.cxx @@ -1120,7 +1120,7 @@ void ScTable::SetPageStyle( const OUString& rName ) if ( !pNewStyle ) { - aStrNew = ScResId(STR_STYLENAME_STANDARD_PAGE); + aStrNew = ScResId(STR_STYLENAME_STANDARD); pNewStyle = pStylePool->Find( aStrNew, SfxStyleFamily::Page ); } diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index 2d60770426c7..28ce5f21c56c 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -675,7 +675,7 @@ ScAutoFormat::ScAutoFormat() : { // create default autoformat std::unique_ptr<ScAutoFormatData> pData(new ScAutoFormatData); - OUString aName(ScResId(STR_STYLENAME_STANDARD_CELL)); + OUString aName(ScResId(STR_STYLENAME_STANDARD)); pData->SetName(aName); // default font, default height @@ -755,7 +755,7 @@ ScAutoFormat::ScAutoFormat() : bool DefaultFirstEntry::operator() (const OUString& left, const OUString& right) const { - OUString aStrStandard(ScResId(STR_STYLENAME_STANDARD_CELL)); + OUString aStrStandard(ScResId(STR_STYLENAME_STANDARD)); if (ScGlobal::GetpTransliteration()->isEqual( left, right ) ) return false; if ( ScGlobal::GetpTransliteration()->isEqual( left, aStrStandard ) ) diff --git a/sc/source/core/tool/stylehelper.cxx b/sc/source/core/tool/stylehelper.cxx index 4ae540af921b..61ec2a3c37a1 100644 --- a/sc/source/core/tool/stylehelper.cxx +++ b/sc/source/core/tool/stylehelper.cxx @@ -60,7 +60,7 @@ static const ScDisplayNameMap* lcl_GetStyleNameMap( SfxStyleFamily nType ) { static ScDisplayNameMap const aCellMap[] { - { ScResId( STR_STYLENAME_STANDARD_CELL ), OUString(SC_STYLE_PROG_STANDARD) }, + { ScResId( STR_STYLENAME_STANDARD ), OUString(SC_STYLE_PROG_STANDARD) }, { ScResId( STR_STYLENAME_RESULT ), OUString(SC_STYLE_PROG_RESULT) }, { ScResId( STR_STYLENAME_RESULT1 ), OUString(SC_STYLE_PROG_RESULT1) }, { ScResId( STR_STYLENAME_HEADLINE ), OUString(SC_STYLE_PROG_HEADLINE) }, @@ -80,7 +80,7 @@ static const ScDisplayNameMap* lcl_GetStyleNameMap( SfxStyleFamily nType ) { static ScDisplayNameMap const aPageMap[] { - { ScResId( STR_STYLENAME_STANDARD_PAGE ), OUString(SC_STYLE_PROG_STANDARD) }, + { ScResId( STR_STYLENAME_STANDARD ), OUString(SC_STYLE_PROG_STANDARD) }, { ScResId( STR_STYLENAME_REPORT ), OUString(SC_STYLE_PROG_REPORT) }, // last entry remains empty { OUString(), OUString() }, diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index b3d5a369f271..5151232e108d 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -1235,7 +1235,7 @@ void ImportExcel::PostDocLoad() /* Set automatic page numbering in Default page style (default is "page number = 1"). Otherwise hidden tables (i.e. for scenarios) which have Default page style will break automatic page numbering. */ - if( SfxStyleSheetBase* pStyleSheet = GetStyleSheetPool().Find( ScResId( STR_STYLENAME_STANDARD_PAGE ), SfxStyleFamily::Page ) ) + if( SfxStyleSheetBase* pStyleSheet = GetStyleSheetPool().Find( ScResId( STR_STYLENAME_STANDARD ), SfxStyleFamily::Page ) ) pStyleSheet->GetItemSet().Put( SfxUInt16Item( ATTR_PAGE_FIRSTPAGENO, 0 ) ); // outlines for all sheets, sets hidden rows and columns (#i11776# after filtered ranges) diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 682de83fe8e3..1c63824ca907 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -2012,7 +2012,7 @@ XclExpXF::XclExpXF( const XclExpRoot& rRoot, const SfxStyleSheetBase& rStyleShee XclExpRoot( rRoot ), mnParentXFId( XclExpXFBuffer::GetXFIdFromIndex( EXC_XF_STYLEPARENT ) ) { - bool bDefStyle = (rStyleSheet.GetName() == ScResId( STR_STYLENAME_STANDARD_CELL )); + bool bDefStyle = (rStyleSheet.GetName() == ScResId( STR_STYLENAME_STANDARD )); sal_Int16 nScript = bDefStyle ? GetDefApiScript() : css::i18n::ScriptType::WEAK; Init( const_cast< SfxStyleSheetBase& >( rStyleSheet ).GetItemSet(), nScript, NUMBERFORMAT_ENTRY_NOT_FOUND, EXC_FONT_NOTFOUND, false, bDefStyle ); @@ -2923,7 +2923,7 @@ void XclExpXFBuffer::InsertDefaultRecords() maFills.push_back( lcl_GetPatternFill_Gray125() ); // index 0: default style - if( SfxStyleSheetBase* pDefStyleSheet = GetStyleSheetPool().Find( ScResId( STR_STYLENAME_STANDARD_CELL ), SfxStyleFamily::Para ) ) + if( SfxStyleSheetBase* pDefStyleSheet = GetStyleSheetPool().Find( ScResId( STR_STYLENAME_STANDARD ), SfxStyleFamily::Para ) ) { XclExpXFRef xDefStyle = new XclExpXF( GetRoot(), *pDefStyleSheet ); sal_uInt32 nXFId = AppendBuiltInXFWithStyle( xDefStyle, EXC_STYLE_NORMAL ); diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 0aef25ef2775..a5e248be1214 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -1358,7 +1358,7 @@ void XclImpXF::ApplyPatternToAttrVector( { ScStyleSheet* pStyleSheet = static_cast<ScStyleSheet*>( pStylePool->Find( - ScResId(STR_STYLENAME_STANDARD_CELL), SfxStyleFamily::Para)); + ScResId(STR_STYLENAME_STANDARD), SfxStyleFamily::Para)); if (pStyleSheet) rPat.SetStyleSheet(pStyleSheet, false); @@ -1520,7 +1520,7 @@ ScStyleSheet* XclImpStyle::CreateStyleSheet() if( pXF ) pXF->SetAllUsedFlags( true ); // use existing "Default" style sheet mpStyleSheet = static_cast< ScStyleSheet* >( GetStyleSheetPool().Find( - ScResId( STR_STYLENAME_STANDARD_CELL ), SfxStyleFamily::Para ) ); + ScResId( STR_STYLENAME_STANDARD ), SfxStyleFamily::Para ) ); OSL_ENSURE( mpStyleSheet, "XclImpStyle::CreateStyleSheet - Default style not found" ); bCreatePattern = true; } @@ -1618,7 +1618,7 @@ void XclImpXFBuffer::CreateUserStyles() BIFF4W import filter is never used to import from clipboard... */ bool bReserveAll = (GetBiff() == EXC_BIFF4) && (GetCurrScTab() > 0); SfxStyleSheetIterator aStyleIter( GetDoc().GetStyleSheetPool(), SfxStyleFamily::Para ); - OUString aStandardName = ScResId( STR_STYLENAME_STANDARD_CELL ); + OUString aStandardName = ScResId( STR_STYLENAME_STANDARD ); for( SfxStyleSheetBase* pStyleSheet = aStyleIter.First(); pStyleSheet; pStyleSheet = aStyleIter.Next() ) if( (pStyleSheet->GetName() != aStandardName) && (bReserveAll || !pStyleSheet->IsUserDefined()) ) if( aCellStyles.count( pStyleSheet->GetName() ) == 0 ) diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx index c069e73963e8..e6fce7474725 100644 --- a/sc/source/filter/excel/xltools.cxx +++ b/sc/source/filter/excel/xltools.cxx @@ -553,7 +553,7 @@ OUString XclTools::GetBuiltInStyleName( sal_uInt8 nStyleId, const OUString& rNam if( nStyleId == EXC_STYLE_NORMAL ) // "Normal" becomes "Default" style { - aStyleName = ScResId( STR_STYLENAME_STANDARD_CELL ); + aStyleName = ScResId( STR_STYLENAME_STANDARD ); } else { @@ -577,7 +577,7 @@ OUString XclTools::GetBuiltInStyleName( sal_uInt8 nStyleId, const OUString& rNam bool XclTools::IsBuiltInStyleName( const OUString& rStyleName, sal_uInt8* pnStyleId, sal_Int32* pnNextChar ) { // "Default" becomes "Normal" - if (rStyleName == ScResId(STR_STYLENAME_STANDARD_CELL)) + if (rStyleName == ScResId(STR_STYLENAME_STANDARD)) { if( pnStyleId ) *pnStyleId = EXC_STYLE_NORMAL; if( pnNextChar ) *pnNextChar = rStyleName.getLength(); diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index 81f01f3f096d..18124981f0ba 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -439,7 +439,7 @@ const SfxItemSet& ScHTMLExport::PageDefaults( SCTAB nTab ) if ( !aHTMLStyle.bInitialized ) { pStyleSheet = pStylePool->Find( - ScResId(STR_STYLENAME_STANDARD_CELL), + ScResId(STR_STYLENAME_STANDARD), SfxStyleFamily::Para ); OSL_ENSURE( pStyleSheet, "ParaStyle not found! :-(" ); if (!pStyleSheet) diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index 1594fa5591e9..cd1515914663 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -2047,7 +2047,7 @@ void Xf::applyPatternToAttrList( AttrList& rAttrs, SCROW nRow1, SCROW nRow2, sal { ScStyleSheet* pStyleSheet = static_cast<ScStyleSheet*>( pStylePool->Find( - ScResId(STR_STYLENAME_STANDARD_CELL), SfxStyleFamily::Para)); + ScResId(STR_STYLENAME_STANDARD), SfxStyleFamily::Para)); if (pStyleSheet) rPat.SetStyleSheet( pStyleSheet, false ); @@ -2481,7 +2481,7 @@ void CellStyle::createCellStyle() if( !mbCreated ) { if ( bDefStyle && maFinalName.isEmpty() ) - maFinalName = ScResId( STR_STYLENAME_STANDARD_CELL ); + maFinalName = ScResId( STR_STYLENAME_STANDARD ); mbCreated = maFinalName.isEmpty(); } @@ -2495,7 +2495,7 @@ void CellStyle::createCellStyle() { // use existing "Default" style sheet mpStyleSheet = static_cast< ScStyleSheet* >( rDoc.GetStyleSheetPool()->Find( - ScResId( STR_STYLENAME_STANDARD_CELL ), SfxStyleFamily::Para ) ); + ScResId( STR_STYLENAME_STANDARD ), SfxStyleFamily::Para ) ); OSL_ENSURE( mpStyleSheet, "CellStyle::createStyle - Default style not found" ); bCreatePattern = true; } diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 746cbeb67bc9..9ba1e652c280 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -423,7 +423,7 @@ void StyleSelect(weld::Window* pDialogParent, weld::ComboBox& rLbStyle, const Sc { // call new style dialog SfxUInt16Item aFamilyItem( SID_STYLE_FAMILY, sal_uInt16(SfxStyleFamily::Para) ); - SfxStringItem aRefItem( SID_STYLE_REFERENCE, ScResId(STR_STYLENAME_STANDARD_CELL) ); + SfxStringItem aRefItem( SID_STYLE_REFERENCE, ScResId(STR_STYLENAME_STANDARD) ); css::uno::Any aAny(pDialogParent->GetXWindow()); SfxUnoAnyItem aDialogParent( SID_DIALOG_PARENT, aAny ); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 59caa054701b..f27c84dc00b4 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -1515,7 +1515,7 @@ void ScDocShell::DoAutoStyle( const ScRange& rRange, const OUString& rStyle ) pStylePool->FindCaseIns( rStyle, SfxStyleFamily::Para ); if (!pStyleSheet) pStyleSheet = static_cast<ScStyleSheet*>( - pStylePool->Find( ScResId(STR_STYLENAME_STANDARD_CELL), SfxStyleFamily::Para )); + pStylePool->Find( ScResId(STR_STYLENAME_STANDARD), SfxStyleFamily::Para )); if (pStyleSheet) { OSL_ENSURE(rRange.aStart.Tab() == rRange.aEnd.Tab(), diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 55a40a5495c4..856736b275b1 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -1925,7 +1925,7 @@ void SAL_CALL ScCellRangesBase::setPropertyToDefault( const OUString& aPropertyN bChartRowAsHdr = false; else if ( pEntry->nWID == SC_WID_UNO_CELLSTYL ) { - OUString aStyleName( ScResId( STR_STYLENAME_STANDARD_CELL ) ); + OUString aStyleName( ScResId( STR_STYLENAME_STANDARD ) ); pDocShell->GetDocFunc().ApplyStyle( *GetMarkData(), aStyleName, true ); } } @@ -1977,7 +1977,7 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const OUString& aPropert break; case SC_WID_UNO_CELLSTYL: aAny <<= ScStyleNameConversion::DisplayToProgrammaticName( - ScResId(STR_STYLENAME_STANDARD_CELL), SfxStyleFamily::Para ); + ScResId(STR_STYLENAME_STANDARD), SfxStyleFamily::Para ); break; case SC_WID_UNO_TBLBORD: case SC_WID_UNO_TBLBORD2: diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index ead34c2a9518..452c5dc3d345 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -759,7 +759,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const OUString& aName ) else { if ( rDoc.RemovePageStyleInUse( aString ) ) - pDocShell->PageStyleModified( ScResId(STR_STYLENAME_STANDARD_PAGE), true ); + pDocShell->PageStyleModified( ScResId(STR_STYLENAME_STANDARD), true ); pStylePool->Remove( pStyle ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits