summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-18 11:56:40 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-07-20 01:26:07 -0400
commitfc6faa580f0c9848622ea28eb1d68c170db31bb0 (patch)
treebf529a88529fd2c3eb2d12d3d0bb885f6c48e4cb /sc
parent5b9a7813f9286b5ca4c0538ff8b8005236394611 (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> (cherry picked from commit 233df63c540f4431ae67693021309ccb66b8f764)
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/attarray.hxx6
-rw-r--r--sc/inc/attrib.hxx48
-rw-r--r--sc/inc/column.hxx5
-rw-r--r--sc/inc/document.hxx5
-rw-r--r--sc/inc/table.hxx4
-rw-r--r--sc/qa/unit/ucalc.cxx2
-rw-r--r--sc/source/core/data/attarray.cxx30
-rw-r--r--sc/source/core/data/attrib.cxx8
-rw-r--r--sc/source/core/data/column.cxx6
-rw-r--r--sc/source/core/data/column2.cxx4
-rw-r--r--sc/source/core/data/documen3.cxx14
-rw-r--r--sc/source/core/data/document.cxx10
-rw-r--r--sc/source/core/data/dpobject.cxx10
-rw-r--r--sc/source/core/data/dpoutput.cxx14
-rw-r--r--sc/source/core/data/fillinfo.cxx26
-rw-r--r--sc/source/core/data/table2.cxx10
-rw-r--r--sc/source/filter/excel/excimp8.cxx4
-rw-r--r--sc/source/filter/excel/exctools.cxx2
-rw-r--r--sc/source/filter/excel/xipivot.cxx18
-rw-r--r--sc/source/filter/rtf/eeimpars.cxx6
-rw-r--r--sc/source/filter/xml/xmldpimp.cxx12
-rw-r--r--sc/source/filter/xml/xmldrani.cxx2
-rw-r--r--sc/source/filter/xml/xmlsceni.cxx2
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx2
-rw-r--r--sc/source/ui/docshell/docfunc.cxx14
-rw-r--r--sc/source/ui/docshell/docsh5.cxx6
-rw-r--r--sc/source/ui/undo/undobase.cxx2
-rw-r--r--sc/source/ui/undo/undoblk.cxx4
-rw-r--r--sc/source/ui/undo/undodat.cxx4
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx2
-rw-r--r--sc/source/ui/unoobj/datauno.cxx4
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx4
-rw-r--r--sc/source/ui/view/dbfunc.cxx18
-rw-r--r--sc/source/ui/view/output.cxx4
-rw-r--r--sc/source/ui/view/output2.cxx12
-rw-r--r--sc/source/ui/view/viewdata.cxx2
-rw-r--r--sc/source/ui/view/viewfun2.cxx2
-rw-r--r--sc/source/ui/view/viewfunc.cxx2
38 files changed, 170 insertions, 160 deletions
diff --git a/sc/inc/attarray.hxx b/sc/inc/attarray.hxx
index 6dd84817b134..415a1838dc20 100644
--- a/sc/inc/attarray.hxx
+++ b/sc/inc/attarray.hxx
@@ -148,8 +148,8 @@ public:
SCsROW& rRow, SCsROW& rEndRow, const ScStyleSheet* pSearchStyle, bool bUp,
const ScMarkArray* pMarkArray = nullptr) const;
- bool ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags );
- bool RemoveFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags );
+ bool ApplyFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags );
+ bool RemoveFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags );
bool Search( SCROW nRow, SCSIZE& nIndex ) const;
@@ -185,7 +185,7 @@ public:
void DeleteArea( SCROW nStartRow, SCROW nEndRow );
void MoveTo( SCROW nStartRow, SCROW nEndRow, ScAttrArray& rAttrArray );
void CopyArea(
- SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArray& rAttrArray, sal_Int16 nStripFlags = 0) const;
+ SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArray& rAttrArray, ScMF nStripFlags = ScMF::NONE) const;
void DeleteHardAttr( SCROW nStartRow, SCROW nEndRow );
diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx
index 0b403d663989..60eeb46f17b0 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -23,22 +23,28 @@
#include <svl/poolitem.hxx>
#include <svl/intitem.hxx>
#include <svl/eitem.hxx>
+#include <o3tl/typed_flags_set.hxx>
#include "scdllapi.h"
#include "global.hxx"
#include "address.hxx"
- // flags for cells hidden by merge
- // and control for auto filter
-#define SC_MF_HOR 0x0001
-#define SC_MF_VER 0x0002
-#define SC_MF_AUTO 0x0004 /// autofilter arrow
-#define SC_MF_BUTTON 0x0008 /// field button for datapilot
-#define SC_MF_SCENARIO 0x0010
-#define SC_MF_BUTTON_POPUP 0x0020 /// dp button with popup arrow
-#define SC_MF_HIDDEN_MEMBER 0x0040 /// dp field button with presence of hidden member
-#define SC_MF_DP_TABLE 0x0080 /// dp table output
-
-#define SC_MF_ALL 0x00FF
+// flags for cells hidden by merge
+// and control for auto filter
+enum class ScMF {
+ NONE = 0x0000,
+ Hor = 0x0001,
+ Ver = 0x0002,
+ Auto = 0x0004, /// autofilter arrow
+ Button = 0x0008, /// field button for datapilot
+ Scenario = 0x0010,
+ ButtonPopup = 0x0020, /// dp button with popup arrow
+ HiddenMember = 0x0040, /// dp field button with presence of hidden member
+ DpTable = 0x0080, /// dp table output
+ All = 0x00FF
+};
+namespace o3tl {
+ template<> struct typed_flags<ScMF> : is_typed_flags<ScMF, 0xff> {};
+}
class EditTextObject;
namespace editeng { class SvxBorderLine; }
@@ -77,21 +83,23 @@ class SC_DLLPUBLIC ScMergeFlagAttr: public SfxInt16Item
{
public:
ScMergeFlagAttr();
- ScMergeFlagAttr(sal_Int16 nFlags);
+ ScMergeFlagAttr(ScMF nFlags);
virtual ~ScMergeFlagAttr();
SfxPoolItem * Clone(SfxItemPool * pPool) const override;
- bool IsHorOverlapped() const { return ( GetValue() & SC_MF_HOR ) != 0; }
- bool IsVerOverlapped() const { return ( GetValue() & SC_MF_VER ) != 0; }
- bool IsOverlapped() const { return ( GetValue() & ( SC_MF_HOR | SC_MF_VER ) ) != 0; }
+ ScMF GetValue() const { return (ScMF) SfxInt16Item::GetValue(); }
+
+ bool IsHorOverlapped() const { return bool( GetValue() & ScMF::Hor ); }
+ bool IsVerOverlapped() const { return bool( GetValue() & ScMF::Ver ); }
+ bool IsOverlapped() const { return bool( GetValue() & ( ScMF::Hor | ScMF::Ver ) ); }
- bool HasAutoFilter() const { return ( GetValue() & SC_MF_AUTO ) != 0; }
+ bool HasAutoFilter() const { return bool( GetValue() & ScMF::Auto ); }
- bool IsScenario() const { return ( GetValue() & SC_MF_SCENARIO ) != 0; }
+ bool IsScenario() const { return bool( GetValue() & ScMF::Scenario ); }
- bool HasPivotButton() const;
- bool HasPivotPopupButton() const;
+ bool HasPivotButton() const;
+ bool HasPivotPopupButton() const;
};
class SC_DLLPUBLIC ScProtectionAttr: public SfxPoolItem
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index c1720f7208a8..55e3d9e5842f 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -102,6 +102,7 @@ struct ScRefCellValue;
struct ScCellValue;
class ScDocumentImport;
class ScHint;
+enum class ScMF;
struct ScNeededSizeOptions
{
@@ -479,8 +480,8 @@ public:
SCsROW& rRow, SCsROW& rEndRow, const ScStyleSheet* pSearchStyle, bool bUp,
bool bInSelection, const ScMarkData& rMark) const;
- bool ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags );
- bool RemoveFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags );
+ bool ApplyFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags );
+ bool RemoveFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags );
void ClearItems( SCROW nStartRow, SCROW nEndRow, const sal_uInt16* pWhich );
void RemoveProtected( SCROW nStartRow, SCROW nEndRow );
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 01f7a48f51e1..574f937a5547 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -48,6 +48,7 @@
#include "markdata.hxx"
enum class SvtScriptType;
+enum class ScMF;
namespace editeng { class SvxBorderLine; }
namespace formula { struct VectorRefArray; }
namespace svl {
@@ -1516,10 +1517,10 @@ public:
SC_DLLPUBLIC bool ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
- SCTAB nTab, sal_Int16 nFlags );
+ SCTAB nTab, ScMF nFlags );
SC_DLLPUBLIC bool RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
- SCTAB nTab, sal_Int16 nFlags );
+ SCTAB nTab, ScMF nFlags );
SC_DLLPUBLIC void SetPattern( const ScAddress&, const ScPatternAttr& rAttr,
bool bPutToPool = false );
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index bd0871f4c816..3739d2902009 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -647,8 +647,8 @@ public:
bool IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllStyles ) const;
- bool ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_Int16 nFlags );
- bool RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_Int16 nFlags );
+ bool ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScMF nFlags );
+ bool RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScMF nFlags );
void ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray = nullptr );
void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast = true );
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 8d210272102b..2c6fc94b4bd4 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -3165,7 +3165,7 @@ void Test::testAutofilter()
pDBData->GetArea(aRange);
m_pDoc->ApplyFlagsTab( aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aStart.Row(),
- aRange.aStart.Tab(), SC_MF_AUTO);
+ aRange.aStart.Tab(), ScMF::Auto);
//create the query param
ScQueryParam aParam;
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 12cb38626eb3..e326aded2ed4 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1389,13 +1389,13 @@ bool ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
{
if ( nMergeEndCol > nThisCol )
pDocument->ApplyFlagsTab( nThisCol+1, nThisRow, nMergeEndCol, pData[i].nRow,
- nTab, SC_MF_HOR );
+ nTab, ScMF::Hor );
if ( nMergeEndRow > nThisRow )
pDocument->ApplyFlagsTab( nThisCol, nThisRow+1, nThisCol, nMergeEndRow,
- nTab, SC_MF_VER );
+ nTab, ScMF::Ver );
if ( nMergeEndCol > nThisCol && nMergeEndRow > nThisRow )
pDocument->ApplyFlagsTab( nThisCol+1, nThisRow+1, nMergeEndCol, nMergeEndRow,
- nTab, SC_MF_HOR | SC_MF_VER );
+ nTab, ScMF::Hor | ScMF::Ver );
Search( nThisRow, i ); // Data changed
Search( nStartRow, nStartIndex );
@@ -1529,11 +1529,11 @@ void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
}
}
-bool ScAttrArray::ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags )
+bool ScAttrArray::ApplyFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags )
{
const ScPatternAttr* pOldPattern;
- sal_Int16 nOldValue;
+ ScMF nOldValue;
SCSIZE nIndex;
SCROW nRow;
SCROW nThisRow;
@@ -1565,11 +1565,11 @@ bool ScAttrArray::ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags )
return bChanged;
}
-bool ScAttrArray::RemoveFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags )
+bool ScAttrArray::RemoveFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags )
{
const ScPatternAttr* pOldPattern;
- sal_Int16 nOldValue;
+ ScMF nOldValue;
SCSIZE nIndex;
SCROW nRow;
SCROW nThisRow;
@@ -2068,8 +2068,8 @@ void ScAttrArray::InsertRow( SCROW nStartRow, SCSIZE nSize )
}
// Don't duplicate the merge flags in the inserted row.
- // #i108488# SC_MF_SCENARIO has to be allowed.
- RemoveFlags( nStartRow, nStartRow+nSize-1, SC_MF_HOR | SC_MF_VER | SC_MF_AUTO | SC_MF_BUTTON );
+ // #i108488# ScMF::Scenario has to be allowed.
+ RemoveFlags( nStartRow, nStartRow+nSize-1, ScMF::Hor | ScMF::Ver | ScMF::Auto | ScMF::Button );
}
void ScAttrArray::DeleteRow( SCROW nStartRow, SCSIZE nSize )
@@ -2116,7 +2116,7 @@ void ScAttrArray::DeleteRow( SCROW nStartRow, SCSIZE nSize )
// Below does not follow the pattern to detect pressure ranges;
// instead, only remove merge flags.
- RemoveFlags( MAXROW-nSize+1, MAXROW, SC_MF_HOR | SC_MF_VER | SC_MF_AUTO );
+ RemoveFlags( MAXROW-nSize+1, MAXROW, ScMF::Hor | ScMF::Ver | ScMF::Auto );
}
void ScAttrArray::DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex )
@@ -2202,7 +2202,7 @@ void ScAttrArray::MoveTo(SCROW nStartRow, SCROW nEndRow, ScAttrArray& rAttrArray
* Copy between documents (Clipboard)
*/
void ScAttrArray::CopyArea(
- SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArray& rAttrArray, sal_Int16 nStripFlags) const
+ SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArray& rAttrArray, ScMF nStripFlags) const
{
nStartRow -= nDy; // Source
nEndRow -= nDy;
@@ -2228,15 +2228,15 @@ void ScAttrArray::CopyArea(
pNewPattern = static_cast<const ScPatternAttr*>(
&pDestDocPool->GetDefaultItem( ATTR_PATTERN ));
}
- else if ( nStripFlags )
+ else if ( nStripFlags != ScMF::NONE )
{
std::unique_ptr<ScPatternAttr> pTmpPattern(new ScPatternAttr( *pOldPattern ));
- sal_Int16 nNewFlags = 0;
- if ( nStripFlags != SC_MF_ALL )
+ ScMF nNewFlags = ScMF::NONE;
+ if ( nStripFlags != ScMF::All )
nNewFlags = static_cast<const ScMergeFlagAttr&>(pTmpPattern->GetItem(ATTR_MERGE_FLAG)).
GetValue() & ~nStripFlags;
- if ( nNewFlags )
+ if ( nNewFlags != ScMF::NONE )
pTmpPattern->GetItemSet().Put( ScMergeFlagAttr( nNewFlags ) );
else
pTmpPattern->GetItemSet().ClearItem( ATTR_MERGE_FLAG );
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index d12240484e35..027182a68676 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -134,8 +134,8 @@ ScMergeFlagAttr::ScMergeFlagAttr():
{
}
-ScMergeFlagAttr::ScMergeFlagAttr(sal_Int16 nFlags):
- SfxInt16Item(ATTR_MERGE_FLAG, nFlags)
+ScMergeFlagAttr::ScMergeFlagAttr(ScMF nFlags):
+ SfxInt16Item(ATTR_MERGE_FLAG, static_cast<sal_Int16>(nFlags))
{
}
@@ -150,12 +150,12 @@ SfxPoolItem * ScMergeFlagAttr::Clone(SfxItemPool *) const
bool ScMergeFlagAttr::HasPivotButton() const
{
- return (GetValue() & SC_MF_BUTTON) != 0;
+ return bool(static_cast<ScMF>(GetValue()) & ScMF::Button);
}
bool ScMergeFlagAttr::HasPivotPopupButton() const
{
- return (GetValue() & SC_MF_BUTTON_POPUP) != 0;
+ return bool(static_cast<ScMF>(GetValue()) & ScMF::ButtonPopup);
}
/**
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index fdc4eead288a..e6cccda5cd3e 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -668,12 +668,12 @@ bool ScColumn::IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllStyl
return pAttrArray->IsStyleSheetUsed( rStyle, bGatherAllStyles );
}
-bool ScColumn::ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags )
+bool ScColumn::ApplyFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags )
{
return pAttrArray->ApplyFlags( nStartRow, nEndRow, nFlags );
}
-bool ScColumn::RemoveFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags )
+bool ScColumn::RemoveFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags )
{
return pAttrArray->RemoveFlags( nStartRow, nEndRow, nFlags );
}
@@ -1022,7 +1022,7 @@ void ScColumn::CopyToClip(
sc::CopyToClipContext& rCxt, SCROW nRow1, SCROW nRow2, ScColumn& rColumn ) const
{
pAttrArray->CopyArea( nRow1, nRow2, 0, *rColumn.pAttrArray,
- rCxt.isKeepScenarioFlags() ? (SC_MF_ALL & ~SC_MF_SCENARIO) : SC_MF_ALL );
+ rCxt.isKeepScenarioFlags() ? (ScMF::All & ~ScMF::Scenario) : ScMF::All );
{
CopyToClipHandler aFunc(*this, rColumn, rCxt.getBlockPosition(rColumn.nTab, rColumn.nCol), rCxt.isCloneNotes());
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index fbaf4daba584..cae5b7c546ba 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -560,8 +560,8 @@ long ScColumn::GetNeededSize(
// 20 * nZoom/100
// Conditional formatting is not interesting here
- sal_Int16 nFlags = static_cast<const ScMergeFlagAttr&>(pPattern->GetItem(ATTR_MERGE_FLAG)).GetValue();
- if (nFlags & SC_MF_AUTO)
+ ScMF nFlags = static_cast<const ScMergeFlagAttr&>(pPattern->GetItem(ATTR_MERGE_FLAG)).GetValue();
+ if (nFlags & ScMF::Auto)
nValue += (rZoomX.GetNumerator()*20)/rZoomX.GetDenominator();
}
return nValue;
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index c519f1efe4a1..219d9be9e8eb 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -274,7 +274,7 @@ void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, bool bRemove
aOldRange.aEnd.SetRow(aOldRange.aStart.Row());
RemoveFlagsTab( aOldRange.aStart.Col(), aOldRange.aStart.Row(),
aOldRange.aEnd.Col(), aOldRange.aEnd.Row(),
- aOldRange.aStart.Tab(), SC_MF_AUTO );
+ aOldRange.aStart.Tab(), ScMF::Auto );
RepaintRange( aOldRange );
}
}
@@ -1444,7 +1444,7 @@ bool ScDocument::HasAutoFilter( SCCOL nCurCol, SCROW nCurRow, SCTAB nCurTab )
{
SCCOL nCol;
SCROW nRow;
- sal_Int16 nFlag;
+ ScMF nFlag;
ScQueryParam aParam;
pDBData->GetQueryParam( aParam );
@@ -1456,7 +1456,7 @@ bool ScDocument::HasAutoFilter( SCCOL nCurCol, SCROW nCurRow, SCTAB nCurTab )
GetAttr( nCol, nRow, nCurTab, ATTR_MERGE_FLAG ))->
GetValue();
- if ( (nFlag & SC_MF_AUTO) == 0 )
+ if ( !(nFlag & ScMF::Auto) )
bHasAutoFilter = false;
}
}
@@ -2002,11 +2002,11 @@ void ScDocument::DoMerge( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
ApplyAttr( nStartCol, nStartRow, nTab, aAttr );
if ( nEndCol > nStartCol )
- ApplyFlagsTab( nStartCol+1, nStartRow, nEndCol, nStartRow, nTab, SC_MF_HOR );
+ ApplyFlagsTab( nStartCol+1, nStartRow, nEndCol, nStartRow, nTab, ScMF::Hor );
if ( nEndRow > nStartRow )
- ApplyFlagsTab( nStartCol, nStartRow+1, nStartCol, nEndRow, nTab, SC_MF_VER );
+ ApplyFlagsTab( nStartCol, nStartRow+1, nStartCol, nEndRow, nTab, ScMF::Ver );
if ( nEndCol > nStartCol && nEndRow > nStartRow )
- ApplyFlagsTab( nStartCol+1, nStartRow+1, nEndCol, nEndRow, nTab, SC_MF_HOR | SC_MF_VER );
+ ApplyFlagsTab( nStartCol+1, nStartRow+1, nEndCol, nEndRow, nTab, ScMF::Hor | ScMF::Ver );
// Remove all covered notes (removed captions are collected by drawing undo if active)
InsertDeleteFlags nDelFlag = InsertDeleteFlags::NOTE | (bDeleteCaptions ? InsertDeleteFlags::NONE : InsertDeleteFlags::NOCAPTIONS);
@@ -2027,7 +2027,7 @@ void ScDocument::RemoveMerge( SCCOL nCol, SCROW nRow, SCTAB nTab )
SCCOL nEndCol = nCol + pAttr->GetColMerge() - 1;
SCROW nEndRow = nRow + pAttr->GetRowMerge() - 1;
- RemoveFlagsTab( nCol, nRow, nEndCol, nEndRow, nTab, SC_MF_HOR | SC_MF_VER );
+ RemoveFlagsTab( nCol, nRow, nEndCol, nEndRow, nTab, ScMF::Hor | ScMF::Ver );
const ScMergeAttr* pDefAttr = static_cast<const ScMergeAttr*>(
&xPoolHelper->GetDocPool()->GetDefaultItem( ATTR_MERGE ));
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 78033cbcdc2d..1e0b41514faa 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -4975,7 +4975,7 @@ bool ScDocument::IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllSt
}
bool ScDocument::ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow,
- SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, sal_Int16 nFlags )
+ SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags )
{
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
if (maTabs[nTab])
@@ -4986,7 +4986,7 @@ bool ScDocument::ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow,
}
bool ScDocument::RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow,
- SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, sal_Int16 nFlags )
+ SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags )
{
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
if (maTabs[nTab])
@@ -5622,7 +5622,7 @@ bool ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
// Delete Autofilter
- bool bChange = RemoveFlagsTab( nStartCol,nStartRow, nEndCol,nEndRow, nTab, SC_MF_AUTO );
+ bool bChange = RemoveFlagsTab( nStartCol,nStartRow, nEndCol,nEndRow, nTab, ScMF::Auto );
// Set Autofilter
@@ -5638,7 +5638,7 @@ bool ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
nDBStartCol<=nEndCol && nDBEndCol>=nStartCol )
{
if (ApplyFlagsTab( nDBStartCol,nDBStartRow, nDBEndCol,nDBStartRow,
- nDBTab, SC_MF_AUTO ))
+ nDBTab, ScMF::Auto ))
bChange = true;
}
}
@@ -5656,7 +5656,7 @@ bool ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
nDBStartCol<=nEndCol && nDBEndCol>=nStartCol )
{
if (ApplyFlagsTab( nDBStartCol,nDBStartRow, nDBEndCol,nDBStartRow,
- nDBTab, SC_MF_AUTO ))
+ nDBTab, ScMF::Auto ))
bChange = true;
}
}
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 6c098d920b3f..a8010a58ea55 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -912,7 +912,7 @@ void ScDPObject::Output( const ScAddress& rPos )
aOutRange.aStart.Tab(), InsertDeleteFlags::ALL );
pDoc->RemoveFlagsTab( aOutRange.aStart.Col(), aOutRange.aStart.Row(),
aOutRange.aEnd.Col(), aOutRange.aEnd.Row(),
- aOutRange.aStart.Tab(), SC_MF_AUTO );
+ aOutRange.aStart.Tab(), ScMF::Auto );
CreateOutput(); // create xSource and pOutput if not already done
@@ -924,7 +924,7 @@ void ScDPObject::Output( const ScAddress& rPos )
aOutRange = pOutput->GetOutputRange();
const ScAddress& s = aOutRange.aStart;
const ScAddress& e = aOutRange.aEnd;
- pDoc->ApplyFlagsTab(s.Col(), s.Row(), e.Col(), e.Row(), s.Tab(), SC_MF_DP_TABLE);
+ pDoc->ApplyFlagsTab(s.Col(), s.Row(), e.Col(), e.Row(), s.Tab(), ScMF::DpTable);
}
ScRange ScDPObject::GetOutputRangeByType( sal_Int32 nType )
@@ -3486,7 +3486,7 @@ void ScDPCollection::CopyToTab( SCTAB nOld, SCTAB nNew )
e.SetTab(nNew);
ScDPObject* pNew = new ScDPObject(rObj);
pNew->SetOutRange(aOutRange);
- mpDoc->ApplyFlagsTab(s.Col(), s.Row(), e.Col(), e.Row(), s.Tab(), SC_MF_DP_TABLE);
+ mpDoc->ApplyFlagsTab(s.Col(), s.Row(), e.Col(), e.Row(), s.Tab(), ScMF::DpTable);
aAdded.push_back(std::unique_ptr<ScDPObject>(pNew));
}
@@ -3608,7 +3608,7 @@ void ScDPCollection::FreeTable(ScDPObject* pDPObj)
const ScRange& rOutRange = pDPObj->GetOutRange();
const ScAddress& s = rOutRange.aStart;
const ScAddress& e = rOutRange.aEnd;
- mpDoc->RemoveFlagsTab(s.Col(), s.Row(), e.Col(), e.Row(), s.Tab(), SC_MF_DP_TABLE);
+ mpDoc->RemoveFlagsTab(s.Col(), s.Row(), e.Col(), e.Row(), s.Tab(), ScMF::DpTable);
TablesType::iterator itr = maTables.begin(), itrEnd = maTables.end();
for (; itr != itrEnd; ++itr)
{
@@ -3626,7 +3626,7 @@ bool ScDPCollection::InsertNewTable(ScDPObject* pDPObj)
const ScRange& rOutRange = pDPObj->GetOutRange();
const ScAddress& s = rOutRange.aStart;
const ScAddress& e = rOutRange.aEnd;
- mpDoc->ApplyFlagsTab(s.Col(), s.Row(), e.Col(), e.Row(), s.Tab(), SC_MF_DP_TABLE);
+ mpDoc->ApplyFlagsTab(s.Col(), s.Row(), e.Col(), e.Row(), s.Tab(), ScMF::DpTable);
maTables.push_back(std::unique_ptr<ScDPObject>(pDPObj));
return true;
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 425e93859287..f11964f6ba95 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -840,21 +840,21 @@ void ScDPOutput::FieldCell(
lcl_SetFrame( pDoc,nTab, nCol,nRow, nCol,nRow, 20 );
// For field button drawing
- sal_uInt16 nMergeFlag = 0;
+ ScMF nMergeFlag = ScMF::NONE;
if (rData.mbHasHiddenMember)
- nMergeFlag |= SC_MF_HIDDEN_MEMBER;
+ nMergeFlag |= ScMF::HiddenMember;
if (rData.mbPageDim)
{
- nMergeFlag |= SC_MF_BUTTON_POPUP;
- pDoc->ApplyFlagsTab(nCol, nRow, nCol, nRow, nTab, SC_MF_BUTTON);
+ nMergeFlag |= ScMF::ButtonPopup;
+ pDoc->ApplyFlagsTab(nCol, nRow, nCol, nRow, nTab, ScMF::Button);
pDoc->ApplyFlagsTab(nCol+1, nRow, nCol+1, nRow, nTab, nMergeFlag);
}
else
{
- nMergeFlag |= SC_MF_BUTTON;
+ nMergeFlag |= ScMF::Button;
if (!rData.mbDataLayout)
- nMergeFlag |= SC_MF_BUTTON_POPUP;
+ nMergeFlag |= ScMF::ButtonPopup;
pDoc->ApplyFlagsTab(nCol, nRow, nCol, nRow, nTab, nMergeFlag);
}
@@ -864,7 +864,7 @@ void ScDPOutput::FieldCell(
static void lcl_DoFilterButton( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab )
{
pDoc->SetString( nCol, nRow, nTab, ScGlobal::GetRscString(STR_CELL_FILTER) );
- pDoc->ApplyFlagsTab(nCol, nRow, nCol, nRow, nTab, SC_MF_BUTTON);
+ pDoc->ApplyFlagsTab(nCol, nRow, nCol, nRow, nTab, ScMF::Button);
}
void ScDPOutput::CalcSizes()
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index cd39a3606006..931f7d210a00 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -80,10 +80,10 @@ static void lcl_GetMergeRange( SCsCOL nX, SCsROW nY, SCSIZE nArrY,
}
else
{
- sal_uInt16 nOverlap = static_cast<const ScMergeFlagAttr*>(pDoc->GetAttr(
+ ScMF nOverlap = static_cast<const ScMergeFlagAttr*>(pDoc->GetAttr(
rStartX, rStartY, nTab, ATTR_MERGE_FLAG ))->GetValue();
- bHOver = ((nOverlap & SC_MF_HOR) != 0);
- bVOver = ((nOverlap & SC_MF_VER) != 0);
+ bHOver = bool(nOverlap & ScMF::Hor);
+ bVOver = bool(nOverlap & ScMF::Ver);
}
}
@@ -103,9 +103,9 @@ static void lcl_GetMergeRange( SCsCOL nX, SCsROW nY, SCSIZE nArrY,
}
else
{
- sal_uInt16 nOverlap = static_cast<const ScMergeFlagAttr*>(pDoc->GetAttr(
+ ScMF nOverlap = static_cast<const ScMergeFlagAttr*>(pDoc->GetAttr(
rStartX, rStartY, nTab, ATTR_MERGE_FLAG ))->GetValue();
- bVOver = ((nOverlap & SC_MF_VER) != 0);
+ bVOver = bool(nOverlap & ScMF::Ver);
}
}
@@ -532,15 +532,15 @@ void ScDocument::FillInfo(
const ScMergeAttr* pMergeAttr = static_cast<const ScMergeAttr*>(
&pPattern->GetItem(ATTR_MERGE));
bool bMerged = ( pMergeAttr != pDefMerge && *pMergeAttr != *pDefMerge );
- sal_uInt16 nOverlap = static_cast<const ScMergeFlagAttr*>( &pPattern->GetItemSet().
+ ScMF nOverlap = static_cast<const ScMergeFlagAttr*>( &pPattern->GetItemSet().
Get(ATTR_MERGE_FLAG))->GetValue();
- bool bHOverlapped = ((nOverlap & SC_MF_HOR) != 0);
- bool bVOverlapped = ((nOverlap & SC_MF_VER) != 0);
- bool bAutoFilter = ((nOverlap & SC_MF_AUTO) != 0);
- bool bPivotButton = ((nOverlap & SC_MF_BUTTON) != 0);
- bool bScenario = ((nOverlap & SC_MF_SCENARIO) != 0);
- bool bPivotPopupButton = ((nOverlap & SC_MF_BUTTON_POPUP) != 0);
- bool bFilterActive = ((nOverlap & SC_MF_HIDDEN_MEMBER) != 0);
+ bool bHOverlapped(nOverlap & ScMF::Hor);
+ bool bVOverlapped(nOverlap & ScMF::Ver);
+ bool bAutoFilter(nOverlap & ScMF::Auto);
+ bool bPivotButton(nOverlap & ScMF::Button);
+ bool bScenario(nOverlap & ScMF::Scenario);
+ bool bPivotPopupButton(nOverlap & ScMF::ButtonPopup);
+ bool bFilterActive(nOverlap & ScMF::HiddenMember);
if (bMerged||bHOverlapped||bVOverlapped)
bAnyMerged = true; // internal
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 3f0cc0177640..bdddb60c3568 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -338,7 +338,7 @@ void ScTable::InsertCol(
aCol[nStartCol-1].CopyToColumn(aCxt, nStartRow, nEndRow, InsertDeleteFlags::ATTRIB,
false, aCol[nStartCol+i] );
aCol[nStartCol+i].RemoveFlags( nStartRow, nEndRow,
- SC_MF_HOR | SC_MF_VER | SC_MF_AUTO );
+ ScMF::Hor | ScMF::Ver | ScMF::Auto );
aCol[nStartCol+i].ClearItems( nStartRow, nEndRow, nWhichArray );
}
}
@@ -910,8 +910,8 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
const ScMergeFlagAttr& rOldFlag = static_cast<const ScMergeFlagAttr&>(rSet.Get(ATTR_MERGE_FLAG));
if (rOldFlag.IsOverlapped())
{
- sal_Int16 nNewFlags = rOldFlag.GetValue() & ~( SC_MF_HOR | SC_MF_VER );
- if ( nNewFlags )
+ ScMF nNewFlags = rOldFlag.GetValue() & ~ScMF( ScMF::Hor | ScMF::Ver );
+ if ( nNewFlags != ScMF::NONE )
rNewSet.Put( ScMergeFlagAttr( nNewFlags ) );
else
rNewSet.ClearItem( ATTR_MERGE_FLAG );
@@ -2624,7 +2624,7 @@ void ScTable::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRem
}
bool ScTable::ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
- sal_Int16 nFlags )
+ ScMF nFlags )
{
bool bChanged = false;
if (ValidColRow(nStartCol, nStartRow) && ValidColRow(nEndCol, nEndRow))
@@ -2634,7 +2634,7 @@ bool ScTable::ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW
}
bool ScTable::RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
- sal_Int16 nFlags )
+ ScMF nFlags )
{
bool bChanged = false;
if (ValidColRow(nStartCol, nStartRow) && ValidColRow(nEndCol, nEndRow))
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index fcc467920ffc..4a21be213f88 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -543,8 +543,8 @@ void XclImpAutoFilterData::SetCellAttribs()
ScDocument& rDoc = pExcRoot->pIR->GetDoc();
for ( SCCOL nCol = StartCol(); nCol <= EndCol(); nCol++ )
{
- sal_Int16 nFlag = static_cast<const ScMergeFlagAttr*>( rDoc.GetAttr( nCol, StartRow(), Tab(), ATTR_MERGE_FLAG ))->GetValue();
- rDoc.ApplyAttr( nCol, StartRow(), Tab(), ScMergeFlagAttr( nFlag | SC_MF_AUTO) );
+ ScMF nFlag = static_cast<const ScMergeFlagAttr*>( rDoc.GetAttr( nCol, StartRow(), Tab(), ATTR_MERGE_FLAG ))->GetValue();
+ rDoc.ApplyAttr( nCol, StartRow(), Tab(), ScMergeFlagAttr( nFlag | ScMF::Auto) );
}
}
diff --git a/sc/source/filter/excel/exctools.cxx b/sc/source/filter/excel/exctools.cxx
index 6d98540d8d96..2792719573b9 100644
--- a/sc/source/filter/excel/exctools.cxx
+++ b/sc/source/filter/excel/exctools.cxx
@@ -240,7 +240,7 @@ void ExcScenario::Apply( const XclImpRoot& rRoot, const bool bLast )
sal_uInt16 nRow = iter->nRow;
OUString aVal = iter->GetValue();
- r.ApplyFlagsTab( nCol, nRow, nCol, nRow, nNewTab, SC_MF_SCENARIO );
+ r.ApplyFlagsTab( nCol, nRow, nCol, nRow, nNewTab, ScMF::Scenario );
r.SetString( nCol, nRow, nNewTab, aVal );
}
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index ef2a209c3bb9..7bda742c49bb 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -1472,12 +1472,12 @@ void XclImpPivotTable::ApplyMergeFlags(const ScRange& rOutRange, const ScDPSaveD
vector<ScAddress>::const_iterator itr = aFieldBtns.begin(), itrEnd = aFieldBtns.end();
for (; itr != itrEnd; ++itr)
{
- rDoc.ApplyFlagsTab(itr->Col(), itr->Row(), itr->Col(), itr->Row(), itr->Tab(), SC_MF_BUTTON);
+ rDoc.ApplyFlagsTab(itr->Col(), itr->Row(), itr->Col(), itr->Row(), itr->Tab(), ScMF::Button);
- sal_uInt16 nMFlag = SC_MF_BUTTON_POPUP;
+ ScMF nMFlag = ScMF::ButtonPopup;
OUString aName = rDoc.GetString(itr->Col(), itr->Row(), itr->Tab());
if (rSaveData.HasInvisibleMember(aName))
- nMFlag |= SC_MF_HIDDEN_MEMBER;
+ nMFlag |= ScMF::HiddenMember;
rDoc.ApplyFlagsTab(itr->Col()+1, itr->Row(), itr->Col()+1, itr->Row(), itr->Tab(), nMFlag);
}
@@ -1491,12 +1491,12 @@ void XclImpPivotTable::ApplyMergeFlags(const ScRange& rOutRange, const ScDPSaveD
vector<const ScDPSaveDimension*>::const_iterator itDim = aFieldDims.begin();
for (; itr != itrEnd; ++itr, ++itDim)
{
- sal_Int16 nMFlag = SC_MF_BUTTON;
+ ScMF nMFlag = ScMF::Button;
const ScDPSaveDimension* pDim = *itDim;
if (pDim->HasInvisibleMember())
- nMFlag |= SC_MF_HIDDEN_MEMBER;
+ nMFlag |= ScMF::HiddenMember;
if (!pDim->IsDataLayout())
- nMFlag |= SC_MF_BUTTON_POPUP;
+ nMFlag |= ScMF::ButtonPopup;
rDoc.ApplyFlagsTab(itr->Col(), itr->Row(), itr->Col(), itr->Row(), itr->Tab(), nMFlag);
}
}
@@ -1510,12 +1510,12 @@ void XclImpPivotTable::ApplyMergeFlags(const ScRange& rOutRange, const ScDPSaveD
vector<const ScDPSaveDimension*>::const_iterator itDim = aFieldDims.begin();
for (; itr != itrEnd; ++itr, ++itDim)
{
- sal_Int16 nMFlag = SC_MF_BUTTON;
+ ScMF nMFlag = ScMF::Button;
const ScDPSaveDimension* pDim = *itDim;
if (pDim->HasInvisibleMember())
- nMFlag |= SC_MF_HIDDEN_MEMBER;
+ nMFlag |= ScMF::HiddenMember;
if (!pDim->IsDataLayout())
- nMFlag |= SC_MF_BUTTON_POPUP;
+ nMFlag |= ScMF::ButtonPopup;
rDoc.ApplyFlagsTab(itr->Col(), itr->Row(), itr->Col(), itr->Row(), itr->Tab(), nMFlag);
}
}
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index e31c215b230e..83a93fbe98bd 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -291,20 +291,20 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
if ( pE->nColOverlap > 1 )
mpDoc->ApplyFlagsTab( nCol+1, nRow,
nCol + pE->nColOverlap - 1, nRow, nTab,
- SC_MF_HOR );
+ ScMF::Hor );
if ( pE->nRowOverlap > 1 )
{
nRO = nRow + pE->nRowOverlap - 1;
mpDoc->ApplyFlagsTab( nCol, nRow+1,
nCol, nRO , nTab,
- SC_MF_VER );
+ ScMF::Ver );
if ( nRO > nOverlapRowMax )
nOverlapRowMax = nRO;
}
if ( pE->nColOverlap > 1 && pE->nRowOverlap > 1 )
mpDoc->ApplyFlagsTab( nCol+1, nRow+1,
nCol + pE->nColOverlap - 1, nRO, nTab,
- SC_MF_HOR | SC_MF_VER );
+ ScMF::Hor | ScMF::Ver );
}
const ScStyleSheet* pStyleSheet =
mpDoc->GetPattern( nCol, nRow, nTab )->GetStyleSheet();
diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index 82e63d5db5e4..feb1c14639ca 100644
--- a/sc/source/filter/xml/xmldpimp.cxx
+++ b/sc/source/filter/xml/xmldpimp.cxx
@@ -375,16 +375,16 @@ void ScXMLDataPilotTableContext::SetButtons()
{
// Page dimension needs 2 buttons.
- pDoc->ApplyFlagsTab(aScAddress.Col(), aScAddress.Row(), aScAddress.Col(), aScAddress.Row(), aScAddress.Tab(), SC_MF_BUTTON);
+ pDoc->ApplyFlagsTab(aScAddress.Col(), aScAddress.Row(), aScAddress.Col(), aScAddress.Row(), aScAddress.Tab(), ScMF::Button);
- sal_Int16 nMFlag = SC_MF_BUTTON_POPUP;
+ ScMF nMFlag = ScMF::ButtonPopup;
if (bHasHidden)
- nMFlag |= SC_MF_HIDDEN_MEMBER;
+ nMFlag |= ScMF::HiddenMember;
pDoc->ApplyFlagsTab(aScAddress.Col()+1, aScAddress.Row(), aScAddress.Col()+1, aScAddress.Row(), aScAddress.Tab(), nMFlag);
}
else
{
- sal_Int16 nMFlag = SC_MF_BUTTON;
+ ScMF nMFlag = ScMF::Button;
if (bDataLayout)
{
// Data layout dimension only has a plain button with no popup.
@@ -393,9 +393,9 @@ void ScXMLDataPilotTableContext::SetButtons()
{
// Normal dimension has a popup arrow button.
if (bHasHidden)
- nMFlag |= SC_MF_HIDDEN_MEMBER;
+ nMFlag |= ScMF::HiddenMember;
- nMFlag |= SC_MF_BUTTON_POPUP;
+ nMFlag |= ScMF::ButtonPopup;
}
pDoc->ApplyFlagsTab(aScAddress.Col(), aScAddress.Row(), aScAddress.Col(), aScAddress.Row(), aScAddress.Tab(), nMFlag);
diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx
index 22a4f7622afd..83a587f65a7b 100644
--- a/sc/source/filter/xml/xmldrani.cxx
+++ b/sc/source/filter/xml/xmldrani.cxx
@@ -425,7 +425,7 @@ bool setAutoFilterFlags(ScDocument& rDoc, const ScDBData& rData)
rData.GetArea(aRange);
rDoc.ApplyFlagsTab(
aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aStart.Row(),
- aRange.aStart.Tab(), SC_MF_AUTO);
+ aRange.aStart.Tab(), ScMF::Auto);
return false;
}
diff --git a/sc/source/filter/xml/xmlsceni.cxx b/sc/source/filter/xml/xmlsceni.cxx
index 9e44757cee16..6259b93de4f3 100644
--- a/sc/source/filter/xml/xmlsceni.cxx
+++ b/sc/source/filter/xml/xmlsceni.cxx
@@ -150,7 +150,7 @@ void ScXMLTableScenarioContext::EndElement()
ScRange* pRange(aScenarioRanges[ i ]);
if( pRange )
pDoc->ApplyFlagsTab( pRange->aStart.Col(), pRange->aStart.Row(),
- pRange->aEnd.Col(), pRange->aEnd.Row(), nCurrTable, SC_MF_SCENARIO );
+ pRange->aEnd.Col(), pRange->aEnd.Row(), nCurrTable, ScMF::Scenario );
}
pDoc->SetActiveScenario( nCurrTable, bIsActive );
}
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 89b2d26f493f..43887c4ff30d 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -1343,7 +1343,7 @@ bool ScDBDocFunc::RemovePivotTable(ScDPObject& rDPObj, bool bRecord, bool bApi)
nTab, InsertDeleteFlags::ALL );
rDoc.RemoveFlagsTab( aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row(),
- nTab, SC_MF_AUTO );
+ nTab, ScMF::Auto );
rDoc.GetDPCollection()->FreeTable(&rDPObj); // object is deleted here
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index dad4824f1a1c..7f47245233f7 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1840,14 +1840,14 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
const ScMergeAttr* pMergeFlag = static_cast<const ScMergeAttr*>( &pPattern->GetItem(ATTR_MERGE) );
pMergeFlagAttr = static_cast<const ScMergeFlagAttr*>( &pPattern->GetItem(ATTR_MERGE_FLAG) );
- sal_Int16 nNewFlags = pMergeFlagAttr->GetValue() & ( SC_MF_HOR | SC_MF_VER );
- if( ( pMergeFlag && pMergeFlag->IsMerged() ) || nNewFlags == SC_MF_HOR || nNewFlags == SC_MF_VER )
+ ScMF nNewFlags = pMergeFlagAttr->GetValue() & ( ScMF::Hor | ScMF::Ver );
+ if( ( pMergeFlag && pMergeFlag->IsMerged() ) || nNewFlags == ScMF::Hor || nNewFlags == ScMF::Ver )
{
ScRange aRange( nTestCol, nTestRow1, i );
rDoc.ExtendOverlapped(aRange);
rDoc.ExtendMerge(aRange, true);
- if( nTestRow1 < nTestRow2 && nNewFlags == SC_MF_HOR )
+ if( nTestRow1 < nTestRow2 && nNewFlags == ScMF::Hor )
{
for( SCROW nTestRow = nTestRow1; nTestRow <= nTestRow2; nTestRow++ )
{
@@ -2264,14 +2264,14 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
const ScMergeAttr* pMergeFlag = static_cast<const ScMergeAttr*>( &pPattern->GetItem( ATTR_MERGE ) );
pMergeFlagAttr = static_cast<const ScMergeFlagAttr*>( &pPattern->GetItem( ATTR_MERGE_FLAG ) );
- sal_Int16 nNewFlags = pMergeFlagAttr->GetValue() & ( SC_MF_HOR | SC_MF_VER );
- if( ( pMergeFlag && pMergeFlag->IsMerged() ) || nNewFlags == SC_MF_HOR || nNewFlags == SC_MF_VER )
+ ScMF nNewFlags = pMergeFlagAttr->GetValue() & ( ScMF::Hor | ScMF::Ver );
+ if( ( pMergeFlag && pMergeFlag->IsMerged() ) || nNewFlags == ScMF::Hor || nNewFlags == ScMF::Ver )
{
ScRange aRange( nTestCol, nTestRow1, i );
rDoc.ExtendOverlapped( aRange );
rDoc.ExtendMerge( aRange, true );
- if( nTestRow1 < nTestRow2 && nNewFlags == SC_MF_HOR )
+ if( nTestRow1 < nTestRow2 && nNewFlags == ScMF::Hor )
{
for( SCROW nTestRow = nTestRow1; nTestRow <= nTestRow2; nTestRow++ )
{
@@ -4831,7 +4831,7 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, bool bRecord )
rDoc.RemoveFlagsTab( aExtended.aStart.Col(), aExtended.aStart.Row(),
aExtended.aEnd.Col(), aExtended.aEnd.Row(), nTab,
- SC_MF_HOR | SC_MF_VER );
+ ScMF::Hor | ScMF::Ver );
rDoc.ExtendMerge( aRefresh, true );
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index a2d7dd018549..3b9454256236 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -98,7 +98,7 @@ bool ScDocShell::IsEditable() const
void ScDocShell::DBAreaDeleted( SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW /* nY2 */ )
{
ScDocShellModificator aModificator( *this );
- aDocument.RemoveFlagsTab( nX1, nY1, nX2, nY1, nTab, SC_MF_AUTO );
+ aDocument.RemoveFlagsTab( nX1, nY1, nX2, nY1, nTab, ScMF::Auto );
PostPaint( nX1, nY1, nTab, nX2, nY1, nTab, PAINT_GRID );
// No SetDocumentModified, as the unnamed database range might have to be restored later.
// The UNO hint is broadcast directly instead, to keep UNO objects in valid state.
@@ -378,7 +378,7 @@ void ScDocShell::CancelAutoDBRange()
{
// restore AutoFilter buttons
pOldAutoDBRange->GetArea( nRangeTab, nRangeX1, nRangeY1, nRangeX2, nRangeY2 );
- aDocument.ApplyFlagsTab( nRangeX1, nRangeY1, nRangeX2, nRangeY1, nRangeTab, SC_MF_AUTO );
+ aDocument.ApplyFlagsTab( nRangeX1, nRangeY1, nRangeX2, nRangeY1, nRangeTab, ScMF::Auto );
PostPaint( nRangeX1, nRangeY1, nRangeTab, nRangeX2, nRangeY1, nRangeTab, PAINT_GRID );
}
}
@@ -813,7 +813,7 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const OUString& rName, const OUStrin
aDocument.ApplyPatternAreaTab( 0,0, MAXCOL,MAXROW, nNewTab, aProtPattern );
ScPatternAttr aPattern( aDocument.GetPool() );
- aPattern.GetItemSet().Put( ScMergeFlagAttr( SC_MF_SCENARIO ) );
+ aPattern.GetItemSet().Put( ScMergeFlagAttr( ScMF::Scenario ) );
aPattern.GetItemSet().Put( ScProtectionAttr( true ) );
aDocument.ApplySelectionPattern( aPattern, aDestMark );
diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx
index 753f8dbac39a..64ce53a7bcca 100644
--- a/sc/source/ui/undo/undobase.cxx
+++ b/sc/source/ui/undo/undobase.cxx
@@ -512,7 +512,7 @@ void ScDBFuncUndo::EndUndo()
{
// restore AutoFilter buttons
pAutoDBRange->GetArea( nRangeTab, nRangeX1, nRangeY1, nRangeX2, nRangeY2 );
- rDoc.ApplyFlagsTab( nRangeX1, nRangeY1, nRangeX2, nRangeY1, nRangeTab, SC_MF_AUTO );
+ rDoc.ApplyFlagsTab( nRangeX1, nRangeY1, nRangeX2, nRangeY1, nRangeTab, ScMF::Auto );
pDocShell->PostPaint( nRangeX1, nRangeY1, nRangeTab, nRangeX2, nRangeY1, nRangeTab, PAINT_GRID );
}
}
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 9d5b047c546e..a4a080245df4 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -591,7 +591,7 @@ void ScUndoDeleteMulti::DoChange() const
ScDocument& rDoc = pDocShell->GetDocument();
SCCOL nEndCol = MAXCOL;
SCROW nEndRow = MAXROW;
- rDoc.RemoveFlagsTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, SC_MF_HOR | SC_MF_VER );
+ rDoc.RemoveFlagsTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, ScMF::Hor | ScMF::Ver );
rDoc.ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab, true );
}
@@ -2181,7 +2181,7 @@ void ScUndoRemoveMerge::Redo()
rDoc.RemoveFlagsTab( maOption.mnStartCol, maOption.mnStartRow,
maOption.mnEndCol, maOption.mnEndRow, nTab,
- SC_MF_HOR | SC_MF_VER );
+ ScMF::Hor | ScMF::Ver );
rDoc.ExtendMerge(aRange, true);
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 77e35c40cd34..d4998d996276 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -938,9 +938,9 @@ void ScUndoAutoFilter::DoChange( bool bUndo )
pDBData->GetArea( nRangeTab, nRangeX1, nRangeY1, nRangeX2, nRangeY2 );
if ( bNewFilter )
- rDoc.ApplyFlagsTab( nRangeX1, nRangeY1, nRangeX2, nRangeY1, nRangeTab, SC_MF_AUTO );
+ rDoc.ApplyFlagsTab( nRangeX1, nRangeY1, nRangeX2, nRangeY1, nRangeTab, ScMF::Auto );
else
- rDoc.RemoveFlagsTab( nRangeX1, nRangeY1, nRangeX2, nRangeY1, nRangeTab, SC_MF_AUTO );
+ rDoc.RemoveFlagsTab( nRangeX1, nRangeY1, nRangeX2, nRangeY1, nRangeTab, ScMF::Auto );
pDocShell->PostPaint( nRangeX1, nRangeY1, nRangeTab, nRangeX2, nRangeY1, nRangeTab, PAINT_GRID );
}
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 6d2dd3fdb39a..ce1382a79203 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -8015,7 +8015,7 @@ void SAL_CALL ScTableSheetObj::addRanges( const uno::Sequence<table::CellRangeAd
// Szenario-Ranges sind durch Attribut gekennzeichnet
ScPatternAttr aPattern( rDoc.GetPool() );
- aPattern.GetItemSet().Put( ScMergeFlagAttr( SC_MF_SCENARIO ) );
+ aPattern.GetItemSet().Put( ScMergeFlagAttr( ScMF::Scenario ) );
aPattern.GetItemSet().Put( ScProtectionAttr( true ) );
pDocSh->GetDocFunc().ApplyAttributes( aMarkData, aPattern, true, true );
}
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 70921f106245..850f447e6c6e 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -2024,11 +2024,11 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue(
if (bAutoFilter)
rDoc.ApplyFlagsTab( aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aStart.Row(),
- aRange.aStart.Tab(), SC_MF_AUTO );
+ aRange.aStart.Tab(), ScMF::Auto );
else if (!bAutoFilter)
rDoc.RemoveFlagsTab(aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aStart.Row(),
- aRange.aStart.Tab(), SC_MF_AUTO );
+ aRange.aStart.Tab(), ScMF::Auto );
ScRange aPaintRange(aRange.aStart, aRange.aEnd);
aPaintRange.aEnd.SetRow(aPaintRange.aStart.Row());
pDocShell->PostPaint(aPaintRange, PAINT_GRID);
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index f54360255d06..207a9ecea36d 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -427,11 +427,11 @@ void SAL_CALL ScVbaWorksheet::setAutoFilterMode( sal_Bool bAutoFilterMode ) thro
if (bAutoFilterMode)
rDoc.ApplyFlagsTab( aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aStart.Row(),
- aRange.aStart.Tab(), SC_MF_AUTO );
+ aRange.aStart.Tab(), ScMF::Auto );
else if (!bAutoFilterMode)
rDoc.RemoveFlagsTab(aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aStart.Row(),
- aRange.aStart.Tab(), SC_MF_AUTO );
+ aRange.aStart.Tab(), ScMF::Auto );
ScRange aPaintRange(aRange.aStart, aRange.aEnd);
aPaintRange.aEnd.SetRow(aPaintRange.aStart.Row());
pDocShell->PostPaint(aPaintRange, PAINT_GRID);
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index c1de01ee4a33..407f0298be82 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;
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 523349fd4959..00af1c33a2a7 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -2532,14 +2532,14 @@ void ScOutputData::DrawClipMarks()
long nStartPosY = nPosY;
while ( nOverX > 0 && ( static_cast<const ScMergeFlagAttr*>(mpDoc->GetAttr(
- nOverX, nOverY, nTab, ATTR_MERGE_FLAG ))->GetValue() & SC_MF_HOR ) )
+ nOverX, nOverY, nTab, ATTR_MERGE_FLAG ))->GetValue() & ScMF::Hor ) )
{
--nOverX;
nStartPosX -= nLayoutSign * (long) ( mpDoc->GetColWidth(nOverX,nTab) * mnPPTX );
}
while ( nOverY > 0 && ( static_cast<const ScMergeFlagAttr*>(mpDoc->GetAttr(
- nOverX, nOverY, nTab, ATTR_MERGE_FLAG ))->GetValue() & SC_MF_VER ) )
+ nOverX, nOverY, nTab, ATTR_MERGE_FLAG ))->GetValue() & ScMF::Ver ) )
{
--nOverY;
nStartPosY -= nLayoutSign * (long) ( mpDoc->GetRowHeight(nOverY,nTab) * mnPPTY );
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index f7b9801b850c..a938513b0ff8 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -936,10 +936,10 @@ bool ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
}
else
{
- sal_uInt16 nOverlap = static_cast<const ScMergeFlagAttr*>(mpDoc->GetAttr(
+ ScMF nOverlap = static_cast<const ScMergeFlagAttr*>(mpDoc->GetAttr(
rOverX, rOverY, nTab, ATTR_MERGE_FLAG ))->GetValue();
- bHOver = ((nOverlap & SC_MF_HOR) != 0);
- bVOver = ((nOverlap & SC_MF_VER) != 0);
+ bHOver = bool(nOverlap & ScMF::Hor);
+ bVOver = bool(nOverlap & ScMF::Ver);
}
}
@@ -962,9 +962,9 @@ bool ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
}
else
{
- sal_uInt16 nOverlap = static_cast<const ScMergeFlagAttr*>(mpDoc->GetAttr(
+ ScMF nOverlap = static_cast<const ScMergeFlagAttr*>(mpDoc->GetAttr(
rOverX, rOverY, nTab, ATTR_MERGE_FLAG ))->GetValue();
- bVOver = ((nOverlap & SC_MF_VER) != 0);
+ bVOver = bool(nOverlap & ScMF::Ver);
}
}
@@ -1331,7 +1331,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
// (for automatic line break: only if not formatting for printer, as in ScColumn::GetNeededSize)
if ( eType==OUTTYPE_WINDOW &&
- ( static_cast<const ScMergeFlagAttr&>(rPattern.GetItem(ATTR_MERGE_FLAG)).GetValue() & (SC_MF_AUTO|SC_MF_BUTTON|SC_MF_BUTTON_POPUP) ) &&
+ ( static_cast<const ScMergeFlagAttr&>(rPattern.GetItem(ATTR_MERGE_FLAG)).GetValue() & (ScMF::Auto|ScMF::Button|ScMF::ButtonPopup) ) &&
( !bBreak || mpRefDevice == pFmtDevice ) )
{
// filter drop-down width is now independent from row height
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 537f58a17754..1e2205425fc4 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1843,7 +1843,7 @@ bool ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
{
OSL_FAIL("merge error found");
- pDoc->RemoveFlagsTab( 0,0, MAXCOL,MAXROW, nTabNo, SC_MF_HOR | SC_MF_VER );
+ pDoc->RemoveFlagsTab( 0,0, MAXCOL,MAXROW, nTabNo, ScMF::Hor | ScMF::Ver );
SCCOL nEndCol = MAXCOL;
SCROW nEndRow = MAXROW;
pDoc->ExtendMerge( 0,0, nEndCol,nEndRow, nTabNo, true );
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 3d30180d8838..93a41953f447 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2055,7 +2055,7 @@ void ScViewFunc::ExtendScenario()
ScDocument* pDoc = GetViewData().GetDocument();
ScPatternAttr aPattern( pDoc->GetPool() );
- aPattern.GetItemSet().Put( ScMergeFlagAttr( SC_MF_SCENARIO ) );
+ aPattern.GetItemSet().Put( ScMergeFlagAttr( ScMF::Scenario ) );
aPattern.GetItemSet().Put( ScProtectionAttr( true ) );
ApplySelectionPattern(aPattern);
}
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 2062d8e8bbad..a07ed3747e9e 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1689,7 +1689,7 @@ void ScViewFunc::DeleteMulti( bool bRows, bool bRecord )
SCCOL nEndCol = MAXCOL;
SCROW nEndRow = MAXROW;
- rDoc.RemoveFlagsTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, SC_MF_HOR | SC_MF_VER );
+ rDoc.RemoveFlagsTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, ScMF::Hor | ScMF::Ver );
rDoc.ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab, true );
}