summaryrefslogtreecommitdiff
path: root/sc/source/core/data/dptabdat.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/dptabdat.cxx')
-rwxr-xr-xsc/source/core/data/dptabdat.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sc/source/core/data/dptabdat.cxx b/sc/source/core/data/dptabdat.cxx
index cff18ef925d9..cb68732a237f 100755
--- a/sc/source/core/data/dptabdat.cxx
+++ b/sc/source/core/data/dptabdat.cxx
@@ -169,13 +169,19 @@ void ScDPTableData::FillRowDataFromCacheTable(sal_Int32 nRow, const ScDPCacheTab
// page dimensions
GetItemData(rCacheTable, nRow, rInfo.aPageDims, rData.aPageData);
+ long nCacheColumnCount = rCacheTable.GetCache()->GetColumnCount();
sal_Int32 n = rInfo.aDataSrcCols.size();
for (sal_Int32 i = 0; i < n; ++i)
{
long nDim = rInfo.aDataSrcCols[i];
rData.aValues.push_back( ScDPValueData() );
- ScDPValueData& rVal = rData.aValues.back();
- rCacheTable.getValue( rVal, static_cast<SCCOL>(nDim), static_cast<SCROW>(nRow), false);
+ // #i111435# GetItemData needs dimension indexes including groups,
+ // so the index must be checked here (groups aren't useful as data fields).
+ if ( nDim < nCacheColumnCount )
+ {
+ ScDPValueData& rVal = rData.aValues.back();
+ rCacheTable.getValue( rVal, static_cast<SCCOL>(nDim), static_cast<SCROW>(nRow), false);
+ }
}
}