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

Jean-Noël Rouvignac jn.rouvignac at gmail.com
Tue Feb 19 05:52:51 PST 2013


 sc/inc/global.hxx                  |    4 ++--
 sc/inc/scabstdlg.hxx               |    4 ++--
 sc/source/core/data/docpool.cxx    |    4 ++--
 sc/source/core/data/global.cxx     |   10 +++++-----
 sc/source/core/data/table3.cxx     |    4 ++--
 sc/source/core/tool/compiler.cxx   |    2 +-
 sc/source/filter/xml/xmlwrap.cxx   |    8 ++++----
 sc/source/ui/attrdlg/scdlgfact.cxx |    4 ++--
 sc/source/ui/attrdlg/scdlgfact.hxx |    4 ++--
 sc/source/ui/inc/inscodlg.hxx      |    6 +++---
 sc/source/ui/miscdlgs/inscodlg.cxx |    2 +-
 11 files changed, 26 insertions(+), 26 deletions(-)

New commits:
commit 742515639168cd35a0c2036a5bf6c46b2a3a554e
Author: Jean-Noël Rouvignac <jn.rouvignac at gmail.com>
Date:   Thu Feb 14 20:15:38 2013 +0100

    fdo#38838 ScGlobal::GetRscString() now returns OUString instead of String.
    
    Cleaned up the call sites.
    
    Change-Id: I6c688cecd4f872ed064ccfa3af4b402a779860dc
    Reviewed-on: https://gerrit.libreoffice.org/2155
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 53ede60..978985a 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -494,7 +494,7 @@ class ScGlobal
     static FuncCollection*  pFuncCollection;
     static ScUnoAddInCollection* pAddInCollection;
     static ScUserList*      pUserList;
-    static String**         ppRscString;
+    static OUString**       ppRscString;
     static String*          pStrScDoc;
     static String*          pEmptyString;
     static ::rtl::OUString* pEmptyOUString;
@@ -553,7 +553,7 @@ public:
     SC_DLLPUBLIC static ScUnoAddInCollection* GetAddInCollection();
     SC_DLLPUBLIC static ScUserList*         GetUserList();
     static void                 SetUserList( const ScUserList* pNewList );
-    SC_DLLPUBLIC static const String&       GetRscString( sal_uInt16 nIndex );
+    SC_DLLPUBLIC static const OUString&       GetRscString( sal_uInt16 nIndex );
     static void                 OpenURL( const String& rURL, const String& rTarget );
     SC_DLLPUBLIC static String              GetAbsDocName( const String& rFileName,
                                                 SfxObjectShell* pShell );
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 0dc4345..4113b64 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -388,8 +388,8 @@ public:
 
     virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( Window*        pParent, //add for ScInsertContentsDlg
                                                                     int nId,
-                                                                    sal_uInt16          nCheckDefaults = 0,
-                                                                    const String*   pStrTitle = NULL ) = 0;
+                                                                    sal_uInt16      nCheckDefaults = 0,
+                                                                    const OUString* pStrTitle = NULL ) = 0;
 
     virtual AbstractScInsertTableDlg * CreateScInsertTableDlg(Window* pParent, ScViewData& rViewData,
         SCTAB nTabCount, bool bFromFile) = 0;
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 8a4e870..535a480 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -994,7 +994,7 @@ SfxItemPresentation ScDocumentPool::GetPresentation(
 
             if( lcl_HFPresentation( rItem, ePresentation, GetMetric( nW ), ePresentationMetric, aBuffer, pIntl ) != SFX_ITEM_PRESENTATION_NONE )
             {
-                rText = OUString(ScGlobal::GetRscString(STR_HEADER)) + " ( " + aBuffer + " ) ";
+                rText = ScGlobal::GetRscString(STR_HEADER) + " ( " + aBuffer + " ) ";
             }
         }
         break;
