summaryrefslogtreecommitdiff
path: root/sc/source/core/data/table3.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-08 08:19:48 +0200
committerNoel Grandin <noel@peralex.com>2013-10-08 10:03:17 +0200
commit8850633fe4cdac306c35caab1a0d14c13d9df864 (patch)
tree3ee83286d83de75f6f8d1742f0253da9c173fee5 /sc/source/core/data/table3.cxx
parent43a3611347c1f49cf6053bf7e8904d56254d8761 (diff)
convert sc/source/core/data/*.cxx from String to OUString
and fix a bug in ScDPCache::ValidQuery where an inner loop was re-using an outer loop counter. Change-Id: Ie750234a079646bdb7174983814d8d9caf52f491
Diffstat (limited to 'sc/source/core/data/table3.cxx')
-rw-r--r--sc/source/core/data/table3.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index d5649eedc73f..1b4e25a2b93d 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -138,7 +138,7 @@ bool SplitString( const OUString &sWhole,
@return Returnes 1 if sInput1 is greater, 0 if sInput1 == sInput2, and -1 if
sInput2 is greater.
*/
-short Compare( const String &sInput1, const String &sInput2,
+short Compare( const OUString &sInput1, const OUString &sInput2,
const bool bCaseSens, const ScUserListData* pData, const CollatorWrapper *pCW )
{
OUString sStr1( sInput1 ), sStr2( sInput2 ), sPre1, sSuf1, sPre2, sSuf2;
@@ -940,13 +940,13 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
bool bTestPrevSub = ( nLevelCount > 1 );
OUString aSubString;
- String aOutString;
+ OUString aOutString;
bool bIgnoreCase = !rParam.bCaseSens;
- String *pCompString[MAXSUBTOTAL]; // Pointer wegen Compiler-Problemen
+ OUString *pCompString[MAXSUBTOTAL]; // Pointer wegen Compiler-Problemen
for (i=0; i<MAXSUBTOTAL; i++)
- pCompString[i] = new String;
+ pCompString[i] = new OUString;
//! sortieren?
@@ -1058,9 +1058,9 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
else
{ // " Ergebnis"
aOutString = aSubString;
- if (!aOutString.Len())
+ if (aOutString.isEmpty())
aOutString = ScGlobal::GetRscString( STR_EMPTYDATA );
- aOutString += ' ';
+ aOutString += " ";
sal_uInt16 nStrId = STR_TABLE_ERGEBNIS;
if ( nResCount == 1 )
switch ( eResFunc[0] )
@@ -1503,24 +1503,24 @@ public:
else
{
const OUString& rQueryStr = rItem.maString;
- String aCell( mpTransliteration->transliterate(
+ OUString aCell( mpTransliteration->transliterate(
aCellStr, ScGlobal::eLnge, 0, aCellStr.getLength(),
NULL ) );
- String aQuer( mpTransliteration->transliterate(
+ OUString aQuer( mpTransliteration->transliterate(
rQueryStr, ScGlobal::eLnge, 0, rQueryStr.getLength(),
NULL ) );
xub_StrLen nIndex = (rEntry.eOp == SC_ENDS_WITH
- || rEntry.eOp == SC_DOES_NOT_END_WITH)? (aCell.Len()-aQuer.Len()):0;
- xub_StrLen nStrPos = aCell.Search( aQuer, nIndex );
+ || rEntry.eOp == SC_DOES_NOT_END_WITH) ? (aCell.getLength()-aQuer.getLength()) : 0;
+ sal_Int32 nStrPos = aCell.indexOf( aQuer, nIndex );
switch (rEntry.eOp)
{
case SC_EQUAL:
case SC_CONTAINS:
- bOk = ( nStrPos != STRING_NOTFOUND );
+ bOk = ( nStrPos != -1 );
break;
case SC_NOT_EQUAL:
case SC_DOES_NOT_CONTAIN:
- bOk = ( nStrPos == STRING_NOTFOUND );
+ bOk = ( nStrPos == -1 );
break;
case SC_BEGINS_WITH:
bOk = ( nStrPos == 0 );
@@ -1529,10 +1529,10 @@ public:
bOk = ( nStrPos != 0 );
break;
case SC_ENDS_WITH:
- bOk = ( nStrPos + aQuer.Len() == aCell.Len() );
+ bOk = ( nStrPos + aQuer.getLength() == aCell.getLength() );
break;
case SC_DOES_NOT_END_WITH:
- bOk = ( nStrPos + aQuer.Len() != aCell.Len() );
+ bOk = ( nStrPos + aQuer.getLength() != aCell.getLength() );
break;
default:
{