summaryrefslogtreecommitdiff
path: root/sc/source/ui/view
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-09-15 17:23:05 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2010-09-15 17:23:05 +0200
commit340f9bd08cfe91054d3ed36e13c26d4fccce154f (patch)
tree1b4b56bab38e2cf3e02469c9e881bcca6f62240d /sc/source/ui/view
parentd8c68b41b4ffd318744d5fc2ca0e60bdc37aca4e (diff)
calc-dp-default-new-sheet.diff: default output to new sheet
i#50886
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r--sc/source/ui/view/tabvwshc.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 0a14ad6c1eba..fa3ba10db0d2 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -252,8 +252,13 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog(
if( pDialogDPObject )
{
+ // Check for an existing datapilot output.
+ ScViewData* pViewData = GetViewData();
+ ScDPObject* pObj = GetViewData()->GetDocument()->GetDPAtCursor(
+ pViewData->GetCurX(), pViewData->GetCurY(), pViewData->GetTabNo());
+
GetViewData()->SetRefTabNo( GetViewData()->GetTabNo() );
- pResult = new ScDPLayoutDlg( pB, pCW, pParent, *pDialogDPObject );
+ pResult = new ScDPLayoutDlg( pB, pCW, pParent, *pDialogDPObject, pObj == NULL);
}
}
break;