diff options
author | Jean-Noël Rouvignac <jn.rouvignac@gmail.com> | 2013-02-14 20:15:38 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-02-19 13:52:30 +0000 |
commit | 742515639168cd35a0c2036a5bf6c46b2a3a554e (patch) | |
tree | b730261a267719fe737315ab375eea88638aa331 /sc | |
parent | Updated core (diff) | |
download | core-742515639168cd35a0c2036a5bf6c46b2a3a554e.tar.gz core-742515639168cd35a0c2036a5bf6c46b2a3a554e.zip |
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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/global.hxx | 4 | ||||
-rw-r--r-- | sc/inc/scabstdlg.hxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/docpool.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/global.cxx | 10 | ||||
-rw-r--r-- | sc/source/core/data/table3.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlwrap.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/inc/inscodlg.hxx | 6 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/inscodlg.cxx | 2 |
11 files changed, 26 insertions, 26 deletions
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index 53ede608600d..978985a47cdb 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 0dc43454817f..4113b647de99 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 8a4e870bf32a..535a48061b02 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 3a00dd5f9806..0d0a3d0b5536 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 af5c3cb1b5b5..52c45a8ded81 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 f9b9e9da16b8..51fba63a3deb 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 5913788f986a..4c9e2aba9eb4 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 cfb0c720f647..dc62cde4d3cf 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 dd9111586713..973a412a7df5 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 8b6b05788e0f..1270e3f93cb6 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 19b0e9ecf132..3e7a8cef8d03 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 ) ), // |