summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-15 17:39:27 +0200
committerNoel Grandin <noel@peralex.com>2013-10-18 09:59:20 +0200
commit4da4fe2d38d7adc9360e4b380bf372cff2323902 (patch)
treef7ecb5540014113097ed4327356186bc473e872c
parent5c3382d57af73f8a78614a6f8960d5caec36f7b7 (diff)
convert sw/source/core/fields/*.cxx from String to OUString
Change-Id: I1e56b2bc0499aebf4e7e57ad7c6e6c84de6a3efe
-rw-r--r--sw/source/core/fields/dbfld.cxx2
-rw-r--r--sw/source/core/fields/ddefld.cxx14
-rw-r--r--sw/source/core/fields/ddetbl.cxx6
-rw-r--r--sw/source/core/fields/tblcalc.cxx2
4 files changed, 12 insertions, 12 deletions
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index 8b7d7e085326..074eb6426e6e 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -278,7 +278,7 @@ void SwDBField::Evaluate()
sal_uInt32 nFmt;
// search corresponding column name
- String aColNm( ((SwDBFieldType*)GetTyp())->GetColumnName() );
+ OUString aColNm( ((SwDBFieldType*)GetTyp())->GetColumnName() );
SvNumberFormatter* pDocFormatter = GetDoc()->GetNumberFormatter();
pMgr->GetMergeColumnCnt(aColNm, GetLanguage(), aContent, &nValue, &nFmt);
diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx
index e3605514947d..589d76f46bcc 100644
--- a/sw/source/core/fields/ddefld.cxx
+++ b/sw/source/core/fields/ddefld.cxx
@@ -62,21 +62,21 @@ public:
{
uno::Sequence< sal_Int8 > aSeq;
rValue >>= aSeq;
- String sStr( (sal_Char*)aSeq.getConstArray(), static_cast<xub_StrLen>(aSeq.getLength()),
+ OUString sStr( (sal_Char*)aSeq.getConstArray(), static_cast<xub_StrLen>(aSeq.getLength()),
DDE_TXT_ENCODING );
// remove not needed CR-LF at the end
- xub_StrLen n = sStr.Len();
- while( n && 0 == sStr.GetChar( n-1 ) )
+ xub_StrLen n = sStr.getLength();
+ while( n && 0 == sStr[ n-1 ] )
--n;
- if( n && 0x0a == sStr.GetChar( n-1 ) )
+ if( n && 0x0a == sStr[ n-1 ] )
--n;
- if( n && 0x0d == sStr.GetChar( n-1 ) )
+ if( n && 0x0d == sStr[ n-1 ] )
--n;
- sal_Bool bDel = n != sStr.Len();
+ sal_Bool bDel = n != sStr.getLength();
if( bDel )
- sStr.Erase( n );
+ sStr = sStr.copy( 0, n );
rFldType.SetExpansion( sStr );
// set Expansion first! (otherwise this flag will be deleted)
diff --git a/sw/source/core/fields/ddetbl.cxx b/sw/source/core/fields/ddetbl.cxx
index 3154c61cdfb0..48e9da0152f3 100644
--- a/sw/source/core/fields/ddetbl.cxx
+++ b/sw/source/core/fields/ddetbl.cxx
@@ -105,11 +105,11 @@ void SwDDETable::ChangeContent()
// access to DDEFldType
SwDDEFieldType* pDDEType = (SwDDEFieldType*)aDepend.GetRegisteredIn();
- String aExpand = comphelper::string::remove(pDDEType->GetExpansion(), '\r');
+ OUString aExpand = comphelper::string::remove(pDDEType->GetExpansion(), '\r');
for( sal_uInt16 n = 0; n < aLines.size(); ++n )
{
- String aLine = aExpand.GetToken( n, '\n' );
+ OUString aLine = aExpand.getToken( n, '\n' );
SwTableLine* pLine = aLines[ n ];
for( sal_uInt16 i = 0; i < pLine->GetTabBoxes().size(); ++i )
{
@@ -120,7 +120,7 @@ void SwDDETable::ChangeContent()
OSL_ENSURE( pTxtNode, "No Node" );
SwIndex aCntIdx( pTxtNode, 0 );
pTxtNode->EraseText( aCntIdx );
- pTxtNode->InsertText( aLine.GetToken( i, '\t' ), aCntIdx );
+ pTxtNode->InsertText( aLine.getToken( i, '\t' ), aCntIdx );
SwTableBoxFmt* pBoxFmt = (SwTableBoxFmt*)pBox->GetFrmFmt();
pBoxFmt->LockModify();
diff --git a/sw/source/core/fields/tblcalc.cxx b/sw/source/core/fields/tblcalc.cxx
index 2d310a653db0..f3bc3e774646 100644
--- a/sw/source/core/fields/tblcalc.cxx
+++ b/sw/source/core/fields/tblcalc.cxx
@@ -46,7 +46,7 @@ void SwTblField::CalcField( SwTblCalcPara& rCalcPara )
// create pointers from box name
BoxNmToPtr( rCalcPara.pTbl );
- String sFml( MakeFormula( rCalcPara ));
+ OUString sFml( MakeFormula( rCalcPara ));
SetValue( rCalcPara.rCalc.Calculate( sFml ).GetDouble() );
ChgValid( !rCalcPara.IsStackOverFlow() ); // is the value again valid?
}