convert sw/source/core/fields/*.cxx from String to OUString

Change-Id: I1e56b2bc0499aebf4e7e57ad7c6e6c84de6a3efe
This commit is contained in:
Noel Grandin
2013-10-15 17:39:27 +02:00
parent 5c3382d57a
commit 4da4fe2d38
4 changed files with 12 additions and 12 deletions

View File

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

View File

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

View File

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

View File

@@ -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?
}