@@ -1005,7 +1005,7 @@ SfxItemPresentation ScDocumentPool::GetPresentation(
 
             if( lcl_HFPresentation( rItem, ePresentation, GetMetric( nW ), ePresentationMetric, aBuffer, pIntl ) != SFX_ITEM_PRESENTATION_NONE )
             {
-                rText = OUString(ScGlobal::GetRscString(STR_FOOTER)) + " ( " + aBuffer + " ) ";
+                rText = ScGlobal::GetRscString(STR_FOOTER) + " ( " + aBuffer + " ) ";
             }
         }
         break;
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 3a00dd5..0d0a3d0 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -88,7 +88,7 @@ ScAutoFormat*   ScGlobal::pAutoFormat = NULL;
 FuncCollection* ScGlobal::pFuncCollection = NULL;
 ScUnoAddInCollection* ScGlobal::pAddInCollection = NULL;
 ScUserList*     ScGlobal::pUserList = NULL;
-String**        ScGlobal::ppRscString = NULL;
+OUString**      ScGlobal::ppRscString = NULL;
 LanguageType    ScGlobal::eLnge = LANGUAGE_SYSTEM;
 ::com::sun::star::lang::Locale*     ScGlobal::pLocale = NULL;
 SvtSysLocale*   ScGlobal::pSysLocale = NULL;
@@ -339,7 +339,7 @@ void ScGlobal::SetUserList( const ScUserList* pNewList )
     }
 }
 
-const String& ScGlobal::GetRscString( sal_uInt16 nIndex )
+const OUString& ScGlobal::GetRscString( sal_uInt16 nIndex )
 {
     OSL_ENSURE( nIndex < STR_COUNT, "ScGlobal::GetRscString - invalid string index");
     if( !ppRscString[ nIndex ] )
@@ -373,10 +373,10 @@ const String& ScGlobal::GetRscString( sal_uInt16 nIndex )
                 ;   // nothing
         }
         if (eOp != ocNone)
