diff options
Diffstat (limited to 'sc/source/ui/unoobj/dapiuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/dapiuno.cxx | 5 |
1 files changed, 2 insertions, 3 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 ); } } |