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>
This commit is contained in:
Jean-Noël Rouvignac
2013-02-14 20:15:38 +01:00
committed by Caolán McNamara
parent 1dace0c3e0
commit 7425156391
11 changed files with 26 additions and 26 deletions

View File

@@ -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 );

View File

@@ -389,7 +389,7 @@ public:
virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( Window* pParent, //add for ScInsertContentsDlg
int nId,
sal_uInt16 nCheckDefaults = 0,
const String* pStrTitle = NULL ) = 0;
const OUString* pStrTitle = NULL ) = 0;
virtual AbstractScInsertTableDlg * CreateScInsertTableDlg(Window* pParent, ScViewData& rViewData,
SCTAB nTabCount, bool bFromFile) = 0;

View File

@@ -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;

View File

@@ -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 );

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 ) );

View File

@@ -985,7 +985,7 @@ AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( W
AbstractScInsertContentsDlg * ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg( Window* pParent,
int nId,
sal_uInt16 nCheckDefaults,
const String* pStrTitle )
const OUString* pStrTitle )
{
ScInsertContentsDlg * pDlg=NULL;
switch ( nId )

View File

@@ -456,7 +456,7 @@ public:
virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( Window* pParent, //add for ScInsertContentsDlg
int nId,
sal_uInt16 nCheckDefaults = 0,
const String* pStrTitle = NULL );
const OUString* pStrTitle = NULL );
virtual AbstractScInsertTableDlg * CreateScInsertTableDlg(Window* pParent, ScViewData& rViewData,
SCTAB nTabCount, bool bFromFile);

View File

@@ -33,7 +33,7 @@ class ScInsertContentsDlg : public ModalDialog
public:
ScInsertContentsDlg( Window* pParent,
sal_uInt16 nCheckDefaults = 0,
const String* pStrTitle = NULL );
const OUString* pStrTitle = NULL );
~ScInsertContentsDlg();
sal_uInt16 GetInsContentsCmdBits() const;

View File

@@ -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 ) ),
//