diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-03-23 16:38:27 -0400 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-03-23 17:18:01 -0400 |
commit | 983ca8104428a2c032a6a170cf249ff176722db5 (patch) | |
tree | df58cc819aab8e56e8ec0790612a47fcacec509d /sc/source/core/data/dpobject.cxx | |
parent | b9ad43810c7e3cb335f0bb1317908cadc123121a (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.cxx | 6 |
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); |