-            ppRscString[ nIndex ] = new String(
+            ppRscString[ nIndex ] = new OUString(
                     ScCompiler::GetNativeSymbol( eOp));
         else
-            ppRscString[ nIndex ] = new String(
+            ppRscString[ nIndex ] = new OUString(
                     ScRscStrLoader( RID_GLOBSTR, nIndex ).GetString());
     }
     return *ppRscString[ nIndex ];
@@ -543,7 +543,7 @@ void ScGlobal::Init()
     pCharClass = pSysLocale->GetCharClassPtr();
     pLocaleData = pSysLocale->GetLocaleDataPtr();
 
-    ppRscString = new String *[ STR_COUNT ];
+    ppRscString = new OUString *[ STR_COUNT ];
     for( sal_uInt16 nC = 0 ; nC < STR_COUNT ; nC++ ) ppRscString[ nC ] = NULL;
 
     pEmptyBrushItem = new SvxBrushItem( Color( COL_TRANSPARENT ), ATTR_BACKGROUND );
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index af5c3cb..52c45a8 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -2057,12 +2057,12 @@ bool ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2
         if (nIndex > 0)
         {
             GetUpperCellString(nCol1, nRow, aCellStr);
-            if ( aCellStr == rtl::OUString(ScGlobal::GetRscString(STR_TABLE_UND)) )
+            if ( aCellStr == ScGlobal::GetRscString(STR_TABLE_UND) )
             {
                 rEntry.eConnect = SC_AND;
                 bValid = true;
             }
-            else if ( aCellStr == rtl::OUString(ScGlobal::GetRscString(STR_TABLE_ODER)) )
+            else if ( aCellStr == ScGlobal::GetRscString(STR_TABLE_ODER) )
             {
                 rEntry.eConnect = SC_OR;
                 bValid = true;
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index f9b9e9d..51fba63 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -5081,7 +5081,7 @@ void ScCompiler::CreateStringFromExternal(rtl::OUStringBuffer& rBuffer, FormulaT
         case svExternalName:
         {
             const OUString *pStr = pRefMgr->getExternalFileName(t->GetIndex());
-            OUString aFileName = pStr ? *pStr : OUString(ScGlobal::GetRscString(STR_NO_NAME_REF));
+            OUString aFileName = pStr ? *pStr : ScGlobal::GetRscString(STR_NO_NAME_REF);
             rBuffer.append(pConv->makeExternalNameStr( aFileName, t->GetString()));
         }
         break;
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 5913788..4c9e2ab 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -382,7 +382,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError)
         if (xStatusIndicator.is())
         {
             sal_Int32 nProgressRange(1000000);
-            xStatusIndicator->start(rtl::OUString(ScGlobal::GetRscString(STR_LOAD_DOC)), nProgressRange);
+            xStatusIndicator->start(ScGlobal::GetRscString(STR_LOAD_DOC), nProgressRange);
             xInfoSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ProgressRange")), uno::makeAny(nProgressRange));
         }
 
@@ -783,12 +783,12 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly)
         uno::Reference<task::XStatusIndicator> xStatusIndicator(GetStatusIndicator());
         sal_Int32 nProgressRange(1000000);
         if(xStatusIndicator.is())
-            xStatusIndicator->start(rtl::OUString(ScGlobal::GetRscString(STR_SAVE_DOC)), nProgressRange);
-        xInfoSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ProgressRange")), uno::makeAny(nProgressRange));
+            xStatusIndicator->start(ScGlobal::GetRscString(STR_SAVE_DOC), nProgressRange);
+        xInfoSet->setPropertyValue("ProgressRange", uno::makeAny(nProgressRange));
 
         SvtSaveOptions aSaveOpt;
         sal_Bool bUsePrettyPrinting(aSaveOpt.IsPrettyPrinting());
-        xInfoSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UsePrettyPrinting")), uno::makeAny(bUsePrettyPrinting));
+        xInfoSet->setPropertyValue("UsePrettyPrinting", uno::makeAny(bUsePrettyPrinting));
 
         const OUString sTargetStorage( RTL_CONSTASCII_USTRINGPARAM("TargetStorage") );
         xInfoSet->setPropertyValue( sTargetStorage, uno::Any( xStorage ) );
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index cfb0c72..dc62cde 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -984,8 +984,8 @@ AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( W
 
 AbstractScInsertContentsDlg * ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg( Window*      pParent,
                                                                                     int nId,
-                                                                                    sal_uInt16          nCheckDefaults,
-                                                                                    const String*   pStrTitle )
+                                                                                    sal_uInt16      nCheckDefaults,
+                                                                                    const OUString* pStrTitle )
 {
     ScInsertContentsDlg * pDlg=NULL;
     switch ( nId )
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index dd91115..973a412 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -455,8 +455,8 @@ public:
 
     virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( Window*        pParent, //add for ScInsertContentsDlg
                                                                     int nId,
-                                                                    sal_uInt16          nCheckDefaults = 0,
-                                                                    const String*   pStrTitle = NULL );
+                                                                    sal_uInt16      nCheckDefaults = 0,
+                                                                    const OUString* pStrTitle = NULL );
 
     virtual AbstractScInsertTableDlg * CreateScInsertTableDlg(Window* pParent, ScViewData& rViewData,
         SCTAB nTabCount, bool bFromFile);
diff --git a/sc/source/ui/inc/inscodlg.hxx b/sc/source/ui/inc/inscodlg.hxx
index 8b6b057..1270e3f 100644
--- a/sc/source/ui/inc/inscodlg.hxx
+++ b/sc/source/ui/inc/inscodlg.hxx
@@ -31,9 +31,9 @@
 class ScInsertContentsDlg : public ModalDialog
 {
 public:
-            ScInsertContentsDlg( Window*        pParent,
-                                 sal_uInt16         nCheckDefaults = 0,
-                                 const String*  pStrTitle = NULL );
+            ScInsertContentsDlg( Window*          pParent,
+                                 sal_uInt16       nCheckDefaults = 0,
+                                 const OUString*  pStrTitle = NULL );
             ~ScInsertContentsDlg();
 
     sal_uInt16      GetInsContentsCmdBits() const;
diff --git a/sc/source/ui/miscdlgs/inscodlg.cxx b/sc/source/ui/miscdlgs/inscodlg.cxx
index 19b0e9e..3e7a8ce 100644
--- a/sc/source/ui/miscdlgs/inscodlg.cxx
+++ b/sc/source/ui/miscdlgs/inscodlg.cxx
@@ -43,7 +43,7 @@ sal_uInt16 ScInsertContentsDlg::nPreviousMoveMode = INS_NONE;   // enum InsCellC
 
 ScInsertContentsDlg::ScInsertContentsDlg( Window*       pParent,
                                           sal_uInt16        nCheckDefaults,
-                                          const String* pStrTitle )
+                                          const OUString* pStrTitle )
 
  :  ModalDialog     ( pParent, ScResId( RID_SCDLG_INSCONT ) ),
     //


More information about the Libreoffice-commits mailing list