Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2155

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/55/2155/1

fdo#38838 ScGlobal::GetRscString() now returns OUString instead of String.

Cleaned up the call sites.

Change-Id: I6c688cecd4f872ed064ccfa3af4b402a779860dc
---
M sc/inc/global.hxx
M sc/inc/scabstdlg.hxx
M sc/source/core/data/docpool.cxx
M sc/source/core/data/global.cxx
M sc/source/core/data/table3.cxx
M sc/source/core/tool/compiler.cxx
M sc/source/filter/xml/xmlwrap.cxx
M sc/source/ui/attrdlg/scdlgfact.cxx
M sc/source/ui/attrdlg/scdlgfact.hxx
M sc/source/ui/inc/inscodlg.hxx
M sc/source/ui/miscdlgs/inscodlg.cxx
11 files changed, 26 insertions(+), 26 deletions(-)



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 @@
     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 @@
     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 19ab66d..60f57af 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -388,8 +388,8 @@
 
     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,  //add for ScInsertTableDlg
                                                                 SCTAB nTabCount, bool bFromFile, 
int nId) = 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 @@
 
             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 @@
 
             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 @@
 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 @@
     }
 }
 
-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 @@
                 ;   // 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 @@
     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 @@
         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 0da95b4..248f6b0 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -5081,7 +5081,7 @@
         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 @@
         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 @@
         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 5062bee..a805eeb 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -984,8 +984,8 @@
 
 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 2bcebbd..d1807a7 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -455,8 +455,8 @@
 
     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,  //add for ScInsertTableDlg
                                                                 SCTAB nTabCount, bool bFromFile, 
int nId);
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 @@
 
 ScInsertContentsDlg::ScInsertContentsDlg( Window*       pParent,
                                           sal_uInt16        nCheckDefaults,
-                                          const String* pStrTitle )
+                                          const OUString* pStrTitle )
 
  :  ModalDialog     ( pParent, ScResId( RID_SCDLG_INSCONT ) ),
     //

-- 
To view, visit https://gerrit.libreoffice.org/2155
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c688cecd4f872ed064ccfa3af4b402a779860dc
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Jean-Noël Rouvignac <jn.rouvignac@gmail.com>

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.