diff options
Diffstat (limited to 'sc/source/ui/view/tabview3.cxx')
-rw-r--r-- | sc/source/ui/view/tabview3.cxx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 84c56659065e..71204128ce60 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -2469,27 +2469,23 @@ void ScTabView::DoChartSelection( } } -void ScTabView::DoDPFieldPopup(Point aPoint, Size /*aSize*/) +void ScTabView::DoDPFieldPopup(OUString const & rPivotTableName, sal_Int32 nDimensionIndex, Point aPoint, Size aSize) { ScDocument& rDocument = aViewData.GetDocShell()->GetDocument(); ScGridWindow* pWin = pGridWin[aViewData.GetActivePart()].get(); + if (!pWin) return; - ScDPCollection* pDPs = rDocument.GetDPCollection(); - // TODO - DP name should be a parameter - ScDPObject* pDPObj = pDPs->GetByName("DataPilot1"); - - pDPObj->BuildAllDimensionMembers(); + ScDPCollection* pDPCollection = rDocument.GetDPCollection(); + ScDPObject* pDPObject = pDPCollection->GetByName(rPivotTableName); - //const ScDPSaveData* pSaveData = pDPObj->GetSaveData(); - //bool bIsDataLayout; - //OUString aDimName = pDPObj->GetDimName(0, bIsDataLayout); + pDPObject->BuildAllDimensionMembers(); Point aScreenPoint = pWin->OutputToScreenPixel(pWin->LogicToPixel(aPoint)); - //Size aScreenSize = pWin->LogicToPixel(aSize); + Size aScreenSize = pWin->LogicToPixel(aSize); - pWin->DPLaunchFieldPopupMenu(aScreenPoint, Size(1, 1), 1, pDPObj); + pWin->DPLaunchFieldPopupMenu(aScreenPoint, aScreenSize, nDimensionIndex, pDPObject); } // PaintGrid - repaint data range |