[Libreoffice-commits] core.git: sc/source
Caolán McNamara
caolanm at redhat.com
Thu Aug 3 12:29:22 UTC 2017
sc/source/core/data/table3.cxx | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
New commits:
commit f17ce1f990c980346ab826781523b5afa45f8e0b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Aug 2 17:10:42 2017 +0100
unwind 'Pointer due to compiler problem' hack
it was 17 years ago and a different string class
Change-Id: I0d23e846aaf8eabf1ef00219f71897226b00e8f0
Reviewed-on: https://gerrit.libreoffice.org/40685
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 1bd97dcb8e91..c42463ab9f20 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -2003,9 +2003,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
bool bIgnoreCase = !rParam.bCaseSens;
- OUString *pCompString[MAXSUBTOTAL]; // Pointer due to compiler problems
- for (i=0; i<MAXSUBTOTAL; i++)
- pCompString[i] = new OUString;
+ OUString aCompString[MAXSUBTOTAL];
//TODO: sort?
@@ -2036,9 +2034,9 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
{
GetString( nGroupCol[i], nStartRow, aSubString );
if ( bIgnoreCase )
- *pCompString[i] = ScGlobal::pCharClass->uppercase( aSubString );
+ aCompString[i] = ScGlobal::pCharClass->uppercase( aSubString );
else
- *pCompString[i] = aSubString;
+ aCompString[i] = aSubString;
} // aSubString stays on the last
bool bBlockVis = false; // group visible?
@@ -2062,7 +2060,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
// when sorting, blanks are separate group
// otherwise blank cells are allowed below
bChanged = ( ( !aString.isEmpty() || rParam.bDoSort ) &&
- aString != *pCompString[i] );
+ aString != aCompString[i] );
}
if ( bChanged && bTestPrevSub )
{
@@ -2151,9 +2149,9 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
{
GetString( nGroupCol[i], nRow, aSubString );
if ( bIgnoreCase )
- *pCompString[i] = ScGlobal::pCharClass->uppercase( aSubString );
+ aCompString[i] = ScGlobal::pCharClass->uppercase( aSubString );
else
- *pCompString[i] = aSubString;
+ aCompString[i] = aSubString;
}
}
}
@@ -2211,9 +2209,6 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
if (bSpaceLeft)
DoAutoOutline( nStartCol, nStartRow, nEndCol, nEndRow );
- for (i=0; i<MAXSUBTOTAL; i++)
- delete pCompString[i];
-
rParam.nRow2 = nEndRow; // new end
return bSpaceLeft;
}
More information about the Libreoffice-commits
mailing list