diff options
-rw-r--r-- | sc/source/ui/inc/gridwin.hxx | 7 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin2.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/tabview.cxx | 4 |
4 files changed, 15 insertions, 2 deletions
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index 00827d9e8985..4271df2c8705 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -42,6 +42,8 @@ #include <memory> #include <boost/scoped_ptr.hpp> +#define USE_NEW_AUTOFILTER 0 + // --------------------------------------------------------------------------- struct ScTableInfo; @@ -341,8 +343,10 @@ public: void LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelect ); void DoScenarioMenue( const ScRange& rScenRange ); - +#if USE_NEW_AUTOFILTER void LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow); + void UpdateAutoFilterFromMenu(); +#endif void LaunchPageFieldMenu( SCCOL nCol, SCROW nRow ); void LaunchDPFieldMenu( SCCOL nCol, SCROW nRow ); @@ -379,7 +383,6 @@ public: void CheckNeedsRepaint(); - void UpdateAutoFilterFromMenu(); void UpdateDPFromFieldPopupMenu(); void UpdateVisibleRange(); diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index dc7ff54ceb0e..8293b6f9a71d 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -585,6 +585,7 @@ void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, sal_Bool bHasSel } } +#if USE_NEW_AUTOFILTER namespace { class PopupAction : public ScMenuFloatingWindow::Action @@ -700,6 +701,7 @@ void ScGridWindow::UpdateAutoFilterFromMenu() pViewData->GetView()->Query(aParam, NULL, true); pDBData->SetQueryParam(aParam); } +#endif void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow ) { diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index 2688e046a95b..a3ecaaea5496 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -165,7 +165,11 @@ bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent& HideCursor(); mpFilterButton->draw(); ShowCursor(); +#if USE_NEW_AUTOFILTER LaunchAutoFilterMenu(nCol, nRow); +#else + LaunchDataSelectMenu(nCol, nRow, false); +#endif return true; } diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index 6e6863a78df1..6804c36ccb46 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -2403,10 +2403,14 @@ void ScTabView::StartDataSelect() aViewData.GetDocument()->GetAttr( nCol, nRow, aViewData.GetTabNo(), ATTR_MERGE_FLAG)); +#if USE_NEW_AUTOFILTER if (pAttr->HasAutoFilter()) pWin->LaunchAutoFilterMenu(nCol, nRow); else pWin->LaunchDataSelectMenu(nCol, nRow, true); +#else + pWin->LaunchDataSelectMenu(nCol, nRow, !pAttr->HasAutoFilter()); +#endif } void ScTabView::EnableRefInput(bool bFlag) |