diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-07-14 18:38:16 -0400 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-07-14 18:45:43 -0400 |
commit | 4da044d0fbc45ad1de5ee8990bd7a5850d7a2fa2 (patch) | |
tree | 5c8e4a1d88767dad5676036ff86ae70ae8a2f002 /sc/source/ui/unoobj | |
parent | cdb8cf074c8536aa3ea30102bcb9b34feda21833 (diff) |
fdo#37767: Fix broken refresh() from UNO API (and Basic).
We now need to clear the cache before running DataPilotUpdate() in
order to re-populate the cache from the source data.
Diffstat (limited to 'sc/source/ui/unoobj')
-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 a8c6b03b6..270b0979b 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -1273,10 +1273,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 ); } } |