summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/dbfunc.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-18 11:56:40 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-25 09:12:04 +0000
commit233df63c540f4431ae67693021309ccb66b8f764 (patch)
tree1672c18d8448e2472993e0f3066ee0c4c5914fe5 /sc/source/ui/view/dbfunc.cxx
parentdc24a1d86c2bb3232c734b1a9d098f7331f47f99 (diff)
Convert SC_MF to scoped enum
Change-Id: I3089006b502e33710bfb2564f051ebf2892ad08a Reviewed-on: https://gerrit.libreoffice.org/25085 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc/source/ui/view/dbfunc.cxx')
-rw-r--r--sc/source/ui/view/dbfunc.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index 1e6aa67d4188..a2bc7999d383 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -295,10 +295,10 @@ void ScDBFunc::ToggleAutoFilter()
SCCOL nCol;
SCROW nRow = aParam.nRow1;
SCTAB nTab = GetViewData().GetTabNo();
- sal_Int16 nFlag;
- bool bHasAuto = true;
- bool bHeader = pDBData->HasHeader();
- bool bPaint = false;
+ ScMF nFlag;
+ bool bHasAuto = true;
+ bool bHeader = pDBData->HasHeader();
+ bool bPaint = false;
//! instead retrieve from DB-range?
@@ -307,7 +307,7 @@ void ScDBFunc::ToggleAutoFilter()
nFlag = static_cast<const ScMergeFlagAttr*>( pDoc->
GetAttr( nCol, nRow, nTab, ATTR_MERGE_FLAG ))->GetValue();
- if ( (nFlag & SC_MF_AUTO) == 0 )
+ if ( !(nFlag & ScMF::Auto) )
bHasAuto = false;
}
@@ -319,7 +319,7 @@ void ScDBFunc::ToggleAutoFilter()
{
nFlag = static_cast<const ScMergeFlagAttr*>( pDoc->
GetAttr( nCol, nRow, nTab, ATTR_MERGE_FLAG ))->GetValue();
- pDoc->ApplyAttr( nCol, nRow, nTab, ScMergeFlagAttr( nFlag & ~SC_MF_AUTO ) );
+ pDoc->ApplyAttr( nCol, nRow, nTab, ScMergeFlagAttr( nFlag & ~ScMF::Auto ) );
}
// use a list action for the AutoFilter buttons (ScUndoAutoFilter) and the filter operation
@@ -374,7 +374,7 @@ void ScDBFunc::ToggleAutoFilter()
{
nFlag = static_cast<const ScMergeFlagAttr*>( pDoc->
GetAttr( nCol, nRow, nTab, ATTR_MERGE_FLAG ))->GetValue();
- pDoc->ApplyAttr( nCol, nRow, nTab, ScMergeFlagAttr( nFlag | SC_MF_AUTO ) );
+ pDoc->ApplyAttr( nCol, nRow, nTab, ScMergeFlagAttr( nFlag | ScMF::Auto ) );
}
pDocSh->PostPaint(ScRange(aParam.nCol1, nRow, nTab, aParam.nCol2, nRow, nTab),
PAINT_GRID);
@@ -417,9 +417,9 @@ void ScDBFunc::HideAutoFilter()
for (SCCOL nCol=nCol1; nCol<=nCol2; nCol++)
{
- sal_Int16 nFlag = static_cast<const ScMergeFlagAttr*>( rDoc.
+ ScMF nFlag = static_cast<const ScMergeFlagAttr*>( rDoc.
GetAttr( nCol, nRow1, nTab, ATTR_MERGE_FLAG ))->GetValue();
- rDoc.ApplyAttr( nCol, nRow1, nTab, ScMergeFlagAttr( nFlag & ~SC_MF_AUTO ) );
+ rDoc.ApplyAttr( nCol, nRow1, nTab, ScMergeFlagAttr( nFlag & ~ScMF::Auto ) );
}
ScRange aRange;