summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/tabview.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/tabview.cxx')
-rw-r--r--sc/source/ui/view/tabview.cxx30
1 files changed, 21 insertions, 9 deletions
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 3077e852dbaf..c076575d4e6d 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -200,6 +200,8 @@
#include "AccessibilityHints.hxx"
#include "appoptio.hxx"
+#include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
+
#include <string>
#include <algorithm>
@@ -212,6 +214,8 @@
// fuer Rad-Maus
#define SC_DELTA_ZOOM 10
+using namespace ::com::sun::star;
+
// STATIC DATA -----------------------------------------------------------
@@ -2476,7 +2480,7 @@ sal_Bool ScTabView::HasPageFieldDataAtCursor() const
SCCOL nCol = aViewData.GetCurX();
SCROW nRow = aViewData.GetCurY();
if (pWin)
- return pWin->HasPageFieldData( nCol, nRow );
+ return pWin->GetDPFieldOrientation( nCol, nRow ) == sheet::DataPilotFieldOrientation_PAGE;
return sal_False;
}
@@ -2486,15 +2490,23 @@ void ScTabView::StartDataSelect()
ScGridWindow* pWin = pGridWin[aViewData.GetActivePart()];
SCCOL nCol = aViewData.GetCurX();
SCROW nRow = aViewData.GetCurY();
- if (pWin)
- {
- // #i36598# If the cursor is on a page field's data cell,
- // no meaningful input is possible anyway, so this function
- // can be used to select a page field entry.
- if ( pWin->HasPageFieldData( nCol, nRow ) )
- pWin->DoPageFieldMenue( nCol, nRow );
- else
+ if (!pWin)
+ return;
+
+ switch (pWin->GetDPFieldOrientation(nCol, nRow))
+ {
+ case sheet::DataPilotFieldOrientation_PAGE:
+ // #i36598# If the cursor is on a page field's data cell,
+ // no meaningful input is possible anyway, so this function
+ // can be used to select a page field entry.
+ pWin->LaunchPageFieldMenu( nCol, nRow );
+ break;
+ case sheet::DataPilotFieldOrientation_COLUMN:
+ case sheet::DataPilotFieldOrientation_ROW:
+ pWin->LaunchDPFieldMenu( nCol, nRow );
+ break;
+ default:
pWin->DoAutoFilterMenue( nCol, nRow, TRUE );
}
}