[Libreoffice-commits] core.git: sc/inc sc/qa sc/source

Srijan Bhatia (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 10 10:55:56 UTC 2020


 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, 53 insertions(+), 41 deletions(-)

New commits:
commit 4111ed76906bf6be05b704bf52fa91353dfef183
Author:     Srijan Bhatia <srijanbhatiasun at gmail.com>
AuthorDate: Tue Jun 2 18:09:20 2020 +0530
Commit:     Heiko Tietze <heiko.tietze at documentfoundation.org>
CommitDate: Wed Jun 10 12:55:17 2020 +0200

    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 at documentfoundation.org>

diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index d393739292e5..063d51a3d2ec 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -269,7 +269,8 @@
 #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                  NC_("STR_STYLENAME_STANDARD", "Default")
+#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_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 76db8c6a3592..23abaa956f1c 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")
+    , XNamed("Default Cell Style")
     , XServiceInfo("ScAutoFormatObj", "com.sun.star.sheet.TableAutoFormat")
 {
 }
diff --git a/sc/qa/extras/scautoformatsobj.cxx b/sc/qa/extras/scautoformatsobj.cxx
index ed799c018ef4..769478608506 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")
+    , XNameAccess("Default Cell Style")
     , 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 38703cb7e34a..4dccc7c697ec 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"}))
+            nameEntry.executeAction("TYPE", mkPropertyValues({"TEXT":"Default Cell Style"}))
             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")
+            self.assertEqual(get_state_as_dict(nameEntry)["Text"], "Default Cell Style")
             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 1a45201521dc..1f174b5b2a0a 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1830,7 +1830,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),
+                        Find( ScResId(STR_STYLENAME_STANDARD_CELL),
                               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 3325a36e6ff9..325b6988e184 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) );
+        mvPoolDefaults[ ATTR_PATTERN     - ATTR_STARTINDEX ] = new ScPatternAttr( std::move(pSet), ScResId(STR_STYLENAME_STANDARD_CELL) );
     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 85ecfd3d94a9..293e66552d75 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) );
+            maTabs[i]->SetPageStyle( ScResId(STR_STYLENAME_STANDARD_PAGE) );
         }
 
     return bWasInUse;
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index ad292b70b7e2..fb8c040ba5c3 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -4967,7 +4967,12 @@ void ScDocument::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool b
                 ( pStyleSheet, bRemoved, pDev, nPPTX, nPPTY, rZoomX, rZoomY );
     }
 
-    if ( pStyleSheet && pStyleSheet->GetName() == ScResId(STR_STYLENAME_STANDARD) )
+    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) )
     {
         //  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 ee5c9f32952d..4bc67a0fcf8d 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) );
+        pStyle->SetParent( ScResId(STR_STYLENAME_STANDARD_CELL) );
         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 3ac2bdcf4f96..005cfe23fc3e 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) != aStrParent &&
+        if ( (ScResId(STR_STYLENAME_STANDARD_CELL) != aStrParent || ScResId(STR_STYLENAME_STANDARD_PAGE) != aStrParent) &&
              aStrSrcStyle != aStrParent &&
              !pDestPool->Find( aStrParent, eFamily ) )
         {
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:
 
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index 6175712c5c0a..1fc3a540d3d6 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -281,7 +281,9 @@ 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) )
+    if ( rNew == aFileStdName && aFileStdName != ScResId(STR_STYLENAME_STANDARD_CELL) )
+        return false;
+    else if ( rNew == aFileStdName && aFileStdName != ScResId(STR_STYLENAME_STANDARD_PAGE) )
         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 16e6e5d594d5..078e4dffb074 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) ),
+    aPageStyle( ScResId(STR_STYLENAME_STANDARD_PAGE) ),
     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 189cad4c7328..1370d77f56d3 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);
+            aStrNew = ScResId(STR_STYLENAME_STANDARD_PAGE);
             pNewStyle = pStylePool->Find( aStrNew, SfxStyleFamily::Page );
         }
 
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 28ce5f21c56c..2d60770426c7 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));
+    OUString aName(ScResId(STR_STYLENAME_STANDARD_CELL));
     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));
+    OUString aStrStandard(ScResId(STR_STYLENAME_STANDARD_CELL));
     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 61ec2a3c37a1..4ae540af921b 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 ), OUString(SC_STYLE_PROG_STANDARD) },
+            { ScResId( STR_STYLENAME_STANDARD_CELL ), 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 ), OUString(SC_STYLE_PROG_STANDARD) },
+            { ScResId( STR_STYLENAME_STANDARD_PAGE ), 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 5151232e108d..b3d5a369f271 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 ), SfxStyleFamily::Page ) )
+    if( SfxStyleSheetBase* pStyleSheet = GetStyleSheetPool().Find( ScResId( STR_STYLENAME_STANDARD_PAGE ), 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 1c63824ca907..682de83fe8e3 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 ));
+    bool bDefStyle = (rStyleSheet.GetName() == ScResId( STR_STYLENAME_STANDARD_CELL ));
     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 ), SfxStyleFamily::Para ) )
+    if( SfxStyleSheetBase* pDefStyleSheet = GetStyleSheetPool().Find( ScResId( STR_STYLENAME_STANDARD_CELL ), 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 a5e248be1214..0aef25ef2775 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), SfxStyleFamily::Para));
+                        ScResId(STR_STYLENAME_STANDARD_CELL), 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 ), SfxStyleFamily::Para ) );
+                ScResId( STR_STYLENAME_STANDARD_CELL ), 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 );
+    OUString aStandardName = ScResId( STR_STYLENAME_STANDARD_CELL );
     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 e6fce7474725..c069e73963e8 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 );
+        aStyleName = ScResId( STR_STYLENAME_STANDARD_CELL );
     }
     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))
+    if (rStyleName == ScResId(STR_STYLENAME_STANDARD_CELL))
     {
         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 18124981f0ba..81f01f3f096d 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),
+                ScResId(STR_STYLENAME_STANDARD_CELL),
                 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 802e515f09b0..d9f8214c2774 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), SfxStyleFamily::Para));
+                        ScResId(STR_STYLENAME_STANDARD_CELL), 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 );
+            maFinalName = ScResId( STR_STYLENAME_STANDARD_CELL );
         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 ), SfxStyleFamily::Para ) );
+                ScResId( STR_STYLENAME_STANDARD_CELL ), 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 9ba1e652c280..746cbeb67bc9 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) );
+        SfxStringItem aRefItem( SID_STYLE_REFERENCE, ScResId(STR_STYLENAME_STANDARD_CELL) );
         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 e634c92605ec..9b948fb94575 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1507,7 +1507,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), SfxStyleFamily::Para ));
+            pStylePool->Find( ScResId(STR_STYLENAME_STANDARD_CELL), 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 efc5386c8160..43870353bcbb 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 ) );
+                OUString aStyleName( ScResId( STR_STYLENAME_STANDARD_CELL ) );
                 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), SfxStyleFamily::Para );
+                                    ScResId(STR_STYLENAME_STANDARD_CELL), 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 452c5dc3d345..ead34c2a9518 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), true );
+                    pDocShell->PageStyleModified( ScResId(STR_STYLENAME_STANDARD_PAGE), true );
 
                 pStylePool->Remove( pStyle );
 


More information about the Libreoffice-commits mailing list