summaryrefslogtreecommitdiff
path: root/sc/source/core/data/dpobject.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-03-23 16:38:27 -0400
committerKohei Yoshida <kyoshida@novell.com>2011-03-23 17:18:01 -0400
commit983ca8104428a2c032a6a170cf249ff176722db5 (patch)
treedf58cc819aab8e56e8ec0790612a47fcacec509d /sc/source/core/data/dpobject.cxx
parentb9ad43810c7e3cb335f0bb1317908cadc123121a (diff)
Create data cache outside of the ScSheetDPData.
This will create a hook where we can detect error conditions before going too deep.
Diffstat (limited to 'sc/source/core/data/dpobject.cxx')
-rw-r--r--sc/source/core/data/dpobject.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 2292dcd4d..d1d9b5c24 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -417,11 +417,13 @@ ScDPTableData* ScDPObject::GetTableData()
OSL_FAIL("no source descriptor");
pSheetDesc = new ScSheetSourceDesc(pDoc); // dummy defaults
}
- pData.reset(new ScSheetDPData(pDoc, *pSheetDesc));
+ ScDPCache* pCache = pSheetDesc->CreateCache();
+ if (pCache)
+ pData.reset(new ScSheetDPData(pDoc, *pSheetDesc, pCache));
}
// grouping (for cell or database data)
- if ( pSaveData && pSaveData->GetExistingDimensionData() )
+ if (pData && pSaveData && pSaveData->GetExistingDimensionData())
{
shared_ptr<ScDPGroupTableData> pGroupData(new ScDPGroupTableData(pData, pDoc));
pSaveData->GetExistingDimensionData()->WriteToData(*pGroupData);