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/clipcontext.hxx | |
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/clipcontext.hxx')
-rw-r--r-- | sc/inc/clipcontext.hxx | 12 |
1 files changed, 6 insertions, 6 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;} |