summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-11-24 19:01:58 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-11-27 22:59:29 -0600
commit739146b75d8f3e537759925ba6e17cddd28e1acf (patch)
tree48e9e2320c539de28ea8cd8fd03e5ea69bf55767 /sc
parent621cdc7a446e500a6c1b7fd417199be34cdaf3da (diff)
convert the last SvNumberformat::GetOutputString and users to OUString
Change-Id: I9766872069ef5c2ee740dcbd8ac288aa8063a752
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/xestyle.cxx2
-rw-r--r--sc/source/ui/view/viewfunc.cxx12
2 files changed, 7 insertions, 7 deletions
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 772b36e581f8..655594ca8cfc 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -1329,7 +1329,7 @@ String GetNumberFormatCode(XclRoot& rRoot, const sal_uInt16 nScNumFmt, SvNumberF
{
// build Boolean number format
Color* pColor = 0;
- String aTemp;
+ OUString aTemp;
const_cast< SvNumberformat* >( pEntry )->GetOutputString( 1.0, aTemp, &pColor );
aFormatStr.Append( '"' ).Append( aTemp ).AppendAscii( "\";\"" ).Append( aTemp ).AppendAscii( "\";\"" );
const_cast< SvNumberformat* >( pEntry )->GetOutputString( 0.0, aTemp, &pColor );
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 22f6eccf4120..f695475ac17e 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -2686,20 +2686,20 @@ void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement )
double nVal = pDoc->GetValue( ScAddress( nCol, nRow, nTab ) );
// the ways of the Numberformatters are unfathomable, so try:
- String aOut;
+ OUString aOut;
Color* pCol;
((SvNumberformat*)pOldEntry)->GetOutputString( nVal, aOut, &pCol );
nPrecision = 0;
// 'E' for exponential is fixed in Numberformatter
- if ( aOut.Search('E') != STRING_NOTFOUND )
+ if ( aOut.indexOf((sal_Unicode)'E') >= 0 )
bError = sal_True; // exponential not changed
else
{
- String aDecSep( pFormatter->GetFormatDecimalSep( nOldFormat ) );
- xub_StrLen nPos = aOut.Search( aDecSep );
- if ( nPos != STRING_NOTFOUND )
- nPrecision = aOut.Len() - nPos - aDecSep.Len();
+ OUString aDecSep( pFormatter->GetFormatDecimalSep( nOldFormat ) );
+ sal_Int32 nPos = aOut.indexOf( aDecSep );
+ if ( nPos >= 0 )
+ nPrecision = aOut.getLength() - nPos - aDecSep.getLength();
// else keep 0
}
}