diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-22 15:15:17 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-09-04 09:05:34 -0500 |
commit | 8e4dc1d760d85e09bbc3f3bbb5b8be2947db1b63 (patch) | |
tree | dbb60d3d9c8f931ed98e6ac864695d1d9046cee5 /sc/inc | |
parent | a62a046df3302e5763b7a568ac25032bb1501d44 (diff) |
create type-safe bitfield for sc insert/delete flags
The most important part of the change is in sc/inc/global.hxx
It creates a type-safe struct that prevents the accidental interaction
between regular integer types and the flags struct.
It also provides utility methods that make combining and testing the
flags type-safe.
Change-Id: Ibc5b20058b1655df913490682b679afd1297b36d
Reviewed-on: https://gerrit.libreoffice.org/11071
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/clipcontext.hxx | 12 | ||||
-rw-r--r-- | sc/inc/column.hxx | 12 | ||||
-rw-r--r-- | sc/inc/document.hxx | 34 | ||||
-rw-r--r-- | sc/inc/global.hxx | 84 | ||||
-rw-r--r-- | sc/inc/scabstdlg.hxx | 8 | ||||
-rw-r--r-- | sc/inc/table.hxx | 10 |
6 files changed, 101 insertions, 59 deletions
diff --git a/sc/inc/clipcontext.hxx b/sc/inc/clipcontext.hxx index 7a2eb441f4e3..4017ddab514c 100644 --- a/sc/inc/clipcontext.hxx +++ b/sc/inc/clipcontext.hxx @@ -52,8 +52,8 @@ class CopyFromClipContext : public ClipContextBase SCTAB mnTabEnd; ScDocument* mpRefUndoDoc; ScDocument* mpClipDoc; - sal_uInt16 mnInsertFlag; - sal_uInt16 mnDeleteFlag; + InsertDeleteFlags mnInsertFlag; + InsertDeleteFlags mnDeleteFlag; ScCellValue maSingleCell; ScConditionalFormatList* mpCondFormatList; const ScPatternAttr* mpSinglePattern; @@ -76,7 +76,7 @@ public: }; CopyFromClipContext(ScDocument& rDoc, - ScDocument* pRefUndoDoc, ScDocument* pClipDoc, sal_uInt16 nInsertFlag, + ScDocument* pRefUndoDoc, ScDocument* pClipDoc, InsertDeleteFlags nInsertFlag, bool bAsLink, bool bSkipAttrForEmptyCells); virtual ~CopyFromClipContext(); @@ -91,10 +91,10 @@ public: ScDocument* getUndoDoc() { return mpRefUndoDoc;} ScDocument* getClipDoc() { return mpClipDoc;} - sal_uInt16 getInsertFlag() const { return mnInsertFlag;} + InsertDeleteFlags getInsertFlag() const { return mnInsertFlag;} - void setDeleteFlag( sal_uInt16 nFlag ); - sal_uInt16 getDeleteFlag() const { return mnDeleteFlag;} + void setDeleteFlag( InsertDeleteFlags nFlag ); + InsertDeleteFlags getDeleteFlag() const { return mnDeleteFlag;} ScCellValue& getSingleCell() { return maSingleCell;} diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index a14a43f24473..893ef1391e68 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -229,8 +229,8 @@ public: void InsertRow( SCROW nStartRow, SCSIZE nSize ); void DeleteRow( SCROW nStartRow, SCSIZE nSize ); void DeleteArea( - SCROW nStartRow, SCROW nEndRow, sal_uInt16 nDelFlag, bool bBroadcast = true ); - void DeleteRanges( const std::vector<sc::RowSpan>& rRanges, sal_uInt16 nDelFlag, bool bBroadcast ); + SCROW nStartRow, SCROW nEndRow, InsertDeleteFlags nDelFlag, bool bBroadcast = true ); + void DeleteRanges( const std::vector<sc::RowSpan>& rRanges, InsertDeleteFlags nDelFlag, bool bBroadcast ); void CopyToClip( sc::CopyToClipContext& rCxt, SCROW nRow1, SCROW nRow2, ScColumn& rColumn ) const; @@ -266,11 +266,11 @@ public: const ScRangeList& rRanges, ScFunctionData& rData, ScFlatBoolRowSegments& rHiddenRows ); void CopyToColumn( - sc::CopyToDocContext& rCxt, SCROW nRow1, SCROW nRow2, sal_uInt16 nFlags, bool bMarked, + sc::CopyToDocContext& rCxt, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked, ScColumn& rColumn, const ScMarkData* pMarkData = NULL, bool bAsLink = false) const; void UndoToColumn( - sc::CopyToDocContext& rCxt, SCROW nRow1, SCROW nRow2, sal_uInt16 nFlags, bool bMarked, + sc::CopyToDocContext& rCxt, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked, ScColumn& rColumn, const ScMarkData* pMarkData = NULL) const; void CopyScenarioFrom( const ScColumn& rSrcCol ); @@ -445,7 +445,7 @@ public: void RemoveProtected( SCROW nStartRow, SCROW nEndRow ); SCsROW ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray = NULL ); - void DeleteSelection( sal_uInt16 nDelFlag, const ScMarkData& rMark, bool bBroadcast ); + void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast ); void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark ); void ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark ); @@ -636,7 +636,7 @@ private: void CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn& rDestCol) const; void DeleteCells( - sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, sal_uInt16 nDelFlag, + sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nDelFlag, std::vector<SCROW>& rDeleted ); /** diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index ad99322cac96..88e062397117 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1203,10 +1203,10 @@ public: void DeleteObjectsInSelection( const ScMarkData& rMark ); void DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - const ScMarkData& rMark, sal_uInt16 nDelFlag); - SC_DLLPUBLIC void DeleteAreaTab(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - SCTAB nTab, sal_uInt16 nDelFlag); - void DeleteAreaTab(const ScRange& rRange, sal_uInt16 nDelFlag); + const ScMarkData& rMark, InsertDeleteFlags nDelFlag); + SC_DLLPUBLIC void DeleteAreaTab(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, + SCTAB nTab, InsertDeleteFlags nDelFlag); + void DeleteAreaTab(const ScRange& rRange, InsertDeleteFlags nDelFlag); void CopyToClip(const ScClipParam& rClipParam, ScDocument* pClipDoc, const ScMarkData* pMarks = NULL, bool bAllTabs = false, bool bKeepScenarioFlags = false, @@ -1250,14 +1250,14 @@ public: void StartListeningFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - const ScMarkData& rMark, sal_uInt16 nInsFlag ); + const ScMarkData& rMark, InsertDeleteFlags nInsFlag ); void BroadcastFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - const ScMarkData& rMark, sal_uInt16 nInsFlag ); + const ScMarkData& rMark, InsertDeleteFlags nInsFlag ); /** If pDestRanges is given it overrides rDestRange, rDestRange in this case is the overall encompassing range. */ void CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMark, - sal_uInt16 nInsFlag, + InsertDeleteFlags nInsFlag, ScDocument* pRefUndoDoc = NULL, ScDocument* pClipDoc = NULL, bool bResetCut = true, @@ -1267,7 +1267,7 @@ public: const ScRangeList * pDestRanges = NULL ); void CopyMultiRangeFromClip(const ScAddress& rDestPos, const ScMarkData& rMark, - sal_uInt16 nInsFlag, ScDocument* pClipDoc, + InsertDeleteFlags nInsFlag, ScDocument* pClipDoc, bool bResetCut = true, bool bAsLink = false, bool bIncludeFiltered = true, bool bSkipAttrForEmpty = false); @@ -1279,7 +1279,7 @@ public: bool IsClipboardSource() const; - SC_DLLPUBLIC void TransposeClip( ScDocument* pTransClip, sal_uInt16 nFlags, bool bAsLink ); + SC_DLLPUBLIC void TransposeClip( ScDocument* pTransClip, InsertDeleteFlags nFlags, bool bAsLink ); ScClipParam& GetClipParam(); void SetClipParam(const ScClipParam& rParam); @@ -1288,10 +1288,10 @@ public: ScDocument* pSrcDoc ); void FillTab( const ScRange& rSrcArea, const ScMarkData& rMark, - sal_uInt16 nFlags, sal_uInt16 nFunction, + InsertDeleteFlags nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bAsLink ); void FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark, - sal_uInt16 nFlags, sal_uInt16 nFunction, + InsertDeleteFlags nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bAsLink ); void TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nType ); @@ -1306,18 +1306,18 @@ public: // don't use anymore: void CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, - sal_uInt16 nFlags, bool bMarked, ScDocument* pDestDoc, + InsertDeleteFlags nFlags, bool bMarked, ScDocument* pDestDoc, const ScMarkData* pMarks = NULL, bool bColRowFlags = true); void UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, - sal_uInt16 nFlags, bool bMarked, ScDocument* pDestDoc, + InsertDeleteFlags nFlags, bool bMarked, ScDocument* pDestDoc, const ScMarkData* pMarks = NULL); void CopyToDocument(const ScRange& rRange, - sal_uInt16 nFlags, bool bMarked, ScDocument* pDestDoc, + InsertDeleteFlags nFlags, bool bMarked, ScDocument* pDestDoc, const ScMarkData* pMarks = NULL, bool bColRowFlags = true); void UndoToDocument(const ScRange& rRange, - sal_uInt16 nFlags, bool bMarked, ScDocument* pDestDoc, + InsertDeleteFlags nFlags, bool bMarked, ScDocument* pDestDoc, const ScMarkData* pMarks = NULL); void CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario = false ); @@ -1486,8 +1486,8 @@ public: SC_DLLPUBLIC void ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark, ScEditDataArray* pDataArray = NULL ); - void DeleteSelection( sal_uInt16 nDelFlag, const ScMarkData& rMark, bool bBroadcast = true ); - void DeleteSelectionTab( SCTAB nTab, sal_uInt16 nDelFlag, const ScMarkData& rMark, bool bBroadcast = true ); + void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast = true ); + void DeleteSelectionTab( SCTAB nTab, InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast = true ); SC_DLLPUBLIC void SetColWidth( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth ); SC_DLLPUBLIC void SetColWidthOnly( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth ); diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index fb2e120cf465..b4758502393e 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -154,29 +154,71 @@ const ScBreakType BREAK_NONE = 0; const ScBreakType BREAK_PAGE = 1; const ScBreakType BREAK_MANUAL = 2; -// insert/delete flags -const sal_uInt16 IDF_NONE = 0x0000; -const sal_uInt16 IDF_VALUE = 0x0001; /// Numeric values (and numeric results if IDF_FORMULA is not set). -const sal_uInt16 IDF_DATETIME = 0x0002; /// Dates, times, datetime values. -const sal_uInt16 IDF_STRING = 0x0004; /// Strings (and string results if IDF_FORMULA is not set). -const sal_uInt16 IDF_NOTE = 0x0008; /// Cell notes. -const sal_uInt16 IDF_FORMULA = 0x0010; /// Formula cells. -const sal_uInt16 IDF_HARDATTR = 0x0020; /// Hard cell attributes. -const sal_uInt16 IDF_STYLES = 0x0040; /// Cell styles. -const sal_uInt16 IDF_OBJECTS = 0x0080; /// Drawing objects. -const sal_uInt16 IDF_EDITATTR = 0x0100; /// Rich-text attributes. -const sal_uInt16 IDF_OUTLINE = 0x0800; /// Sheet / outlining (grouping) information -const sal_uInt16 IDF_NOCAPTIONS = 0x0200; /// Internal use only (undo etc.): do not copy/delete caption objects of cell notes. -const sal_uInt16 IDF_ADDNOTES = 0x0400; /// Internal use only (copy from clip): do not delete existing cell contents when pasting notes. -const sal_uInt16 IDF_SPECIAL_BOOLEAN = 0x1000; -const sal_uInt16 IDF_ATTRIB = IDF_HARDATTR | IDF_STYLES; -const sal_uInt16 IDF_CONTENTS = IDF_VALUE | IDF_DATETIME | IDF_STRING | IDF_NOTE | IDF_FORMULA | IDF_OUTLINE; -const sal_uInt16 IDF_ALL = IDF_CONTENTS | IDF_ATTRIB | IDF_OBJECTS; - -BOOST_STATIC_ASSERT((IDF_ATTRIB & IDF_CONTENTS) == 0); +// insert/delete flags - typesafe bitfield +struct InsertDeleteFlags SAL_FINAL { +private: + sal_uInt16 v; + // hidden so that it doesn't accidentally get called in constructor initialiser lists + explicit InsertDeleteFlags(sal_uInt16 _v) : v(_v) {} +public: + static InsertDeleteFlags fromInt(sal_uInt16 v) { return InsertDeleteFlags(v); } + operator bool() const { return v != 0; } + sal_uInt16 val() const { return v; } + bool operator ==(const InsertDeleteFlags& other) const { return v == other.v; } + bool operator !=(const InsertDeleteFlags& other) const { return v != other.v; } +private: + // disallow implicit conversion to int + operator int() const { return v; } +}; +// make combining these type-safe +inline InsertDeleteFlags operator| (const InsertDeleteFlags& lhs, const InsertDeleteFlags& rhs) +{ + return InsertDeleteFlags::fromInt(lhs.val() | rhs.val()); +} +inline InsertDeleteFlags operator& (const InsertDeleteFlags& lhs, const InsertDeleteFlags& rhs) +{ + return InsertDeleteFlags::fromInt(lhs.val() & rhs.val()); +} +inline InsertDeleteFlags& operator|= (InsertDeleteFlags& lhs, const InsertDeleteFlags& rhs) +{ + lhs = InsertDeleteFlags::fromInt(lhs.val() | rhs.val()); + return lhs; +} +inline InsertDeleteFlags& operator&= (InsertDeleteFlags& lhs, const InsertDeleteFlags& rhs) +{ + lhs = InsertDeleteFlags::fromInt(lhs.val() & rhs.val()); + return lhs; +} + +const InsertDeleteFlags IDF_NONE = InsertDeleteFlags::fromInt(0x0000); +const InsertDeleteFlags IDF_VALUE = InsertDeleteFlags::fromInt(0x0001); /// Numeric values (and numeric results if IDF_FORMULA is not set). +const InsertDeleteFlags IDF_DATETIME = InsertDeleteFlags::fromInt(0x0002); /// Dates, times, datetime values. +const InsertDeleteFlags IDF_STRING = InsertDeleteFlags::fromInt(0x0004); /// Strings (and string results if IDF_FORMULA is not set). +const InsertDeleteFlags IDF_NOTE = InsertDeleteFlags::fromInt(0x0008); /// Cell notes. +const InsertDeleteFlags IDF_FORMULA = InsertDeleteFlags::fromInt(0x0010); /// Formula cells. +const InsertDeleteFlags IDF_HARDATTR = InsertDeleteFlags::fromInt(0x0020); /// Hard cell attributes. +const InsertDeleteFlags IDF_STYLES = InsertDeleteFlags::fromInt(0x0040); /// Cell styles. +const InsertDeleteFlags IDF_OBJECTS = InsertDeleteFlags::fromInt(0x0080); /// Drawing objects. +const InsertDeleteFlags IDF_EDITATTR = InsertDeleteFlags::fromInt(0x0100); /// Rich-text attributes. +const InsertDeleteFlags IDF_OUTLINE = InsertDeleteFlags::fromInt(0x0800); /// Sheet / outlining (grouping) information +const InsertDeleteFlags IDF_NOCAPTIONS = InsertDeleteFlags::fromInt(0x0200); /// Internal use only (undo etc.): do not copy/delete caption objects of cell notes. +const InsertDeleteFlags IDF_ADDNOTES = InsertDeleteFlags::fromInt(0x0400); /// Internal use only (copy from clip): do not delete existing cell contents when pasting notes. +const InsertDeleteFlags IDF_SPECIAL_BOOLEAN = InsertDeleteFlags::fromInt(0x1000); +const InsertDeleteFlags IDF_ATTRIB = IDF_HARDATTR | IDF_STYLES; +const InsertDeleteFlags IDF_CONTENTS = IDF_VALUE | IDF_DATETIME | IDF_STRING | IDF_NOTE | IDF_FORMULA | IDF_OUTLINE; +const InsertDeleteFlags IDF_ALL = IDF_CONTENTS | IDF_ATTRIB | IDF_OBJECTS; +const InsertDeleteFlags IDF_ALL_USED_BITS = IDF_ALL | IDF_EDITATTR | IDF_NOCAPTIONS | IDF_ADDNOTES | IDF_SPECIAL_BOOLEAN; + +inline InsertDeleteFlags operator~ (const InsertDeleteFlags& rhs) +{ + return IDF_ALL_USED_BITS & InsertDeleteFlags::fromInt(~rhs.val()); +} + +// boost can't cope with this at the moment, perhaps when we have constexpr we can modify InsertDeleteFlags to make it work. +//BOOST_STATIC_ASSERT((IDF_ATTRIB & IDF_CONTENTS) == IDF_NONE); /// Copy flags for auto/series fill functions: do not touch notes and drawing objects. -const sal_uInt16 IDF_AUTOFILL = IDF_ALL & ~(IDF_NOTE | IDF_OBJECTS); +const InsertDeleteFlags IDF_AUTOFILL = IDF_ALL & ~(IDF_NOTE | IDF_OBJECTS); #define PASTE_NOFUNC 0 #define PASTE_ADD 1 diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx index 2028a0105e02..4d7ada8be307 100644 --- a/sc/inc/scabstdlg.hxx +++ b/sc/inc/scabstdlg.hxx @@ -125,7 +125,7 @@ class AbstractScDeleteContentsDlg: public VclAbstractDialog { public: virtual void DisableObjects() = 0 ; - virtual sal_uInt16 GetDelContentsCmdBits() const = 0; + virtual InsertDeleteFlags GetDelContentsCmdBits() const = 0; }; class AbstractScFillSeriesDlg: public VclAbstractDialog @@ -156,7 +156,7 @@ public: class AbstractScInsertContentsDlg : public VclAbstractDialog { public: - virtual sal_uInt16 GetInsContentsCmdBits() const = 0; + virtual InsertDeleteFlags GetInsContentsCmdBits() const = 0; virtual sal_uInt16 GetFormulaCmdBits() const = 0 ; virtual bool IsSkipEmptyCells() const = 0; virtual bool IsLink() const = 0; @@ -361,7 +361,7 @@ public: ScTabViewShell* pTabViewShell) = 0; virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent, - sal_uInt16 nCheckDefaults = 0) = 0; + InsertDeleteFlags nCheckDefaults = IDF_NONE) = 0; virtual AbstractScFillSeriesDlg * CreateScFillSeriesDlg( Window* pParent, ScDocument& rDocument, FillDir eFillDir, @@ -381,7 +381,7 @@ public: bool bDisallowCellMove = false ) = 0; virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( Window* pParent, - sal_uInt16 nCheckDefaults = 0, + InsertDeleteFlags nCheckDefaults = IDF_NONE, const OUString* pStrTitle = NULL ) = 0; virtual AbstractScInsertTableDlg * CreateScInsertTableDlg(Window* pParent, ScViewData& rViewData, diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 6e581edf41a7..fb5d6f9dcada 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -410,7 +410,7 @@ public: void DeleteCol( const sc::ColumnSet& rRegroupCols, SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize, bool* pUndoOutline = NULL ); - void DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uInt16 nDelFlag); + void DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, InsertDeleteFlags nDelFlag); void CopyToClip( sc::CopyToClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScTable* pTable ); void CopyToClip( sc::CopyToClipContext& rCxt, const ScRangeList& rRanges, ScTable* pTable ); @@ -439,17 +439,17 @@ public: void CopyToTable( sc::CopyToDocContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - sal_uInt16 nFlags, bool bMarked, ScTable* pDestTab, + InsertDeleteFlags nFlags, bool bMarked, ScTable* pDestTab, const ScMarkData* pMarkData = NULL, bool bAsLink = false, bool bColRowFlags = true ); void UndoToTable( sc::CopyToDocContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - sal_uInt16 nFlags, bool bMarked, ScTable* pDestTab, const ScMarkData* pMarkData = NULL ); + InsertDeleteFlags nFlags, bool bMarked, ScTable* pDestTab, const ScMarkData* pMarkData = NULL ); void CopyConditionalFormat( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCsCOL nDx, SCsROW nDy, ScTable* pTable); void TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - ScTable* pTransClip, sal_uInt16 nFlags, bool bAsLink ); + ScTable* pTransClip, InsertDeleteFlags nFlags, bool bAsLink ); // mark of this document void MixMarked( @@ -642,7 +642,7 @@ public: bool RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_Int16 nFlags ); void ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray = NULL ); - void DeleteSelection( sal_uInt16 nDelFlag, const ScMarkData& rMark, bool bBroadcast = true ); + void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast = true ); void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark ); void ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark ); |