summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-11-27 22:58:50 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-11-27 23:00:06 -0600
commitc617be8307033394bde4255c05b72dbd01ae0056 (patch)
treebda35b72f8b61d71f22517a197517ec3bbffa0b0 /sw
parentae0fa7cc62e1f57d22e68b2ef45086aeb1dfe41c (diff)
remove legacy String svl's Put*Entry family of function and convert users
Change-Id: Iebf4017ce4c2c48389716eac1bbf7f386ac7a296
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/fields/fldbas.cxx20
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx10
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx6
-rw-r--r--sw/source/ui/shells/tabsh.cxx4
5 files changed, 23 insertions, 23 deletions
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index b8cafaa6447d..d542331c60a3 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -474,7 +474,7 @@ String SwValueFieldType::ExpandValue( const double& rVal,
if (rVal >= DBL_MAX) // FehlerString fuer Calculator
return ViewShell::GetShellRes()->aCalc_Error;
- String sExpand;
+ OUString sExpand;
SvNumberFormatter* pFormatter = pDoc->GetNumberFormatter();
Color* pCol = 0;
@@ -484,7 +484,7 @@ String SwValueFieldType::ExpandValue( const double& rVal,
if( nFmt < SV_COUNTRY_LANGUAGE_OFFSET && LANGUAGE_SYSTEM != nFmtLng )
{
short nType = NUMBERFORMAT_DEFINED;
- xub_StrLen nDummy;
+ sal_Int32 nDummy;
const SvNumberformat* pEntry = pFormatter->GetEntry(nFmt);
@@ -496,7 +496,7 @@ String SwValueFieldType::ExpandValue( const double& rVal,
if (nNewFormat == nFmt)
{
// Warscheinlich benutzerdefiniertes Format
- String sFmt(pEntry->GetFormatstring());
+ OUString sFmt(pEntry->GetFormatstring());
pFormatter->PutandConvertEntry(sFmt, nDummy, nType, nFmt,
pEntry->GetLanguage(), nFmtLng );
@@ -512,9 +512,7 @@ String SwValueFieldType::ExpandValue( const double& rVal,
String sValue;
DoubleToString(sValue, rVal, nFmtLng);
OUString sTempIn(sValue);
- OUString sTempOut(sExpand);
- pFormatter->GetOutputString(sTempIn, nFmt, sTempOut, &pCol);
- sExpand = sTempOut;
+ pFormatter->GetOutputString(sTempIn, nFmt, sExpand, &pCol);
}
else
{
@@ -608,13 +606,13 @@ sal_uInt32 SwValueField::GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt
{
// Warscheinlich benutzerdefiniertes Format
short nType = NUMBERFORMAT_DEFINED;
- xub_StrLen nDummy;
+ sal_Int32 nDummy;
- String sFmt(pEntry->GetFormatstring());
+ OUString sFmt(pEntry->GetFormatstring());
sal_uInt32 nFormat = nFmt;
pFormatter->PutandConvertEntry(sFmt, nDummy, nType,
- nFormat, pEntry->GetLanguage(), nLng);
+ nFormat, pEntry->GetLanguage(), nLng);
nFmt = nFormat;
}
else
@@ -654,8 +652,8 @@ void SwValueField::SetLanguage( sal_uInt16 nLng )
{
// Warscheinlich benutzerdefiniertes Format
short nType = NUMBERFORMAT_DEFINED;
- xub_StrLen nDummy;
- String sFmt( pEntry->GetFormatstring() );
+ sal_Int32 nDummy;
+ OUString sFmt( pEntry->GetFormatstring() );
pFormatter->PutandConvertEntry( sFmt, nDummy, nType,
nNewFormat,
pEntry->GetLanguage(),
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index a515b2c44503..2e08a761ba68 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -734,7 +734,7 @@ namespace sw
sal_uInt16 nDocLang)
{
// tell the Formatter about the new entry
- sal_uInt16 nCheckPos = 0;
+ sal_Int32 nCheckPos = 0;
short nType = NUMBERFORMAT_DEFINED;
sal_uInt32 nKey = 0;
@@ -949,7 +949,9 @@ namespace sw
if (bHijri)
rParams.Insert(rtl::OUString("[~hijri]"), 0);
- pFormatter->PutEntry(rParams, nCheckPos, nType, nKey, rLang);
+ OUString sTemp(rParams);
+ pFormatter->PutEntry(sTemp, nCheckPos, nType, nKey, rLang);
+ rParams = sTemp;
return nKey;
}
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 037c4bed7c8f..1075590ab09a 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -633,12 +633,14 @@ short SwWW8ImplReader::GetTimeDatePara(String& rStr, sal_uInt32& rFormat,
if (bHijri)
sParams.Insert(rtl::OUString("[~hijri]"), 0);
- sal_uInt16 nCheckPos = 0;
- sal_Int16 nType = NUMBERFORMAT_DEFINED;
+ sal_Int32 nCheckPos = 0;
+ short nType = NUMBERFORMAT_DEFINED;
rFormat = 0;
- pFormatter->PutandConvertEntry(sParams, nCheckPos, nType, rFormat,
- LANGUAGE_ENGLISH_US, rLang);
+ OUString sTemp(sParams);
+ pFormatter->PutandConvertEntry(sTemp, nCheckPos, nType, rFormat,
+ LANGUAGE_ENGLISH_US, rLang);
+ sParams = sTemp;
return bHasTime ? NUMBERFORMAT_DATETIME : NUMBERFORMAT_DATE;
}
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 076a8dd9421d..1198fb780297 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1850,12 +1850,10 @@ void SwInsertDBColAutoPilot::Load()
rGet.eUsrNumFmtLng );
if( NUMBERFORMAT_ENTRY_NOT_FOUND == rSet.nUsrNumFmt )
{
- xub_StrLen nCheckPos;
+ sal_Int32 nCheckPos;
short nType;
- String sTmpFmt = rGet.sUsrNumFmt;
- rNFmtr.PutEntry( sTmpFmt, nCheckPos, nType,
+ rNFmtr.PutEntry( rGet.sUsrNumFmt, nCheckPos, nType,
rSet.nUsrNumFmt, rGet.eUsrNumFmtLng );
- rGet.sUsrNumFmt = sTmpFmt;
}
}
break;
diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx
index 56c788f575c4..defbad8eb502 100644
--- a/sw/source/ui/shells/tabsh.cxx
+++ b/sw/source/ui/shells/tabsh.cxx
@@ -1443,12 +1443,12 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq)
if( pItem )
{
// Index fuer String bestimmen
- String aCode( ((const SfxStringItem*)pItem)->GetValue() );
+ OUString aCode( ((const SfxStringItem*)pItem)->GetValue() );
nNumberFormat = pFormatter->GetEntryKey( aCode, eLang );
if( NUMBERFORMAT_ENTRY_NOT_FOUND == nNumberFormat )
{
// neu eintragen
- xub_StrLen nErrPos;
+ sal_Int32 nErrPos;
short nType;
if( !pFormatter->PutEntry( aCode, nErrPos, nType,
nNumberFormat, eLang ))