summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx5
-rw-r--r--sc/source/ui/view/dbfunc3.cxx33
-rw-r--r--sc/source/ui/view/output.cxx1
3 files changed, 6 insertions, 33 deletions
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index d1289cd205d8..65fe8a002dc8 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -1282,10 +1282,9 @@ void SAL_CALL ScDataPilotTableObj::refresh() throw(RuntimeException)
ScDPObject* pDPObj = lcl_GetDPObject(GetDocShell(), nTab, aName);
if (pDPObj)
{
- ScDPObject* pNew = new ScDPObject(*pDPObj);
ScDBDocFunc aFunc(*GetDocShell());
- aFunc.DataPilotUpdate( pDPObj, pNew, true, true );
- delete pNew; // DataPilotUpdate copies settings from "new" object
+ GetDocShell()->GetDocument()->GetDPCollection()->ClearCache(pDPObj);
+ aFunc.DataPilotUpdate( pDPObj, pDPObj, true, true );
}
}
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;