summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-15 10:45:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-15 12:30:39 +0200
commit48565c4bf1b9dc36666199e74e49ac3527b99cfb (patch)
treeb185aa5ea1e2fb11efd8e034411d25620205e9bf /sc
parentccd6ed5e3b3978822c00020fbc6baeb4af6628a5 (diff)
convert ScFilterBoxMode to scoped enum
and drop unused enumerators Change-Id: I3f59622e17355ccc39597c0f79d4e254e6cc92c6
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/gridwin.cxx26
1 files changed, 8 insertions, 18 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 8b02579c288c..e4c3b6beef17 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -153,12 +153,10 @@ using namespace css::uno;
#define SC_AUTOFILTER_EMPTY 3
#define SC_AUTOFILTER_NOTEMPTY 4
-enum ScFilterBoxMode
+enum class ScFilterBoxMode
{
- SC_FILTERBOX_FILTER,
- SC_FILTERBOX_DATASELECT,
- SC_FILTERBOX_SCENARIO,
- SC_FILTERBOX_PAGEFIELD
+ DataSelect,
+ Scenario
};
struct ScGridWindow::MouseEventState
@@ -206,7 +204,7 @@ private:
bool bInit;
bool bCancelled;
bool bInSelect;
- sal_uLong nSel;
+ sal_uLong nSel;
ScFilterBoxMode eMode;
protected:
@@ -961,7 +959,7 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
mpFilterFloat.reset(VclPtr<ScFilterFloatingWindow>::Create(this, WinBits(WB_BORDER)));
mpFilterFloat->SetPopupModeEndHdl( LINK( this, ScGridWindow, PopupModeEndHdl ) );
- mpFilterBox.reset(VclPtr<ScFilterListBox>::Create(mpFilterFloat.get(), this, nCol, nRow, SC_FILTERBOX_SCENARIO));
+ mpFilterBox.reset(VclPtr<ScFilterListBox>::Create(mpFilterFloat.get(), this, nCol, nRow, ScFilterBoxMode::Scenario));
if (bLayoutRTL)
mpFilterBox->EnableMirroring();
@@ -1085,8 +1083,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow )
mpFilterFloat.reset(VclPtr<ScFilterFloatingWindow>::Create(this, WinBits(WB_BORDER)));
mpFilterFloat->SetPopupModeEndHdl(LINK( this, ScGridWindow, PopupModeEndHdl));
- ScFilterBoxMode eFilterMode = SC_FILTERBOX_DATASELECT;
- mpFilterBox.reset(VclPtr<ScFilterListBox>::Create(mpFilterFloat.get(), this, nCol, nRow, eFilterMode));
+ mpFilterBox.reset(VclPtr<ScFilterListBox>::Create(mpFilterFloat.get(), this, nCol, nRow, ScFilterBoxMode::DataSelect));
// Fix for bug fdo#44925
if (AllSettings::GetLayoutRTL() != bLayoutRTL)
mpFilterBox->EnableMirroring();
@@ -1225,19 +1222,12 @@ void ScGridWindow::FilterSelect( sal_uLong nSel )
SCROW nRow = mpFilterBox->GetRow();
switch (mpFilterBox->GetMode())
{
- case SC_FILTERBOX_DATASELECT:
+ case ScFilterBoxMode::DataSelect:
ExecDataSelect(nCol, nRow, aString);
break;
- case SC_FILTERBOX_FILTER:
- ExecFilter(nSel, nCol, nRow, aString);
- break;
- case SC_FILTERBOX_SCENARIO:
+ case ScFilterBoxMode::Scenario:
pViewData->GetView()->UseScenario(aString);
break;
- case SC_FILTERBOX_PAGEFIELD:
- // first entry is "all"
- ExecPageFieldSelect( nCol, nRow, (nSel != 0), aString );
- break;
}
if (mpFilterFloat)