summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/dbfunc3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/dbfunc3.cxx')
-rwxr-xr-xsc/source/ui/view/dbfunc3.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 35befa8f7a36..dbdeae1ae0b1 100755
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -694,6 +694,9 @@ ULONG RefreshDPObject( ScDPObject *pDPObj, ScDocument *pDoc, ScDocShell *pDocSh,
if( !pDPObj )
return STR_PIVOT_NOTFOUND;
+ if ( pDocSh && !pDoc )
+ pDoc = pDocSh->GetDocument();
+
if( !pDoc )
return static_cast<ULONG>(-1);