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:
committed by
Caolán McNamara
parent
1dace0c3e0
commit
7425156391
@@ -494,7 +494,7 @@ class ScGlobal
|
|||||||
static FuncCollection* pFuncCollection;
|
static FuncCollection* pFuncCollection;
|
||||||
static ScUnoAddInCollection* pAddInCollection;
|
static ScUnoAddInCollection* pAddInCollection;
|
||||||
static ScUserList* pUserList;
|
static ScUserList* pUserList;
|
||||||
static String** ppRscString;
|
static OUString** ppRscString;
|
||||||
static String* pStrScDoc;
|
static String* pStrScDoc;
|
||||||
static String* pEmptyString;
|
static String* pEmptyString;
|
||||||
static ::rtl::OUString* pEmptyOUString;
|
static ::rtl::OUString* pEmptyOUString;
|
||||||
@@ -553,7 +553,7 @@ public:
|
|||||||
SC_DLLPUBLIC static ScUnoAddInCollection* GetAddInCollection();
|
SC_DLLPUBLIC static ScUnoAddInCollection* GetAddInCollection();
|
||||||
SC_DLLPUBLIC static ScUserList* GetUserList();
|
SC_DLLPUBLIC static ScUserList* GetUserList();
|
||||||
static void SetUserList( const ScUserList* pNewList );
|
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 );
|
static void OpenURL( const String& rURL, const String& rTarget );
|
||||||
SC_DLLPUBLIC static String GetAbsDocName( const String& rFileName,
|
SC_DLLPUBLIC static String GetAbsDocName( const String& rFileName,
|
||||||
SfxObjectShell* pShell );
|
SfxObjectShell* pShell );
|
||||||
|
@@ -389,7 +389,7 @@ public:
|
|||||||
virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( Window* pParent, //add for ScInsertContentsDlg
|
virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( Window* pParent, //add for ScInsertContentsDlg
|
||||||
int nId,
|
int nId,
|
||||||
sal_uInt16 nCheckDefaults = 0,
|
sal_uInt16 nCheckDefaults = 0,
|
||||||
const String* pStrTitle = NULL ) = 0;
|
const OUString* pStrTitle = NULL ) = 0;
|
||||||
|
|
||||||
virtual AbstractScInsertTableDlg * CreateScInsertTableDlg(Window* pParent, ScViewData& rViewData,
|
virtual AbstractScInsertTableDlg * CreateScInsertTableDlg(Window* pParent, ScViewData& rViewData,
|
||||||
SCTAB nTabCount, bool bFromFile) = 0;
|
SCTAB nTabCount, bool bFromFile) = 0;
|
||||||
|
@@ -994,7 +994,7 @@ SfxItemPresentation ScDocumentPool::GetPresentation(
|
|||||||
|
|
||||||
if( lcl_HFPresentation( rItem, ePresentation, GetMetric( nW ), ePresentationMetric, aBuffer, pIntl ) != SFX_ITEM_PRESENTATION_NONE )
|
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;
|
break;
|
||||||
@@ -1005,7 +1005,7 @@ SfxItemPresentation ScDocumentPool::GetPresentation(
|
|||||||
|
|
||||||
if( lcl_HFPresentation( rItem, ePresentation, GetMetric( nW ), ePresentationMetric, aBuffer, pIntl ) != SFX_ITEM_PRESENTATION_NONE )
|
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;
|
break;
|
||||||
|
@@ -88,7 +88,7 @@ ScAutoFormat* ScGlobal::pAutoFormat = NULL;
|
|||||||
FuncCollection* ScGlobal::pFuncCollection = NULL;
|
FuncCollection* ScGlobal::pFuncCollection = NULL;
|
||||||
ScUnoAddInCollection* ScGlobal::pAddInCollection = NULL;
|
ScUnoAddInCollection* ScGlobal::pAddInCollection = NULL;
|
||||||
ScUserList* ScGlobal::pUserList = NULL;
|
ScUserList* ScGlobal::pUserList = NULL;
|
||||||
String** ScGlobal::ppRscString = NULL;
|
OUString** ScGlobal::ppRscString = NULL;
|
||||||
LanguageType ScGlobal::eLnge = LANGUAGE_SYSTEM;
|
LanguageType ScGlobal::eLnge = LANGUAGE_SYSTEM;
|
||||||
::com::sun::star::lang::Locale* ScGlobal::pLocale = NULL;
|
::com::sun::star::lang::Locale* ScGlobal::pLocale = NULL;
|
||||||
SvtSysLocale* ScGlobal::pSysLocale = 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");
|
OSL_ENSURE( nIndex < STR_COUNT, "ScGlobal::GetRscString - invalid string index");
|
||||||
if( !ppRscString[ nIndex ] )
|
if( !ppRscString[ nIndex ] )
|
||||||
@@ -373,10 +373,10 @@ const String& ScGlobal::GetRscString( sal_uInt16 nIndex )
|
|||||||
; // nothing
|
; // nothing
|
||||||
}
|
}
|
||||||
if (eOp != ocNone)
|
if (eOp != ocNone)
|
||||||
ppRscString[ nIndex ] = new String(
|
ppRscString[ nIndex ] = new OUString(
|
||||||
ScCompiler::GetNativeSymbol( eOp));
|
ScCompiler::GetNativeSymbol( eOp));
|
||||||
else
|
else
|
||||||
ppRscString[ nIndex ] = new String(
|
ppRscString[ nIndex ] = new OUString(
|
||||||
ScRscStrLoader( RID_GLOBSTR, nIndex ).GetString());
|
ScRscStrLoader( RID_GLOBSTR, nIndex ).GetString());
|
||||||
}
|
}
|
||||||
return *ppRscString[ nIndex ];
|
return *ppRscString[ nIndex ];
|
||||||
@@ -543,7 +543,7 @@ void ScGlobal::Init()
|
|||||||
pCharClass = pSysLocale->GetCharClassPtr();
|
pCharClass = pSysLocale->GetCharClassPtr();
|
||||||
pLocaleData = pSysLocale->GetLocaleDataPtr();
|
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;
|
for( sal_uInt16 nC = 0 ; nC < STR_COUNT ; nC++ ) ppRscString[ nC ] = NULL;
|
||||||
|
|
||||||
pEmptyBrushItem = new SvxBrushItem( Color( COL_TRANSPARENT ), ATTR_BACKGROUND );
|
pEmptyBrushItem = new SvxBrushItem( Color( COL_TRANSPARENT ), ATTR_BACKGROUND );
|
||||||
|
@@ -2057,12 +2057,12 @@ bool ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2
|
|||||||
if (nIndex > 0)
|
if (nIndex > 0)
|
||||||
{
|
{
|
||||||
GetUpperCellString(nCol1, nRow, aCellStr);
|
GetUpperCellString(nCol1, nRow, aCellStr);
|
||||||
if ( aCellStr == rtl::OUString(ScGlobal::GetRscString(STR_TABLE_UND)) )
|
if ( aCellStr == ScGlobal::GetRscString(STR_TABLE_UND) )
|
||||||
{
|
{
|
||||||
rEntry.eConnect = SC_AND;
|
rEntry.eConnect = SC_AND;
|
||||||
bValid = true;
|
bValid = true;
|
||||||
}
|
}
|
||||||
else if ( aCellStr == rtl::OUString(ScGlobal::GetRscString(STR_TABLE_ODER)) )
|
else if ( aCellStr == ScGlobal::GetRscString(STR_TABLE_ODER) )
|
||||||
{
|
{
|
||||||
rEntry.eConnect = SC_OR;
|
rEntry.eConnect = SC_OR;
|
||||||
bValid = true;
|
bValid = true;
|
||||||
|
@@ -5081,7 +5081,7 @@ void ScCompiler::CreateStringFromExternal(rtl::OUStringBuffer& rBuffer, FormulaT
|
|||||||
case svExternalName:
|
case svExternalName:
|
||||||
{
|
{
|
||||||
const OUString *pStr = pRefMgr->getExternalFileName(t->GetIndex());
|
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()));
|
rBuffer.append(pConv->makeExternalNameStr( aFileName, t->GetString()));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@@ -382,7 +382,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError)
|
|||||||
if (xStatusIndicator.is())
|
if (xStatusIndicator.is())
|
||||||
{
|
{
|
||||||
sal_Int32 nProgressRange(1000000);
|
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));
|
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());
|
uno::Reference<task::XStatusIndicator> xStatusIndicator(GetStatusIndicator());
|
||||||
sal_Int32 nProgressRange(1000000);
|
sal_Int32 nProgressRange(1000000);
|
||||||
if(xStatusIndicator.is())
|
if(xStatusIndicator.is())
|
||||||
xStatusIndicator->start(rtl::OUString(ScGlobal::GetRscString(STR_SAVE_DOC)), nProgressRange);
|
xStatusIndicator->start(ScGlobal::GetRscString(STR_SAVE_DOC), nProgressRange);
|
||||||
xInfoSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ProgressRange")), uno::makeAny(nProgressRange));
|
xInfoSet->setPropertyValue("ProgressRange", uno::makeAny(nProgressRange));
|
||||||
|
|
||||||
SvtSaveOptions aSaveOpt;
|
SvtSaveOptions aSaveOpt;
|
||||||
sal_Bool bUsePrettyPrinting(aSaveOpt.IsPrettyPrinting());
|
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") );
|
const OUString sTargetStorage( RTL_CONSTASCII_USTRINGPARAM("TargetStorage") );
|
||||||
xInfoSet->setPropertyValue( sTargetStorage, uno::Any( xStorage ) );
|
xInfoSet->setPropertyValue( sTargetStorage, uno::Any( xStorage ) );
|
||||||
|
@@ -985,7 +985,7 @@ AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( W
|
|||||||
AbstractScInsertContentsDlg * ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg( Window* pParent,
|
AbstractScInsertContentsDlg * ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg( Window* pParent,
|
||||||
int nId,
|
int nId,
|
||||||
sal_uInt16 nCheckDefaults,
|
sal_uInt16 nCheckDefaults,
|
||||||
const String* pStrTitle )
|
const OUString* pStrTitle )
|
||||||
{
|
{
|
||||||
ScInsertContentsDlg * pDlg=NULL;
|
ScInsertContentsDlg * pDlg=NULL;
|
||||||
switch ( nId )
|
switch ( nId )
|
||||||
|
@@ -456,7 +456,7 @@ public:
|
|||||||
virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( Window* pParent, //add for ScInsertContentsDlg
|
virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( Window* pParent, //add for ScInsertContentsDlg
|
||||||
int nId,
|
int nId,
|
||||||
sal_uInt16 nCheckDefaults = 0,
|
sal_uInt16 nCheckDefaults = 0,
|
||||||
const String* pStrTitle = NULL );
|
const OUString* pStrTitle = NULL );
|
||||||
|
|
||||||
virtual AbstractScInsertTableDlg * CreateScInsertTableDlg(Window* pParent, ScViewData& rViewData,
|
virtual AbstractScInsertTableDlg * CreateScInsertTableDlg(Window* pParent, ScViewData& rViewData,
|
||||||
SCTAB nTabCount, bool bFromFile);
|
SCTAB nTabCount, bool bFromFile);
|
||||||
|
@@ -33,7 +33,7 @@ class ScInsertContentsDlg : public ModalDialog
|
|||||||
public:
|
public:
|
||||||
ScInsertContentsDlg( Window* pParent,
|
ScInsertContentsDlg( Window* pParent,
|
||||||
sal_uInt16 nCheckDefaults = 0,
|
sal_uInt16 nCheckDefaults = 0,
|
||||||
const String* pStrTitle = NULL );
|
const OUString* pStrTitle = NULL );
|
||||||
~ScInsertContentsDlg();
|
~ScInsertContentsDlg();
|
||||||
|
|
||||||
sal_uInt16 GetInsContentsCmdBits() const;
|
sal_uInt16 GetInsContentsCmdBits() const;
|
||||||
|
@@ -43,7 +43,7 @@ sal_uInt16 ScInsertContentsDlg::nPreviousMoveMode = INS_NONE; // enum InsCellC
|
|||||||
|
|
||||||
ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent,
|
ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent,
|
||||||
sal_uInt16 nCheckDefaults,
|
sal_uInt16 nCheckDefaults,
|
||||||
const String* pStrTitle )
|
const OUString* pStrTitle )
|
||||||
|
|
||||||
: ModalDialog ( pParent, ScResId( RID_SCDLG_INSCONT ) ),
|
: ModalDialog ( pParent, ScResId( RID_SCDLG_INSCONT ) ),
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user