summaryrefslogtreecommitdiff
path: root/sc/source/ui/view
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r--sc/source/ui/view/dbfunc3.cxx33
-rw-r--r--sc/source/ui/view/output.cxx1
2 files changed, 4 insertions, 30 deletions
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index e8e5baafb1f7..ac4408238818 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -707,37 +707,10 @@ void ScDBFunc::RecalcPivotTable()
{
// Remove existing data cache for the data that this datapilot uses,
// to force re-build data cache.
- if (pDPObj->IsSheetData())
+ if (!pDPs->ClearCache(pDPObj))
{
- // data source is internal sheet.
- const ScSheetSourceDesc* pDesc = pDPObj->GetSheetDesc();
- if (!pDesc)
- {
- ErrorMessage(STR_PIVOT_NOTFOUND);
- return;
- }
- if (pDesc->HasRangeName())
- {
- ScDPCollection::NameCaches& rCaches = pDPs->GetNameCaches();
- rCaches.removeCache(pDesc->GetRangeName());
- }
- else
- {
- ScDPCollection::SheetCaches& rCaches = pDPs->GetSheetCaches();
- rCaches.removeCache(pDesc->GetSourceRange());
- }
- }
- else if (pDPObj->IsImportData())
- {
- // data source is external database.
- const ScImportSourceDesc* pDesc = pDPObj->GetImportSourceDesc();
- if (!pDesc)
- {
- ErrorMessage(STR_PIVOT_NOTFOUND);
- return;
- }
- ScDPCollection::DBCaches& rCaches = pDPs->GetDBCaches();
- rCaches.removeCache(pDesc->GetCommandType(), pDesc->aDBName, pDesc->aObject);
+ ErrorMessage(STR_PIVOT_NOTFOUND);
+ return;
}
ScDBDocFunc aFunc( *pDocSh );
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index b69f2ace659a..5d34fa25d1c3 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -1634,6 +1634,7 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
drawinglayer::processor2d::BaseProcessor2D* ScOutputData::CreateProcessor2D( )
{
+ pDoc->InitDrawLayer(pDoc->GetDocumentShell());
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
if (!pDrawLayer)
return NULL;