convert sw/source/core/fields/*.cxx from String to OUString
Change-Id: I1e56b2bc0499aebf4e7e57ad7c6e6c84de6a3efe
This commit is contained in:
@@ -278,7 +278,7 @@ void SwDBField::Evaluate()
|
|||||||
sal_uInt32 nFmt;
|
sal_uInt32 nFmt;
|
||||||
|
|
||||||
// search corresponding column name
|
// search corresponding column name
|
||||||
String aColNm( ((SwDBFieldType*)GetTyp())->GetColumnName() );
|
OUString aColNm( ((SwDBFieldType*)GetTyp())->GetColumnName() );
|
||||||
|
|
||||||
SvNumberFormatter* pDocFormatter = GetDoc()->GetNumberFormatter();
|
SvNumberFormatter* pDocFormatter = GetDoc()->GetNumberFormatter();
|
||||||
pMgr->GetMergeColumnCnt(aColNm, GetLanguage(), aContent, &nValue, &nFmt);
|
pMgr->GetMergeColumnCnt(aColNm, GetLanguage(), aContent, &nValue, &nFmt);
|
||||||
|
@@ -62,21 +62,21 @@ public:
|
|||||||
{
|
{
|
||||||
uno::Sequence< sal_Int8 > aSeq;
|
uno::Sequence< sal_Int8 > aSeq;
|
||||||
rValue >>= 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 );
|
DDE_TXT_ENCODING );
|
||||||
|
|
||||||
// remove not needed CR-LF at the end
|
// remove not needed CR-LF at the end
|
||||||
xub_StrLen n = sStr.Len();
|
xub_StrLen n = sStr.getLength();
|
||||||
while( n && 0 == sStr.GetChar( n-1 ) )
|
while( n && 0 == sStr[ n-1 ] )
|
||||||
--n;
|
--n;
|
||||||
if( n && 0x0a == sStr.GetChar( n-1 ) )
|
if( n && 0x0a == sStr[ n-1 ] )
|
||||||
--n;
|
--n;
|
||||||
if( n && 0x0d == sStr.GetChar( n-1 ) )
|
if( n && 0x0d == sStr[ n-1 ] )
|
||||||
--n;
|
--n;
|
||||||
|
|
||||||
sal_Bool bDel = n != sStr.Len();
|
sal_Bool bDel = n != sStr.getLength();
|
||||||
if( bDel )
|
if( bDel )
|
||||||
sStr.Erase( n );
|
sStr = sStr.copy( 0, n );
|
||||||
|
|
||||||
rFldType.SetExpansion( sStr );
|
rFldType.SetExpansion( sStr );
|
||||||
// set Expansion first! (otherwise this flag will be deleted)
|
// set Expansion first! (otherwise this flag will be deleted)
|
||||||
|
@@ -105,11 +105,11 @@ void SwDDETable::ChangeContent()
|
|||||||
// access to DDEFldType
|
// access to DDEFldType
|
||||||
SwDDEFieldType* pDDEType = (SwDDEFieldType*)aDepend.GetRegisteredIn();
|
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 )
|
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 ];
|
SwTableLine* pLine = aLines[ n ];
|
||||||
for( sal_uInt16 i = 0; i < pLine->GetTabBoxes().size(); ++i )
|
for( sal_uInt16 i = 0; i < pLine->GetTabBoxes().size(); ++i )
|
||||||
{
|
{
|
||||||
@@ -120,7 +120,7 @@ void SwDDETable::ChangeContent()
|
|||||||
OSL_ENSURE( pTxtNode, "No Node" );
|
OSL_ENSURE( pTxtNode, "No Node" );
|
||||||
SwIndex aCntIdx( pTxtNode, 0 );
|
SwIndex aCntIdx( pTxtNode, 0 );
|
||||||
pTxtNode->EraseText( aCntIdx );
|
pTxtNode->EraseText( aCntIdx );
|
||||||
pTxtNode->InsertText( aLine.GetToken( i, '\t' ), aCntIdx );
|
pTxtNode->InsertText( aLine.getToken( i, '\t' ), aCntIdx );
|
||||||
|
|
||||||
SwTableBoxFmt* pBoxFmt = (SwTableBoxFmt*)pBox->GetFrmFmt();
|
SwTableBoxFmt* pBoxFmt = (SwTableBoxFmt*)pBox->GetFrmFmt();
|
||||||
pBoxFmt->LockModify();
|
pBoxFmt->LockModify();
|
||||||
|
@@ -46,7 +46,7 @@ void SwTblField::CalcField( SwTblCalcPara& rCalcPara )
|
|||||||
|
|
||||||
// create pointers from box name
|
// create pointers from box name
|
||||||
BoxNmToPtr( rCalcPara.pTbl );
|
BoxNmToPtr( rCalcPara.pTbl );
|
||||||
String sFml( MakeFormula( rCalcPara ));
|
OUString sFml( MakeFormula( rCalcPara ));
|
||||||
SetValue( rCalcPara.rCalc.Calculate( sFml ).GetDouble() );
|
SetValue( rCalcPara.rCalc.Calculate( sFml ).GetDouble() );
|
||||||
ChgValid( !rCalcPara.IsStackOverFlow() ); // is the value again valid?
|
ChgValid( !rCalcPara.IsStackOverFlow() ); // is the value again valid?
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user