Kaydet (Commit) 4c2370c0 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Fix infinite looping memory devouring on refreshing table with date grouping.

It so happens that both group info and date info can be enabled, in which
case the date info takes precedence.
üst 0ee9a1c0
......@@ -466,7 +466,13 @@ void ScDPSaveNumGroupDimension::AddToData( ScDPGroupTableData& rData ) const
void ScDPSaveNumGroupDimension::AddToCache(ScDPCache& rCache) const
{
long nDim = rCache.GetDimensionIndex(aDimensionName);
if (aGroupInfo.mbEnable)
if (aDateInfo.mbEnable)
{
// Date grouping
SvNumberFormatter* pFormatter = rCache.GetDoc()->GetFormatTable();
fillDateGroupDimension(rCache, aDateInfo, nDim, nDim, nDatePart, pFormatter);
}
else if (aGroupInfo.mbEnable)
{
// Number-range grouping
......@@ -558,12 +564,6 @@ void ScDPSaveNumGroupDimension::AddToCache(ScDPCache& rCache) const
aItem.SetRangeLast();
rCache.SetGroupItem(nDim, aItem);
}
else if (aDateInfo.mbEnable)
{
// Date grouping
SvNumberFormatter* pFormatter = rCache.GetDoc()->GetFormatTable();
fillDateGroupDimension(rCache, aDateInfo, nDim, nDim, nDatePart, pFormatter);
}
}
void ScDPSaveNumGroupDimension::SetGroupInfo( const ScDPNumGroupInfo& rNew )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment