summaryrefslogtreecommitdiff
path: root/sc/source/ui/undo/undoblk.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-22 15:15:17 +0200
committerEike Rathke <erack@redhat.com>2014-09-04 09:05:34 -0500
commit8e4dc1d760d85e09bbc3f3bbb5b8be2947db1b63 (patch)
treedbb60d3d9c8f931ed98e6ac864695d1d9046cee5 /sc/source/ui/undo/undoblk.cxx
parenta62a046df3302e5763b7a568ac25032bb1501d44 (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/source/ui/undo/undoblk.cxx')
-rw-r--r--sc/source/ui/undo/undoblk.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index be6895fc3e6c..a23e390f7f9c 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -775,7 +775,7 @@ void ScUndoCut::DoChange( const bool bUndo )
sal_uInt16 nExtFlags = 0;
// do not undo/redo objects and note captions, they are handled via drawing undo
- sal_uInt16 nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ InsertDeleteFlags nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
if (bUndo) // only for Undo
{
@@ -842,7 +842,7 @@ bool ScUndoCut::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoPaste::ScUndoPaste( ScDocShell* pNewDocShell, const ScRangeList& rRanges,
const ScMarkData& rMark,
ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
- sal_uInt16 nNewFlags,
+ InsertDeleteFlags nNewFlags,
ScRefUndoData* pRefData,
bool bRedoIsFilled, const ScUndoPasteOptions* pOptions ) :
ScMultiBlockUndo( pNewDocShell, rRanges, SC_UNDO_SIMPLE ),
@@ -904,7 +904,7 @@ void ScUndoPaste::DoChange(bool bUndo)
ScRefUndoData* pWorkRefData = bUndo ? pRefUndoData : pRefRedoData;
// Always back-up either all or none of the content for Undo
- sal_uInt16 nUndoFlags = IDF_NONE;
+ InsertDeleteFlags nUndoFlags = IDF_NONE;
if (nFlags & IDF_CONTENTS)
nUndoFlags |= IDF_CONTENTS;
if (nFlags & IDF_ATTRIB)
@@ -1236,7 +1236,7 @@ void ScUndoDragDrop::DoUndo( ScRange aRange )
pDocShell->UpdatePaintExt(mnPaintExtFlags, aPaintRange);
// do not undo objects and note captions, they are handled via drawing undo
- sal_uInt16 nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ InsertDeleteFlags nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
rDoc.DeleteAreaTab( aRange, nUndoFlags );
pRefUndoDoc->CopyToDocument( aRange, nUndoFlags, false, &rDoc );
@@ -1353,7 +1353,7 @@ void ScUndoDragDrop::Redo()
EnableDrawAdjust( &rDoc, false ); //! include in ScBlockUndo?
// do not undo/redo objects and note captions, they are handled via drawing undo
- sal_uInt16 nRedoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ InsertDeleteFlags nRedoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
/* TODO: Redoing note captions is quite tricky due to the fact that a
helper clip document is used. While (re-)pasting the contents to the