summaryrefslogtreecommitdiff
path: root/sc/source/ui
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
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')
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx8
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx8
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx2
-rw-r--r--sc/source/ui/docshell/docfunc.cxx6
-rw-r--r--sc/source/ui/docshell/impex.cxx6
-rw-r--r--sc/source/ui/inc/delcodlg.hxx6
-rw-r--r--sc/source/ui/inc/docfunc.hxx2
-rw-r--r--sc/source/ui/inc/inscodlg.hxx8
-rw-r--r--sc/source/ui/inc/undoblk.hxx16
-rw-r--r--sc/source/ui/inc/undodat.hxx4
-rw-r--r--sc/source/ui/inc/viewfunc.hxx16
-rw-r--r--sc/source/ui/miscdlgs/delcodlg.cxx10
-rw-r--r--sc/source/ui/miscdlgs/inscodlg.cxx13
-rw-r--r--sc/source/ui/undo/undoblk.cxx10
-rw-r--r--sc/source/ui/undo/undoblk3.cxx12
-rw-r--r--sc/source/ui/undo/undodat.cxx6
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx4
-rw-r--r--sc/source/ui/vba/excelvbahelper.cxx2
-rw-r--r--sc/source/ui/vba/excelvbahelper.hxx2
-rw-r--r--sc/source/ui/vba/vbarange.cxx9
-rw-r--r--sc/source/ui/view/cellsh1.cxx8
-rw-r--r--sc/source/ui/view/cliputil.cxx2
-rw-r--r--sc/source/ui/view/viewfun2.cxx2
-rw-r--r--sc/source/ui/view/viewfun3.cxx24
-rw-r--r--sc/source/ui/view/viewfunc.cxx4
25 files changed, 95 insertions, 95 deletions
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 807863c851c3..85667ea63435 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -242,7 +242,7 @@ void AbstractScDeleteContentsDlg_Impl::DisableObjects()
pDlg->DisableObjects();
}
-sal_uInt16 AbstractScDeleteContentsDlg_Impl::GetDelContentsCmdBits() const
+InsertDeleteFlags AbstractScDeleteContentsDlg_Impl::GetDelContentsCmdBits() const
{
return pDlg->GetDelContentsCmdBits();
}
@@ -297,7 +297,7 @@ InsCellCmd AbstractScInsertCellDlg_Impl::GetInsCellCmd() const
return pDlg->GetInsCellCmd();
}
-sal_uInt16 AbstractScInsertContentsDlg_Impl::GetInsContentsCmdBits() const
+InsertDeleteFlags AbstractScInsertContentsDlg_Impl::GetInsContentsCmdBits() const
{
return pDlg->GetInsContentsCmdBits();
}
@@ -701,7 +701,7 @@ AbstractScDataFormDlg* ScAbstractDialogFactory_Impl::CreateScDataFormDlg(Window*
}
AbstractScDeleteContentsDlg* ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(Window* pParent,
- sal_uInt16 nCheckDefaults)
+ InsertDeleteFlags nCheckDefaults)
{
ScDeleteContentsDlg* pDlg = new ScDeleteContentsDlg(pParent, nCheckDefaults);
return new AbstractScDeleteContentsDlg_Impl( pDlg );
@@ -749,7 +749,7 @@ AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( W
}
AbstractScInsertContentsDlg * ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg( Window* pParent,
- sal_uInt16 nCheckDefaults,
+ InsertDeleteFlags nCheckDefaults,
const OUString* pStrTitle )
{
ScInsertContentsDlg * pDlg = new ScInsertContentsDlg(pParent, nCheckDefaults, pStrTitle);
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 70c90006f78f..a0c8be1fed69 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -177,7 +177,7 @@ class AbstractScDeleteContentsDlg_Impl : public AbstractScDeleteContentsDlg
{
DECL_ABSTDLG_BASE( AbstractScDeleteContentsDlg_Impl,ScDeleteContentsDlg)
virtual void DisableObjects() SAL_OVERRIDE;
- virtual sal_uInt16 GetDelContentsCmdBits() const SAL_OVERRIDE;
+ virtual InsertDeleteFlags GetDelContentsCmdBits() const SAL_OVERRIDE;
};
class AbstractScFillSeriesDlg_Impl:public AbstractScFillSeriesDlg
@@ -208,7 +208,7 @@ class AbstractScInsertCellDlg_Impl : public AbstractScInsertCellDlg
class AbstractScInsertContentsDlg_Impl : public AbstractScInsertContentsDlg
{
DECL_ABSTDLG_BASE(AbstractScInsertContentsDlg_Impl, ScInsertContentsDlg)
- virtual sal_uInt16 GetInsContentsCmdBits() const SAL_OVERRIDE;
+ virtual InsertDeleteFlags GetInsContentsCmdBits() const SAL_OVERRIDE;
virtual sal_uInt16 GetFormulaCmdBits() const SAL_OVERRIDE;
virtual bool IsSkipEmptyCells() const SAL_OVERRIDE;
virtual bool IsLink() const SAL_OVERRIDE;
@@ -428,7 +428,7 @@ public:
ScTabViewShell* pTabViewShell) SAL_OVERRIDE;
virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent,
- sal_uInt16 nCheckDefaults = 0) SAL_OVERRIDE;
+ InsertDeleteFlags nCheckDefaults = IDF_NONE) SAL_OVERRIDE;
virtual AbstractScFillSeriesDlg * CreateScFillSeriesDlg( Window* pParent,
ScDocument& rDocument,
@@ -448,7 +448,7 @@ public:
bool bDisallowCellMove = false ) SAL_OVERRIDE;
virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( Window* pParent,
- sal_uInt16 nCheckDefaults = 0,
+ InsertDeleteFlags nCheckDefaults = IDF_NONE,
const OUString* pStrTitle = NULL ) SAL_OVERRIDE;
virtual AbstractScInsertTableDlg * CreateScInsertTableDlg(Window* pParent, ScViewData& rViewData,
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index 702b239da276..ea6e52a41f02 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -499,7 +499,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (bRecord)
{
// do not touch notes (ScUndoImportData does not support drawing undo)
- sal_uInt16 nCopyFlags = IDF_ALL & ~IDF_NOTE;
+ InsertDeleteFlags nCopyFlags = IDF_ALL & ~IDF_NOTE;
// nFormulaCols is set only if column count is unchanged
rDoc.CopyToDocument( rParam.nCol1, rParam.nRow1, nTab,
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 6e8dcf532f1f..90cc95d23584 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -555,7 +555,7 @@ void ScDocFunc::DetectiveCollectAllSuccs(const ScRangeList& rSrcRanges, vector<S
lcl_collectAllPredOrSuccRanges(rSrcRanges, rRefTokens, rDocShell, false);
}
-bool ScDocFunc::DeleteContents( const ScMarkData& rMark, sal_uInt16 nFlags,
+bool ScDocFunc::DeleteContents( const ScMarkData& rMark, InsertDeleteFlags nFlags,
bool bRecord, bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
@@ -638,7 +638,7 @@ bool ScDocFunc::DeleteContents( const ScMarkData& rMark, sal_uInt16 nFlags,
// bei "Format/Standard" alle Attribute kopieren, weil CopyToDocument
// nur mit IDF_HARDATTR zu langsam ist:
- sal_uInt16 nUndoDocFlags = nFlags;
+ InsertDeleteFlags nUndoDocFlags = nFlags;
if (nFlags & IDF_ATTRIB)
nUndoDocFlags |= IDF_ATTRIB;
if (nFlags & IDF_EDITATTR) // Edit-Engine-Attribute
@@ -2669,7 +2669,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
{
bool bWholeCols = ( nStartRow == 0 && nEndRow == MAXROW );
bool bWholeRows = ( nStartCol == 0 && nEndCol == MAXCOL );
- sal_uInt16 nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ InsertDeleteFlags nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( &rDoc, nStartTab, nEndTab, bWholeCols, bWholeRows );
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 5aec94e57f81..f1960a17df43 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -2108,7 +2108,7 @@ bool ScImportExport::Dif2Doc( SvStream& rStrm )
bool bOk = StartPaste();
if (bOk)
{
- sal_uInt16 nFlags = IDF_ALL & ~IDF_STYLES;
+ InsertDeleteFlags nFlags = IDF_ALL & ~IDF_STYLES;
pDoc->DeleteAreaTab( aRange, nFlags );
pImportDoc->CopyToDocument( aRange, nFlags, false, pDoc );
EndPaste();
@@ -2130,7 +2130,7 @@ bool ScImportExport::RTF2Doc( SvStream& rStrm, const OUString& rBaseURL )
bool bOk = StartPaste();
if (bOk)
{
- sal_uInt16 nFlags = IDF_ALL & ~IDF_STYLES;
+ InsertDeleteFlags nFlags = IDF_ALL & ~IDF_STYLES;
pDoc->DeleteAreaTab( aRange, nFlags );
pImp->WriteToDocument();
EndPaste();
@@ -2155,7 +2155,7 @@ bool ScImportExport::HTML2Doc( SvStream& rStrm, const OUString& rBaseURL )
if (pDocSh)
pDocSh->MakeDrawLayer();
- sal_uInt16 nFlags = IDF_ALL & ~IDF_STYLES;
+ InsertDeleteFlags nFlags = IDF_ALL & ~IDF_STYLES;
pDoc->DeleteAreaTab( aRange, nFlags );
if (pExtOptions)
diff --git a/sc/source/ui/inc/delcodlg.hxx b/sc/source/ui/inc/delcodlg.hxx
index fcc4acb9ecbc..c119b495a1f0 100644
--- a/sc/source/ui/inc/delcodlg.hxx
+++ b/sc/source/ui/inc/delcodlg.hxx
@@ -40,18 +40,18 @@ private:
bool bObjectsDisabled;
static bool bPreviousAllCheck;
- static sal_uInt16 nPreviousChecks;
+ static InsertDeleteFlags nPreviousChecks;
void DisableChecks( bool bDelAllChecked = true );
DECL_LINK( DelAllHdl, void * );
public:
ScDeleteContentsDlg( Window* pParent,
- sal_uInt16 nCheckDefaults = 0 );
+ InsertDeleteFlags nCheckDefaults = IDF_NONE );
virtual ~ScDeleteContentsDlg();
void DisableObjects();
- sal_uInt16 GetDelContentsCmdBits() const;
+ InsertDeleteFlags GetDelContentsCmdBits() const;
};
#endif // INCLUDED_SC_SOURCE_UI_INC_DELCODLG_HXX
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx
index 5dc4d06a5d5e..37bf4aac12b7 100644
--- a/sc/source/ui/inc/docfunc.hxx
+++ b/sc/source/ui/inc/docfunc.hxx
@@ -86,7 +86,7 @@ public:
void DetectiveCollectAllSuccs(const ScRangeList& rSrcRanges, ::std::vector<ScTokenRef>& rRefTokens);
SC_DLLPUBLIC bool
- DeleteContents( const ScMarkData& rMark, sal_uInt16 nFlags,
+ DeleteContents( const ScMarkData& rMark, InsertDeleteFlags nFlags,
bool bRecord, bool bApi );
bool TransliterateText( const ScMarkData& rMark, sal_Int32 nType,
diff --git a/sc/source/ui/inc/inscodlg.hxx b/sc/source/ui/inc/inscodlg.hxx
index 1130daa2ed03..92bcfbd03ec2 100644
--- a/sc/source/ui/inc/inscodlg.hxx
+++ b/sc/source/ui/inc/inscodlg.hxx
@@ -31,11 +31,11 @@ class ScInsertContentsDlg : public ModalDialog
{
public:
ScInsertContentsDlg( Window* pParent,
- sal_uInt16 nCheckDefaults = 0,
+ InsertDeleteFlags nCheckDefaults = IDF_NONE,
const OUString* pStrTitle = NULL );
virtual ~ScInsertContentsDlg();
- sal_uInt16 GetInsContentsCmdBits() const;
+ InsertDeleteFlags GetInsContentsCmdBits() const;
sal_uInt16 GetFormulaCmdBits() const;
bool IsSkipEmptyCells() const;
bool IsTranspose() const;
@@ -82,7 +82,7 @@ private:
bool bMoveRightDisabled;
bool bUsedShortCut;
- sal_uInt16 nShortCutInsContentsCmdBits;
+ InsertDeleteFlags nShortCutInsContentsCmdBits;
sal_uInt16 nShortCutFormulaCmdBits;
bool bShortCutSkipEmptyCells;
bool bShortCutTranspose;
@@ -90,7 +90,7 @@ private:
InsCellCmd nShortCutMoveMode;
static bool bPreviousAllCheck;
- static sal_uInt16 nPreviousChecks;
+ static InsertDeleteFlags nPreviousChecks;
static sal_uInt16 nPreviousChecks2;
static sal_uInt16 nPreviousFormulaChecks;
static sal_uInt16 nPreviousMoveMode; // enum InsCellCmd
diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx
index 3444eb895404..e19ade3db28c 100644
--- a/sc/source/ui/inc/undoblk.hxx
+++ b/sc/source/ui/inc/undoblk.hxx
@@ -186,7 +186,7 @@ public:
ScUndoPaste(ScDocShell* pNewDocShell, const ScRangeList& rRanges,
const ScMarkData& rMark,
ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
- sal_uInt16 nNewFlags,
+ InsertDeleteFlags nNewFlags,
ScRefUndoData* pRefData,
bool bRedoIsFilled = true,
const ScUndoPasteOptions* pOptions = NULL);
@@ -203,7 +203,7 @@ private:
ScMarkData aMarkData;
ScDocument* pUndoDoc;
ScDocument* pRedoDoc;
- sal_uInt16 nFlags;
+ InsertDeleteFlags nFlags;
ScRefUndoData* pRefUndoData;
ScRefUndoData* pRefRedoData;
sal_uLong nStartChangeAction;
@@ -257,7 +257,7 @@ public:
const ScMarkData& rMark,
const ScRange& rRange,
ScDocument* pNewUndoDoc, bool bNewMulti,
- sal_uInt16 nNewFlags, bool bObjects );
+ InsertDeleteFlags nNewFlags, bool bObjects );
virtual ~ScUndoDeleteContents();
virtual void Undo() SAL_OVERRIDE;
@@ -278,7 +278,7 @@ private:
SdrUndoAction* pDrawUndo; // Deleted objects
sal_uLong nStartChangeAction;
sal_uLong nEndChangeAction;
- sal_uInt16 nFlags;
+ InsertDeleteFlags nFlags;
bool bMulti; // Multi selection
void DoChange( const bool bUndo );
@@ -294,7 +294,7 @@ public:
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
ScDocument* pNewUndoDoc, bool bNewMulti, SCTAB nSrc,
- sal_uInt16 nFlg, sal_uInt16 nFunc, bool bSkip, bool bLink );
+ InsertDeleteFlags nFlg, sal_uInt16 nFunc, bool bSkip, bool bLink );
virtual ~ScUndoFillTable();
virtual void Undo() SAL_OVERRIDE;
@@ -310,7 +310,7 @@ private:
ScDocument* pUndoDoc; // Block mark and deleted data
sal_uLong nStartChangeAction;
sal_uLong nEndChangeAction;
- sal_uInt16 nFlags;
+ InsertDeleteFlags nFlags;
sal_uInt16 nFunction;
SCTAB nSrcTab;
bool bMulti; // Multi selection
@@ -577,7 +577,7 @@ public:
TYPEINFO_OVERRIDE();
ScUndoRefConversion( ScDocShell* pNewDocShell,
const ScRange& aMarkRange, const ScMarkData& rMark,
- ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, bool bNewMulti, sal_uInt16 nNewFlag);
+ ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, bool bNewMulti, InsertDeleteFlags nNewFlag);
virtual ~ScUndoRefConversion();
virtual void Undo() SAL_OVERRIDE;
@@ -593,7 +593,7 @@ private:
ScDocument* pRedoDoc;
ScRange aRange;
bool bMulti;
- sal_uInt16 nFlags;
+ InsertDeleteFlags nFlags;
sal_uLong nStartChangeAction;
sal_uLong nEndChangeAction;
diff --git a/sc/source/ui/inc/undodat.hxx b/sc/source/ui/inc/undodat.hxx
index b564c33adf71..c9c3060afb0f 100644
--- a/sc/source/ui/inc/undodat.hxx
+++ b/sc/source/ui/inc/undodat.hxx
@@ -455,7 +455,7 @@ public:
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
const ScMarkData& rMark,
ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
- sal_uInt16 nNewFlags,
+ InsertDeleteFlags nNewFlags,
ScRefUndoData* pRefData, void* pFill1, void* pFill2, void* pFill3,
bool bRedoIsFilled = true
);
@@ -472,7 +472,7 @@ private:
boost::scoped_ptr<ScMarkData> mpMarkData;
ScDocument* pUndoDoc;
ScDocument* pRedoDoc;
- sal_uInt16 nFlags;
+ InsertDeleteFlags nFlags;
ScRefUndoData* pRefUndoData;
ScRefUndoData* pRefRedoData;
sal_uLong nStartChangeAction;
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 28b7a2e8bf29..17ae3d6c5227 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -104,14 +104,14 @@ public:
SC_DLLPUBLIC bool CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRange, bool bCut = false,
bool bApi = false, bool bIncludeObjects = false, bool bStopEdit = true, bool bUseRangeForVBA = true );
ScTransferObj* CopyToTransferable();
- SC_DLLPUBLIC bool PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
+ SC_DLLPUBLIC bool PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
sal_uInt16 nFunction = PASTE_NOFUNC, bool bSkipEmpty = false,
bool bTranspose = false, bool bAsLink = false,
InsCellCmd eMoveMode = INS_NONE,
- sal_uInt16 nUndoExtraFlags = IDF_NONE,
+ InsertDeleteFlags nUndoExtraFlags = IDF_NONE,
bool bAllowDialogs = false );
- void FillTab( sal_uInt16 nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bAsLink );
+ void FillTab( InsertDeleteFlags nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bAsLink );
SC_DLLPUBLIC void PasteFromSystem();
SC_DLLPUBLIC bool PasteFromSystem( sal_uLong nFormatId, bool bApi = false );
@@ -198,7 +198,7 @@ public:
bool InsertCells( InsCellCmd eCmd, bool bRecord = true, bool bPartOfPaste = false );
void DeleteMulti( bool bRows, bool bRecord = true );
- void DeleteContents( sal_uInt16 nFlags, bool bRecord = true );
+ void DeleteContents( InsertDeleteFlags nFlags, bool bRecord = true );
void SetWidthOrHeight(
bool bWidth, const std::vector<sc::ColRowSpan>& rRanges, ScSizeMode eMode,
@@ -349,13 +349,13 @@ private:
const ::com::sun::star::uno::Reference<
::com::sun::star::datatransfer::XTransferable >& rxTransferable );
- bool PasteMultiRangesFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc, sal_uInt16 nFunction,
+ bool PasteMultiRangesFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, sal_uInt16 nFunction,
bool bSkipEmpty, bool bTranspose, bool bAsLink, bool bAllowDialogs,
- InsCellCmd eMoveMode, sal_uInt16 nUndoFlags );
+ InsCellCmd eMoveMode, InsertDeleteFlags nUndoFlags );
- bool PasteFromClipToMultiRanges( sal_uInt16 nFlags, ScDocument* pClipDoc, sal_uInt16 nFunction,
+ bool PasteFromClipToMultiRanges( InsertDeleteFlags nFlags, ScDocument* pClipDoc, sal_uInt16 nFunction,
bool bSkipEmpty, bool bTranspose, bool bAsLink, bool bAllowDialogs,
- InsCellCmd eMoveMode, sal_uInt16 nUndoFlags );
+ InsCellCmd eMoveMode, InsertDeleteFlags nUndoFlags );
void PostPasteFromClip(const ScRangeList& rPasteRanges, const ScMarkData& rMark);
diff --git a/sc/source/ui/miscdlgs/delcodlg.cxx b/sc/source/ui/miscdlgs/delcodlg.cxx
index d0da98af6339..52a48716743f 100644
--- a/sc/source/ui/miscdlgs/delcodlg.cxx
+++ b/sc/source/ui/miscdlgs/delcodlg.cxx
@@ -24,12 +24,12 @@
#include "miscdlgs.hrc"
bool ScDeleteContentsDlg::bPreviousAllCheck = false;
-sal_uInt16 ScDeleteContentsDlg::nPreviousChecks = (IDF_DATETIME | IDF_STRING |
+InsertDeleteFlags ScDeleteContentsDlg::nPreviousChecks = (IDF_DATETIME | IDF_STRING |
IDF_NOTE | IDF_FORMULA |
IDF_VALUE);
ScDeleteContentsDlg::ScDeleteContentsDlg( Window* pParent,
- sal_uInt16 nCheckDefaults ) :
+ InsertDeleteFlags nCheckDefaults ) :
ModalDialog ( pParent, "DeleteContentsDialog", "modules/scalc/ui/deletecontents.ui" ),
bObjectsDisabled( false )
@@ -44,7 +44,7 @@ ScDeleteContentsDlg::ScDeleteContentsDlg( Window* pParent,
get( aBtnDelObjects, "objects" );
get( aBtnOk, "ok" );
- if ( nCheckDefaults != 0 )
+ if ( nCheckDefaults != IDF_NONE )
{
ScDeleteContentsDlg::nPreviousChecks = nCheckDefaults;
ScDeleteContentsDlg::bPreviousAllCheck = false;
@@ -71,9 +71,9 @@ ScDeleteContentsDlg::ScDeleteContentsDlg( Window* pParent,
aBtnDelAll->SetClickHdl( LINK( this, ScDeleteContentsDlg, DelAllHdl ) );
}
-sal_uInt16 ScDeleteContentsDlg::GetDelContentsCmdBits() const
+InsertDeleteFlags ScDeleteContentsDlg::GetDelContentsCmdBits() const
{
- ScDeleteContentsDlg::nPreviousChecks = 0;
+ ScDeleteContentsDlg::nPreviousChecks = IDF_NONE;
if ( aBtnDelStrings->IsChecked() )
ScDeleteContentsDlg::nPreviousChecks = IDF_STRING;
diff --git a/sc/source/ui/miscdlgs/inscodlg.cxx b/sc/source/ui/miscdlgs/inscodlg.cxx
index efd40b014896..13ad6a460cbc 100644
--- a/sc/source/ui/miscdlgs/inscodlg.cxx
+++ b/sc/source/ui/miscdlgs/inscodlg.cxx
@@ -24,13 +24,13 @@
#include "miscdlgs.hrc"
bool ScInsertContentsDlg::bPreviousAllCheck = false;
-sal_uInt16 ScInsertContentsDlg::nPreviousChecks = (IDF_VALUE | IDF_DATETIME | IDF_STRING);
+InsertDeleteFlags ScInsertContentsDlg::nPreviousChecks = (IDF_VALUE | IDF_DATETIME | IDF_STRING);
sal_uInt16 ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_NOFUNC;
sal_uInt16 ScInsertContentsDlg::nPreviousChecks2 = 0;
sal_uInt16 ScInsertContentsDlg::nPreviousMoveMode = INS_NONE; // enum InsCellCmd
ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent,
- sal_uInt16 nCheckDefaults,
+ InsertDeleteFlags nCheckDefaults,
const OUString* pStrTitle )
: ModalDialog ( pParent, "PasteSpecial", "modules/scalc/ui/pastespecial.ui" ),
@@ -39,7 +39,8 @@ ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent,
bChangeTrack ( false ),
bMoveDownDisabled( false ),
bMoveRightDisabled( false ),
- bUsedShortCut ( false )
+ bUsedShortCut ( false ),
+ nShortCutInsContentsCmdBits( IDF_NONE )
{
get( mpBtnInsAll, "paste_all" );
get( mpBtnInsStrings, "text" );
@@ -67,7 +68,7 @@ ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent,
if ( pStrTitle )
SetText( *pStrTitle );
- if ( nCheckDefaults != 0 )
+ if ( nCheckDefaults != IDF_NONE )
{
ScInsertContentsDlg::nPreviousChecks = nCheckDefaults;
ScInsertContentsDlg::bPreviousAllCheck = false;
@@ -120,9 +121,9 @@ ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent,
mpBtnShortCutPasteTranspose->SetClickHdl( LINK( this, ScInsertContentsDlg, ShortCutHdl ) );
}
-sal_uInt16 ScInsertContentsDlg::GetInsContentsCmdBits() const
+InsertDeleteFlags ScInsertContentsDlg::GetInsContentsCmdBits() const
{
- ScInsertContentsDlg::nPreviousChecks = 0;
+ ScInsertContentsDlg::nPreviousChecks = IDF_NONE;
if ( mpBtnInsStrings->IsChecked() )
ScInsertContentsDlg::nPreviousChecks = IDF_STRING;
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
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 661f3e95c460..6b8c8cfd38c7 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -77,7 +77,7 @@ ScUndoDeleteContents::ScUndoDeleteContents(
ScDocShell* pNewDocShell,
const ScMarkData& rMark, const ScRange& rRange,
ScDocument* pNewUndoDoc, bool bNewMulti,
- sal_uInt16 nNewFlags, bool bObjects )
+ InsertDeleteFlags nNewFlags, bool bObjects )
: ScSimpleUndo( pNewDocShell ),
aRange ( rRange ),
aMarkData ( rMark ),
@@ -131,7 +131,7 @@ void ScUndoDeleteContents::DoChange( const bool bUndo )
if (bUndo) // only Undo
{
- sal_uInt16 nUndoFlags = IDF_NONE; // copy either all or none of the content
+ InsertDeleteFlags nUndoFlags = IDF_NONE; // copy either all or none of the content
if (nFlags & IDF_CONTENTS) // (Only the correct ones have been copied into UndoDoc)
nUndoFlags |= IDF_CONTENTS;
if (nFlags & IDF_ATTRIB)
@@ -163,7 +163,7 @@ void ScUndoDeleteContents::DoChange( const bool bUndo )
aMarkData.MarkToMulti();
RedoSdrUndoAction( pDrawUndo );
// do not delete objects and note captions, they have been removed via drawing undo
- sal_uInt16 nRedoFlags = (nFlags & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ InsertDeleteFlags nRedoFlags = (nFlags & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
rDoc.DeleteSelection( nRedoFlags, aMarkData );
aMarkData.MarkToSimple();
@@ -229,7 +229,7 @@ ScUndoFillTable::ScUndoFillTable( ScDocShell* pNewDocShell,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
ScDocument* pNewUndoDoc, bool bNewMulti, SCTAB nSrc,
- sal_uInt16 nFlg, sal_uInt16 nFunc, bool bSkip, bool bLink )
+ InsertDeleteFlags nFlg, sal_uInt16 nFunc, bool bSkip, bool bLink )
: ScSimpleUndo( pNewDocShell ),
aRange ( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ),
aMarkData ( rMark ),
@@ -995,7 +995,7 @@ void ScUndoReplace::Undo()
// Undo document has no row/column information, thus copy with
// bColRowFlags = FALSE to not destroy Outline groups
- sal_uInt16 nUndoFlags = (pSearchItem->GetPattern()) ? IDF_ATTRIB : IDF_CONTENTS;
+ InsertDeleteFlags nUndoFlags = (pSearchItem->GetPattern()) ? IDF_ATTRIB : IDF_CONTENTS;
pUndoDoc->CopyToDocument( 0, 0, 0,
MAXCOL, MAXROW, MAXTAB,
nUndoFlags, false, &rDoc, NULL, false ); // without row flags
@@ -1282,7 +1282,7 @@ bool ScUndoConversion::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoRefConversion::ScUndoRefConversion( ScDocShell* pNewDocShell,
const ScRange& aMarkRange, const ScMarkData& rMark,
- ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, bool bNewMulti, sal_uInt16 nNewFlag) :
+ ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, bool bNewMulti, InsertDeleteFlags nNewFlag) :
ScSimpleUndo( pNewDocShell ),
aMarkData ( rMark ),
pUndoDoc ( pNewUndoDoc ),
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index ac1b8fd38e19..e2baf7de8809 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -1802,7 +1802,7 @@ ScUndoDataForm::ScUndoDataForm( ScDocShell* pNewDocShell,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
const ScMarkData& rMark,
ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
- sal_uInt16 nNewFlags,
+ InsertDeleteFlags nNewFlags,
ScRefUndoData* pRefData,
void* /*pFill1*/, void* /*pFill2*/, void* /*pFill3*/,
bool bRedoIsFilled ) :
@@ -1893,7 +1893,7 @@ void ScUndoDataForm::DoChange( const 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)
@@ -1919,7 +1919,7 @@ void ScUndoDataForm::DoChange( const bool bUndo )
ScRange aCopyRange = aBlockRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- rDoc.CopyToDocument( aCopyRange, 1, false, pRedoDoc );
+ rDoc.CopyToDocument( aCopyRange, IDF_VALUE, false, pRedoDoc );
bRedoFilled = true;
}
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 7ad020265790..5e859a869f2b 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -1815,8 +1815,8 @@ void SAL_CALL ScCellRangesBase::clearContents( sal_Int32 nContentFlags ) throw(u
if ( !aRanges.empty() )
{
// only for clearContents: EDITATTR is only used if no contents are deleted
- sal_uInt16 nDelFlags = static_cast< sal_uInt16 >( nContentFlags & IDF_ALL );
- if ( ( nContentFlags & IDF_EDITATTR ) && ( nContentFlags & IDF_CONTENTS ) == 0 )
+ InsertDeleteFlags nDelFlags = InsertDeleteFlags::fromInt(nContentFlags) & IDF_ALL;
+ if ( ( nDelFlags & IDF_EDITATTR ) && ( nDelFlags & IDF_CONTENTS ) == IDF_NONE )
nDelFlags |= IDF_EDITATTR;
pDocShell->GetDocFunc().DeleteContents( *GetMarkData(), nDelFlags, true, true );
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index 5c379294f6fe..2e18439ff2c1 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -186,7 +186,7 @@ implnCut( const uno::Reference< frame::XModel>& xModel )
}
}
-void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, sal_uInt16 nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bTranspose)
+void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, InsertDeleteFlags nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bTranspose)
{
PasteCellsWarningReseter resetWarningBox;
InsCellCmd eMoveMode = INS_NONE;
diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx
index cd6590c5402a..9de833c9e77d 100644
--- a/sc/source/ui/vba/excelvbahelper.hxx
+++ b/sc/source/ui/vba/excelvbahelper.hxx
@@ -41,7 +41,7 @@ void implSetZoom( const css::uno::Reference< css::frame::XModel >& xModel, sal_I
void implnCopy( const css::uno::Reference< css::frame::XModel>& xModel );
void implnPaste ( const css::uno::Reference< css::frame::XModel>& xModel );
void implnCut( const css::uno::Reference< css::frame::XModel>& xModel );
-void implnPasteSpecial( const css::uno::Reference< css::frame::XModel>& xModel, sal_uInt16 nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bTranspose);
+void implnPasteSpecial( const css::uno::Reference< css::frame::XModel>& xModel, InsertDeleteFlags nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bTranspose);
ScTabViewShell* getBestViewShell( const css::uno::Reference< css::frame::XModel>& xModel ) ;
ScDocShell* getDocShell( const css::uno::Reference< css::frame::XModel>& xModel ) ;
ScTabViewShell* getCurrentBestViewShell( const css::uno::Reference< css::uno::XComponentContext >& xContext );
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 7e33235844d4..523db877a903 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -2797,10 +2797,9 @@ uno::Any ScVbaRange::getCellRange( const uno::Reference< excel::XRange >& rxRang
throw uno::RuntimeException();
}
-static sal_uInt16
-getPasteFlags (sal_Int32 Paste)
+static InsertDeleteFlags getPasteFlags (sal_Int32 Paste)
{
- sal_uInt16 nFlags = IDF_NONE;
+ InsertDeleteFlags nFlags = IDF_NONE;
switch (Paste) {
case excel::XlPasteType::xlPasteComments:
nFlags = IDF_NOTE;break;
@@ -2821,7 +2820,7 @@ getPasteFlags (sal_Int32 Paste)
default:
nFlags = IDF_ALL;break;
}
-return nFlags;
+ return nFlags;
}
static sal_uInt16
@@ -2875,7 +2874,7 @@ ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, cons
if ( Transpose.hasValue() )
Transpose >>= bTranspose;
- sal_uInt16 nFlags = getPasteFlags(nPaste);
+ InsertDeleteFlags nFlags = getPasteFlags(nPaste);
sal_uInt16 nFormulaBits = getPasteFormulaBits(nOperation);
excel::implnPasteSpecial(pShell->GetModel(), nFlags,nFormulaBits,bSkipBlanks,bTranspose);
}
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 3d682b4749b2..c5f509ba449f 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -320,7 +320,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_DELETE:
{
- sal_uInt16 nFlags = IDF_NONE;
+ InsertDeleteFlags nFlags = IDF_NONE;
if ( pReqArgs!=NULL && pTabViewShell->SelectionEditable() )
{
@@ -428,7 +428,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case FID_FILL_TAB:
{
- sal_uInt16 nFlags = IDF_NONE;
+ InsertDeleteFlags nFlags = IDF_NONE;
sal_uInt16 nFunction = PASTE_NOFUNC;
bool bSkipEmpty = false;
bool bAsLink = false;
@@ -467,7 +467,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
boost::scoped_ptr<AbstractScInsertContentsDlg> pDlg(pFact->CreateScInsertContentsDlg( pTabViewShell->GetDialogParent(),
- 0, /* nCheckDefaults */
+ IDF_NONE, /* nCheckDefaults */
&ScGlobal::GetRscString(STR_FILL_TAB)));
OSL_ENSURE(pDlg, "Dialog create fail!");
pDlg->SetFillMode(true);
@@ -1280,7 +1280,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case FID_INS_CELL_CONTENTS:
{
- sal_uInt16 nFlags = IDF_NONE;
+ InsertDeleteFlags nFlags = IDF_NONE;
sal_uInt16 nFunction = PASTE_NOFUNC;
bool bSkipEmpty = false;
bool bTranspose = false;
diff --git a/sc/source/ui/view/cliputil.cxx b/sc/source/ui/view/cliputil.cxx
index 7c37d61416eb..2c3171c6b0d2 100644
--- a/sc/source/ui/view/cliputil.cxx
+++ b/sc/source/ui/view/cliputil.cxx
@@ -59,7 +59,7 @@ void ScClipUtil::PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTab
else
{
ScDocument* pClipDoc = pOwnClip->GetDocument();
- sal_uInt16 nFlags = IDF_ALL;
+ InsertDeleteFlags nFlags = IDF_ALL;
if (pClipDoc->GetClipParam().isMultiRange())
// For multi-range paste, we paste values by default.
nFlags &= ~IDF_FORMULA;
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 6f92ac9aa737..410eae91c080 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1274,7 +1274,7 @@ void ScViewFunc::FillAuto( FillDir eDir, SCCOL nStartCol, SCROW nStartRow,
}
}
-void ScViewFunc::FillTab( sal_uInt16 nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bAsLink )
+void ScViewFunc::FillTab( InsertDeleteFlags nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bAsLink )
{
//! allow source sheet to be protected
ScEditableTester aTester( this );
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index b00ab735f6c8..8b0ace1610c0 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -798,10 +798,10 @@ bool checkDestRangeForOverwrite(const ScRangeList& rDestRanges, const ScDocument
}
-bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
+bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
sal_uInt16 nFunction, bool bSkipEmpty,
bool bTranspose, bool bAsLink,
- InsCellCmd eMoveMode, sal_uInt16 nUndoExtraFlags,
+ InsCellCmd eMoveMode, InsertDeleteFlags nUndoExtraFlags,
bool bAllowDialogs )
{
if (!pClipDoc)
@@ -811,13 +811,13 @@ bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
}
// fuer Undo etc. immer alle oder keine Inhalte sichern
- sal_uInt16 nContFlags = IDF_NONE;
+ InsertDeleteFlags nContFlags = IDF_NONE;
if (nFlags & IDF_CONTENTS)
nContFlags |= IDF_CONTENTS;
if (nFlags & IDF_ATTRIB)
nContFlags |= IDF_ATTRIB;
// evtl. Attribute ins Undo ohne sie vom Clip ins Doc zu kopieren
- sal_uInt16 nUndoFlags = nContFlags;
+ InsertDeleteFlags nUndoFlags = nContFlags;
if (nUndoExtraFlags & IDF_ATTRIB)
nUndoFlags |= IDF_ATTRIB;
// do not copy note captions into undo document
@@ -1228,7 +1228,7 @@ bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
if ( bRecord )
pDoc->BeginDrawUndo();
- sal_uInt16 nNoObjFlags = nFlags & ~IDF_OBJECTS;
+ InsertDeleteFlags nNoObjFlags = nFlags & ~IDF_OBJECTS;
if (!bAsLink)
{
// copy normally (original range)
@@ -1391,9 +1391,9 @@ bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
}
bool ScViewFunc::PasteMultiRangesFromClip(
- sal_uInt16 nFlags, ScDocument* pClipDoc, sal_uInt16 nFunction,
+ InsertDeleteFlags nFlags, ScDocument* pClipDoc, sal_uInt16 nFunction,
bool bSkipEmpty, bool bTranspose, bool bAsLink, bool bAllowDialogs,
- InsCellCmd eMoveMode, sal_uInt16 nUndoFlags)
+ InsCellCmd eMoveMode, InsertDeleteFlags nUndoFlags)
{
ScViewData& rViewData = GetViewData();
ScDocument* pDoc = rViewData.GetDocument();
@@ -1502,7 +1502,7 @@ bool ScViewFunc::PasteMultiRangesFromClip(
if (pDoc->IsUndoEnabled())
pDoc->BeginDrawUndo();
- sal_uInt16 nNoObjFlags = nFlags & ~IDF_OBJECTS;
+ InsertDeleteFlags nNoObjFlags = nFlags & ~IDF_OBJECTS;
pDoc->CopyMultiRangeFromClip(rCurPos, aMark, nNoObjFlags, pClipDoc,
true, bAsLink, false, bSkipEmpty);
@@ -1555,9 +1555,9 @@ bool ScViewFunc::PasteMultiRangesFromClip(
}
bool ScViewFunc::PasteFromClipToMultiRanges(
- sal_uInt16 nFlags, ScDocument* pClipDoc, sal_uInt16 nFunction,
+ InsertDeleteFlags nFlags, ScDocument* pClipDoc, sal_uInt16 nFunction,
bool bSkipEmpty, bool bTranspose, bool bAsLink, bool bAllowDialogs,
- InsCellCmd eMoveMode, sal_uInt16 nUndoFlags )
+ InsCellCmd eMoveMode, InsertDeleteFlags nUndoFlags )
{
if (bTranspose)
{
@@ -1904,13 +1904,13 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
bool bRowInfo = ( nStartCol==0 && nEndCol==MAXCOL );
SCCOL nUndoEndCol = nStartCol+aColLength-1;
SCROW nUndoEndRow = nCurrentRow;
- sal_uInt16 nUndoFlags = IDF_NONE;
+ InsertDeleteFlags nUndoFlags = IDF_NONE;
if ( bRecord )
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndoSelected( pDoc , rMark , bColInfo , bRowInfo );
- pDoc->CopyToDocument( aUserRange , 1 , false , pUndoDoc );
+ pDoc->CopyToDocument( aUserRange , IDF_VALUE , false , pUndoDoc );
}
sal_uInt16 nExtFlags = 0;
pDocSh->UpdatePaintExt( nExtFlags, nStartCol, nStartRow, nStartTab , nEndCol, nEndRow, nEndTab ); // content before the change
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index c3359a0e7afd..1993cca5d2a7 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1734,7 +1734,7 @@ void ScViewFunc::DeleteMulti( bool bRows, bool bRecord )
// delete contents
-void ScViewFunc::DeleteContents( sal_uInt16 nFlags, bool bRecord )
+void ScViewFunc::DeleteContents( InsertDeleteFlags nFlags, bool bRecord )
{
ScViewData& rViewData = GetViewData();
rViewData.SetPasteMode( SC_PASTE_NONE );
@@ -1854,7 +1854,7 @@ void ScViewFunc::DeleteContents( sal_uInt16 nFlags, bool bRecord )
// in case of "Format/Standard" copy all attributes, because CopyToDocument
// with IDF_HARDATTR only is too time-consuming:
- sal_uInt16 nUndoDocFlags = nFlags;
+ InsertDeleteFlags nUndoDocFlags = nFlags;
if (nFlags & IDF_ATTRIB)
nUndoDocFlags |= IDF_ATTRIB;
if (nFlags & IDF_EDITATTR) // Edit-Engine-Attribute