summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-26 10:19:25 +0200
committerNoel Grandin <noel@peralex.com>2015-10-26 10:19:43 +0200
commiteaa34b4e29478770c4707d56aa102491bc8e058a (patch)
tree40a47c34cc90068c1b8648f99667dec44a301716
parent2f83ed1407302a83130cf6e3984743342eec708d (diff)
convert InsertDeleteFlags to use o3tl::typed_flags
Change-Id: I3f6a97195d3364b2a0964f62f11e9c0de9493d64
-rw-r--r--sc/inc/global.hxx89
-rw-r--r--sc/inc/scabstdlg.hxx4
-rw-r--r--sc/qa/unit/copy_paste_test.cxx2
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx4
-rw-r--r--sc/qa/unit/ucalc.cxx74
-rw-r--r--sc/qa/unit/ucalc_formula.cxx2
-rw-r--r--sc/qa/unit/ucalc_sharedformula.cxx2
-rw-r--r--sc/source/core/data/clipcontext.cxx14
-rw-r--r--sc/source/core/data/column.cxx52
-rw-r--r--sc/source/core/data/column3.cxx52
-rw-r--r--sc/source/core/data/column4.cxx18
-rw-r--r--sc/source/core/data/documen2.cxx6
-rw-r--r--sc/source/core/data/documen3.cxx2
-rw-r--r--sc/source/core/data/document.cxx62
-rw-r--r--sc/source/core/data/document10.cxx4
-rw-r--r--sc/source/core/data/dpobject.cxx2
-rw-r--r--sc/source/core/data/dpoutput.cxx4
-rw-r--r--sc/source/core/data/table2.cxx34
-rw-r--r--sc/source/core/data/table4.cxx10
-rw-r--r--sc/source/core/data/table6.cxx2
-rw-r--r--sc/source/core/tool/chgtrack.cxx4
-rw-r--r--sc/source/ui/app/transobj.cxx4
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx4
-rw-r--r--sc/source/ui/docshell/arealink.cxx12
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx32
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx24
-rw-r--r--sc/source/ui/docshell/docfunc.cxx74
-rw-r--r--sc/source/ui/docshell/docfuncutil.cxx16
-rw-r--r--sc/source/ui/docshell/docsh5.cxx18
-rw-r--r--sc/source/ui/docshell/impex.cxx12
-rw-r--r--sc/source/ui/docshell/olinefun.cxx28
-rw-r--r--sc/source/ui/docshell/tablink.cxx4
-rw-r--r--sc/source/ui/inc/delcodlg.hxx2
-rw-r--r--sc/source/ui/inc/docfuncutil.hxx2
-rw-r--r--sc/source/ui/inc/inscodlg.hxx2
-rw-r--r--sc/source/ui/inc/viewfunc.hxx2
-rw-r--r--sc/source/ui/miscdlgs/delcodlg.cxx40
-rw-r--r--sc/source/ui/miscdlgs/inscodlg.cxx44
-rw-r--r--sc/source/ui/undo/undobase.cxx2
-rw-r--r--sc/source/ui/undo/undoblk.cxx69
-rw-r--r--sc/source/ui/undo/undoblk2.cxx4
-rw-r--r--sc/source/ui/undo/undoblk3.cxx84
-rw-r--r--sc/source/ui/undo/undodat.cxx108
-rw-r--r--sc/source/ui/undo/undotab.cxx6
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx26
-rw-r--r--sc/source/ui/unoobj/docuno.cxx2
-rw-r--r--sc/source/ui/unoobj/funcuno.cxx6
-rw-r--r--sc/source/ui/vba/excelvbahelper.cxx2
-rw-r--r--sc/source/ui/vba/vbahelper.cxx2
-rw-r--r--sc/source/ui/vba/vbarange.cxx16
-rw-r--r--sc/source/ui/view/cellsh1.cxx108
-rw-r--r--sc/source/ui/view/cellsh3.cxx2
-rw-r--r--sc/source/ui/view/cliputil.cxx6
-rw-r--r--sc/source/ui/view/dbfunc3.cxx18
-rw-r--r--sc/source/ui/view/gridwin.cxx6
-rw-r--r--sc/source/ui/view/viewfun2.cxx10
-rw-r--r--sc/source/ui/view/viewfun3.cxx90
-rw-r--r--sc/source/ui/view/viewfun4.cxx12
-rw-r--r--sc/source/ui/view/viewfun5.cxx8
-rw-r--r--sc/source/ui/view/viewfunc.cxx24
60 files changed, 670 insertions, 704 deletions
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 8ecfedfc62b1..c61b20951c7e 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -135,72 +135,37 @@ const ScBreakType BREAK_NONE = 0;
const ScBreakType BREAK_PAGE = 1;
const ScBreakType BREAK_MANUAL = 2;
-// insert/delete flags - typesafe bitfield
-struct InsertDeleteFlags 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)
+enum class InsertDeleteFlags : sal_uInt16
{
- 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_FORGETCAPTIONS = InsertDeleteFlags::fromInt(0x2000); /// Internal use only (d&d undo): do not delete caption objects of cell notes.
-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 | IDF_FORGETCAPTIONS;
-
-inline InsertDeleteFlags operator~ (const InsertDeleteFlags& rhs)
+ NONE = 0x0000,
+ VALUE = 0x0001, /// Numeric values (and numeric results if InsertDeleteFlags::FORMULA is not set).
+ DATETIME = 0x0002, /// Dates, times, datetime values.
+ STRING = 0x0004, /// Strings (and string results if InsertDeleteFlags::FORMULA is not set).
+ NOTE = 0x0008, /// Cell notes.
+ FORMULA = 0x0010, /// Formula cells.
+ HARDATTR = 0x0020, /// Hard cell attributes.
+ STYLES = 0x0040, /// Cell styles.
+ OBJECTS = 0x0080, /// Drawing objects.
+ EDITATTR = 0x0100, /// Rich-text attributes.
+ OUTLINE = 0x0800, /// Sheet / outlining (grouping) information
+ NOCAPTIONS = 0x0200, /// Internal use only (undo etc.): do not copy/delete caption objects of cell notes.
+ ADDNOTES = 0x0400, /// Internal use only (copy from clip): do not delete existing cell contents when pasting notes.
+ SPECIAL_BOOLEAN = 0x1000,
+ FORGETCAPTIONS = 0x2000, /// Internal use only (d&d undo): do not delete caption objects of cell notes.
+ ATTRIB = HARDATTR | STYLES,
+ CONTENTS = VALUE | DATETIME | STRING | NOTE | FORMULA | OUTLINE,
+ ALL = CONTENTS | ATTRIB | OBJECTS,
+ ALL_USED_BITS = ALL | EDITATTR | NOCAPTIONS | ADDNOTES | SPECIAL_BOOLEAN | FORGETCAPTIONS,
+ /// Copy flags for auto/series fill functions: do not touch notes and drawing objects.
+ AUTOFILL = ALL & ~(NOTE | OBJECTS)
+};
+namespace o3tl
{
- return IDF_ALL_USED_BITS & InsertDeleteFlags::fromInt(~rhs.val());
+ template<> struct typed_flags<InsertDeleteFlags> : is_typed_flags<InsertDeleteFlags, 0x3fff> {};
}
+// This doesn't work at the moment, perhaps when we have constexpr we can modify InsertDeleteFlags to make it work.
+//static_assert((InsertDeleteFlags::ATTRIB & InsertDeleteFlags::CONTENTS) == InsertDeleteFlags::NONE, "these must match");
-// This doesnt work at the moment, perhaps when we have constexpr we can modify InsertDeleteFlags to make it work.
-//static_assert((IDF_ATTRIB & IDF_CONTENTS) == IDF_NONE, "these must match");
-
-/// Copy flags for auto/series fill functions: do not touch notes and drawing objects.
-const InsertDeleteFlags IDF_AUTOFILL = IDF_ALL & ~(IDF_NOTE | IDF_OBJECTS);
enum class ScPasteFunc {
NONE, ADD, SUB, MUL, DIV
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 1fd7e12f65f2..82c866ecd01d 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -361,7 +361,7 @@ public:
ScTabViewShell* pTabViewShell) = 0;
virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(vcl::Window* pParent,
- InsertDeleteFlags nCheckDefaults = IDF_NONE) = 0;
+ InsertDeleteFlags nCheckDefaults = InsertDeleteFlags::NONE) = 0;
virtual AbstractScFillSeriesDlg * CreateScFillSeriesDlg( vcl::Window* pParent,
ScDocument& rDocument,
FillDir eFillDir,
@@ -381,7 +381,7 @@ public:
bool bDisallowCellMove = false ) = 0;
virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( vcl::Window* pParent,
- InsertDeleteFlags nCheckDefaults = IDF_NONE,
+ InsertDeleteFlags nCheckDefaults = InsertDeleteFlags::NONE,
const OUString* pStrTitle = NULL ) = 0;
virtual AbstractScInsertTableDlg * CreateScInsertTableDlg(vcl::Window* pParent, ScViewData& rViewData,
diff --git a/sc/qa/unit/copy_paste_test.cxx b/sc/qa/unit/copy_paste_test.cxx
index 1cd559beb904..9d933a370d0f 100644
--- a/sc/qa/unit/copy_paste_test.cxx
+++ b/sc/qa/unit/copy_paste_test.cxx
@@ -116,7 +116,7 @@ void ScCopyPasteTest::testCopyPasteXLS()
CPPUNIT_ASSERT(pViewShell != NULL);
// 6. Paste
- pViewShell->GetViewData().GetView()->PasteFromClip(IDF_ALL, &aClipDoc);
+ pViewShell->GetViewData().GetView()->PasteFromClip(InsertDeleteFlags::ALL, &aClipDoc);
xDocSh->DoClose();
}
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index d88a1cc8f636..d362b2d596e2 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -719,7 +719,7 @@ void ScFiltersTest::testFormulaDepDeleteContentsODS()
ScMarkData aMark;
aMark.SetMarkArea(aRange);
aMark.MarkToMulti();
- bool bGood = rFunc.DeleteContents(aMark, IDF_ALL, true, true);
+ bool bGood = rFunc.DeleteContents(aMark, InsertDeleteFlags::ALL, true, true);
CPPUNIT_ASSERT(bGood);
CPPUNIT_ASSERT_EQUAL(0.0, rDoc.GetValue(ScAddress(3,1,0)));
CPPUNIT_ASSERT_EQUAL(0.0, rDoc.GetValue(ScAddress(3,2,0)));
@@ -2623,7 +2623,7 @@ void ScFiltersTest::testOptimalHeightReset()
ScRange aDelRange(0,0,0,0,0,0);
ScMarkData aMark;
aMark.SetMarkArea(aDelRange);
- bool bRet = rFunc.DeleteContents( aMark, IDF_ALL, false, true );
+ bool bRet = rFunc.DeleteContents( aMark, InsertDeleteFlags::ALL, false, true );
CPPUNIT_ASSERT_MESSAGE("DeleteContents failed", bRet);
// get the new height of A1
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index f473903c24bd..0ef8cdc17930 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -269,7 +269,7 @@ void Test::testPerf()
ScDocument* pUndoDoc = new ScDocument(SCDOCMODE_UNDO);
pUndoDoc->InitUndo(m_pDoc, 0, 0);
- m_pDoc->CopyToDocument(ScRange(aPos), IDF_CONTENTS, false, pUndoDoc, &aMark);
+ m_pDoc->CopyToDocument(ScRange(aPos), InsertDeleteFlags::CONTENTS, false, pUndoDoc, &aMark);
// Paste it to A2:A100000, and measure its duration.
ScRange aPasteRange(0,1,0,0,99999,0);
@@ -277,17 +277,17 @@ void Test::testPerf()
{
MeasureTimeSwitch aTime(diff);
- m_pDoc->CopyFromClip(aPasteRange, aMark, IDF_CONTENTS, pUndoDoc, &aClipDoc);
+ m_pDoc->CopyFromClip(aPasteRange, aMark, InsertDeleteFlags::CONTENTS, pUndoDoc, &aClipDoc);
}
PERF_ASSERT(diff, scale, 1500.0, "Pasting a single cell to A2:A100000");
ScDocument* pRedoDoc = new ScDocument(SCDOCMODE_UNDO);
pRedoDoc->InitUndo(m_pDoc, 0, 0);
- m_pDoc->CopyToDocument(aPasteRange, IDF_CONTENTS, false, pRedoDoc, &aMark);
+ m_pDoc->CopyToDocument(aPasteRange, InsertDeleteFlags::CONTENTS, false, pRedoDoc, &aMark);
// Create an undo object for this.
ScRefUndoData* pRefUndoData = new ScRefUndoData(m_pDoc);
- ScUndoPaste aUndo(&getDocShell(), aPasteRange, aMark, pUndoDoc, pRedoDoc, IDF_CONTENTS, pRefUndoData);
+ ScUndoPaste aUndo(&getDocShell(), aPasteRange, aMark, pUndoDoc, pRedoDoc, InsertDeleteFlags::CONTENTS, pRefUndoData);
// Make sure it did what it's supposed to do.
CPPUNIT_ASSERT_EQUAL(m_pDoc->GetString(aPos), m_pDoc->GetString(aPasteRange.aStart));
@@ -340,7 +340,7 @@ void Test::testPerf()
ScDocument* pUndoDoc = new ScDocument(SCDOCMODE_UNDO);
pUndoDoc->InitUndo(m_pDoc, 0, 0);
- m_pDoc->CopyToDocument(aSrcRange, IDF_CONTENTS, false, pUndoDoc, &aMark);
+ m_pDoc->CopyToDocument(aSrcRange, InsertDeleteFlags::CONTENTS, false, pUndoDoc, &aMark);
// Paste it to A3:A100001, and measure its duration.
ScRange aPasteRange(0,2,0,0,100000,0);
@@ -348,17 +348,17 @@ void Test::testPerf()
{
MeasureTimeSwitch aTime(diff);
- m_pDoc->CopyFromClip(aPasteRange, aMark, IDF_CONTENTS, pUndoDoc, &aClipDoc);
+ m_pDoc->CopyFromClip(aPasteRange, aMark, InsertDeleteFlags::CONTENTS, pUndoDoc, &aClipDoc);
}
PERF_ASSERT(diff, scale, 1000.0, "Pasting A1:A2 to A3:A100001");
ScDocument* pRedoDoc = new ScDocument(SCDOCMODE_UNDO);
pRedoDoc->InitUndo(m_pDoc, 0, 0);
- m_pDoc->CopyToDocument(aPasteRange, IDF_CONTENTS, false, pRedoDoc, &aMark);
+ m_pDoc->CopyToDocument(aPasteRange, InsertDeleteFlags::CONTENTS, false, pRedoDoc, &aMark);
// Create an undo object for this.
ScRefUndoData* pRefUndoData = new ScRefUndoData(m_pDoc);
- ScUndoPaste aUndo(&getDocShell(), aPasteRange, aMark, pUndoDoc, pRedoDoc, IDF_CONTENTS, pRefUndoData);
+ ScUndoPaste aUndo(&getDocShell(), aPasteRange, aMark, pUndoDoc, pRedoDoc, InsertDeleteFlags::CONTENTS, pRefUndoData);
// Make sure it did what it's supposed to do.
CPPUNIT_ASSERT_EQUAL(m_pDoc->GetString(aPos), m_pDoc->GetString(aPasteRange.aStart));
@@ -417,7 +417,7 @@ void Test::testPerf()
ScDocument* pUndoDoc = new ScDocument(SCDOCMODE_UNDO);
pUndoDoc->InitUndo(m_pDoc, 0, 0);
- m_pDoc->CopyToDocument(aSrcRange, IDF_CONTENTS, false, pUndoDoc, &aMark);
+ m_pDoc->CopyToDocument(aSrcRange, InsertDeleteFlags::CONTENTS, false, pUndoDoc, &aMark);
// Paste it to A3:A50001, and measure its duration.
ScRange aPasteRange(0,2,0,0,50000,0);
@@ -425,17 +425,17 @@ void Test::testPerf()
{
MeasureTimeSwitch aTime(diff);
- m_pDoc->CopyFromClip(aPasteRange, aMark, IDF_CONTENTS, pUndoDoc, &aClipDoc);
+ m_pDoc->CopyFromClip(aPasteRange, aMark, InsertDeleteFlags::CONTENTS, pUndoDoc, &aClipDoc);
}
PERF_ASSERT(diff, scale, 2000.0, "Pasting");
ScDocument* pRedoDoc = new ScDocument(SCDOCMODE_UNDO);
pRedoDoc->InitUndo(m_pDoc, 0, 0);
- m_pDoc->CopyToDocument(aPasteRange, IDF_CONTENTS, false, pRedoDoc, &aMark);
+ m_pDoc->CopyToDocument(aPasteRange, InsertDeleteFlags::CONTENTS, false, pRedoDoc, &aMark);
// Create an undo object for this.
ScRefUndoData* pRefUndoData = new ScRefUndoData(m_pDoc);
- ScUndoPaste aUndo(&getDocShell(), aPasteRange, aMark, pUndoDoc, pRedoDoc, IDF_CONTENTS, pRefUndoData);
+ ScUndoPaste aUndo(&getDocShell(), aPasteRange, aMark, pUndoDoc, pRedoDoc, InsertDeleteFlags::CONTENTS, pRefUndoData);
// Make sure it did what it's supposed to do.
CPPUNIT_ASSERT_EQUAL(CELLTYPE_FORMULA, m_pDoc->GetCellType(aPasteRange.aStart));
@@ -3259,7 +3259,7 @@ void Test::testCopyPaste()
std::unique_ptr<ScUndoPaste> pUndo(createUndoPaste(getDocShell(), aRange, pUndoDoc));
ScMarkData aMark;
aMark.SetMarkArea(aRange);
- m_pDoc->CopyFromClip(aRange, aMark, IDF_ALL, NULL, &aClipDoc);
+ m_pDoc->CopyFromClip(aRange, aMark, InsertDeleteFlags::ALL, NULL, &aClipDoc);
//check values after copying
OUString aString;
@@ -3342,7 +3342,7 @@ void Test::testCopyPasteAsLink()
ScMarkData aMark;
aMark.SetMarkArea(aRange);
// Paste range as link.
- m_pDoc->CopyFromClip(aRange, aMark, IDF_CONTENTS, NULL, &aClipDoc, true, true);
+ m_pDoc->CopyFromClip(aRange, aMark, InsertDeleteFlags::CONTENTS, NULL, &aClipDoc, true, true);
// Check pasted content to make sure they reference the correct cells.
ScFormulaCell* pFC = m_pDoc->GetFormulaCell(ScAddress(1,1,1));
@@ -3393,13 +3393,13 @@ void Test::testCopyPasteTranspose()
::std::unique_ptr<ScDocument> pTransClip;
pTransClip.reset(new ScDocument(SCDOCMODE_CLIP));
- aNewClipDoc.TransposeClip(pTransClip.get(), IDF_ALL, false);
+ aNewClipDoc.TransposeClip(pTransClip.get(), InsertDeleteFlags::ALL, false);
ScDocument* pTransposedClip = pTransClip.release();
ScRange aDestRange = ScRange(3,1,1,3,3,1);//target: Sheet2.D2:D4
ScMarkData aMark;
aMark.SetMarkArea(aDestRange);
- m_pDoc->CopyFromClip(aDestRange, aMark, IDF_ALL, NULL, pTransposedClip);
+ m_pDoc->CopyFromClip(aDestRange, aMark, InsertDeleteFlags::ALL, NULL, pTransposedClip);
//check cell content after transposed copy/paste
OUString aString = m_pDoc->GetString(3, 3, 1);
@@ -3464,7 +3464,7 @@ void Test::testCopyPasteMultiRange()
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark);
// Paste to D9:E11, and make sure it won't crash (rhbz#1080196).
- m_pDoc->CopyMultiRangeFromClip(ScAddress(3,8,0), aMark, IDF_CONTENTS, &aClipDoc);
+ m_pDoc->CopyMultiRangeFromClip(ScAddress(3,8,0), aMark, InsertDeleteFlags::CONTENTS, &aClipDoc);
CPPUNIT_ASSERT_EQUAL(1.0, m_pDoc->GetValue(ScAddress(3,8,0)));
CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(ScAddress(4,8,0)));
CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(ScAddress(3,9,0)));
@@ -3608,20 +3608,20 @@ void Test::testCopyPasteSkipEmpty()
// Create undo document.
ScDocument* pUndoDoc = new ScDocument(SCDOCMODE_UNDO);
pUndoDoc->InitUndo(m_pDoc, 0, 0);
- m_pDoc->CopyToDocument(aDestRange, IDF_ALL, false, pUndoDoc, &aMark);
+ m_pDoc->CopyToDocument(aDestRange, InsertDeleteFlags::ALL, false, pUndoDoc, &aMark);
// Paste clipboard content onto A1:A5 but skip empty cells.
bool bSkipEmpty = true;
- m_pDoc->CopyFromClip(aDestRange, aMark, IDF_ALL, pUndoDoc, &aClipDoc, true, false, false, bSkipEmpty);
+ m_pDoc->CopyFromClip(aDestRange, aMark, InsertDeleteFlags::ALL, pUndoDoc, &aClipDoc, true, false, false, bSkipEmpty);
// Create redo document.
ScDocument* pRedoDoc = new ScDocument(SCDOCMODE_UNDO);
pRedoDoc->InitUndo(m_pDoc, 0, 0);
- m_pDoc->CopyToDocument(aDestRange, IDF_ALL, false, pRedoDoc, &aMark);
+ m_pDoc->CopyToDocument(aDestRange, InsertDeleteFlags::ALL, false, pRedoDoc, &aMark);
// Create an undo object for this.
ScRefUndoData* pRefUndoData = new ScRefUndoData(m_pDoc);
- ScUndoPaste aUndo(&getDocShell(), aDestRange, aMark, pUndoDoc, pRedoDoc, IDF_ALL, pRefUndoData);
+ ScUndoPaste aUndo(&getDocShell(), aDestRange, aMark, pUndoDoc, pRedoDoc, InsertDeleteFlags::ALL, pRefUndoData);
// Check the content after the paste.
{
@@ -3686,7 +3686,7 @@ void Test::testCopyPasteSkipEmpty2()
ScRange aDestRange(0,2,0,2,2,0);
ScMarkData aMark;
aMark.SetMarkArea(aDestRange);
- m_pDoc->CopyFromClip(aDestRange, aMark, IDF_ALL, NULL, &aClipDoc, false, false, true, true);
+ m_pDoc->CopyFromClip(aDestRange, aMark, InsertDeleteFlags::ALL, NULL, &aClipDoc, false, false, true, true);
CPPUNIT_ASSERT_EQUAL(OUString("A"), m_pDoc->GetString(ScAddress(0,2,0)));
CPPUNIT_ASSERT_MESSAGE("B3 should be empty.", m_pDoc->GetCellType(ScAddress(1,2,0)) == CELLTYPE_NONE);
@@ -3737,11 +3737,11 @@ void Test::testCopyPasteSkipEmptyConditionalFormatting()
// Create undo document.
ScDocument* pUndoDoc = new ScDocument(SCDOCMODE_UNDO);
pUndoDoc->InitUndo(m_pDoc, 0, 0);
- m_pDoc->CopyToDocument(aDestRange, IDF_CONTENTS, false, pUndoDoc, &aMark);
+ m_pDoc->CopyToDocument(aDestRange, InsertDeleteFlags::CONTENTS, false, pUndoDoc, &aMark);
// Paste clipboard content onto A1:A5 but skip empty cells.
bool bSkipEmpty = true;
- m_pDoc->CopyFromClip(aDestRange, aMark, IDF_CONTENTS, pUndoDoc, &aClipDoc, true, false, false, bSkipEmpty);
+ m_pDoc->CopyFromClip(aDestRange, aMark, InsertDeleteFlags::CONTENTS, pUndoDoc, &aClipDoc, true, false, false, bSkipEmpty);
ScConditionalFormatList* pList = m_pDoc->GetCondFormList(0);
CPPUNIT_ASSERT_EQUAL(size_t(2), pList->size());
@@ -3790,7 +3790,7 @@ void Test::testCutPasteRefUndo()
pUndoDoc->InitUndo(m_pDoc, 0, 0);
// Do the pasting of 12 into C2. This should update A2 to reference C2.
- m_pDoc->CopyFromClip(ScAddress(2,1,0), aMark, IDF_CONTENTS, pUndoDoc, &aClipDoc);
+ m_pDoc->CopyFromClip(ScAddress(2,1,0), aMark, InsertDeleteFlags::CONTENTS, pUndoDoc, &aClipDoc);
CPPUNIT_ASSERT_EQUAL(12.0, m_pDoc->GetValue(0,1,0));
if (!checkFormula(*m_pDoc, ScAddress(0,1,0), "C2"))
@@ -3800,7 +3800,7 @@ void Test::testCutPasteRefUndo()
if (!checkFormula(*pUndoDoc, ScAddress(0,1,0), "B2"))
CPPUNIT_FAIL("A2 in the undo document should be referencing B2.");
- ScUndoPaste aUndo(&getDocShell(), ScRange(ScAddress(2,1,0)), aMark, pUndoDoc, NULL, IDF_CONTENTS, NULL, false, NULL);
+ ScUndoPaste aUndo(&getDocShell(), ScRange(ScAddress(2,1,0)), aMark, pUndoDoc, NULL, InsertDeleteFlags::CONTENTS, NULL, false, NULL);
aUndo.Undo();
// Now A2 should be referencing B2 once again.
@@ -3876,14 +3876,14 @@ void Test::testUndoCut()
// Set up an undo object for cutting A1:A3.
ScDocument* pUndoDoc = new ScDocument(SCDOCMODE_UNDO);
pUndoDoc->InitUndo(m_pDoc, 0 ,0);
- m_pDoc->CopyToDocument(aRange, IDF_ALL, false, pUndoDoc);
+ m_pDoc->CopyToDocument(aRange, InsertDeleteFlags::ALL, false, pUndoDoc);
CPPUNIT_ASSERT_EQUAL( 1.0, pUndoDoc->GetValue(ScAddress(0,0,0)));
CPPUNIT_ASSERT_EQUAL( 10.0, pUndoDoc->GetValue(ScAddress(0,1,0)));
CPPUNIT_ASSERT_EQUAL(100.0, pUndoDoc->GetValue(ScAddress(0,2,0)));
ScUndoCut aUndo(&getDocShell(), aRange, aRange.aEnd, aMark, pUndoDoc);
// "Cut" the selection.
- m_pDoc->DeleteSelection(IDF_ALL, aMark);
+ m_pDoc->DeleteSelection(InsertDeleteFlags::ALL, aMark);
CPPUNIT_ASSERT_EQUAL(0.0, m_pDoc->GetValue(0,3,0)); // The SUM should be zero after the "cut".
// Undo it, and check the result.
@@ -3986,7 +3986,7 @@ void Test::testCopyPasteRelativeFormula()
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark);
// Paste it to B1:B2.
- InsertDeleteFlags nFlags = IDF_ALL;
+ InsertDeleteFlags nFlags = InsertDeleteFlags::ALL;
ScRange aDestRange(1,0,0,1,1,0);
aMark.SetMarkArea(aDestRange);
m_pDoc->CopyFromClip(aDestRange, aMark, nFlags, NULL, &aClipDoc);
@@ -4069,7 +4069,7 @@ void Test::testCopyPasteRepeatOneFormula()
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark);
// Paste it to C2:C10.
- InsertDeleteFlags nFlags = IDF_CONTENTS;
+ InsertDeleteFlags nFlags = InsertDeleteFlags::CONTENTS;
ScRange aDestRange(2,1,0,2,9,0);
aMark.SetMarkArea(aDestRange);
m_pDoc->CopyFromClip(aDestRange, aMark, nFlags, NULL, &aClipDoc);
@@ -4719,7 +4719,7 @@ void Test::testCopyPasteFormulasExternalDoc()
ScDocument* pClipDoc = new ScDocument(SCDOCMODE_CLIP);
m_pDoc->CopyToClip(aClipParam, pClipDoc, &aMark);
- InsertDeleteFlags nFlags = IDF_ALL;
+ InsertDeleteFlags nFlags = InsertDeleteFlags::ALL;
aRange = ScRange(1,1,1,1,6,1);
ScMarkData aMarkData2;
aMarkData2.SetMarkArea(aRange);
@@ -5223,7 +5223,7 @@ void Test::testNoteCopyPaste()
// Paste to B6:B8 but only cell notes.
ScRange aDestRange(1,5,0,1,7,0);
- m_pDoc->CopyFromClip(aDestRange, aMark, IDF_NOTE, NULL, &aClipDoc);
+ m_pDoc->CopyFromClip(aDestRange, aMark, InsertDeleteFlags::NOTE, NULL, &aClipDoc);
// Make sure the notes are there.
pNote = m_pDoc->GetNote(ScAddress(1,5,0));
@@ -6214,8 +6214,8 @@ void Test::testDeleteContents()
std::unique_ptr<ScDocument> pUndoDoc(new ScDocument(SCDOCMODE_UNDO));
pUndoDoc->InitUndo(m_pDoc, 0, 0);
- m_pDoc->CopyToDocument(aRange, IDF_CONTENTS, false, pUndoDoc.get(), &aMark);
- ScUndoDeleteContents aUndo(&getDocShell(), aMark, aRange, std::move(pUndoDoc), false, IDF_CONTENTS, true);
+ m_pDoc->CopyToDocument(aRange, InsertDeleteFlags::CONTENTS, false, pUndoDoc.get(), &aMark);
+ ScUndoDeleteContents aUndo(&getDocShell(), aMark, aRange, std::move(pUndoDoc), false, InsertDeleteFlags::CONTENTS, true);
clearRange(m_pDoc, aRange);
CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(ScAddress(3,15,0))); // formula
@@ -6822,7 +6822,7 @@ void Test::clearRange(ScDocument* pDoc, const ScRange& rRange)
aMarkData.SetMarkArea(rRange);
pDoc->DeleteArea(
rRange.aStart.Col(), rRange.aStart.Row(),
- rRange.aEnd.Col(), rRange.aEnd.Row(), aMarkData, IDF_CONTENTS);
+ rRange.aEnd.Col(), rRange.aEnd.Row(), aMarkData, InsertDeleteFlags::CONTENTS);
}
void Test::clearSheet(ScDocument* pDoc, SCTAB nTab)
@@ -6843,7 +6843,7 @@ void Test::pasteFromClip(ScDocument* pDestDoc, const ScRange& rDestRange, ScDocu
{
ScMarkData aMark;
aMark.SetMarkArea(rDestRange);
- pDestDoc->CopyFromClip(rDestRange, aMark, IDF_ALL, NULL, pClipDoc);
+ pDestDoc->CopyFromClip(rDestRange, aMark, InsertDeleteFlags::ALL, NULL, pClipDoc);
}
ScUndoPaste* Test::createUndoPaste(ScDocShell& rDocSh, const ScRange& rRange, ScDocument* pUndoDoc)
@@ -6854,7 +6854,7 @@ ScUndoPaste* Test::createUndoPaste(ScDocShell& rDocSh, const ScRange& rRange, Sc
ScRefUndoData* pRefUndoData = new ScRefUndoData(&rDoc);
return new ScUndoPaste(
- &rDocSh, rRange, aMarkData, pUndoDoc, NULL, IDF_ALL, pRefUndoData, false);
+ &rDocSh, rRange, aMarkData, pUndoDoc, NULL, InsertDeleteFlags::ALL, pRefUndoData, false);
}
void Test::setExpandRefs(bool bExpand)
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 1e0c06bbb5cc..a8e9100c3835 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -2214,7 +2214,7 @@ void Test::testFormulaRefUpdateDeleteContent()
ScDocFunc& rFunc = getDocShell().GetDocFunc();
ScMarkData aMark;
aMark.SetMarkArea(ScAddress(1,1,0));
- rFunc.DeleteContents(aMark, IDF_CONTENTS, true, true);
+ rFunc.DeleteContents(aMark, InsertDeleteFlags::CONTENTS, true, true);
CPPUNIT_ASSERT_MESSAGE("B2 should be empty.", m_pDoc->GetCellType(ScAddress(1,1,0)) == CELLTYPE_NONE);
CPPUNIT_ASSERT_EQUAL(0.0, m_pDoc->GetValue(ScAddress(2,1,0)));
diff --git a/sc/qa/unit/ucalc_sharedformula.cxx b/sc/qa/unit/ucalc_sharedformula.cxx
index 3c1a0e353c07..63cc3b1673ed 100644
--- a/sc/qa/unit/ucalc_sharedformula.cxx
+++ b/sc/qa/unit/ucalc_sharedformula.cxx
@@ -1317,7 +1317,7 @@ void Test::testSharedFormulasCopyPaste()
ScRange aRange(1,0,0,1,9,0); // B1:B10
ScDocument* pUndoDoc = new ScDocument(SCDOCMODE_UNDO);
pUndoDoc->InitUndo(m_pDoc, 0, 0, true, true);
- m_pDoc->CopyToDocument(aRange, IDF_CONTENTS, false, pUndoDoc);
+ m_pDoc->CopyToDocument(aRange, InsertDeleteFlags::CONTENTS, false, pUndoDoc);
std::unique_ptr<ScUndoPaste> pUndo(createUndoPaste(getDocShell(), aRange, pUndoDoc));
// First, make sure the formula cells are shared in the undo document.
diff --git a/sc/source/core/data/clipcontext.cxx b/sc/source/core/data/clipcontext.cxx
index 4bdb0e766687..25479d572d7f 100644
--- a/sc/source/core/data/clipcontext.cxx
+++ b/sc/source/core/data/clipcontext.cxx
@@ -39,10 +39,10 @@ CopyFromClipContext::CopyFromClipContext(ScDocument& rDoc,
mnTabStart(-1), mnTabEnd(-1),
mrDestDoc(rDoc),
mpRefUndoDoc(pRefUndoDoc), mpClipDoc(pClipDoc),
- mnInsertFlag(nInsertFlag), mnDeleteFlag(IDF_NONE),
+ mnInsertFlag(nInsertFlag), mnDeleteFlag(InsertDeleteFlags::NONE),
mpCondFormatList(NULL),
mbAsLink(bAsLink), mbSkipAttrForEmptyCells(bSkipAttrForEmptyCells),
- mbCloneNotes (mnInsertFlag & (IDF_NOTE|IDF_ADDNOTES)),
+ mbCloneNotes (mnInsertFlag & (InsertDeleteFlags::NOTE|InsertDeleteFlags::ADDNOTES)),
mbTableProtected(false)
{
}
@@ -160,11 +160,11 @@ void CopyFromClipContext::setSingleCell( const ScAddress& rSrcPos, const ScColum
// Check the paste flag to see whether we want to paste this cell. If the
// flag says we don't want to paste this cell, we'll return with true.
InsertDeleteFlags nFlags = getInsertFlag();
- bool bNumeric = (nFlags & IDF_VALUE) != IDF_NONE;
- bool bDateTime = (nFlags & IDF_DATETIME) != IDF_NONE;
- bool bString = (nFlags & IDF_STRING) != IDF_NONE;
- bool bBoolean = (nFlags & IDF_SPECIAL_BOOLEAN) != IDF_NONE;
- bool bFormula = (nFlags & IDF_FORMULA) != IDF_NONE;
+ bool bNumeric = (nFlags & InsertDeleteFlags::VALUE) != InsertDeleteFlags::NONE;
+ bool bDateTime = (nFlags & InsertDeleteFlags::DATETIME) != InsertDeleteFlags::NONE;
+ bool bString = (nFlags & InsertDeleteFlags::STRING) != InsertDeleteFlags::NONE;
+ bool bBoolean = (nFlags & InsertDeleteFlags::SPECIAL_BOOLEAN) != InsertDeleteFlags::NONE;
+ bool bFormula = (nFlags & InsertDeleteFlags::FORMULA) != InsertDeleteFlags::NONE;
switch (rSrcCell.meType)
{
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 33e0a3bfbfb4..7bb8d77f5ae3 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1226,9 +1226,9 @@ bool canCopyValue(const ScDocument& rDoc, const ScAddress& rPos, InsertDeleteFla
sal_uInt32 nNumIndex = static_cast<const SfxUInt32Item*>(rDoc.GetAttr(rPos, ATTR_VALUE_FORMAT))->GetValue();
short nType = rDoc.GetFormatTable()->GetType(nNumIndex);
if ((nType == css::util::NumberFormat::DATE) || (nType == css::util::NumberFormat::TIME) || (nType == css::util::NumberFormat::DATETIME))
- return ((nFlags & IDF_DATETIME) != IDF_NONE);
+ return ((nFlags & InsertDeleteFlags::DATETIME) != InsertDeleteFlags::NONE);
- return (nFlags & IDF_VALUE) != IDF_NONE;
+ return (nFlags & InsertDeleteFlags::VALUE) != InsertDeleteFlags::NONE;
}
class CopyAsLinkHandler
@@ -1310,9 +1310,9 @@ public:
{
size_t nRow = aNode.position + nOffset;
- if (mnCopyFlags & (IDF_NOTE|IDF_ADDNOTES))
+ if (mnCopyFlags & (InsertDeleteFlags::NOTE|InsertDeleteFlags::ADDNOTES))
{
- bool bCloneCaption = (mnCopyFlags & IDF_NOCAPTIONS) == IDF_NONE;
+ bool bCloneCaption = (mnCopyFlags & InsertDeleteFlags::NOCAPTIONS) == InsertDeleteFlags::NONE;
duplicateNotes(nRow, nDataSize, bCloneCaption );
}
@@ -1320,7 +1320,7 @@ public:
{
case sc::element_type_numeric:
{
- if ((mnCopyFlags & (IDF_DATETIME|IDF_VALUE)) == IDF_NONE)
+ if ((mnCopyFlags & (InsertDeleteFlags::DATETIME|InsertDeleteFlags::VALUE)) == InsertDeleteFlags::NONE)
return;
sc::numeric_block::const_iterator it = sc::numeric_block::begin(*aNode.data);
@@ -1342,7 +1342,7 @@ public:
case sc::element_type_string:
case sc::element_type_edittext:
{
- if (!(mnCopyFlags & IDF_STRING))
+ if (!(mnCopyFlags & InsertDeleteFlags::STRING))
return;
createRefBlock(aNode, nOffset, nDataSize);
@@ -1350,7 +1350,7 @@ public:
break;
case sc::element_type_formula:
{
- if (!(mnCopyFlags & IDF_FORMULA))
+ if (!(mnCopyFlags & InsertDeleteFlags::FORMULA))
return;
createRefBlock(aNode, nOffset, nDataSize);
@@ -1390,11 +1390,11 @@ class CopyByCloneHandler
{
ScAddress aDestPos(mrDestCol.GetCol(), nRow, mrDestCol.GetTab());
- bool bCloneValue = (mnCopyFlags & IDF_VALUE) != IDF_NONE;
- bool bCloneDateTime = (mnCopyFlags & IDF_DATETIME) != IDF_NONE;
- bool bCloneString = (mnCopyFlags & IDF_STRING) != IDF_NONE;
- bool bCloneSpecialBoolean = (mnCopyFlags & IDF_SPECIAL_BOOLEAN) != IDF_NONE;
- bool bCloneFormula = (mnCopyFlags & IDF_FORMULA) != IDF_NONE;
+ bool bCloneValue = (mnCopyFlags & InsertDeleteFlags::VALUE) != InsertDeleteFlags::NONE;
+ bool bCloneDateTime = (mnCopyFlags & InsertDeleteFlags::DATETIME) != InsertDeleteFlags::NONE;
+ bool bCloneString = (mnCopyFlags & InsertDeleteFlags::STRING) != InsertDeleteFlags::NONE;
+ bool bCloneSpecialBoolean = (mnCopyFlags & InsertDeleteFlags::SPECIAL_BOOLEAN) != InsertDeleteFlags::NONE;
+ bool bCloneFormula = (mnCopyFlags & InsertDeleteFlags::FORMULA) != InsertDeleteFlags::NONE;
bool bForceFormula = false;
@@ -1512,9 +1512,9 @@ public:
{
size_t nRow = aNode.position + nOffset;
- if (mnCopyFlags & (IDF_NOTE|IDF_ADDNOTES))
+ if (mnCopyFlags & (InsertDeleteFlags::NOTE|InsertDeleteFlags::ADDNOTES))
{
- bool bCloneCaption = (mnCopyFlags & IDF_NOCAPTIONS) == IDF_NONE;
+ bool bCloneCaption = (mnCopyFlags & InsertDeleteFlags::NOCAPTIONS) == InsertDeleteFlags::NONE;
duplicateNotes(nRow, nDataSize, bCloneCaption );
}
@@ -1522,7 +1522,7 @@ public:
{
case sc::element_type_numeric:
{
- if ((mnCopyFlags & (IDF_DATETIME|IDF_VALUE)) == IDF_NONE)
+ if ((mnCopyFlags & (InsertDeleteFlags::DATETIME|InsertDeleteFlags::VALUE)) == InsertDeleteFlags::NONE)
return;
sc::numeric_block::const_iterator it = sc::numeric_block::begin(*aNode.data);
@@ -1543,7 +1543,7 @@ public:
break;
case sc::element_type_string:
{
- if (!(mnCopyFlags & IDF_STRING))
+ if (!(mnCopyFlags & InsertDeleteFlags::STRING))
return;
sc::string_block::const_iterator it = sc::string_block::begin(*aNode.data);
@@ -1583,7 +1583,7 @@ public:
break;
case sc::element_type_edittext:
{
- if (!(mnCopyFlags & IDF_STRING))
+ if (!(mnCopyFlags & InsertDeleteFlags::STRING))
return;
sc::edittext_block::const_iterator it = sc::edittext_block::begin(*aNode.data);
@@ -1647,9 +1647,9 @@ void ScColumn::CopyToColumn(
return;
}
- if ( (nFlags & IDF_ATTRIB) != IDF_NONE )
+ if ( (nFlags & InsertDeleteFlags::ATTRIB) != InsertDeleteFlags::NONE )
{
- if ( (nFlags & IDF_STYLES) != IDF_STYLES )
+ if ( (nFlags & InsertDeleteFlags::STYLES) != InsertDeleteFlags::STYLES )
{ // keep the StyleSheets in the target document
// e.g. DIF and RTF Clipboard-Import
for ( SCROW nRow = nRow1; nRow <= nRow2; nRow++ )
@@ -1666,7 +1666,7 @@ void ScColumn::CopyToColumn(
pAttrArray->CopyArea( nRow1, nRow2, 0, *rColumn.pAttrArray);
}
- if ((nFlags & IDF_CONTENTS) != IDF_NONE)
+ if ((nFlags & InsertDeleteFlags::CONTENTS) != InsertDeleteFlags::NONE)
{
if (bAsLink)
{
@@ -1696,12 +1696,12 @@ void ScColumn::UndoToColumn(
ScColumn& rColumn, const ScMarkData* pMarkData ) const
{
if (nRow1 > 0)
- CopyToColumn(rCxt, 0, nRow1-1, IDF_FORMULA, false, rColumn);
+ CopyToColumn(rCxt, 0, nRow1-1, InsertDeleteFlags::FORMULA, false, rColumn);
CopyToColumn(rCxt, nRow1, nRow2, nFlags, bMarked, rColumn, pMarkData); //TODO: bMarked ????
if (nRow2 < MAXROW)
- CopyToColumn(rCxt, nRow2+1, MAXROW, IDF_FORMULA, false, rColumn);
+ CopyToColumn(rCxt, nRow2+1, MAXROW, InsertDeleteFlags::FORMULA, false, rColumn);
}
void ScColumn::CopyUpdated( const ScColumn& rPosCol, ScColumn& rDestCol ) const
@@ -1738,10 +1738,10 @@ void ScColumn::CopyScenarioFrom( const ScColumn& rSrcCol )
{
if ( static_cast<const ScMergeFlagAttr&>(pPattern->GetItem( ATTR_MERGE_FLAG )).IsScenario() )
{
- DeleteArea( nStart, nEnd, IDF_CONTENTS );
+ DeleteArea( nStart, nEnd, InsertDeleteFlags::CONTENTS );
sc::CopyToDocContext aCxt(*pDocument);
((ScColumn&)rSrcCol).
- CopyToColumn(aCxt, nStart, nEnd, IDF_CONTENTS, false, *this);
+ CopyToColumn(aCxt, nStart, nEnd, InsertDeleteFlags::CONTENTS, false, *this);
// UpdateUsed not needed, already done in TestCopyScenario (obsolete comment ?)
@@ -1769,9 +1769,9 @@ void ScColumn::CopyScenarioTo( ScColumn& rDestCol ) const
{
if ( static_cast<const ScMergeFlagAttr&>(pPattern->GetItem( ATTR_MERGE_FLAG )).IsScenario() )
{
- rDestCol.DeleteArea( nStart, nEnd, IDF_CONTENTS );
+ rDestCol.DeleteArea( nStart, nEnd, InsertDeleteFlags::CONTENTS );
sc::CopyToDocContext aCxt(*rDestCol.pDocument);
- CopyToColumn(aCxt, nStart, nEnd, IDF_CONTENTS, false, rDestCol);
+ CopyToColumn(aCxt, nStart, nEnd, InsertDeleteFlags::CONTENTS, false, rDestCol);
// UpdateUsed not needed, is already done in TestCopyScenario (obsolete comment ?)
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index c4d2e4ef3061..065f0d51a6b1 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -545,9 +545,9 @@ class DeleteAreaHandler
public:
DeleteAreaHandler(ScDocument& rDoc, InsertDeleteFlags nDelFlag) :
mrDoc(rDoc),
- mbNumeric(nDelFlag & IDF_VALUE),
- mbString(nDelFlag & IDF_STRING),
- mbFormula(nDelFlag & IDF_FORMULA) {}
+ mbNumeric(nDelFlag & InsertDeleteFlags::VALUE),
+ mbString(nDelFlag & InsertDeleteFlags::STRING),
+ mbFormula(nDelFlag & InsertDeleteFlags::FORMULA) {}
void operator() (const sc::CellStoreType::value_type& node, size_t nOffset, size_t nDataSize)
{
@@ -659,10 +659,10 @@ void ScColumn::DeleteArea(
SCROW nStartRow, SCROW nEndRow, InsertDeleteFlags nDelFlag, bool bBroadcast,
sc::ColumnSpanSet* pBroadcastSpans )
{
- InsertDeleteFlags nContMask = IDF_CONTENTS;
- // IDF_NOCAPTIONS needs to be passed too, if IDF_NOTE is set
- if( nDelFlag & IDF_NOTE )
- nContMask |= IDF_NOCAPTIONS;
+ InsertDeleteFlags nContMask = InsertDeleteFlags::CONTENTS;
+ // InsertDeleteFlags::NOCAPTIONS needs to be passed too, if InsertDeleteFlags::NOTE is set
+ if( nDelFlag & InsertDeleteFlags::NOTE )
+ nContMask |= InsertDeleteFlags::NOCAPTIONS;
InsertDeleteFlags nContFlag = nDelFlag & nContMask;
sc::SingleColumnSpanSet aDeletedRows;
@@ -670,7 +670,7 @@ void ScColumn::DeleteArea(
sc::ColumnBlockPosition aBlockPos;
InitBlockPosition(aBlockPos);
- if (!IsEmptyData() && nContFlag)
+ if (!IsEmptyData() && nContFlag != InsertDeleteFlags::NONE)
{
DeleteCells(aBlockPos, nStartRow, nEndRow, nDelFlag, aDeletedRows);
if (pBroadcastSpans)
@@ -683,22 +683,22 @@ void ScColumn::DeleteArea(
}
}
- if (nDelFlag & IDF_NOTE)
+ if (nDelFlag & InsertDeleteFlags::NOTE)
{
- bool bForgetCaptionOwnership = ((nDelFlag & IDF_FORGETCAPTIONS) != IDF_NONE);
+ bool bForgetCaptionOwnership = ((nDelFlag & InsertDeleteFlags::FORGETCAPTIONS) != InsertDeleteFlags::NONE);
DeleteCellNotes(aBlockPos, nStartRow, nEndRow, bForgetCaptionOwnership);
}
- if ( nDelFlag & IDF_EDITATTR )
+ if ( nDelFlag & InsertDeleteFlags::EDITATTR )
{
- OSL_ENSURE( nContFlag == IDF_NONE, "DeleteArea: Wrong Flags" );
+ OSL_ENSURE( nContFlag == InsertDeleteFlags::NONE, "DeleteArea: Wrong Flags" );
RemoveEditAttribs( nStartRow, nEndRow );
}
// Delete attributes just now
- if ((nDelFlag & IDF_ATTRIB) == IDF_ATTRIB)
+ if ((nDelFlag & InsertDeleteFlags::ATTRIB) == InsertDeleteFlags::ATTRIB)
pAttrArray->DeleteArea( nStartRow, nEndRow );
- else if ((nDelFlag & IDF_HARDATTR) == IDF_HARDATTR)
+ else if ((nDelFlag & InsertDeleteFlags::HARDATTR) == InsertDeleteFlags::HARDATTR)
pAttrArray->DeleteHardAttr( nStartRow, nEndRow );
if (bBroadcast)
@@ -818,17 +818,17 @@ public:
{
if (bCopyCellNotes && !mrCxt.isSkipAttrForEmptyCells())
{
- bool bCloneCaption = (nFlags & IDF_NOCAPTIONS) == IDF_NONE;
+ bool bCloneCaption = (nFlags & InsertDeleteFlags::NOCAPTIONS) == InsertDeleteFlags::NONE;
duplicateNotes(nSrcRow1, nDataSize, bCloneCaption );
}
return;
}
- bool bNumeric = (nFlags & IDF_VALUE) != IDF_NONE;
- bool bDateTime = (nFlags & IDF_DATETIME) != IDF_NONE;
- bool bString = (nFlags & IDF_STRING) != IDF_NONE;
- bool bBoolean = (nFlags & IDF_SPECIAL_BOOLEAN) != IDF_NONE;
- bool bFormula = (nFlags & IDF_FORMULA) != IDF_NONE;
+ bool bNumeric = (nFlags & InsertDeleteFlags::VALUE) != InsertDeleteFlags::NONE;
+ bool bDateTime = (nFlags & InsertDeleteFlags::DATETIME) != InsertDeleteFlags::NONE;
+ bool bString = (nFlags & InsertDeleteFlags::STRING) != InsertDeleteFlags::NONE;
+ bool bBoolean = (nFlags & InsertDeleteFlags::SPECIAL_BOOLEAN) != InsertDeleteFlags::NONE;
+ bool bFormula = (nFlags & InsertDeleteFlags::FORMULA) != InsertDeleteFlags::NONE;
bool bAsLink = mrCxt.isAsLink();
@@ -1001,7 +1001,7 @@ public:
}
if (bCopyCellNotes)
{
- bool bCloneCaption = (nFlags & IDF_NOCAPTIONS) == IDF_NONE;
+ bool bCloneCaption = (nFlags & InsertDeleteFlags::NOCAPTIONS) == InsertDeleteFlags::NONE;
duplicateNotes(nSrcRow1, nDataSize, bCloneCaption );
}
}
@@ -1040,7 +1040,7 @@ public:
void ScColumn::CopyFromClip(
sc::CopyFromClipContext& rCxt, SCROW nRow1, SCROW nRow2, long nDy, ScColumn& rColumn )
{
- if ((rCxt.getInsertFlag() & IDF_ATTRIB) != IDF_NONE)
+ if ((rCxt.getInsertFlag() & InsertDeleteFlags::ATTRIB) != InsertDeleteFlags::NONE)
{
if (rCxt.isSkipAttrForEmptyCells())
{
@@ -1055,13 +1055,13 @@ void ScColumn::CopyFromClip(
else
rColumn.pAttrArray->CopyAreaSafe( nRow1, nRow2, nDy, *pAttrArray );
}
- if ((rCxt.getInsertFlag() & IDF_CONTENTS) == IDF_NONE)
+ if ((rCxt.getInsertFlag() & InsertDeleteFlags::CONTENTS) == InsertDeleteFlags::NONE)
return;
- if (rCxt.isAsLink() && rCxt.getInsertFlag() == IDF_ALL)
+ if (rCxt.isAsLink() && rCxt.getInsertFlag() == InsertDeleteFlags::ALL)
{
// We also reference empty cells for "ALL"
- // IDF_ALL must always contain more flags when compared to "Insert contents" as
+ // InsertDeleteFlags::ALL must always contain more flags when compared to "Insert contents" as
// contents can be selected one by one!
ScAddress aDestPos( nCol, 0, nTab ); // Adapt Row
@@ -2353,7 +2353,7 @@ void ScColumn::RemoveProtected( SCROW nStartRow, SCROW nEndRow )
{
const ScProtectionAttr* pAttr = static_cast<const ScProtectionAttr*>(&pPattern->GetItem(ATTR_PROTECTION));
if ( pAttr->GetHideCell() )
- DeleteArea( nTop, nBottom, IDF_CONTENTS );
+ DeleteArea( nTop, nBottom, InsertDeleteFlags::CONTENTS );
else if ( pAttr->GetHideFormula() )
{
// Replace all formula cells between nTop and nBottom with raw value cells.
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index bd7c60bf7d4d..b374d52655f5 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -104,21 +104,21 @@ void ScColumn::DeleteBeforeCopyFromClip(
SCROW nRow1 = it->mnRow1;
SCROW nRow2 = it->mnRow2;
- if (nDelFlag & IDF_CONTENTS)
+ if (nDelFlag & InsertDeleteFlags::CONTENTS)
{
sc::SingleColumnSpanSet aDeletedRows;
DeleteCells(aBlockPos, nRow1, nRow2, nDelFlag, aDeletedRows);
rBroadcastSpans.set(nTab, nCol, aDeletedRows, true);
}
- if (nDelFlag & IDF_NOTE)
+ if (nDelFlag & InsertDeleteFlags::NOTE)
DeleteCellNotes(aBlockPos, nRow1, nRow2, false);
- if (nDelFlag & IDF_EDITATTR)
+ if (nDelFlag & InsertDeleteFlags::EDITATTR)
RemoveEditAttribs(nRow1, nRow2);
// Delete attributes just now
- if (nDelFlag & IDF_ATTRIB)
+ if (nDelFlag & InsertDeleteFlags::ATTRIB)
{
pAttrArray->DeleteArea(nRow1, nRow2);
@@ -133,7 +133,7 @@ void ScColumn::DeleteBeforeCopyFromClip(
if (pCondList)
pCondList->DeleteArea(nCol, nRow1, nCol, nRow2);
}
- else if ((nDelFlag & IDF_HARDATTR) == IDF_HARDATTR)
+ else if ((nDelFlag & InsertDeleteFlags::HARDATTR) == InsertDeleteFlags::HARDATTR)
pAttrArray->DeleteHardAttr(nRow1, nRow2);
}
}
@@ -154,7 +154,7 @@ void ScColumn::CopyOneCellFromClip( sc::CopyFromClipContext& rCxt, SCROW nRow1,
InsertDeleteFlags nFlags = rCxt.getInsertFlag();
- if ((nFlags & IDF_ATTRIB) != IDF_NONE)
+ if ((nFlags & InsertDeleteFlags::ATTRIB) != InsertDeleteFlags::NONE)
{
if (!rCxt.isSkipAttrForEmptyCells() || rSrcCell.meType != CELLTYPE_NONE)
{
@@ -164,7 +164,7 @@ void ScColumn::CopyOneCellFromClip( sc::CopyFromClipContext& rCxt, SCROW nRow1,
}
}
- if ((nFlags & IDF_CONTENTS) != IDF_NONE)
+ if ((nFlags & InsertDeleteFlags::CONTENTS) != InsertDeleteFlags::NONE)
{
std::vector<sc::CellTextAttr> aTextAttrs(nDestSize, rSrcAttr);
@@ -225,7 +225,7 @@ void ScColumn::CopyOneCellFromClip( sc::CopyFromClipContext& rCxt, SCROW nRow1,
}
const ScPostIt* pNote = rCxt.getSingleCellNote(nColOffset);
- if (pNote && (nFlags & (IDF_NOTE | IDF_ADDNOTES)) != IDF_NONE)
+ if (pNote && (nFlags & (InsertDeleteFlags::NOTE | InsertDeleteFlags::ADDNOTES)) != InsertDeleteFlags::NONE)
{
// Duplicate the cell note over the whole pasted range.
@@ -236,7 +236,7 @@ void ScColumn::CopyOneCellFromClip( sc::CopyFromClipContext& rCxt, SCROW nRow1,
aNotes.reserve(nDestSize);
for (size_t i = 0; i < nDestSize; ++i)
{
- bool bCloneCaption = (nFlags & IDF_NOCAPTIONS) == IDF_NONE;
+ bool bCloneCaption = (nFlags & InsertDeleteFlags::NOCAPTIONS) == InsertDeleteFlags::NONE;
aNotes.push_back(pNote->Clone(rSrcPos, *pDocument, aDestPos, bCloneCaption));
aDestPos.IncRow();
}
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index dbf968631193..5774c3331299 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -886,7 +886,7 @@ bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
{
SetNoListening( true ); // noch nicht bei CopyToTable/Insert
sc::CopyToDocContext aCopyDocCxt(*this);
- maTabs[nOldPos]->CopyToTable(aCopyDocCxt, 0, 0, MAXCOL, MAXROW, IDF_ALL, (pOnlyMarked != NULL),
+ maTabs[nOldPos]->CopyToTable(aCopyDocCxt, 0, 0, MAXCOL, MAXROW, InsertDeleteFlags::ALL, (pOnlyMarked != NULL),
maTabs[nNewPos], pOnlyMarked );
maTabs[nNewPos]->SetTabBgColor(maTabs[nOldPos]->GetTabBgColor());
@@ -965,7 +965,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
{
if (ValidTab(nDestPos) && nDestPos < static_cast<SCTAB>(maTabs.size()) && maTabs[nDestPos])
{
- maTabs[nDestPos]->DeleteArea( 0,0, MAXCOL,MAXROW, IDF_ALL );
+ maTabs[nDestPos]->DeleteArea( 0,0, MAXCOL,MAXROW, InsertDeleteFlags::ALL );
}
else
bValid = false;
@@ -991,7 +991,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
{ // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( pBASM);
pSrcDoc->maTabs[nSrcPos]->CopyToTable(aCxt, 0, 0, MAXCOL, MAXROW,
- ( bResultsOnly ? IDF_ALL & ~IDF_FORMULA : IDF_ALL),
+ ( bResultsOnly ? InsertDeleteFlags::ALL & ~InsertDeleteFlags::FORMULA : InsertDeleteFlags::ALL),
false, maTabs[nDestPos] );
}
}
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index e9b2f558f5c6..e93926458ebb 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -1988,7 +1988,7 @@ void ScDocument::DoMerge( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
ApplyFlagsTab( nStartCol+1, nStartRow+1, nEndCol, nEndRow, nTab, SC_MF_HOR | SC_MF_VER );
// Remove all covered notes (removed captions are collected by drawing undo if active)
- InsertDeleteFlags nDelFlag = IDF_NOTE | (bDeleteCaptions ? IDF_NONE : IDF_NOCAPTIONS);
+ InsertDeleteFlags nDelFlag = InsertDeleteFlags::NOTE | (bDeleteCaptions ? InsertDeleteFlags::NONE : InsertDeleteFlags::NOCAPTIONS);
if( nStartCol < nEndCol )
DeleteAreaTab( nStartCol + 1, nStartRow, nEndCol, nStartRow, nTab, nDelFlag );
if( nStartRow < nEndRow )
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 53f5b304f803..9786c2ae5b81 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -1747,7 +1747,7 @@ bool ScDocument::CanFitBlock( const ScRange& rOld, const ScRange& rNew )
void ScDocument::FitBlock( const ScRange& rOld, const ScRange& rNew, bool bClear )
{
if (bClear)
- DeleteAreaTab( rOld, IDF_ALL );
+ DeleteAreaTab( rOld, InsertDeleteFlags::ALL );
bool bInsCol,bDelCol,bInsRow,bDelRow;
ScRange aColRange,aRowRange;
@@ -1787,7 +1787,7 @@ void ScDocument::DeleteArea(
std::vector<ScAddress> aGroupPos;
// Destroy and reconstruct listeners only if content is affected.
- bool bDelContent = ((nDelFlag & ~IDF_CONTENTS) != nDelFlag);
+ bool bDelContent = ((nDelFlag & ~InsertDeleteFlags::CONTENTS) != nDelFlag);
if (bDelContent)
{
// Record the positions of top and/or bottom formula groups that intersect
@@ -1985,7 +1985,7 @@ void ScDocument::UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
sc::AutoCalcSwitch aACSwitch(*pDestDoc, false); // avoid multiple calculations
if (nTab1 > 0)
- CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTab1-1, IDF_FORMULA, false, pDestDoc, pMarks );
+ CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTab1-1, InsertDeleteFlags::FORMULA, false, pDestDoc, pMarks );
sc::CopyToDocContext aCxt(*pDestDoc);
OSL_ASSERT( nTab2 < static_cast<SCTAB>(maTabs.size()) && nTab2 < static_cast<SCTAB>(pDestDoc->maTabs.size()));
@@ -1997,7 +1997,7 @@ void ScDocument::UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
}
if (nTab2 < MAXTAB)
- CopyToDocument( 0,0,nTab2+1, MAXCOL,MAXROW,MAXTAB, IDF_FORMULA, false, pDestDoc, pMarks );
+ CopyToDocument( 0,0,nTab2+1, MAXCOL,MAXROW,MAXTAB, InsertDeleteFlags::FORMULA, false, pDestDoc, pMarks );
}
}
@@ -2045,7 +2045,7 @@ void ScDocument::UndoToDocument(const ScRange& rRange,
sc::CopyToDocContext aCxt(*pDestDoc);
if (nTab1 > 0)
- CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTab1-1, IDF_FORMULA, false, pDestDoc, pMarks );
+ CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTab1-1, InsertDeleteFlags::FORMULA, false, pDestDoc, pMarks );
SCTAB nMinSizeBothTabs = static_cast<SCTAB>(std::min(maTabs.size(), pDestDoc->maTabs.size()));
for (SCTAB i = nTab1; i <= nTab2 && i < nMinSizeBothTabs; i++)
@@ -2057,7 +2057,7 @@ void ScDocument::UndoToDocument(const ScRange& rRange,
}
if (nTab2 < static_cast<SCTAB>(maTabs.size()))
- CopyToDocument( 0,0,nTab2+1, MAXCOL,MAXROW,maTabs.size(), IDF_FORMULA, false, pDestDoc, pMarks );
+ CopyToDocument( 0,0,nTab2+1, MAXCOL,MAXROW,maTabs.size(), InsertDeleteFlags::FORMULA, false, pDestDoc, pMarks );
}
// bUseRangeForVBA added for VBA api support to allow content of a specified
@@ -2268,7 +2268,7 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, InsertDeleteFlags nFlags
aClipRange.aEnd.Col(), aClipRange.aEnd.Row(),
pTransClip->maTabs[i], nFlags, bAsLink );
- if ( pDrawLayer && ( nFlags & IDF_OBJECTS ) )
+ if ( pDrawLayer && ( nFlags & InsertDeleteFlags::OBJECTS ) )
{
// Drawing objects are copied to the new area without transposing.
// CopyFromClip is used to adjust the objects to the transposed block's
@@ -2466,7 +2466,7 @@ void ScDocument::StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2,
const ScMarkData& rMark, InsertDeleteFlags nInsFlag )
{
- if (nInsFlag & IDF_CONTENTS)
+ if (nInsFlag & InsertDeleteFlags::CONTENTS)
{
std::shared_ptr<sc::ColumnBlockPositionSet> pSet(
new sc::ColumnBlockPositionSet(*this));
@@ -2486,7 +2486,7 @@ void ScDocument::SetDirtyFromClip(
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark,
InsertDeleteFlags nInsFlag, sc::ColumnSpanSet& rBroadcastSpans )
{
- if (nInsFlag & IDF_CONTENTS)
+ if (nInsFlag & InsertDeleteFlags::CONTENTS)
{
SCTAB nMax = static_cast<SCTAB>(maTabs.size());
ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end();
@@ -2520,7 +2520,7 @@ void ScDocument::CopyBlockFromClip(
maTabs[i]->CopyFromClip(
rCxt, nCol1, nRow1, nCol2, nRow2, nDx, nDy, rClipTabs[nClipTab]);
- if (rCxt.getClipDoc()->pDrawLayer && (rCxt.getInsertFlag() & IDF_OBJECTS))
+ if (rCxt.getClipDoc()->pDrawLayer && (rCxt.getInsertFlag() & InsertDeleteFlags::OBJECTS))
{
// also copy drawing objects
@@ -2544,7 +2544,7 @@ void ScDocument::CopyBlockFromClip(
nClipTab = (nClipTab+1) % (static_cast<SCTAB>(rClipTabs.size()));
}
}
- if (rCxt.getInsertFlag() & IDF_CONTENTS)
+ if (rCxt.getInsertFlag() & InsertDeleteFlags::CONTENTS)
{
nClipTab = 0;
for (SCTAB i = rCxt.getTabStart(); i <= nTabEnd && i < static_cast<SCTAB>(maTabs.size()); i++)
@@ -2726,18 +2726,18 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
/* Decide which contents to delete before copying. Delete all
contents if nInsFlag contains any real content flag.
#i102056# Notes are pasted from clipboard in a second pass,
- together with the special flag IDF_ADDNOTES that states to not
+ together with the special flag InsertDeleteFlags::ADDNOTES that states to not
overwrite/delete existing cells but to insert the notes into
these cells. In this case, just delete old notes from the
destination area. */
- InsertDeleteFlags nDelFlag = IDF_NONE;
- if ( (nInsFlag & (IDF_CONTENTS | IDF_ADDNOTES)) == (IDF_NOTE | IDF_ADDNOTES) )
- nDelFlag |= IDF_NOTE;
- else if ( nInsFlag & IDF_CONTENTS )
- nDelFlag |= IDF_CONTENTS;
+ InsertDeleteFlags nDelFlag = InsertDeleteFlags::NONE;
+ if ( (nInsFlag & (InsertDeleteFlags::CONTENTS | InsertDeleteFlags::ADDNOTES)) == (InsertDeleteFlags::NOTE | InsertDeleteFlags::ADDNOTES) )
+ nDelFlag |= InsertDeleteFlags::NOTE;
+ else if ( nInsFlag & InsertDeleteFlags::CONTENTS )
+ nDelFlag |= InsertDeleteFlags::CONTENTS;
- if (nInsFlag & IDF_ATTRIB)
- nDelFlag |= IDF_ATTRIB;
+ if (nInsFlag & InsertDeleteFlags::ATTRIB)
+ nDelFlag |= InsertDeleteFlags::ATTRIB;
sc::CopyFromClipContext aCxt(*this, pRefUndoDoc, pClipDoc, nInsFlag, bAsLink, bSkipAttrForEmpty);
std::pair<SCTAB,SCTAB> aTabRanges = getMarkedTableRange(maTabs, rMark);
@@ -2788,7 +2788,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
nR2 = nRow2;
const SCCOLROW nThreshold = 8192;
- bool bPreallocatePattern = ((nInsFlag & IDF_ATTRIB) && (nRow2 - nRow1 > nThreshold));
+ bool bPreallocatePattern = ((nInsFlag & InsertDeleteFlags::ATTRIB) && (nRow2 - nRow1 > nThreshold));
std::vector< SCTAB > vTables;
if (bPreallocatePattern)
@@ -2918,7 +2918,7 @@ void ScDocument::CopyMultiRangeFromClip(
if (!bSkipAttrForEmpty)
{
// Do the deletion first.
- InsertDeleteFlags nDelFlag = IDF_CONTENTS;
+ InsertDeleteFlags nDelFlag = InsertDeleteFlags::CONTENTS;
SCCOL nColSize = rClipParam.getPasteColSize();
SCROW nRowSize = rClipParam.getPasteRowSize();
@@ -3107,8 +3107,8 @@ void ScDocument::FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
bool bSkipEmpty, bool bAsLink )
{
InsertDeleteFlags nDelFlags = nFlags;
- if (nDelFlags & IDF_CONTENTS)
- nDelFlags |= IDF_CONTENTS; // Either all contents or delete nothing!
+ if (nDelFlags & InsertDeleteFlags::CONTENTS)
+ nDelFlags |= InsertDeleteFlags::CONTENTS; // Either all contents or delete nothing!
SCTAB nSrcTab = rSrcArea.aStart.Tab();
@@ -3119,7 +3119,7 @@ void ScDocument::FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
SCCOL nEndCol = rSrcArea.aEnd.Col();
SCROW nEndRow = rSrcArea.aEnd.Row();
std::unique_ptr<ScDocument> pMixDoc;
- bool bDoMix = ( bSkipEmpty || nFunction != ScPasteFunc::NONE ) && ( nFlags & IDF_CONTENTS );
+ bool bDoMix = ( bSkipEmpty || nFunction != ScPasteFunc::NONE ) && ( nFlags & InsertDeleteFlags::CONTENTS );
bool bOldAutoCalc = GetAutoCalc();
SetAutoCalc( false ); // avoid multiple calculations
@@ -3146,7 +3146,7 @@ void ScDocument::FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
// context used for copying content to the temporary mix document.
sc::CopyToDocContext aMixCxt(*pMixDoc);
maTabs[i]->CopyToTable(aMixCxt, nStartCol,nStartRow, nEndCol,nEndRow,
- IDF_CONTENTS, false, pMixDoc->maTabs[i] );
+ InsertDeleteFlags::CONTENTS, false, pMixDoc->maTabs[i] );
}
maTabs[i]->DeleteArea( nStartCol,nStartRow, nEndCol,nEndRow, nDelFlags);
maTabs[nSrcTab]->CopyToTable(aCxt, nStartCol,nStartRow, nEndCol,nEndRow,
@@ -3170,13 +3170,13 @@ void ScDocument::FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark,
bool bSkipEmpty, bool bAsLink )
{
InsertDeleteFlags nDelFlags = nFlags;
- if (nDelFlags & IDF_CONTENTS)
- nDelFlags |= IDF_CONTENTS; // Either all contents or delete nothing!
+ if (nDelFlags & InsertDeleteFlags::CONTENTS)
+ nDelFlags |= InsertDeleteFlags::CONTENTS; // Either all contents or delete nothing!
if (ValidTab(nSrcTab) && nSrcTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nSrcTab])
{
std::unique_ptr<ScDocument> pMixDoc;
- bool bDoMix = ( bSkipEmpty || nFunction != ScPasteFunc::NONE ) && ( nFlags & IDF_CONTENTS );
+ bool bDoMix = ( bSkipEmpty || nFunction != ScPasteFunc::NONE ) && ( nFlags & InsertDeleteFlags::CONTENTS );
bool bOldAutoCalc = GetAutoCalc();
SetAutoCalc( false ); // avoid multiple calculations
@@ -3208,7 +3208,7 @@ void ScDocument::FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark,
sc::CopyToDocContext aMixCxt(*pMixDoc);
maTabs[i]->CopyToTable(aMixCxt, nStartCol,nStartRow, nEndCol,nEndRow,
- IDF_CONTENTS, true, pMixDoc->maTabs[i], &rMark );
+ InsertDeleteFlags::CONTENTS, true, pMixDoc->maTabs[i], &rMark );
}
maTabs[i]->DeleteSelection( nDelFlags, rMark );
@@ -5663,7 +5663,7 @@ void ScDocument::DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData&
std::vector<ScAddress> aGroupPos;
// Destroy and reconstruct listeners only if content is affected.
- bool bDelContent = ((nDelFlag & ~IDF_CONTENTS) != nDelFlag);
+ bool bDelContent = ((nDelFlag & ~InsertDeleteFlags::CONTENTS) != nDelFlag);
if (bDelContent)
{
// Record the positions of top and/or bottom formula groups that
@@ -5703,7 +5703,7 @@ void ScDocument::DeleteSelectionTab(
std::vector<ScAddress> aGroupPos;
// Destroy and reconstruct listeners only if content is affected.
- bool bDelContent = ((nDelFlag & ~IDF_CONTENTS) != nDelFlag);
+ bool bDelContent = ((nDelFlag & ~InsertDeleteFlags::CONTENTS) != nDelFlag);
if (bDelContent)
{
// Record the positions of top and/or bottom formula groups that
diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx
index dd3572ca1ef2..d520a0f5e6dc 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -103,7 +103,7 @@ bool ScDocument::CopyOneCellFromClip(
const ScPatternAttr* pAttr = pClipDoc->GetPattern(aSrcPos);
rCxt.setSingleCellPattern(nColOffset, pAttr);
- if ((rCxt.getInsertFlag() & (IDF_NOTE | IDF_ADDNOTES)) != IDF_NONE)
+ if ((rCxt.getInsertFlag() & (InsertDeleteFlags::NOTE | InsertDeleteFlags::ADDNOTES)) != InsertDeleteFlags::NONE)
rCxt.setSingleCellNote(nColOffset, pClipDoc->GetNote(aSrcPos));
ScColumn& rSrcCol = pSrcTab->aCol[aSrcPos.Col()];
@@ -118,7 +118,7 @@ bool ScDocument::CopyOneCellFromClip(
for (SCTAB i = rCxt.getTabStart(); i <= nTabEnd && i < static_cast<SCTAB>(maTabs.size()); ++i)
{
maTabs[i]->CopyOneCellFromClip(rCxt, nCol1, nRow1, nCol2, nRow2);
- if (rCxt.getInsertFlag() & IDF_ATTRIB)
+ if (rCxt.getInsertFlag() & InsertDeleteFlags::ATTRIB)
for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow)
{
maTabs[i]->CopyConditionalFormat(nCol1, nRow, nCol2, nRow, nCol1 - aClipRange.aStart.Col(),
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 316a8780ceee..0ba7b2766067 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -909,7 +909,7 @@ void ScDPObject::Output( const ScAddress& rPos )
// clear old output area
pDoc->DeleteAreaTab( aOutRange.aStart.Col(), aOutRange.aStart.Row(),
aOutRange.aEnd.Col(), aOutRange.aEnd.Row(),
- aOutRange.aStart.Tab(), IDF_ALL );
+ 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 );
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index a2c13f824568..a277ab532a11 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -978,8 +978,8 @@ void ScDPOutput::Output()
// clear whole (new) output area
// when modifying table, clear old area !
- //TODO: include IDF_OBJECTS ???
- pDoc->DeleteAreaTab( aStartPos.Col(), aStartPos.Row(), nTabEndCol, nTabEndRow, nTab, IDF_ALL );
+ //TODO: include InsertDeleteFlags::OBJECTS ???
+ pDoc->DeleteAreaTab( aStartPos.Col(), aStartPos.Row(), nTabEndCol, nTabEndRow, nTab, InsertDeleteFlags::ALL );
if ( bDoFilter )
lcl_DoFilterButton( pDoc, aStartPos.Col(), aStartPos.Row(), nTab );
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index b4f143e65346..38208ec35929 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -334,7 +334,7 @@ void ScTable::InsertCol(
sc::CopyToDocContext aCxt(*pDocument);
for (SCSIZE i=0; i<nSize; i++)
{
- aCol[nStartCol-1].CopyToColumn(aCxt, nStartRow, nEndRow, IDF_ATTRIB,
+ 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 );
@@ -394,7 +394,7 @@ void ScTable::DeleteCol(
}
for (SCSIZE i = 0; i < nSize; i++)
- aCol[nStartCol + i].DeleteArea(nStartRow, nEndRow, IDF_ALL, false);
+ aCol[nStartCol + i].DeleteArea(nStartRow, nEndRow, InsertDeleteFlags::ALL, false);
if ((nStartRow == 0) && (nEndRow == MAXROW))
{
@@ -436,14 +436,14 @@ void ScTable::DeleteArea(
// Do not set protected cell in a protected table
- if ( IsProtected() && (nDelFlag & IDF_ATTRIB) )
+ if ( IsProtected() && (nDelFlag & InsertDeleteFlags::ATTRIB) )
{
ScPatternAttr aPattern(pDocument->GetPool());
aPattern.GetItemSet().Put( ScProtectionAttr( false ) );
ApplyPatternArea( nCol1, nRow1, nCol2, nRow2, aPattern );
}
- if( nDelFlag & IDF_ATTRIB )
+ if( nDelFlag & InsertDeleteFlags::ATTRIB )
mpCondFormatList->DeleteArea( nCol1, nRow1, nCol2, nRow2 );
}
@@ -468,13 +468,13 @@ void ScTable::DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMa
{
ScRange* pRange = aRangeList[i];
- if((nDelFlag & IDF_ATTRIB) && pRange && pRange->aStart.Tab() == nTab)
+ if((nDelFlag & InsertDeleteFlags::ATTRIB) && pRange && pRange->aStart.Tab() == nTab)
mpCondFormatList->DeleteArea( pRange->aStart.Col(), pRange->aStart.Row(), pRange->aEnd.Col(), pRange->aEnd.Row() );
}
// Do not set protected cell in a protected sheet
- if ( IsProtected() && (nDelFlag & IDF_ATTRIB) )
+ if ( IsProtected() && (nDelFlag & InsertDeleteFlags::ATTRIB) )
{
ScDocumentPool* pPool = pDocument->GetPool();
SfxItemSet aSet( *pPool, ATTR_PATTERN_START, ATTR_PATTERN_END );
@@ -659,7 +659,7 @@ void ScTable::CopyFromClip(
for ( SCCOL i = nCol1; i <= nCol2; i++)
aCol[i].CopyFromClip(rCxt, nRow1, nRow2, nDy, pTable->aCol[i - nDx]); // notes are handles at column level
- if (rCxt.getInsertFlag() & IDF_ATTRIB)
+ if (rCxt.getInsertFlag() & InsertDeleteFlags::ATTRIB)
{
// make sure that there are no old references to the cond formats
sal_uInt16 nWhichArray[2];
@@ -669,7 +669,7 @@ void ScTable::CopyFromClip(
aCol[i].ClearItems(nRow1, nRow2, nWhichArray);
}
- if ((rCxt.getInsertFlag() & IDF_ATTRIB) != IDF_NONE)
+ if ((rCxt.getInsertFlag() & InsertDeleteFlags::ATTRIB) != InsertDeleteFlags::NONE)
{
if (nRow1==0 && nRow2==MAXROW && pColWidth && pTable->pColWidth)
for (SCCOL i=nCol1; i<=nCol2; i++)
@@ -690,7 +690,7 @@ void ScTable::CopyFromClip(
}
// Do not set protected cell in a protected sheet
- if (IsProtected() && (rCxt.getInsertFlag() & IDF_ATTRIB))
+ if (IsProtected() && (rCxt.getInsertFlag() & InsertDeleteFlags::ATTRIB))
{
ScPatternAttr aPattern(pDocument->GetPool());
aPattern.GetItemSet().Put( ScProtectionAttr( false ) );
@@ -831,9 +831,9 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
for (SCCOL nCol=nCol1; nCol<=nCol2; nCol++)
{
SCROW nRow;
- if ( bAsLink && nFlags == IDF_ALL )
+ if ( bAsLink && nFlags == InsertDeleteFlags::ALL )
{
- // with IDF_ALL, also create links (formulas) for empty cells
+ // with InsertDeleteFlags::ALL, also create links (formulas) for empty cells
for ( nRow=nRow1; nRow<=nRow2; nRow++ )
{
@@ -1080,7 +1080,7 @@ void ScTable::CopyToTable(
if (!ValidColRow(nCol1, nRow1) || !ValidColRow(nCol2, nRow2))
return;
- if (nFlags)
+ if (nFlags != InsertDeleteFlags::NONE)
for (SCCOL i = nCol1; i <= nCol2; i++)
aCol[i].CopyToColumn(rCxt, nRow1, nRow2, nFlags, bMarked,
pDestTab->aCol[i], pMarkData, bAsLink);
@@ -1088,7 +1088,7 @@ void ScTable::CopyToTable(
if (!bColRowFlags) // Column widths/Row heights/Flags
return;
- if(pDestTab->pDocument->IsUndo() && (nFlags & IDF_ATTRIB))
+ if(pDestTab->pDocument->IsUndo() && (nFlags & InsertDeleteFlags::ATTRIB))
{
pDestTab->mpCondFormatList.reset(new ScConditionalFormatList(pDestTab->pDocument, *mpCondFormatList));
}
@@ -1182,13 +1182,13 @@ void ScTable::CopyToTable(
if (bFlagChange)
pDestTab->InvalidatePageBreaks();
- if(nFlags & IDF_ATTRIB)
+ if(nFlags & InsertDeleteFlags::ATTRIB)
{
pDestTab->mpCondFormatList->DeleteArea(nCol1, nRow1, nCol2, nRow2);
pDestTab->CopyConditionalFormat(nCol1, nRow1, nCol2, nRow2, 0, 0, this);
}
- if(nFlags & IDF_OUTLINE) // also only when bColRowFlags
+ if(nFlags & InsertDeleteFlags::OUTLINE) // also only when bColRowFlags
pDestTab->SetOutlineTable( pOutlineTable );
}
@@ -1206,10 +1206,10 @@ void ScTable::UndoToTable(
if ( i >= nCol1 && i <= nCol2 )
aCol[i].UndoToColumn(rCxt, nRow1, nRow2, nFlags, bMarked, pDestTab->aCol[i], pMarkData);
else
- aCol[i].CopyToColumn(rCxt, 0, MAXROW, IDF_FORMULA, false, pDestTab->aCol[i]);
+ aCol[i].CopyToColumn(rCxt, 0, MAXROW, InsertDeleteFlags::FORMULA, false, pDestTab->aCol[i]);
}
- if (nFlags & IDF_ATTRIB)
+ if (nFlags & InsertDeleteFlags::ATTRIB)
pDestTab->mpCondFormatList.reset(new ScConditionalFormatList(pDestTab->pDocument, *mpCondFormatList));
if (bWidth||bHeight)
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index ee1a29a99f72..b8f3a956d29c 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -545,9 +545,9 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (!bHasFiltered)
{
if (bVertical)
- DeleteArea(nCol1, static_cast<SCROW>(nIMin), nCol2, static_cast<SCROW>(nIMax), IDF_AUTOFILL);
+ DeleteArea(nCol1, static_cast<SCROW>(nIMin), nCol2, static_cast<SCROW>(nIMax), InsertDeleteFlags::AUTOFILL);
else
- DeleteArea(static_cast<SCCOL>(nIMin), nRow1, static_cast<SCCOL>(nIMax), nRow2, IDF_AUTOFILL);
+ DeleteArea(static_cast<SCCOL>(nIMin), nRow1, static_cast<SCCOL>(nIMax), nRow2, InsertDeleteFlags::AUTOFILL);
}
sal_uLong nProgress = 0;
@@ -632,7 +632,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if ( bHasFiltered )
DeleteArea(static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow),
- static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), IDF_AUTOFILL);
+ static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), InsertDeleteFlags::AUTOFILL);
if ( pSrcPattern != aCol[nCol].GetPattern( static_cast<SCROW>(nRow) ) )
{
@@ -1175,7 +1175,7 @@ void ScTable::FillFormulaVertical(
if (aSpans.empty())
return;
- aCol[nCol].DeleteRanges(aSpans, IDF_VALUE | IDF_DATETIME | IDF_STRING | IDF_FORMULA | IDF_OUTLINE, false);
+ aCol[nCol].DeleteRanges(aSpans, InsertDeleteFlags::VALUE | InsertDeleteFlags::DATETIME | InsertDeleteFlags::STRING | InsertDeleteFlags::FORMULA | InsertDeleteFlags::OUTLINE, false);
aCol[nCol].CloneFormulaCell(rSrcCell, sc::CellTextAttr(), aSpans, NULL);
std::shared_ptr<sc::ColumnBlockPositionSet> pSet(new sc::ColumnBlockPositionSet(*pDocument));
@@ -1528,7 +1528,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
SCCOLROW nIMin = nIStart;
SCCOLROW nIMax = nIEnd;
PutInOrder(nIMin,nIMax);
- InsertDeleteFlags nDel = bAttribs ? IDF_AUTOFILL : (IDF_AUTOFILL & IDF_CONTENTS);
+ InsertDeleteFlags nDel = bAttribs ? InsertDeleteFlags::AUTOFILL : (InsertDeleteFlags::AUTOFILL & InsertDeleteFlags::CONTENTS);
bool bIsFiltered = IsDataFiltered(aFillRange);
if (!bIsFiltered)
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 859b1b189012..4fb4216a707e 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -686,7 +686,7 @@ bool ScTable::ReplaceAllStyle(
{
if (pUndoDoc)
pDocument->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab,
- IDF_ATTRIB, true, pUndoDoc, &rMark );
+ InsertDeleteFlags::ATTRIB, true, pUndoDoc, &rMark );
ApplySelectionStyle( *pReplaceStyle, rMark );
}
else
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 381e0ab5a70d..531290116afb 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -1247,8 +1247,8 @@ bool ScChangeActionMove::Reject( ScDocument* pDoc )
pTrack->LookUpContents( aToRange, pDoc, 0, 0, 0 ); // Contents to be moved
- pDoc->DeleteAreaTab( aToRange, IDF_ALL );
- pDoc->DeleteAreaTab( aFrmRange, IDF_ALL );
+ pDoc->DeleteAreaTab( aToRange, InsertDeleteFlags::ALL );
+ pDoc->DeleteAreaTab( aFrmRange, InsertDeleteFlags::ALL );
// Adjust formula in the Document
sc::RefUpdateContext aCxt(*pDoc);
aCxt.meMode = URM_MOVE;
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 017d68b3b283..1154c66448e3 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -498,7 +498,7 @@ void ScTransferObj::DragFinished( sal_Int8 nDropAction )
ScMarkData aMarkData = GetSourceMarkData();
// external drag&drop doesn't copy objects, so they also aren't deleted:
// bApi=TRUE, don't show error messages from drag&drop
- pSourceSh->GetDocFunc().DeleteContents( aMarkData, IDF_ALL & ~IDF_OBJECTS, true, true );
+ pSourceSh->GetDocFunc().DeleteContents( aMarkData, InsertDeleteFlags::ALL & ~InsertDeleteFlags::OBJECTS, true, true );
}
}
@@ -646,7 +646,7 @@ void ScTransferObj::InitDocShell(bool bLimitToPageSize)
bool bWasCut = pDoc->IsCutMode();
if (!bWasCut)
pDoc->SetClipArea( aDestRange, true ); // Cut
- rDestDoc.CopyFromClip( aDestRange, aDestMark, IDF_ALL, NULL, pDoc, false );
+ rDestDoc.CopyFromClip( aDestRange, aDestMark, InsertDeleteFlags::ALL, NULL, pDoc, false );
pDoc->SetClipArea( aDestRange, bWasCut );
StripRefs( pDoc, nStartX,nStartY, nEndX,nEndY, &rDestDoc );
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 5932e945a6ff..491514e8d229 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -426,7 +426,7 @@ public:
ScTabViewShell* pTabViewShell) override;
virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(vcl::Window* pParent,
- InsertDeleteFlags nCheckDefaults = IDF_NONE) override;
+ InsertDeleteFlags nCheckDefaults = InsertDeleteFlags::NONE) override;
virtual AbstractScFillSeriesDlg * CreateScFillSeriesDlg( vcl::Window* pParent,
ScDocument& rDocument,
@@ -446,7 +446,7 @@ public:
bool bDisallowCellMove = false ) override;
virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( vcl::Window* pParent,
- InsertDeleteFlags nCheckDefaults = IDF_NONE,
+ InsertDeleteFlags nCheckDefaults = InsertDeleteFlags::NONE,
const OUString* pStrTitle = NULL ) override;
virtual AbstractScInsertTableDlg * CreateScInsertTableDlg(vcl::Window* pParent, ScViewData& rViewData,
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index 016cd7985caf..314181a5fd05 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -334,16 +334,16 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const OUString& rNewFilter,
{
pUndoDoc->InitUndo( &rDoc, 0, rDoc.GetTableCount()-1 );
rDoc.CopyToDocument( 0,0,0,MAXCOL,MAXROW,MAXTAB,
- IDF_FORMULA, false, pUndoDoc ); // alle Formeln
+ InsertDeleteFlags::FORMULA, false, pUndoDoc ); // alle Formeln
}
else
pUndoDoc->InitUndo( &rDoc, nDestTab, nDestTab ); // nur Zieltabelle
- rDoc.CopyToDocument( aOldRange, IDF_ALL & ~IDF_NOTE, false, pUndoDoc );
+ rDoc.CopyToDocument( aOldRange, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE, false, pUndoDoc );
}
else // ohne Einfuegen
{
pUndoDoc->InitUndo( &rDoc, nDestTab, nDestTab ); // nur Zieltabelle
- rDoc.CopyToDocument( aMaxRange, IDF_ALL & ~IDF_NOTE, false, pUndoDoc );
+ rDoc.CopyToDocument( aMaxRange, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE, false, pUndoDoc );
}
}
@@ -353,7 +353,7 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const OUString& rNewFilter,
if (bDoInsert)
rDoc.FitBlock( aOldRange, aNewRange ); // incl. loeschen
else
- rDoc.DeleteAreaTab( aMaxRange, IDF_ALL & ~IDF_NOTE );
+ rDoc.DeleteAreaTab( aMaxRange, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE );
// Daten kopieren
@@ -392,7 +392,7 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const OUString& rNewFilter,
ScMarkData aDestMark;
aDestMark.SelectOneTable( nDestTab );
aDestMark.SetMarkArea( aNewTokenRange );
- rDoc.CopyFromClip( aNewTokenRange, aDestMark, IDF_ALL, NULL, &aClipDoc, false );
+ rDoc.CopyFromClip( aNewTokenRange, aDestMark, InsertDeleteFlags::ALL, NULL, &aClipDoc, false );
aNewTokenRange.aStart.SetRow( aNewTokenRange.aEnd.Row() + 2 );
}
}
@@ -409,7 +409,7 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const OUString& rNewFilter,
{
ScDocument* pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndo( &rDoc, nDestTab, nDestTab );
- rDoc.CopyToDocument( aNewRange, IDF_ALL & ~IDF_NOTE, false, pRedoDoc );
+ rDoc.CopyToDocument( aNewRange, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE, false, pRedoDoc );
pImpl->m_pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoUpdateAreaLink( pImpl->m_pDocSh,
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 2d762ea40bb7..9b26badde76c 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -363,19 +363,19 @@ bool ScDBDocFunc::RepeatDB( const OUString& rDBName, bool bRecord, bool bApi, bo
pUndoDoc->InitUndo( &rDoc, nTab, nTab, true, true );
rDoc.CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0,
nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab,
- IDF_NONE, false, pUndoDoc );
+ InsertDeleteFlags::NONE, false, pUndoDoc );
rDoc.CopyToDocument( 0, static_cast<SCROW>(nOutStartRow),
nTab, MAXCOL, static_cast<SCROW>(nOutEndRow), nTab,
- IDF_NONE, false, pUndoDoc );
+ InsertDeleteFlags::NONE, false, pUndoDoc );
}
else
pUndoDoc->InitUndo( &rDoc, nTab, nTab, false, true );
// Datenbereich sichern - incl. Filter-Ergebnis
- rDoc.CopyToDocument( 0,nStartRow,nTab, MAXCOL,nEndRow,nTab, IDF_ALL, false, pUndoDoc );
+ rDoc.CopyToDocument( 0,nStartRow,nTab, MAXCOL,nEndRow,nTab, InsertDeleteFlags::ALL, false, pUndoDoc );
// alle Formeln wegen Referenzen
- rDoc.CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, IDF_FORMULA, false, pUndoDoc );
+ rDoc.CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, InsertDeleteFlags::FORMULA, false, pUndoDoc );
// DB- und andere Bereiche
ScRangeName* pDocRange = rDoc.GetRangeName();
@@ -737,12 +737,12 @@ bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
pUndoDoc->InitUndo( &rDoc, nDestTab, nDestTab, false, true );
rDoc.CopyToDocument( aLocalParam.nCol1, aLocalParam.nRow1, nDestTab,
aLocalParam.nCol2, aLocalParam.nRow2, nDestTab,
- IDF_ALL, false, pUndoDoc );
+ InsertDeleteFlags::ALL, false, pUndoDoc );
// Attribute sichern, falls beim Filtern mitkopiert
if (pDestData)
{
- rDoc.CopyToDocument( aOldDest, IDF_ALL, false, pUndoDoc );
+ rDoc.CopyToDocument( aOldDest, InsertDeleteFlags::ALL, false, pUndoDoc );
pOld = &aOldDest;
}
}
@@ -750,7 +750,7 @@ bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
{
pUndoDoc->InitUndo( &rDoc, nTab, nTab, false, true );
rDoc.CopyToDocument( 0, rQueryParam.nRow1, nTab, MAXCOL, rQueryParam.nRow2, nTab,
- IDF_NONE, false, pUndoDoc );
+ InsertDeleteFlags::NONE, false, pUndoDoc );
}
ScDBCollection* pDocDB = rDoc.GetDBCollection();
@@ -778,13 +778,13 @@ bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
pAttribDoc = new ScDocument( SCDOCMODE_UNDO );
pAttribDoc->InitUndo( &rDoc, nDestTab, nDestTab, false, true );
- rDoc.CopyToDocument( aAttribRange, IDF_ATTRIB, false, pAttribDoc );
+ rDoc.CopyToDocument( aAttribRange, InsertDeleteFlags::ATTRIB, false, pAttribDoc );
}
if ( bDoSize )
rDoc.FitBlock( aOldDest, aDestTotal );
else
- rDoc.DeleteAreaTab(aOldDest, IDF_ALL); // einfach loeschen
+ rDoc.DeleteAreaTab(aOldDest, InsertDeleteFlags::ALL); // einfach loeschen
}
// Filtern am Dokument ausfuehren
@@ -838,7 +838,7 @@ bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
{
ScRange aHdrRange = aAttribRange;
aHdrRange.aEnd.SetRow( aHdrRange.aStart.Row() );
- pAttribDoc->CopyToDocument( aHdrRange, IDF_ATTRIB, false, &rDoc );
+ pAttribDoc->CopyToDocument( aHdrRange, InsertDeleteFlags::ATTRIB, false, &rDoc );
}
// Daten
@@ -1026,19 +1026,19 @@ bool ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
pTable->GetRowArray().GetRange( nOutStartRow, nOutEndRow );
pUndoDoc->InitUndo( &rDoc, nTab, nTab, true, true );
- rDoc.CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab, IDF_NONE, false, pUndoDoc );
- rDoc.CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, false, pUndoDoc );
+ rDoc.CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
+ rDoc.CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
}
else
pUndoDoc->InitUndo( &rDoc, nTab, nTab, false, bOldFilter );
// Datenbereich sichern - incl. Filter-Ergebnis
rDoc.CopyToDocument( 0,rParam.nRow1+1,nTab, MAXCOL,rParam.nRow2,nTab,
- IDF_ALL, false, pUndoDoc );
+ InsertDeleteFlags::ALL, false, pUndoDoc );
// alle Formeln wegen Referenzen
rDoc.CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1,
- IDF_FORMULA, false, pUndoDoc );
+ InsertDeleteFlags::FORMULA, false, pUndoDoc );
// DB- und andere Bereiche
ScRangeName* pDocRange = rDoc.GetRangeName();
@@ -1161,7 +1161,7 @@ void createUndoDoc(std::unique_ptr<ScDocument>& pUndoDoc, ScDocument* pDoc, cons
SCTAB nTab = rRange.aStart.Tab();
pUndoDoc.reset(new ScDocument(SCDOCMODE_UNDO));
pUndoDoc->InitUndo(pDoc, nTab, nTab);
- pDoc->CopyToDocument(rRange, IDF_ALL, false, pUndoDoc.get());
+ pDoc->CopyToDocument(rRange, InsertDeleteFlags::ALL, false, pUndoDoc.get());
}
bool checkNewOutputRange(ScDPObject& rDPObj, ScDocShell& rDocShell, ScRange& rNewOut, bool bApi)
@@ -1340,7 +1340,7 @@ bool ScDBDocFunc::RemovePivotTable(ScDPObject& rDPObj, bool bRecord, bool bApi)
rDoc.DeleteAreaTab( aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row(),
- nTab, IDF_ALL );
+ nTab, InsertDeleteFlags::ALL );
rDoc.RemoveFlagsTab( aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row(),
nTab, SC_MF_AUTO );
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index bb48cd0a5f20..b16827082573 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -449,10 +449,10 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
SCCOL nMinEndCol = std::min( rParam.nCol2, nEndCol ); // not too much
nMinEndCol = sal::static_int_cast<SCCOL>( nMinEndCol + nFormulaCols ); // only if column count unchanged
- pImportDoc->DeleteAreaTab( 0,0, MAXCOL,MAXROW, nTab, IDF_ATTRIB );
+ pImportDoc->DeleteAreaTab( 0,0, MAXCOL,MAXROW, nTab, InsertDeleteFlags::ATTRIB );
rDoc.CopyToDocument( rParam.nCol1, rParam.nRow1, nTab,
nMinEndCol, rParam.nRow1, nTab,
- IDF_ATTRIB, false, pImportDoc );
+ InsertDeleteFlags::ATTRIB, false, pImportDoc );
SCROW nDataStartRow = rParam.nRow1+1;
for (SCCOL nCopyCol=rParam.nCol1; nCopyCol<=nMinEndCol; nCopyCol++)
@@ -498,7 +498,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (bRecord)
{
// do not touch notes (ScUndoImportData does not support drawing undo)
- InsertDeleteFlags nCopyFlags = IDF_ALL & ~IDF_NOTE;
+ InsertDeleteFlags nCopyFlags = InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE;
// nFormulaCols is set only if column count is unchanged
rDoc.CopyToDocument( rParam.nCol1, rParam.nRow1, nTab,
@@ -523,7 +523,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
ScRange aDelRange( rParam.nCol1, rParam.nRow1, nTab,
rParam.nCol2, rParam.nRow2, nTab );
- rDoc.DeleteAreaTab( aDelRange, IDF_ALL & ~IDF_NOTE ); // ohne die Formeln
+ rDoc.DeleteAreaTab( aDelRange, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE ); // ohne die Formeln
ScRange aOld( rParam.nCol1, rParam.nRow1, nTab,
rParam.nCol2+nFormulaCols, rParam.nRow2, nTab );
@@ -533,10 +533,10 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
}
else if ( nEndCol < rParam.nCol2 ) // DeleteArea calls PutInOrder
rDoc.DeleteArea( nEndCol+1, rParam.nRow1, rParam.nCol2, rParam.nRow2,
- aNewMark, IDF_CONTENTS & ~IDF_NOTE );
+ aNewMark, InsertDeleteFlags::CONTENTS & ~InsertDeleteFlags::NOTE );
// CopyToDocument doesn't remove contents
- rDoc.DeleteAreaTab( rParam.nCol1, rParam.nRow1, nEndCol, nEndRow, nTab, IDF_CONTENTS & ~IDF_NOTE );
+ rDoc.DeleteAreaTab( rParam.nCol1, rParam.nRow1, nEndCol, nEndRow, nTab, InsertDeleteFlags::CONTENTS & ~InsertDeleteFlags::NOTE );
// remove each column from ImportDoc after copying to reduce memory usage
bool bOldAutoCalc = rDoc.GetAutoCalc();
@@ -544,8 +544,8 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
for (SCCOL nCopyCol = rParam.nCol1; nCopyCol <= nEndCol; nCopyCol++)
{
pImportDoc->CopyToDocument( nCopyCol, rParam.nRow1, nTab, nCopyCol, nEndRow, nTab,
- IDF_ALL, false, &rDoc );
- pImportDoc->DeleteAreaTab( nCopyCol, rParam.nRow1, nCopyCol, nEndRow, nTab, IDF_CONTENTS );
+ InsertDeleteFlags::ALL, false, &rDoc );
+ pImportDoc->DeleteAreaTab( nCopyCol, rParam.nRow1, nCopyCol, nEndRow, nTab, InsertDeleteFlags::CONTENTS );
}
rDoc.SetAutoCalc( bOldAutoCalc );
@@ -554,7 +554,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (bKeepFormat) // formats for formulas
pImportDoc->CopyToDocument( nEndCol+1, rParam.nRow1, nTab,
nEndCol+nFormulaCols, nEndRow, nTab,
- IDF_ATTRIB, false, &rDoc );
+ InsertDeleteFlags::ATTRIB, false, &rDoc );
// fill formulas
ScMarkData aMark;
aMark.SelectOneTable(nTab);
@@ -574,10 +574,10 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
{
if ( rParam.nCol2 > nEndCol )
rDoc.DeleteArea( nEndCol+1, rParam.nRow1, rParam.nCol2, rParam.nRow2,
- aNewMark, IDF_CONTENTS );
+ aNewMark, InsertDeleteFlags::CONTENTS );
if ( rParam.nRow2 > nEndRow )
rDoc.DeleteArea( rParam.nCol1, nEndRow+1, rParam.nCol2, rParam.nRow2,
- aNewMark, IDF_CONTENTS );
+ aNewMark, InsertDeleteFlags::CONTENTS );
}
if( !bAddrInsert ) // update database range
@@ -598,7 +598,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (nFormulaCols > 0) // include filled formulas for redo
rDoc.CopyToDocument( rParam.nCol1, rParam.nRow1, nTab,
nEndCol+nFormulaCols, nEndRow, nTab,
- IDF_ALL & ~IDF_NOTE, false, pRedoDoc );
+ InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE, false, pRedoDoc );
ScDBData* pRedoDBData = pDBData ? new ScDBData( *pDBData ) : NULL;
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 86422aedffb4..98152768c11f 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -591,10 +591,10 @@ bool ScDocFunc::DeleteContents(
bMulti = false;
// no objects on protected tabs
- bool bObjects = (nFlags & IDF_OBJECTS) && !sc::DocFuncUtil::hasProtectedTab(rDoc, rMark);
+ bool bObjects = (nFlags & InsertDeleteFlags::OBJECTS) && !sc::DocFuncUtil::hasProtectedTab(rDoc, rMark);
sal_uInt16 nExtFlags = 0; // extra flags are needed only if attributes are deleted
- if ( nFlags & IDF_ATTRIB )
+ if ( nFlags & InsertDeleteFlags::ATTRIB )
rDocShell.UpdatePaintExt( nExtFlags, aMarkRange );
// Reihenfolge:
@@ -603,7 +603,7 @@ bool ScDocFunc::DeleteContents(
// 3) Inhalte fuer Undo kopieren und Undo-Aktion anlegen
// 4) Inhalte loeschen
- bool bDrawUndo = bObjects || (nFlags & IDF_NOTE);
+ bool bDrawUndo = bObjects || (nFlags & InsertDeleteFlags::NOTE);
if (bRecord && bDrawUndo)
rDoc.BeginDrawUndo();
@@ -665,10 +665,10 @@ bool ScDocFunc::DeleteCell(
}
// no objects on protected tabs
- bool bObjects = (nFlags & IDF_OBJECTS) && !sc::DocFuncUtil::hasProtectedTab(rDoc, rMark);
+ bool bObjects = (nFlags & InsertDeleteFlags::OBJECTS) && !sc::DocFuncUtil::hasProtectedTab(rDoc, rMark);
sal_uInt16 nExtFlags = 0; // extra flags are needed only if attributes are deleted
- if (nFlags & IDF_ATTRIB)
+ if (nFlags & InsertDeleteFlags::ATTRIB)
rDocShell.UpdatePaintExt(nExtFlags, rPos);
// order op opeeration:
@@ -678,7 +678,7 @@ bool ScDocFunc::DeleteCell(
// 4) delete contents
// 5) add undo-action
- bool bDrawUndo = bObjects || (nFlags & IDF_NOTE); // needed for shown notes
+ bool bDrawUndo = bObjects || (nFlags & InsertDeleteFlags::NOTE); // needed for shown notes
if (bDrawUndo && bRecord)
rDoc.BeginDrawUndo();
@@ -752,7 +752,7 @@ bool ScDocFunc::TransliterateText( const ScMarkData& rMark, sal_Int32 nType,
ScRange aCopyRange = aMarkRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- rDoc.CopyToDocument( aCopyRange, IDF_CONTENTS, true, pUndoDoc, &aMultiMark );
+ rDoc.CopyToDocument( aCopyRange, InsertDeleteFlags::CONTENTS, true, pUndoDoc, &aMultiMark );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoTransliterate( &rDocShell, aMultiMark, pUndoDoc, nType ) );
@@ -1356,7 +1356,7 @@ bool ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& r
{
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( &rDoc, aMultiRange.aStart.Tab(), aMultiRange.aEnd.Tab() );
- rDoc.CopyToDocument( aMultiRange, IDF_ATTRIB, bMulti, pUndoDoc, &rMark );
+ rDoc.CopyToDocument( aMultiRange, InsertDeleteFlags::ATTRIB, bMulti, pUndoDoc, &rMark );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoSelectionAttr(
@@ -1431,7 +1431,7 @@ bool ScDocFunc::ApplyStyle( const ScMarkData& rMark, const OUString& rStyleName,
ScRange aCopyRange = aMultiRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- rDoc.CopyToDocument( aCopyRange, IDF_ATTRIB, bMulti, pUndoDoc, &rMark );
+ rDoc.CopyToDocument( aCopyRange, InsertDeleteFlags::ATTRIB, bMulti, pUndoDoc, &rMark );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoSelectionStyle(
@@ -2351,7 +2351,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
nScenarioCount ++;
rDoc.CopyToDocument( nUndoStartCol, nUndoStartRow, *itr, nUndoEndCol, nUndoEndRow, *itr+nScenarioCount,
- IDF_ALL | IDF_NOCAPTIONS, false, pUndoDoc );
+ InsertDeleteFlags::ALL | InsertDeleteFlags::NOCAPTIONS, false, pUndoDoc );
}
pRefUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -2405,13 +2405,13 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
itr = aFullMark.begin(), itrEnd = aFullMark.end();
for (; itr != itrEnd && *itr < nTabCount; ++itr)
- pRefUndoDoc->DeleteAreaTab(nUndoStartCol,nUndoStartRow,nUndoEndCol,nUndoEndRow, *itr, IDF_ALL);
+ pRefUndoDoc->DeleteAreaTab(nUndoStartCol,nUndoStartRow,nUndoEndCol,nUndoEndRow, *itr, InsertDeleteFlags::ALL);
// alle Tabellen anlegen, damit Formeln kopiert werden koennen:
pUndoDoc->AddUndoTab( 0, nTabCount-1 );
// kopieren mit bColRowFlags=false (#54194#)
- pRefUndoDoc->CopyToDocument(0,0,0,MAXCOL,MAXROW,MAXTAB,IDF_FORMULA,false,pUndoDoc,NULL,false);
+ pRefUndoDoc->CopyToDocument(0,0,0,MAXCOL,MAXROW,MAXTAB,InsertDeleteFlags::FORMULA,false,pUndoDoc,NULL,false);
delete pRefUndoDoc;
SCTAB* pTabs = new SCTAB[nSelCount];
@@ -2698,7 +2698,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
{
bool bWholeCols = ( nStartRow == 0 && nEndRow == MAXROW );
bool bWholeRows = ( nStartCol == 0 && nEndCol == MAXCOL );
- InsertDeleteFlags nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ InsertDeleteFlags nUndoFlags = (InsertDeleteFlags::ALL & ~InsertDeleteFlags::OBJECTS) | InsertDeleteFlags::NOCAPTIONS;
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( &rDoc, nStartTab, nEndTab, bWholeCols, bWholeRows );
@@ -2723,7 +2723,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
ScMarkData aDelMark; // only for tables
for (nTab=nStartTab; nTab<=nEndTab; nTab++)
{
- rDoc.DeleteAreaTab( nStartCol,nStartRow, nOldEndCol,nOldEndRow, nTab, IDF_ALL );
+ rDoc.DeleteAreaTab( nStartCol,nStartRow, nOldEndCol,nOldEndRow, nTab, InsertDeleteFlags::ALL );
aDelMark.SelectTable( nTab, true );
}
rDoc.DeleteObjectsInArea( nStartCol,nStartRow, nOldEndCol,nOldEndRow, aDelMark );
@@ -2735,7 +2735,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
nUndoEndCol,nUndoEndRow,nDestEndTab,
HASATTR_MERGED | HASATTR_OVERLAPPED ))
{
- rDoc.CopyFromClip( rSource, aSourceMark, IDF_ALL, NULL, pClipDoc );
+ rDoc.CopyFromClip( rSource, aSourceMark, InsertDeleteFlags::ALL, NULL, pClipDoc );
for (nTab=nStartTab; nTab<=nEndTab; nTab++)
{
SCCOL nTmpEndCol = nEndCol;
@@ -2766,7 +2766,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
function ScDocument::UpdateReference() is called which calls
ScDrawLayer::MoveCells() which may move away inserted objects to wrong
positions (e.g. if source and destination range overlaps).*/
- rDoc.CopyFromClip( aPasteDest, aDestMark, IDF_ALL & ~(IDF_OBJECTS),
+ rDoc.CopyFromClip( aPasteDest, aDestMark, InsertDeleteFlags::ALL & ~(InsertDeleteFlags::OBJECTS),
NULL, pClipDoc, true, false, bIncludeFiltered );
// skipped rows and merged cells don't mix
@@ -2781,7 +2781,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
and row heights. There are no cell notes or drawing objects, if the
clipdoc does not contain a drawing layer.*/
if ( pClipDoc->GetDrawLayer() )
- rDoc.CopyFromClip( aPasteDest, aDestMark, IDF_OBJECTS,
+ rDoc.CopyFromClip( aPasteDest, aDestMark, InsertDeleteFlags::OBJECTS,
NULL, pClipDoc, true, false, bIncludeFiltered );
if (bRecord)
@@ -3057,7 +3057,7 @@ bool ScDocFunc::DeleteTable( SCTAB nTab, bool bRecord, bool /* bApi */ )
pUndoDoc->InitUndo( &rDoc, nTab, nTab, true, true ); // nur nTab mit Flags
pUndoDoc->AddUndoTab( 0, nCount-1 ); // alle Tabs fuer Referenzen
- rDoc.CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,false, pUndoDoc );
+ rDoc.CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, InsertDeleteFlags::ALL,false, pUndoDoc );
OUString aOldName;
rDoc.GetName( nTab, aOldName );
pUndoDoc->RenameTab( nTab, aOldName, false );
@@ -3412,12 +3412,12 @@ bool ScDocFunc::SetWidthOrHeight(
if (bWidth)
{
pUndoDoc->InitUndo( &rDoc, nTab, nTab, true );
- rDoc.CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab, static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false, pUndoDoc );
+ rDoc.CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab, static_cast<SCCOL>(nEnd), MAXROW, nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
}
else
{
pUndoDoc->InitUndo( &rDoc, nTab, nTab, false, true );
- rDoc.CopyToDocument( 0, static_cast<SCROW>(nStart), nTab, MAXCOL, static_cast<SCROW>(nEnd), nTab, IDF_NONE, false, pUndoDoc );
+ rDoc.CopyToDocument( 0, static_cast<SCROW>(nStart), nTab, MAXCOL, static_cast<SCROW>(nEnd), nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
}
aUndoRanges = rRanges;
@@ -3849,7 +3849,7 @@ bool ScDocFunc::ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhich, b
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( &rDoc, nStartTab, nEndTab );
- rDoc.CopyToDocument( aMarkRange, IDF_ATTRIB, true, pUndoDoc, &aMultiMark );
+ rDoc.CopyToDocument( aMarkRange, InsertDeleteFlags::ATTRIB, true, pUndoDoc, &aMultiMark );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoClearItems( &rDocShell, aMultiMark, pUndoDoc, pWhich ) );
@@ -3897,7 +3897,7 @@ bool ScDocFunc::ChangeIndent( const ScMarkData& rMark, bool bIncrement, bool bAp
ScRange aCopyRange = aMarkRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- rDoc.CopyToDocument( aCopyRange, IDF_ATTRIB, true, pUndoDoc, &rMark );
+ rDoc.CopyToDocument( aCopyRange, InsertDeleteFlags::ATTRIB, true, pUndoDoc, &rMark );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoIndent( &rDocShell, rMark, pUndoDoc, bIncrement ) );
@@ -3978,13 +3978,13 @@ bool ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
ScRange aCopyRange = rRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aStart.SetTab(nTabCount-1);
- rDoc.CopyToDocument( aCopyRange, IDF_ATTRIB, false, pUndoDoc, &aMark );
+ rDoc.CopyToDocument( aCopyRange, InsertDeleteFlags::ATTRIB, false, pUndoDoc, &aMark );
if (bSize)
{
rDoc.CopyToDocument( nStartCol,0,0, nEndCol,MAXROW,nTabCount-1,
- IDF_NONE, false, pUndoDoc, &aMark );
+ InsertDeleteFlags::NONE, false, pUndoDoc, &aMark );
rDoc.CopyToDocument( 0,nStartRow,0, MAXCOL,nEndRow,nTabCount-1,
- IDF_NONE, false, pUndoDoc, &aMark );
+ InsertDeleteFlags::NONE, false, pUndoDoc, &aMark );
}
rDoc.BeginDrawUndo();
}
@@ -4072,7 +4072,7 @@ bool ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
//! auch bei Undo selektierte Tabellen beruecksichtigen
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( &rDoc, nStartTab, nEndTab );
- rDoc.CopyToDocument( rRange, IDF_ALL & ~IDF_NOTE, false, pUndoDoc );
+ rDoc.CopyToDocument( rRange, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE, false, pUndoDoc );
}
// use TokenArray if given, string (and flags) otherwise
@@ -4157,7 +4157,7 @@ bool ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
//! auch bei Undo selektierte Tabellen beruecksichtigen
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( &rDoc, nStartTab, nEndTab );
- rDoc.CopyToDocument( rRange, IDF_ALL & ~IDF_NOTE, false, pUndoDoc );
+ rDoc.CopyToDocument( rRange, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE, false, pUndoDoc );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoTabOp( &rDocShell,
@@ -4335,7 +4335,7 @@ bool ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
ScRange aCopyRange = aDestArea;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- rDoc.CopyToDocument( aCopyRange, IDF_AUTOFILL, false, pUndoDoc, &aMark );
+ rDoc.CopyToDocument( aCopyRange, InsertDeleteFlags::AUTOFILL, false, pUndoDoc, &aMark );
}
sal_uLong nProgCount;
@@ -4450,7 +4450,7 @@ bool ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
rDoc.CopyToDocument(
aDestArea.aStart.Col(), aDestArea.aStart.Row(), 0,
aDestArea.aEnd.Col(), aDestArea.aEnd.Row(), nTabCount-1,
- IDF_AUTOFILL, false, pUndoDoc, &aMark );
+ InsertDeleteFlags::AUTOFILL, false, pUndoDoc, &aMark );
}
if (aDestArea.aStart.Col() <= aDestArea.aEnd.Col() &&
@@ -4600,7 +4600,7 @@ bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
rDoc.CopyToDocument(
aDestArea.aStart.Col(), aDestArea.aStart.Row(), 0,
aDestArea.aEnd.Col(), aDestArea.aEnd.Row(), nTabCount-1,
- IDF_AUTOFILL, false, pUndoDoc, &aMark );
+ InsertDeleteFlags::AUTOFILL, false, pUndoDoc, &aMark );
}
sal_uLong nProgCount;
@@ -4699,7 +4699,7 @@ bool ScDocFunc::MergeCells( const ScCellMergeOption& rOption, bool bContents, bo
}
// note captions are collected by drawing undo
rDoc.CopyToDocument( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab,
- IDF_ALL|IDF_NOCAPTIONS, false, pUndoDoc );
+ InsertDeleteFlags::ALL|InsertDeleteFlags::NOCAPTIONS, false, pUndoDoc );
if( bHasNotes )
rDoc.BeginDrawUndo();
}
@@ -4791,7 +4791,7 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, bool bRecord )
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo(&rDoc, *rOption.maTabs.begin(), *rOption.maTabs.rbegin());
}
- rDoc.CopyToDocument(aExtended, IDF_ATTRIB, false, pUndoDoc);
+ rDoc.CopyToDocument(aExtended, InsertDeleteFlags::ATTRIB, false, pUndoDoc);
}
const SfxPoolItem& rDefAttr = rDoc.GetPool()->GetDefaultItem( ATTR_MERGE );
@@ -5091,7 +5091,7 @@ bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, bool bApi )
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( &rDoc, nTab, nTab );
rDoc.CopyToDocument( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab,
- IDF_ALL, false, pUndoDoc );
+ InsertDeleteFlags::ALL, false, pUndoDoc );
rDoc.BeginDrawUndo(); // wegen Hoehenanpassung
}
@@ -5137,7 +5137,7 @@ bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, bool bApi )
ScDocument* pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndo( &rDoc, nTab, nTab );
rDoc.CopyToDocument( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab,
- IDF_ALL, false, pRedoDoc );
+ InsertDeleteFlags::ALL, false, pRedoDoc );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoListNames( &rDocShell,
@@ -5182,7 +5182,7 @@ bool ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd
aMark.SelectTable( nTab, true );
ScRange aNewRange( rOldRange.aStart, rNewEnd );
- if ( DeleteContents( aMark, IDF_CONTENTS, true, bApi ) )
+ if ( DeleteContents( aMark, InsertDeleteFlags::CONTENTS, true, bApi ) )
{
// GRAM_PODF_A1 for API compatibility.
bRet = EnterMatrix( aNewRange, &aMark, NULL, aFormula, bApi, false, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 );
@@ -5317,7 +5317,7 @@ void ScDocFunc::ReplaceConditionalFormat( sal_uLong nOldFormat, ScConditionalFor
rDoc.CopyToDocument( aCompleteRange.aStart.Col(),aCompleteRange.aStart.Row(),nTab,
aCompleteRange.aEnd.Col(),aCompleteRange.aEnd.Row(),nTab,
- IDF_ALL, false, pUndoDoc );
+ InsertDeleteFlags::ALL, false, pUndoDoc );
}
std::unique_ptr<ScRange> pRepaintRange;
@@ -5352,7 +5352,7 @@ void ScDocFunc::ReplaceConditionalFormat( sal_uLong nOldFormat, ScConditionalFor
pRedoDoc->InitUndo( &rDoc, nTab, nTab );
rDoc.CopyToDocument( aCompleteRange.aStart.Col(),aCompleteRange.aStart.Row(),nTab,
aCompleteRange.aEnd.Col(),aCompleteRange.aEnd.Row(),nTab,
- IDF_ALL, false, pRedoDoc );
+ InsertDeleteFlags::ALL, false, pRedoDoc );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoConditionalFormat(&rDocShell, pUndoDoc, pRedoDoc, aCompleteRange));
}
diff --git a/sc/source/ui/docshell/docfuncutil.cxx b/sc/source/ui/docshell/docfuncutil.cxx
index 5bd771b3d526..3c71dc53f05e 100644
--- a/sc/source/ui/docshell/docfuncutil.cxx
+++ b/sc/source/ui/docshell/docfuncutil.cxx
@@ -57,16 +57,16 @@ std::unique_ptr<ScDocument> DocFuncUtil::createDeleteContentsUndoDoc(
aCopyRange.aEnd.SetTab(nTabCount-1);
// in case of "Format/Standard" copy all attributes, because CopyToDocument
- // with IDF_HARDATTR only is too time-consuming:
+ // with InsertDeleteFlags::HARDATTR only is too time-consuming:
InsertDeleteFlags nUndoDocFlags = nFlags;
- if (nFlags & IDF_ATTRIB)
- nUndoDocFlags |= IDF_ATTRIB;
- if (nFlags & IDF_EDITATTR) // Edit-Engine-Attribute
- nUndoDocFlags |= IDF_STRING; // -> cells will be changed
- if (nFlags & IDF_NOTE)
- nUndoDocFlags |= IDF_CONTENTS; // copy all cells with their notes
+ if (nFlags & InsertDeleteFlags::ATTRIB)
+ nUndoDocFlags |= InsertDeleteFlags::ATTRIB;
+ if (nFlags & InsertDeleteFlags::EDITATTR) // Edit-Engine-Attribute
+ nUndoDocFlags |= InsertDeleteFlags::STRING; // -> cells will be changed
+ if (nFlags & InsertDeleteFlags::NOTE)
+ nUndoDocFlags |= InsertDeleteFlags::CONTENTS; // copy all cells with their notes
// do not copy note captions to undo document
- nUndoDocFlags |= IDF_NOCAPTIONS;
+ nUndoDocFlags |= InsertDeleteFlags::NOCAPTIONS;
rDoc.CopyToDocument(aCopyRange, nUndoDocFlags, bOnlyMarked, pUndoDoc.get(), &rMark);
return pUndoDoc;
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index cbef1979ee13..e96f182b0c6f 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -570,20 +570,20 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, bool bRecord )
// Zeilenstatus
aDocument.CopyToDocument( 0,0,nDestTab, MAXCOL,MAXROW,nDestTab,
- IDF_NONE, false, pUndoDoc );
+ InsertDeleteFlags::NONE, false, pUndoDoc );
// alle Formeln
aDocument.CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1,
- IDF_FORMULA, false, pUndoDoc );
+ InsertDeleteFlags::FORMULA, false, pUndoDoc );
// komplette Ausgangszeilen
aDocument.CopyToDocument( 0,aDestArea.nRowStart,nDestTab,
MAXCOL,aDestArea.nRowEnd,nDestTab,
- IDF_ALL, false, pUndoDoc );
+ InsertDeleteFlags::ALL, false, pUndoDoc );
// alten Ausgabebereich
if (pDestData)
- aDocument.CopyToDocument( aOldDest, IDF_ALL, false, pUndoDoc );
+ aDocument.CopyToDocument( aOldDest, InsertDeleteFlags::ALL, false, pUndoDoc );
GetUndoManager()->AddUndoAction(
new ScUndoConsolidate( this, aDestArea, rParam, pUndoDoc,
@@ -596,11 +596,11 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, bool bRecord )
aDocument.CopyToDocument( aDestArea.nColStart, aDestArea.nRowStart, aDestArea.nTab,
aDestArea.nColEnd, aDestArea.nRowEnd, aDestArea.nTab,
- IDF_ALL, false, pUndoDoc );
+ InsertDeleteFlags::ALL, false, pUndoDoc );
// alten Ausgabebereich
if (pDestData)
- aDocument.CopyToDocument( aOldDest, IDF_ALL, false, pUndoDoc );
+ aDocument.CopyToDocument( aOldDest, InsertDeleteFlags::ALL, false, pUndoDoc );
GetUndoManager()->AddUndoAction(
new ScUndoConsolidate( this, aDestArea, rParam, pUndoDoc,
@@ -610,7 +610,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, bool bRecord )
if (pDestData) // Zielbereich loeschen / anpassen
{
- aDocument.DeleteAreaTab(aOldDest, IDF_CONTENTS);
+ aDocument.DeleteAreaTab(aOldDest, InsertDeleteFlags::CONTENTS);
pDestData->SetArea( rParam.nTab, rParam.nCol, rParam.nRow,
rParam.nCol + nColSize - 1, rParam.nRow + nRowSize - 1 );
pDestData->SetHeader( rParam.bByRow );
@@ -684,7 +684,7 @@ void ScDocShell::UseScenario( SCTAB nTab, const OUString& rName, bool bRecord )
pUndoDoc->InitUndo( &aDocument, nTab,nEndTab ); // auch alle Szenarien
// angezeigte Tabelle:
aDocument.CopyToDocument( nStartCol,nStartRow,nTab,
- nEndCol,nEndRow,nTab, IDF_ALL,true, pUndoDoc, &aScenMark );
+ nEndCol,nEndRow,nTab, InsertDeleteFlags::ALL,true, pUndoDoc, &aScenMark );
// Szenarien
for (SCTAB i=nTab+1; i<=nEndTab; i++)
{
@@ -699,7 +699,7 @@ void ScDocShell::UseScenario( SCTAB nTab, const OUString& rName, bool bRecord )
// Bei Zurueckkopier-Szenarios auch Inhalte
if ( nScenFlags & SC_SCENARIO_TWOWAY )
aDocument.CopyToDocument( 0,0,i, MAXCOL,MAXROW,i,
- IDF_ALL,false, pUndoDoc );
+ InsertDeleteFlags::ALL,false, pUndoDoc );
}
GetUndoManager()->AddUndoAction(
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index ef8229fb27f6..01c8d6d9723f 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -220,7 +220,7 @@ bool ScImportExport::StartPaste()
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, aRange.aStart.Tab(), aRange.aEnd.Tab() );
- pDoc->CopyToDocument( aRange, IDF_ALL | IDF_NOCAPTIONS, false, pUndoDoc );
+ pDoc->CopyToDocument( aRange, InsertDeleteFlags::ALL | InsertDeleteFlags::NOCAPTIONS, false, pUndoDoc );
}
return true;
}
@@ -235,11 +235,11 @@ void ScImportExport::EndPaste(bool bAutoRowHeight)
{
ScDocument* pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndo( pDoc, aRange.aStart.Tab(), aRange.aEnd.Tab() );
- pDoc->CopyToDocument( aRange, IDF_ALL | IDF_NOCAPTIONS, false, pRedoDoc );
+ pDoc->CopyToDocument( aRange, InsertDeleteFlags::ALL | InsertDeleteFlags::NOCAPTIONS, false, pRedoDoc );
ScMarkData aDestMark;
aDestMark.SetMarkArea(aRange);
pDocSh->GetUndoManager()->AddUndoAction(
- new ScUndoPaste(pDocSh, aRange, aDestMark, pUndoDoc, pRedoDoc, IDF_ALL, NULL));
+ new ScUndoPaste(pDocSh, aRange, aDestMark, pUndoDoc, pRedoDoc, InsertDeleteFlags::ALL, NULL));
}
pUndoDoc = NULL;
if( pDocSh )
@@ -2132,7 +2132,7 @@ bool ScImportExport::Dif2Doc( SvStream& rStrm )
bool bOk = StartPaste();
if (bOk)
{
- InsertDeleteFlags nFlags = IDF_ALL & ~IDF_STYLES;
+ InsertDeleteFlags nFlags = InsertDeleteFlags::ALL & ~InsertDeleteFlags::STYLES;
pDoc->DeleteAreaTab( aRange, nFlags );
pImportDoc->CopyToDocument( aRange, nFlags, false, pDoc );
EndPaste();
@@ -2154,7 +2154,7 @@ bool ScImportExport::RTF2Doc( SvStream& rStrm, const OUString& rBaseURL )
bool bOk = StartPaste();
if (bOk)
{
- InsertDeleteFlags nFlags = IDF_ALL & ~IDF_STYLES;
+ InsertDeleteFlags nFlags = InsertDeleteFlags::ALL & ~InsertDeleteFlags::STYLES;
pDoc->DeleteAreaTab( aRange, nFlags );
pImp->WriteToDocument();
EndPaste();
@@ -2179,7 +2179,7 @@ bool ScImportExport::HTML2Doc( SvStream& rStrm, const OUString& rBaseURL )
if (pDocSh)
pDocSh->MakeDrawLayer();
- InsertDeleteFlags nFlags = IDF_ALL & ~IDF_STYLES;
+ InsertDeleteFlags nFlags = InsertDeleteFlags::ALL & ~InsertDeleteFlags::STYLES;
pDoc->DeleteAreaTab( aRange, nFlags );
if (pExtOptions)
diff --git a/sc/source/ui/docshell/olinefun.cxx b/sc/source/ui/docshell/olinefun.cxx
index 8f3e3d07064c..71cb5da6a2d7 100644
--- a/sc/source/ui/docshell/olinefun.cxx
+++ b/sc/source/ui/docshell/olinefun.cxx
@@ -227,8 +227,8 @@ bool ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, bool bRecord )
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( &rDoc, nTab, nTab, true, true );
- rDoc.CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, false, pUndoDoc );
- rDoc.CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pUndoDoc );
+ rDoc.CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
+ rDoc.CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
ScOutlineTable* pUndoTab = new ScOutlineTable( *pTable );
@@ -291,8 +291,8 @@ bool ScOutlineDocFunc::AutoOutline( const ScRange& rRange, bool bRecord )
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( &rDoc, nTab, nTab, true, true );
- rDoc.CopyToDocument( nOutStartCol, 0, nTab, nOutEndCol, MAXROW, nTab, IDF_NONE, false, pUndoDoc );
- rDoc.CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, false, pUndoDoc );
+ rDoc.CopyToDocument( nOutStartCol, 0, nTab, nOutEndCol, MAXROW, nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
+ rDoc.CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
}
// einblenden
@@ -345,13 +345,13 @@ bool ScOutlineDocFunc::SelectLevel( SCTAB nTab, bool bColumns, sal_uInt16 nLevel
{
pUndoDoc->InitUndo( &rDoc, nTab, nTab, true );
rDoc.CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
- static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false,
+ static_cast<SCCOL>(nEnd), MAXROW, nTab, InsertDeleteFlags::NONE, false,
pUndoDoc );
}
else
{
pUndoDoc->InitUndo( &rDoc, nTab, nTab, false, true );
- rDoc.CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pUndoDoc );
+ rDoc.CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
}
rDocShell.GetUndoManager()->AddUndoAction(
@@ -443,8 +443,8 @@ bool ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, bool bRecord )
ScOutlineTable* pUndoTab = new ScOutlineTable( *pTable );
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( &rDoc, nTab, nTab, true, true );
- rDoc.CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, false, pUndoDoc );
- rDoc.CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pUndoDoc );
+ rDoc.CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
+ rDoc.CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoOutlineBlock( &rDocShell,
@@ -558,9 +558,9 @@ bool ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, bool bRecord )
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( &rDoc, nTab, nTab, true, true );
rDoc.CopyToDocument( static_cast<SCCOL>(nEffStartCol), 0, nTab,
- static_cast<SCCOL>(nEffEndCol), MAXROW, nTab, IDF_NONE,
+ static_cast<SCCOL>(nEffEndCol), MAXROW, nTab, InsertDeleteFlags::NONE,
false, pUndoDoc );
- rDoc.CopyToDocument( 0, nEffStartRow, nTab, MAXCOL, nEffEndRow, nTab, IDF_NONE, false, pUndoDoc );
+ rDoc.CopyToDocument( 0, nEffStartRow, nTab, MAXCOL, nEffEndRow, nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoOutlineBlock( &rDocShell,
@@ -628,13 +628,13 @@ bool ScOutlineDocFunc::ShowOutline( SCTAB nTab, bool bColumns, sal_uInt16 nLevel
{
pUndoDoc->InitUndo( &rDoc, nTab, nTab, true );
rDoc.CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
- static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false,
+ static_cast<SCCOL>(nEnd), MAXROW, nTab, InsertDeleteFlags::NONE, false,
pUndoDoc );
}
else
{
pUndoDoc->InitUndo( &rDoc, nTab, nTab, false, true );
- rDoc.CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pUndoDoc );
+ rDoc.CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
}
rDocShell.GetUndoManager()->AddUndoAction(
@@ -712,13 +712,13 @@ bool ScOutlineDocFunc::HideOutline( SCTAB nTab, bool bColumns, sal_uInt16 nLevel
{
pUndoDoc->InitUndo( &rDoc, nTab, nTab, true );
rDoc.CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
- static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false,
+ static_cast<SCCOL>(nEnd), MAXROW, nTab, InsertDeleteFlags::NONE, false,
pUndoDoc );
}
else
{
pUndoDoc->InitUndo( &rDoc, nTab, nTab, false, true );
- rDoc.CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pUndoDoc );
+ rDoc.CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
}
rDocShell.GetUndoManager()->AddUndoAction(
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index 54a1930c21dd..fc2846680478 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -245,7 +245,7 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter,
pUndoDoc->AddUndoTab( nTab, nTab, true, true );
bFirst = false;
ScRange aRange(0,0,nTab,MAXCOL,MAXROW,nTab);
- rDoc.CopyToDocument(aRange, IDF_ALL, false, pUndoDoc);
+ rDoc.CopyToDocument(aRange, InsertDeleteFlags::ALL, false, pUndoDoc);
pUndoDoc->TransferDrawPage( &rDoc, nTab, nTab );
pUndoDoc->SetLink( nTab, nMode, aFileName, aFilterName,
aOptions, aTabName, GetRefreshDelay() );
@@ -288,7 +288,7 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter,
(nMode == ScLinkMode::VALUE) ); // nur Werte?
else
{
- rDoc.DeleteAreaTab( 0,0,MAXCOL,MAXROW, nTab, IDF_ALL );
+ rDoc.DeleteAreaTab( 0,0,MAXCOL,MAXROW, nTab, InsertDeleteFlags::ALL );
bool bShowError = true;
if ( nMode == ScLinkMode::VALUE )
diff --git a/sc/source/ui/inc/delcodlg.hxx b/sc/source/ui/inc/delcodlg.hxx
index 2af0af3ba64d..dd6f93d77828 100644
--- a/sc/source/ui/inc/delcodlg.hxx
+++ b/sc/source/ui/inc/delcodlg.hxx
@@ -47,7 +47,7 @@ private:
public:
ScDeleteContentsDlg( vcl::Window* pParent,
- InsertDeleteFlags nCheckDefaults = IDF_NONE );
+ InsertDeleteFlags nCheckDefaults = InsertDeleteFlags::NONE );
virtual ~ScDeleteContentsDlg();
virtual void dispose() override;
void DisableObjects();
diff --git a/sc/source/ui/inc/docfuncutil.hxx b/sc/source/ui/inc/docfuncutil.hxx
index bd99ab6ff0a0..dba17c80464a 100644
--- a/sc/source/ui/inc/docfuncutil.hxx
+++ b/sc/source/ui/inc/docfuncutil.hxx
@@ -15,7 +15,7 @@
class ScDocument;
class ScMarkData;
class ScRange;
-struct InsertDeleteFlags;
+enum class InsertDeleteFlags : sal_uInt16;
namespace sc {
diff --git a/sc/source/ui/inc/inscodlg.hxx b/sc/source/ui/inc/inscodlg.hxx
index 8ff69c9778a3..d321c8b87bac 100644
--- a/sc/source/ui/inc/inscodlg.hxx
+++ b/sc/source/ui/inc/inscodlg.hxx
@@ -31,7 +31,7 @@ class ScInsertContentsDlg : public ModalDialog
{
public:
ScInsertContentsDlg( vcl::Window* pParent,
- InsertDeleteFlags nCheckDefaults = IDF_NONE,
+ InsertDeleteFlags nCheckDefaults = InsertDeleteFlags::NONE,
const OUString* pStrTitle = NULL );
virtual ~ScInsertContentsDlg();
virtual void dispose() override;
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index cbd8a391f4a1..836d5ac5058f 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -108,7 +108,7 @@ public:
ScPasteFunc nFunction = ScPasteFunc::NONE, bool bSkipEmpty = false,
bool bTranspose = false, bool bAsLink = false,
InsCellCmd eMoveMode = INS_NONE,
- InsertDeleteFlags nUndoExtraFlags = IDF_NONE,
+ InsertDeleteFlags nUndoExtraFlags = InsertDeleteFlags::NONE,
bool bAllowDialogs = false );
void FillTab( InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bAsLink );
diff --git a/sc/source/ui/miscdlgs/delcodlg.cxx b/sc/source/ui/miscdlgs/delcodlg.cxx
index 3ab1ecb854f4..c61a7a233d83 100644
--- a/sc/source/ui/miscdlgs/delcodlg.cxx
+++ b/sc/source/ui/miscdlgs/delcodlg.cxx
@@ -24,9 +24,9 @@
#include "miscdlgs.hrc"
bool ScDeleteContentsDlg::bPreviousAllCheck = false;
-InsertDeleteFlags ScDeleteContentsDlg::nPreviousChecks = (IDF_DATETIME | IDF_STRING |
- IDF_NOTE | IDF_FORMULA |
- IDF_VALUE);
+InsertDeleteFlags ScDeleteContentsDlg::nPreviousChecks = (InsertDeleteFlags::DATETIME | InsertDeleteFlags::STRING |
+ InsertDeleteFlags::NOTE | InsertDeleteFlags::FORMULA |
+ InsertDeleteFlags::VALUE);
ScDeleteContentsDlg::ScDeleteContentsDlg( vcl::Window* pParent,
InsertDeleteFlags nCheckDefaults ) :
@@ -44,26 +44,26 @@ ScDeleteContentsDlg::ScDeleteContentsDlg( vcl::Window* pParent,
get( aBtnDelObjects, "objects" );
get( aBtnOk, "ok" );
- if ( nCheckDefaults != IDF_NONE )
+ if ( nCheckDefaults != InsertDeleteFlags::NONE )
{
ScDeleteContentsDlg::nPreviousChecks = nCheckDefaults;
ScDeleteContentsDlg::bPreviousAllCheck = false;
}
aBtnDelAll->Check ( ScDeleteContentsDlg::bPreviousAllCheck );
- aBtnDelStrings->Check ( IS_SET( IDF_STRING,
+ aBtnDelStrings->Check ( IS_SET( InsertDeleteFlags::STRING,
ScDeleteContentsDlg::nPreviousChecks ) );
- aBtnDelNumbers->Check ( IS_SET( IDF_VALUE,
+ aBtnDelNumbers->Check ( IS_SET( InsertDeleteFlags::VALUE,
ScDeleteContentsDlg::nPreviousChecks ) );
- aBtnDelDateTime->Check( IS_SET( IDF_DATETIME,
+ aBtnDelDateTime->Check( IS_SET( InsertDeleteFlags::DATETIME,
ScDeleteContentsDlg::nPreviousChecks ) );
- aBtnDelFormulas->Check( IS_SET( IDF_FORMULA,
+ aBtnDelFormulas->Check( IS_SET( InsertDeleteFlags::FORMULA,
ScDeleteContentsDlg::nPreviousChecks ) );
- aBtnDelNotes->Check ( IS_SET( IDF_NOTE,
+ aBtnDelNotes->Check ( IS_SET( InsertDeleteFlags::NOTE,
ScDeleteContentsDlg::nPreviousChecks ) );
- aBtnDelAttrs->Check ( IS_SET( IDF_ATTRIB,
+ aBtnDelAttrs->Check ( IS_SET( InsertDeleteFlags::ATTRIB,
ScDeleteContentsDlg::nPreviousChecks ) );
- aBtnDelObjects->Check ( IS_SET( IDF_OBJECTS,
+ aBtnDelObjects->Check ( IS_SET( InsertDeleteFlags::OBJECTS,
ScDeleteContentsDlg::nPreviousChecks ) );
DisableChecks( aBtnDelAll->IsChecked() );
@@ -92,27 +92,27 @@ void ScDeleteContentsDlg::dispose()
InsertDeleteFlags ScDeleteContentsDlg::GetDelContentsCmdBits() const
{
- ScDeleteContentsDlg::nPreviousChecks = IDF_NONE;
+ ScDeleteContentsDlg::nPreviousChecks = InsertDeleteFlags::NONE;
if ( aBtnDelStrings->IsChecked() )
- ScDeleteContentsDlg::nPreviousChecks = IDF_STRING;
+ ScDeleteContentsDlg::nPreviousChecks = InsertDeleteFlags::STRING;
if ( aBtnDelNumbers->IsChecked() )
- ScDeleteContentsDlg::nPreviousChecks |= IDF_VALUE;
+ ScDeleteContentsDlg::nPreviousChecks |= InsertDeleteFlags::VALUE;
if ( aBtnDelDateTime->IsChecked())
- ScDeleteContentsDlg::nPreviousChecks |= IDF_DATETIME;
+ ScDeleteContentsDlg::nPreviousChecks |= InsertDeleteFlags::DATETIME;
if ( aBtnDelFormulas->IsChecked())
- ScDeleteContentsDlg::nPreviousChecks |= IDF_FORMULA;
+ ScDeleteContentsDlg::nPreviousChecks |= InsertDeleteFlags::FORMULA;
if ( aBtnDelNotes->IsChecked() )
- ScDeleteContentsDlg::nPreviousChecks |= IDF_NOTE;
+ ScDeleteContentsDlg::nPreviousChecks |= InsertDeleteFlags::NOTE;
if ( aBtnDelAttrs->IsChecked() )
- ScDeleteContentsDlg::nPreviousChecks |= IDF_ATTRIB;
+ ScDeleteContentsDlg::nPreviousChecks |= InsertDeleteFlags::ATTRIB;
if ( aBtnDelObjects->IsChecked() )
- ScDeleteContentsDlg::nPreviousChecks |= IDF_OBJECTS;
+ ScDeleteContentsDlg::nPreviousChecks |= InsertDeleteFlags::OBJECTS;
ScDeleteContentsDlg::bPreviousAllCheck = aBtnDelAll->IsChecked();
return ( (ScDeleteContentsDlg::bPreviousAllCheck)
- ? IDF_ALL
+ ? InsertDeleteFlags::ALL
: ScDeleteContentsDlg::nPreviousChecks );
}
diff --git a/sc/source/ui/miscdlgs/inscodlg.cxx b/sc/source/ui/miscdlgs/inscodlg.cxx
index e68c15962c08..5a29f2e8852c 100644
--- a/sc/source/ui/miscdlgs/inscodlg.cxx
+++ b/sc/source/ui/miscdlgs/inscodlg.cxx
@@ -24,7 +24,7 @@
#include "miscdlgs.hrc"
bool ScInsertContentsDlg::bPreviousAllCheck = false;
-InsertDeleteFlags ScInsertContentsDlg::nPreviousChecks = (IDF_VALUE | IDF_DATETIME | IDF_STRING);
+InsertDeleteFlags ScInsertContentsDlg::nPreviousChecks = (InsertDeleteFlags::VALUE | InsertDeleteFlags::DATETIME | InsertDeleteFlags::STRING);
ScPasteFunc ScInsertContentsDlg::nPreviousFormulaChecks = ScPasteFunc::NONE;
sal_uInt16 ScInsertContentsDlg::nPreviousChecks2 = 0;
sal_uInt16 ScInsertContentsDlg::nPreviousMoveMode = INS_NONE; // enum InsCellCmd
@@ -40,7 +40,7 @@ ScInsertContentsDlg::ScInsertContentsDlg( vcl::Window* pParent,
bMoveDownDisabled( false ),
bMoveRightDisabled( false ),
bUsedShortCut ( false ),
- nShortCutInsContentsCmdBits( IDF_NONE ),
+ nShortCutInsContentsCmdBits( InsertDeleteFlags::NONE ),
nShortCutFormulaCmdBits(ScPasteFunc::NONE),
bShortCutSkipEmptyCells(false),
bShortCutTranspose(false),
@@ -73,7 +73,7 @@ ScInsertContentsDlg::ScInsertContentsDlg( vcl::Window* pParent,
if ( pStrTitle )
SetText( *pStrTitle );
- if ( nCheckDefaults != IDF_NONE )
+ if ( nCheckDefaults != InsertDeleteFlags::NONE )
{
ScInsertContentsDlg::nPreviousChecks = nCheckDefaults;
ScInsertContentsDlg::bPreviousAllCheck = false;
@@ -81,19 +81,19 @@ ScInsertContentsDlg::ScInsertContentsDlg( vcl::Window* pParent,
}
mpBtnInsAll->Check ( ScInsertContentsDlg::bPreviousAllCheck );
- mpBtnInsStrings->Check ( IS_SET( IDF_STRING,
+ mpBtnInsStrings->Check ( IS_SET( InsertDeleteFlags::STRING,
ScInsertContentsDlg::nPreviousChecks ) );
- mpBtnInsNumbers->Check ( IS_SET( IDF_VALUE,
+ mpBtnInsNumbers->Check ( IS_SET( InsertDeleteFlags::VALUE,
ScInsertContentsDlg::nPreviousChecks ) );
- mpBtnInsDateTime->Check( IS_SET( IDF_DATETIME,
+ mpBtnInsDateTime->Check( IS_SET( InsertDeleteFlags::DATETIME,
ScInsertContentsDlg::nPreviousChecks ) );
- mpBtnInsFormulas->Check( IS_SET( IDF_FORMULA,
+ mpBtnInsFormulas->Check( IS_SET( InsertDeleteFlags::FORMULA,
ScInsertContentsDlg::nPreviousChecks ) );
- mpBtnInsNotes->Check ( IS_SET( IDF_NOTE,
+ mpBtnInsNotes->Check ( IS_SET( InsertDeleteFlags::NOTE,
ScInsertContentsDlg::nPreviousChecks ) );
- mpBtnInsAttrs->Check ( IS_SET( IDF_ATTRIB,
+ mpBtnInsAttrs->Check ( IS_SET( InsertDeleteFlags::ATTRIB,
ScInsertContentsDlg::nPreviousChecks ) );
- mpBtnInsObjects->Check ( IS_SET( IDF_OBJECTS,
+ mpBtnInsObjects->Check ( IS_SET( InsertDeleteFlags::OBJECTS,
ScInsertContentsDlg::nPreviousChecks ) );
switch( ScInsertContentsDlg::nPreviousFormulaChecks )
@@ -128,22 +128,22 @@ ScInsertContentsDlg::ScInsertContentsDlg( vcl::Window* pParent,
InsertDeleteFlags ScInsertContentsDlg::GetInsContentsCmdBits() const
{
- ScInsertContentsDlg::nPreviousChecks = IDF_NONE;
+ ScInsertContentsDlg::nPreviousChecks = InsertDeleteFlags::NONE;
if ( mpBtnInsStrings->IsChecked() )
- ScInsertContentsDlg::nPreviousChecks = IDF_STRING;
+ ScInsertContentsDlg::nPreviousChecks = InsertDeleteFlags::STRING;
if ( mpBtnInsNumbers->IsChecked() )
- ScInsertContentsDlg::nPreviousChecks |= IDF_VALUE;
+ ScInsertContentsDlg::nPreviousChecks |= InsertDeleteFlags::VALUE;
if ( mpBtnInsDateTime->IsChecked())
- ScInsertContentsDlg::nPreviousChecks |= IDF_DATETIME;
+ ScInsertContentsDlg::nPreviousChecks |= InsertDeleteFlags::DATETIME;
if ( mpBtnInsFormulas->IsChecked())
- ScInsertContentsDlg::nPreviousChecks |= IDF_FORMULA;
+ ScInsertContentsDlg::nPreviousChecks |= InsertDeleteFlags::FORMULA;
if ( mpBtnInsNotes->IsChecked() )
- ScInsertContentsDlg::nPreviousChecks |= IDF_NOTE;
+ ScInsertContentsDlg::nPreviousChecks |= InsertDeleteFlags::NOTE;
if ( mpBtnInsAttrs->IsChecked() )
- ScInsertContentsDlg::nPreviousChecks |= IDF_ATTRIB;
+ ScInsertContentsDlg::nPreviousChecks |= InsertDeleteFlags::ATTRIB;
if ( mpBtnInsObjects->IsChecked() )
- ScInsertContentsDlg::nPreviousChecks |= IDF_OBJECTS;
+ ScInsertContentsDlg::nPreviousChecks |= InsertDeleteFlags::OBJECTS;
ScInsertContentsDlg::bPreviousAllCheck = mpBtnInsAll->IsChecked();
@@ -151,7 +151,7 @@ InsertDeleteFlags ScInsertContentsDlg::GetInsContentsCmdBits() const
return nShortCutInsContentsCmdBits;
return ( (ScInsertContentsDlg::bPreviousAllCheck)
- ? IDF_ALL
+ ? InsertDeleteFlags::ALL
: ScInsertContentsDlg::nPreviousChecks );
}
@@ -311,7 +311,7 @@ IMPL_LINK_TYPED( ScInsertContentsDlg, ShortCutHdl, Button*, pBtn, void )
if ( pBtn == mpBtnShortCutPasteValuesOnly )
{
bUsedShortCut = true;
- nShortCutInsContentsCmdBits = IDF_STRING | IDF_VALUE | IDF_DATETIME;
+ nShortCutInsContentsCmdBits = InsertDeleteFlags::STRING | InsertDeleteFlags::VALUE | InsertDeleteFlags::DATETIME;
nShortCutFormulaCmdBits = ScPasteFunc::NONE;
bShortCutSkipEmptyCells = false;
bShortCutTranspose = false;
@@ -322,7 +322,7 @@ IMPL_LINK_TYPED( ScInsertContentsDlg, ShortCutHdl, Button*, pBtn, void )
else if ( pBtn == mpBtnShortCutPasteValuesFormats )
{
bUsedShortCut = true;
- nShortCutInsContentsCmdBits = IDF_STRING | IDF_VALUE | IDF_DATETIME | IDF_ATTRIB;
+ nShortCutInsContentsCmdBits = InsertDeleteFlags::STRING | InsertDeleteFlags::VALUE | InsertDeleteFlags::DATETIME | InsertDeleteFlags::ATTRIB;
nShortCutFormulaCmdBits = ScPasteFunc::NONE;
bShortCutSkipEmptyCells = false;
bShortCutTranspose = false;
@@ -333,7 +333,7 @@ IMPL_LINK_TYPED( ScInsertContentsDlg, ShortCutHdl, Button*, pBtn, void )
else if ( pBtn == mpBtnShortCutPasteTranspose )
{
bUsedShortCut = true;
- nShortCutInsContentsCmdBits = IDF_ALL;
+ nShortCutInsContentsCmdBits = InsertDeleteFlags::ALL;
nShortCutFormulaCmdBits = ScPasteFunc::NONE;
bShortCutSkipEmptyCells = false;
bShortCutTranspose = true;
diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx
index 48f1b9cffbe8..40e877e885a3 100644
--- a/sc/source/ui/undo/undobase.cxx
+++ b/sc/source/ui/undo/undobase.cxx
@@ -443,7 +443,7 @@ void ScMoveUndo::UndoRef()
{
ScDocument& rDoc = pDocShell->GetDocument();
ScRange aRange(0,0,0, MAXCOL,MAXROW,pRefUndoDoc->GetTableCount()-1);
- pRefUndoDoc->CopyToDocument( aRange, IDF_FORMULA, false, &rDoc, NULL, false );
+ pRefUndoDoc->CopyToDocument( aRange, InsertDeleteFlags::FORMULA, false, &rDoc, NULL, false );
if (pRefUndoData)
pRefUndoData->DoUndo( &rDoc, (eMode == SC_UNDO_REFFIRST) );
// HACK: ScDragDropUndo is the only one with REFFIRST.
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 2815372168d3..9041722dec95 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -426,7 +426,7 @@ void ScUndoDeleteCells::DoChange( const bool bUndo )
for( i=0; i<nCount && bUndo; i++ )
{
pRefUndoDoc->CopyToDocument( aEffRange.aStart.Col(), aEffRange.aStart.Row(), pTabs[i], aEffRange.aEnd.Col(), aEffRange.aEnd.Row(), pTabs[i]+pScenarios[i],
- IDF_ALL | IDF_NOCAPTIONS, false, &rDoc );
+ InsertDeleteFlags::ALL | InsertDeleteFlags::NOCAPTIONS, false, &rDoc );
}
ScRange aWorkRange( aEffRange );
@@ -685,10 +685,10 @@ void ScUndoDeleteMulti::Undo()
SCCOLROW nStart = it->mnStart;
SCCOLROW nEnd = it->mnEnd;
if (mbRows)
- pRefUndoDoc->CopyToDocument( 0,nStart,nTab, MAXCOL,nEnd,nTab, IDF_ALL,false, &rDoc );
+ pRefUndoDoc->CopyToDocument( 0,nStart,nTab, MAXCOL,nEnd,nTab, InsertDeleteFlags::ALL,false, &rDoc );
else
pRefUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart),0,nTab,
- static_cast<SCCOL>(nEnd),MAXROW,nTab, IDF_ALL,false, &rDoc );
+ static_cast<SCCOL>(nEnd),MAXROW,nTab, InsertDeleteFlags::ALL,false, &rDoc );
}
ScChangeTrack* pChangeTrack = rDoc.GetChangeTrack();
@@ -780,7 +780,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
- InsertDeleteFlags nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ InsertDeleteFlags nUndoFlags = (InsertDeleteFlags::ALL & ~InsertDeleteFlags::OBJECTS) | InsertDeleteFlags::NOCAPTIONS;
if (bUndo) // only for Undo
{
@@ -884,7 +884,7 @@ OUString ScUndoPaste::GetComment() const
void ScUndoPaste::SetChangeTrack()
{
ScChangeTrack* pChangeTrack = pDocShell->GetDocument().GetChangeTrack();
- if ( pChangeTrack && (nFlags & IDF_CONTENTS) )
+ if ( pChangeTrack && (nFlags & InsertDeleteFlags::CONTENTS) )
{
for (size_t i = 0, n = maBlockRanges.size(); i < n; ++i)
{
@@ -909,14 +909,15 @@ void ScUndoPaste::DoChange(bool bUndo)
ScRefUndoData* pWorkRefData = bUndo ? pRefUndoData : pRefRedoData;
// Always back-up either all or none of the content for Undo
- InsertDeleteFlags nUndoFlags = IDF_NONE;
- if (nFlags & IDF_CONTENTS)
- nUndoFlags |= IDF_CONTENTS;
- if (nFlags & IDF_ATTRIB)
- nUndoFlags |= IDF_ATTRIB;
+ InsertDeleteFlags nUndoFlags = InsertDeleteFlags::NONE;
+ if (nFlags & InsertDeleteFlags::CONTENTS)
+ nUndoFlags |= InsertDeleteFlags::CONTENTS;
+ if (nFlags & InsertDeleteFlags::ATTRIB)
+ nUndoFlags |= InsertDeleteFlags::ATTRIB;
// do not undo/redo objects and note captions, they are handled via drawing undo
- (nUndoFlags &= ~IDF_OBJECTS) |= IDF_NOCAPTIONS;
+ nUndoFlags &= ~InsertDeleteFlags::OBJECTS;
+ nUndoFlags |= InsertDeleteFlags::NOCAPTIONS;
bool bPaintAll = false;
@@ -1105,7 +1106,7 @@ void ScUndoPaste::Repeat(SfxRepeatTarget& rTarget)
com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> aOwnClipRef( pOwnClip );
pViewSh->PasteFromClip( nFlags, pOwnClip->GetDocument(),
aPasteOptions.nFunction, aPasteOptions.bSkipEmpty, aPasteOptions.bTranspose,
- aPasteOptions.bAsLink, aPasteOptions.eMoveMode, IDF_NONE,
+ aPasteOptions.bAsLink, aPasteOptions.eMoveMode, InsertDeleteFlags::NONE,
true ); // allow warning dialog
}
}
@@ -1241,14 +1242,14 @@ void ScUndoDragDrop::DoUndo( ScRange aRange )
pDocShell->UpdatePaintExt(mnPaintExtFlags, aPaintRange);
// do not undo objects and note captions, they are handled via drawing undo
- InsertDeleteFlags nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ InsertDeleteFlags nUndoFlags = (InsertDeleteFlags::ALL & ~InsertDeleteFlags::OBJECTS) | InsertDeleteFlags::NOCAPTIONS;
// Additionally discard/forget caption ownership during deletion, as
// Drag&Drop is a special case in that the Undo holds captions of the
// transferred target range, which would get deleted and
// SdrGroupUndo::Undo() would attempt to access invalidated captions and
// crash, tdf#92995
- InsertDeleteFlags nDelFlags = nUndoFlags | IDF_FORGETCAPTIONS;
+ InsertDeleteFlags nDelFlags = nUndoFlags | InsertDeleteFlags::FORGETCAPTIONS;
rDoc.DeleteAreaTab( aRange, nDelFlags );
pRefUndoDoc->CopyToDocument( aRange, nUndoFlags, false, &rDoc );
@@ -1365,7 +1366,7 @@ void ScUndoDragDrop::Redo()
EnableDrawAdjust( &rDoc, false ); //! include in ScBlockUndo?
// do not undo/redo objects and note captions, they are handled via drawing undo
- InsertDeleteFlags nRedoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ InsertDeleteFlags nRedoFlags = (InsertDeleteFlags::ALL & ~InsertDeleteFlags::OBJECTS) | InsertDeleteFlags::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
@@ -1406,7 +1407,7 @@ void ScUndoDragDrop::Redo()
bool bIncludeFiltered = bCut;
// TODO: restore old note captions instead of cloning new captions...
- rDoc.CopyFromClip( aDestRange, aDestMark, IDF_ALL & ~IDF_OBJECTS, NULL, pClipDoc.get(), true, false, bIncludeFiltered );
+ rDoc.CopyFromClip( aDestRange, aDestMark, InsertDeleteFlags::ALL & ~InsertDeleteFlags::OBJECTS, NULL, pClipDoc.get(), true, false, bIncludeFiltered );
if (bCut)
for (nTab=aSrcRange.aStart.Tab(); nTab<=aSrcRange.aEnd.Tab(); nTab++)
@@ -1473,8 +1474,8 @@ void ScUndoListNames::DoChange( ScDocument* pSrcDoc ) const
{
ScDocument& rDoc = pDocShell->GetDocument();
- rDoc.DeleteAreaTab( aBlockRange, IDF_ALL );
- pSrcDoc->CopyToDocument( aBlockRange, IDF_ALL, false, &rDoc );
+ rDoc.DeleteAreaTab( aBlockRange, InsertDeleteFlags::ALL );
+ pSrcDoc->CopyToDocument( aBlockRange, InsertDeleteFlags::ALL, false, &rDoc );
pDocShell->PostPaint( aBlockRange, PAINT_GRID );
pDocShell->PostDataChanged();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -1539,8 +1540,8 @@ void ScUndoConditionalFormat::DoChange(ScDocument* pSrcDoc)
{
ScDocument& rDoc = pDocShell->GetDocument();
- rDoc.DeleteAreaTab( maRange, IDF_ALL );
- pSrcDoc->CopyToDocument( maRange, IDF_ALL, false, &rDoc );
+ rDoc.DeleteAreaTab( maRange, InsertDeleteFlags::ALL );
+ pSrcDoc->CopyToDocument( maRange, InsertDeleteFlags::ALL, false, &rDoc );
pDocShell->PostPaint( maRange, PAINT_GRID );
pDocShell->PostDataChanged();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -1597,8 +1598,8 @@ void ScUndoUseScenario::Undo()
}
ScDocument& rDoc = pDocShell->GetDocument();
- rDoc.DeleteSelection( IDF_ALL, aMarkData );
- pUndoDoc->CopyToDocument( aRange, IDF_ALL, true, &rDoc, &aMarkData );
+ rDoc.DeleteSelection( InsertDeleteFlags::ALL, aMarkData );
+ pUndoDoc->CopyToDocument( aRange, InsertDeleteFlags::ALL, true, &rDoc, &aMarkData );
// scenario table
bool bFrame = false;
@@ -1619,8 +1620,8 @@ void ScUndoUseScenario::Undo()
// For copy-back scenario also consider content
if ( nScenFlags & SC_SCENARIO_TWOWAY )
{
- rDoc.DeleteAreaTab( 0,0, MAXCOL,MAXROW, i, IDF_ALL );
- pUndoDoc->CopyToDocument( 0,0,i, MAXCOL,MAXROW,i, IDF_ALL,false, &rDoc );
+ rDoc.DeleteAreaTab( 0,0, MAXCOL,MAXROW, i, InsertDeleteFlags::ALL );
+ pUndoDoc->CopyToDocument( 0,0,i, MAXCOL,MAXROW,i, InsertDeleteFlags::ALL,false, &rDoc );
}
if ( nScenFlags & SC_SCENARIO_SHOWFRAME )
bFrame = true;
@@ -1720,7 +1721,7 @@ void ScUndoSelectionStyle::DoChange( const bool bUndo )
ScRange aCopyRange = aWorkRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, true, &rDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aCopyRange, InsertDeleteFlags::ATTRIB, true, &rDoc, &aMarkData );
}
else // if Redo, then reapply style
{
@@ -1823,8 +1824,8 @@ void ScUndoEnterMatrix::Undo()
ScDocument& rDoc = pDocShell->GetDocument();
- rDoc.DeleteAreaTab( aBlockRange, IDF_ALL & ~IDF_NOTE );
- pUndoDoc->CopyToDocument( aBlockRange, IDF_ALL & ~IDF_NOTE, false, &rDoc );
+ rDoc.DeleteAreaTab( aBlockRange, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE );
+ pUndoDoc->CopyToDocument( aBlockRange, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE, false, &rDoc );
pDocShell->PostPaint( aBlockRange, PAINT_GRID );
pDocShell->PostDataChanged();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -1910,7 +1911,7 @@ void ScUndoIndent::Undo()
ScRange aCopyRange = aBlockRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, true, &rDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aCopyRange, InsertDeleteFlags::ATTRIB, true, &rDoc, &aMarkData );
pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE );
EndUndo();
@@ -1966,7 +1967,7 @@ void ScUndoTransliterate::Undo()
ScRange aCopyRange = aBlockRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, IDF_CONTENTS, true, &rDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aCopyRange, InsertDeleteFlags::CONTENTS, true, &rDoc, &aMarkData );
pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE );
EndUndo();
@@ -2027,7 +2028,7 @@ void ScUndoClearItems::Undo()
BeginUndo();
ScDocument& rDoc = pDocShell->GetDocument();
- pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, true, &rDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aBlockRange, InsertDeleteFlags::ATTRIB, true, &rDoc, &aMarkData );
pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE );
EndUndo();
@@ -2084,7 +2085,7 @@ void ScUndoRemoveBreaks::Undo()
ScDocument& rDoc = pDocShell->GetDocument();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, false, &rDoc );
+ pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, InsertDeleteFlags::NONE, false, &rDoc );
if (pViewShell)
pViewShell->UpdatePageBreakData( true );
pDocShell->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID );
@@ -2158,8 +2159,8 @@ void ScUndoRemoveMerge::Undo()
continue;
// There is no need to extend merge area because it's already been extended.
ScRange aRange = maOption.getSingleRange(*itr);
- rDoc.DeleteAreaTab(aRange, IDF_ATTRIB);
- pUndoDoc->CopyToDocument(aRange, IDF_ATTRIB, false, &rDoc);
+ rDoc.DeleteAreaTab(aRange, InsertDeleteFlags::ATTRIB);
+ pUndoDoc->CopyToDocument(aRange, InsertDeleteFlags::ATTRIB, false, &rDoc);
bool bDidPaint = false;
if ( pViewShell )
@@ -2289,7 +2290,7 @@ void ScUndoBorder::Undo()
ScDocument& rDoc = pDocShell->GetDocument();
ScMarkData aMarkData;
aMarkData.MarkFromRangeList( *pRanges, false );
- pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, true, &rDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aBlockRange, InsertDeleteFlags::ATTRIB, true, &rDoc, &aMarkData );
pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE );
EndUndo();
diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx
index 2cc11515ec69..7abfac0ccb07 100644
--- a/sc/source/ui/undo/undoblk2.cxx
+++ b/sc/source/ui/undo/undoblk2.cxx
@@ -102,7 +102,7 @@ void ScUndoWidthOrHeight::Undo()
if (bWidth) // Width
{
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, *itr,
- static_cast<SCCOL>(nEnd), MAXROW, *itr, IDF_NONE,
+ static_cast<SCCOL>(nEnd), MAXROW, *itr, InsertDeleteFlags::NONE,
false, &rDoc );
rDoc.UpdatePageBreaks( *itr );
pDocShell->PostPaint( static_cast<SCCOL>(nPaintStart), 0, *itr,
@@ -110,7 +110,7 @@ void ScUndoWidthOrHeight::Undo()
}
else // Height
{
- pUndoDoc->CopyToDocument( 0, nStart, *itr, MAXCOL, nEnd, *itr, IDF_NONE, false, &rDoc );
+ pUndoDoc->CopyToDocument( 0, nStart, *itr, MAXCOL, nEnd, *itr, InsertDeleteFlags::NONE, false, &rDoc );
rDoc.UpdatePageBreaks( *itr );
pDocShell->PostPaint( 0, nPaintStart, *itr, MAXCOL, MAXROW, *itr, PAINT_GRID | PAINT_LEFT );
}
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 4ad03d771fc9..187127c168ea 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -119,7 +119,7 @@ void ScUndoDeleteContents::SetDataSpans( const std::shared_ptr<DataSpansType>& p
void ScUndoDeleteContents::SetChangeTrack()
{
ScChangeTrack* pChangeTrack = pDocShell->GetDocument().GetChangeTrack();
- if ( pChangeTrack && (nFlags & IDF_CONTENTS) )
+ if ( pChangeTrack && (nFlags & InsertDeleteFlags::CONTENTS) )
pChangeTrack->AppendContentRange( aRange, pUndoDoc.get(),
nStartChangeAction, nEndChangeAction );
else
@@ -136,15 +136,15 @@ void ScUndoDeleteContents::DoChange( const bool bUndo )
if (bUndo) // only Undo
{
- 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)
- nUndoFlags |= IDF_ATTRIB;
- if (nFlags & IDF_EDITATTR) // Edit-Engine attribute
- nUndoFlags |= IDF_STRING; // -> Cells will be changed
+ InsertDeleteFlags nUndoFlags = InsertDeleteFlags::NONE; // copy either all or none of the content
+ if (nFlags & InsertDeleteFlags::CONTENTS) // (Only the correct ones have been copied into UndoDoc)
+ nUndoFlags |= InsertDeleteFlags::CONTENTS;
+ if (nFlags & InsertDeleteFlags::ATTRIB)
+ nUndoFlags |= InsertDeleteFlags::ATTRIB;
+ if (nFlags & InsertDeleteFlags::EDITATTR) // Edit-Engine attribute
+ nUndoFlags |= InsertDeleteFlags::STRING; // -> Cells will be changed
// do not create clones of note captions, they will be restored via drawing undo
- nUndoFlags |= IDF_NOCAPTIONS;
+ nUndoFlags |= InsertDeleteFlags::NOCAPTIONS;
ScRange aCopyRange = aRange;
SCTAB nTabCount = rDoc.GetTableCount();
@@ -168,14 +168,14 @@ void ScUndoDeleteContents::DoChange( const bool bUndo )
aMarkData.MarkToMulti();
RedoSdrUndoAction( pDrawUndo );
// do not delete objects and note captions, they have been removed via drawing undo
- InsertDeleteFlags nRedoFlags = (nFlags & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ InsertDeleteFlags nRedoFlags = (nFlags & ~InsertDeleteFlags::OBJECTS) | InsertDeleteFlags::NOCAPTIONS;
rDoc.DeleteSelection( nRedoFlags, aMarkData );
aMarkData.MarkToSimple();
SetChangeTrack();
}
- if (nFlags & IDF_CONTENTS)
+ if (nFlags & InsertDeleteFlags::CONTENTS)
{
// Broadcast only when the content changes. fdo#74687
if (mpDataSpans)
@@ -298,10 +298,10 @@ void ScUndoFillTable::DoChange( const bool bUndo )
aWorkRange.aStart.SetTab(*itr);
aWorkRange.aEnd.SetTab(*itr);
if (bMulti)
- rDoc.DeleteSelectionTab( *itr, IDF_ALL, aMarkData );
+ rDoc.DeleteSelectionTab( *itr, InsertDeleteFlags::ALL, aMarkData );
else
- rDoc.DeleteAreaTab( aWorkRange, IDF_ALL );
- pUndoDoc->CopyToDocument( aWorkRange, IDF_ALL, bMulti, &rDoc, &aMarkData );
+ rDoc.DeleteAreaTab( aWorkRange, InsertDeleteFlags::ALL );
+ pUndoDoc->CopyToDocument( aWorkRange, InsertDeleteFlags::ALL, bMulti, &rDoc, &aMarkData );
}
ScChangeTrack* pChangeTrack = rDoc.GetChangeTrack();
@@ -421,7 +421,7 @@ void ScUndoSelectionAttr::DoChange( const bool bUndo )
SCTAB nTabCount = rDoc.GetTableCount();
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, bMulti, &rDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aCopyRange, InsertDeleteFlags::ATTRIB, bMulti, &rDoc, &aMarkData );
}
else // only for Redo
{
@@ -552,8 +552,8 @@ void ScUndoAutoFill::Undo()
sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aWorkRange );
- rDoc.DeleteAreaTab( aWorkRange, IDF_AUTOFILL );
- pUndoDoc->CopyToDocument( aWorkRange, IDF_AUTOFILL, false, &rDoc );
+ rDoc.DeleteAreaTab( aWorkRange, InsertDeleteFlags::AUTOFILL );
+ pUndoDoc->CopyToDocument( aWorkRange, InsertDeleteFlags::AUTOFILL, false, &rDoc );
rDoc.ExtendMerge( aWorkRange, true );
pDocShell->PostPaint( aWorkRange, PAINT_GRID, nExtFlags );
@@ -710,8 +710,8 @@ void ScUndoMerge::DoChange( bool bUndo ) const
// undo -> copy back deleted contents
if (bUndo && mpUndoDoc)
{
- rDoc.DeleteAreaTab( aRange, IDF_CONTENTS|IDF_NOCAPTIONS );
- mpUndoDoc->CopyToDocument( aRange, IDF_ALL|IDF_NOCAPTIONS, false, &rDoc );
+ rDoc.DeleteAreaTab( aRange, InsertDeleteFlags::CONTENTS|InsertDeleteFlags::NOCAPTIONS );
+ mpUndoDoc->CopyToDocument( aRange, InsertDeleteFlags::ALL|InsertDeleteFlags::NOCAPTIONS, false, &rDoc );
}
// redo -> merge contents again
@@ -800,13 +800,13 @@ void ScUndoAutoFormat::Undo()
SCTAB nTabCount = rDoc.GetTableCount();
rDoc.DeleteArea( aBlockRange.aStart.Col(), aBlockRange.aStart.Row(),
aBlockRange.aEnd.Col(), aBlockRange.aEnd.Row(),
- aMarkData, IDF_ATTRIB );
+ aMarkData, InsertDeleteFlags::ATTRIB );
ScRange aCopyRange = aBlockRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, false, &rDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aCopyRange, InsertDeleteFlags::ATTRIB, false, &rDoc, &aMarkData );
- // cell heights and widths (IDF_NONE)
+ // cell heights and widths (InsertDeleteFlags::NONE)
if (bSize)
{
SCCOL nStartX = aBlockRange.aStart.Col();
@@ -817,9 +817,9 @@ void ScUndoAutoFormat::Undo()
SCTAB nEndZ = aBlockRange.aEnd.Tab();
pUndoDoc->CopyToDocument( nStartX, 0, 0, nEndX, MAXROW, nTabCount-1,
- IDF_NONE, false, &rDoc, &aMarkData );
+ InsertDeleteFlags::NONE, false, &rDoc, &aMarkData );
pUndoDoc->CopyToDocument( 0, nStartY, 0, MAXCOL, nEndY, nTabCount-1,
- IDF_NONE, false, &rDoc, &aMarkData );
+ InsertDeleteFlags::NONE, false, &rDoc, &aMarkData );
pDocShell->PostPaint( 0, 0, nStartZ, MAXCOL, MAXROW, nEndZ,
PAINT_GRID | PAINT_LEFT | PAINT_TOP, SC_PF_LINES );
}
@@ -995,7 +995,7 @@ void ScUndoReplace::Undo()
// Undo document has no row/column information, thus copy with
// bColRowFlags = FALSE to not destroy Outline groups
- InsertDeleteFlags nUndoFlags = (pSearchItem->GetPattern()) ? IDF_ATTRIB : IDF_CONTENTS;
+ InsertDeleteFlags nUndoFlags = (pSearchItem->GetPattern()) ? InsertDeleteFlags::ATTRIB : InsertDeleteFlags::CONTENTS;
pUndoDoc->CopyToDocument( 0, 0, 0,
MAXCOL, MAXROW, MAXTAB,
nUndoFlags, false, &rDoc, NULL, false ); // without row flags
@@ -1138,8 +1138,8 @@ void ScUndoTabOp::Undo()
pDocShell->UpdatePaintExt( nExtFlags, aRange );
ScDocument& rDoc = pDocShell->GetDocument();
- rDoc.DeleteAreaTab( aRange,IDF_ALL & ~IDF_NOTE );
- pUndoDoc->CopyToDocument( aRange, IDF_ALL & ~IDF_NOTE, false, &rDoc );
+ rDoc.DeleteAreaTab( aRange,InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE );
+ pUndoDoc->CopyToDocument( aRange, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE, false, &rDoc );
pDocShell->PostPaint( aRange, PAINT_GRID, nExtFlags );
pDocShell->PostDataChanged();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -1242,7 +1242,7 @@ void ScUndoConversion::DoChange( ScDocument* pRefDoc, const ScAddress& rCursorPo
bool bMulti = aMarkData.IsMultiMarked();
pRefDoc->CopyToDocument( 0, 0, 0,
MAXCOL, MAXROW, nTabCount-1,
- IDF_CONTENTS, bMulti, &rDoc, &aMarkData );
+ InsertDeleteFlags::CONTENTS, bMulti, &rDoc, &aMarkData );
pDocShell->PostPaintGridAll();
}
else
@@ -1308,7 +1308,7 @@ OUString ScUndoRefConversion::GetComment() const
void ScUndoRefConversion::SetChangeTrack()
{
ScChangeTrack* pChangeTrack = pDocShell->GetDocument().GetChangeTrack();
- if ( pChangeTrack && (nFlags & IDF_FORMULA) )
+ if ( pChangeTrack && (nFlags & InsertDeleteFlags::FORMULA) )
pChangeTrack->AppendContentsIfInRefDoc( pUndoDoc,
nStartChangeAction, nEndChangeAction );
else
@@ -1407,7 +1407,7 @@ void ScUndoRefreshLink::Undo()
else
pRedoDoc->AddUndoTab( nTab, nTab, true, true );
bFirst = false;
- rDoc.CopyToDocument(aRange, IDF_ALL, false, pRedoDoc);
+ rDoc.CopyToDocument(aRange, InsertDeleteFlags::ALL, false, pRedoDoc);
pRedoDoc->SetLink( nTab,
rDoc.GetLinkMode(nTab),
rDoc.GetLinkDoc(nTab),
@@ -1418,8 +1418,8 @@ void ScUndoRefreshLink::Undo()
pRedoDoc->SetTabBgColor( nTab, rDoc.GetTabBgColor(nTab) );
}
- rDoc.DeleteAreaTab( aRange,IDF_ALL );
- pUndoDoc->CopyToDocument( aRange, IDF_ALL, false, &rDoc );
+ rDoc.DeleteAreaTab( aRange,InsertDeleteFlags::ALL );
+ pUndoDoc->CopyToDocument( aRange, InsertDeleteFlags::ALL, false, &rDoc );
rDoc.SetLink( nTab, pUndoDoc->GetLinkMode(nTab), pUndoDoc->GetLinkDoc(nTab),
pUndoDoc->GetLinkFlt(nTab), pUndoDoc->GetLinkOpt(nTab),
pUndoDoc->GetLinkTab(nTab),
@@ -1446,8 +1446,8 @@ void ScUndoRefreshLink::Redo()
{
ScRange aRange(0,0,nTab,MAXCOL,MAXROW,nTab);
- rDoc.DeleteAreaTab( aRange, IDF_ALL );
- pRedoDoc->CopyToDocument( aRange, IDF_ALL, false, &rDoc );
+ rDoc.DeleteAreaTab( aRange, InsertDeleteFlags::ALL );
+ pRedoDoc->CopyToDocument( aRange, InsertDeleteFlags::ALL, false, &rDoc );
rDoc.SetLink( nTab,
pRedoDoc->GetLinkMode(nTab),
pRedoDoc->GetLinkDoc(nTab),
@@ -1667,14 +1667,14 @@ void ScUndoUpdateAreaLink::DoChange( const bool bUndo ) const
if ( bWithInsert )
{
rDoc.FitBlock( aNewRange, aOldRange );
- rDoc.DeleteAreaTab( aOldRange, IDF_ALL & ~IDF_NOTE );
- pUndoDoc->UndoToDocument( aOldRange, IDF_ALL & ~IDF_NOTE, false, &rDoc );
+ rDoc.DeleteAreaTab( aOldRange, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE );
+ pUndoDoc->UndoToDocument( aOldRange, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE, false, &rDoc );
}
else
{
ScRange aCopyRange( aOldRange.aStart, ScAddress(nEndX,nEndY,nEndZ) );
- rDoc.DeleteAreaTab( aCopyRange, IDF_ALL & ~IDF_NOTE );
- pUndoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, false, &rDoc );
+ rDoc.DeleteAreaTab( aCopyRange, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE );
+ pUndoDoc->CopyToDocument( aCopyRange, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE, false, &rDoc );
}
}
else
@@ -1682,14 +1682,14 @@ void ScUndoUpdateAreaLink::DoChange( const bool bUndo ) const
if ( bWithInsert )
{
rDoc.FitBlock( aOldRange, aNewRange );
- rDoc.DeleteAreaTab( aNewRange, IDF_ALL & ~IDF_NOTE );
- pRedoDoc->CopyToDocument( aNewRange, IDF_ALL & ~IDF_NOTE, false, &rDoc );
+ rDoc.DeleteAreaTab( aNewRange, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE );
+ pRedoDoc->CopyToDocument( aNewRange, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE, false, &rDoc );
}
else
{
ScRange aCopyRange( aOldRange.aStart, ScAddress(nEndX,nEndY,nEndZ) );
- rDoc.DeleteAreaTab( aCopyRange, IDF_ALL & ~IDF_NOTE );
- pRedoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, false, &rDoc );
+ rDoc.DeleteAreaTab( aCopyRange, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE );
+ pRedoDoc->CopyToDocument( aCopyRange, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE, false, &rDoc );
}
}
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 47731ec9a4e3..e35a15880b39 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -114,9 +114,9 @@ void ScUndoDoOutline::Undo()
// Original column/row status
if (bColumns)
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
- static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false, &rDoc);
+ static_cast<SCCOL>(nEnd), MAXROW, nTab, InsertDeleteFlags::NONE, false, &rDoc);
else
- pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, &rDoc );
+ pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, InsertDeleteFlags::NONE, false, &rDoc );
pViewShell->UpdateScrollBars();
@@ -278,9 +278,9 @@ void ScUndoOutlineLevel::Undo()
if (bColumns)
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
- static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false, &rDoc);
+ static_cast<SCCOL>(nEnd), MAXROW, nTab, InsertDeleteFlags::NONE, false, &rDoc);
else
- pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, &rDoc );
+ pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, InsertDeleteFlags::NONE, false, &rDoc );
rDoc.UpdatePageBreaks( nTab );
@@ -377,8 +377,8 @@ void ScUndoOutlineBlock::Undo()
}
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab,
- static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, false, &rDoc );
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, &rDoc );
+ static_cast<SCCOL>(nEndCol), MAXROW, nTab, InsertDeleteFlags::NONE, false, &rDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, InsertDeleteFlags::NONE, false, &rDoc );
rDoc.UpdatePageBreaks( nTab );
@@ -466,8 +466,8 @@ void ScUndoRemoveAllOutlines::Undo()
SCROW nStartRow = aBlockStart.Row();
SCROW nEndRow = aBlockEnd.Row();
- pUndoDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, false, &rDoc );
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, &rDoc );
+ pUndoDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, InsertDeleteFlags::NONE, false, &rDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, InsertDeleteFlags::NONE, false, &rDoc );
rDoc.UpdatePageBreaks( nTab );
@@ -556,9 +556,9 @@ void ScUndoAutoOutline::Undo()
pUndoTable->GetRowArray().GetRange( nStartRow, nEndRow );
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab,
- static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, false,
+ static_cast<SCCOL>(nEndCol), MAXROW, nTab, InsertDeleteFlags::NONE, false,
&rDoc);
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, &rDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, InsertDeleteFlags::NONE, false, &rDoc );
pViewShell->UpdateScrollBars();
}
@@ -673,9 +673,9 @@ void ScUndoSubTotals::Undo()
pUndoTable->GetRowArray().GetRange( nStartRow, nEndRow );
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab,
- static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, false,
+ static_cast<SCCOL>(nEndCol), MAXROW, nTab, InsertDeleteFlags::NONE, false,
&rDoc);
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, &rDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, InsertDeleteFlags::NONE, false, &rDoc );
pViewShell->UpdateScrollBars();
}
@@ -685,12 +685,12 @@ void ScUndoSubTotals::Undo()
ScUndoUtil::MarkSimpleBlock( pDocShell, 0, aParam.nRow1+1, nTab,
MAXCOL, aParam.nRow2, nTab );
- rDoc.DeleteAreaTab( 0,aParam.nRow1+1, MAXCOL,aParam.nRow2, nTab, IDF_ALL );
+ rDoc.DeleteAreaTab( 0,aParam.nRow1+1, MAXCOL,aParam.nRow2, nTab, InsertDeleteFlags::ALL );
pUndoDoc->CopyToDocument( 0, aParam.nRow1+1, nTab, MAXCOL, aParam.nRow2, nTab,
- IDF_NONE, false, &rDoc ); // Flags
+ InsertDeleteFlags::NONE, false, &rDoc ); // Flags
pUndoDoc->UndoToDocument( 0, aParam.nRow1+1, nTab, MAXCOL, aParam.nRow2, nTab,
- IDF_ALL, false, &rDoc );
+ InsertDeleteFlags::ALL, false, &rDoc );
ScUndoUtil::MarkSimpleBlock( pDocShell, aParam.nCol1,aParam.nRow1,nTab,
aParam.nCol2,aParam.nRow2,nTab );
@@ -814,25 +814,25 @@ void ScUndoQuery::Undo()
aQueryParam.nDestCol, aQueryParam.nDestRow, aQueryParam.nDestTab,
nDestEndCol, nDestEndRow, aQueryParam.nDestTab );
rDoc.DeleteAreaTab( aQueryParam.nDestCol, aQueryParam.nDestRow,
- nDestEndCol, nDestEndRow, aQueryParam.nDestTab, IDF_ALL );
+ nDestEndCol, nDestEndRow, aQueryParam.nDestTab, InsertDeleteFlags::ALL );
pViewShell->DoneBlockMode();
pUndoDoc->CopyToDocument( aQueryParam.nDestCol, aQueryParam.nDestRow, aQueryParam.nDestTab,
nDestEndCol, nDestEndRow, aQueryParam.nDestTab,
- IDF_ALL, false, &rDoc );
+ InsertDeleteFlags::ALL, false, &rDoc );
// Attributes are always copied (#49287#)
// rest of the old range
if ( bDestArea && !bDoSize )
{
- rDoc.DeleteAreaTab( aOldDest, IDF_ALL );
- pUndoDoc->CopyToDocument( aOldDest, IDF_ALL, false, &rDoc );
+ rDoc.DeleteAreaTab( aOldDest, InsertDeleteFlags::ALL );
+ pUndoDoc->CopyToDocument( aOldDest, InsertDeleteFlags::ALL, false, &rDoc );
}
}
else
pUndoDoc->CopyToDocument( 0, aQueryParam.nRow1, nTab, MAXCOL, aQueryParam.nRow2, nTab,
- IDF_NONE, false, &rDoc );
+ InsertDeleteFlags::NONE, false, &rDoc );
if (pUndoDB)
rDoc.SetDBCollection( new ScDBCollection( *pUndoDB ), true );
@@ -1114,8 +1114,8 @@ void ScUndoImportData::Undo()
for (SCCOL nCopyCol = nCol1; nCopyCol <= nCol2; nCopyCol++)
{
rDoc.CopyToDocument( nCopyCol,nRow1,nTab, nCopyCol,nRow2,nTab,
- IDF_CONTENTS & ~IDF_NOTE, false, pRedoDoc );
- rDoc.DeleteAreaTab( nCopyCol,nRow1, nCopyCol,nRow2, nTab, IDF_CONTENTS & ~IDF_NOTE );
+ InsertDeleteFlags::CONTENTS & ~InsertDeleteFlags::NOTE, false, pRedoDoc );
+ rDoc.DeleteAreaTab( nCopyCol,nRow1, nCopyCol,nRow2, nTab, InsertDeleteFlags::CONTENTS & ~InsertDeleteFlags::NOTE );
}
rDoc.SetAutoCalc( bOldAutoCalc );
bRedoFilled = true;
@@ -1132,7 +1132,7 @@ void ScUndoImportData::Undo()
pRedoDBData->GetArea( aNew );
rDoc.DeleteAreaTab( aNew.aStart.Col(), aNew.aStart.Row(),
- aNew.aEnd.Col(), aNew.aEnd.Row(), nTab, IDF_ALL & ~IDF_NOTE );
+ aNew.aEnd.Col(), aNew.aEnd.Row(), nTab, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE );
aOld.aEnd.SetCol( aOld.aEnd.Col() + nFormulaCols ); // FitBlock also for formulas
aNew.aEnd.SetCol( aNew.aEnd.Col() + nFormulaCols );
@@ -1140,11 +1140,11 @@ void ScUndoImportData::Undo()
}
else
rDoc.DeleteAreaTab( aImportParam.nCol1,aImportParam.nRow1,
- nEndCol,nEndRow, nTab, IDF_ALL & ~IDF_NOTE );
+ nEndCol,nEndRow, nTab, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE );
pUndoDoc->CopyToDocument( aImportParam.nCol1,aImportParam.nRow1,nTab,
nEndCol+nFormulaCols,nEndRow,nTab,
- IDF_ALL & ~IDF_NOTE, false, &rDoc );
+ InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE, false, &rDoc );
if (pCurrentData)
{
@@ -1203,16 +1203,16 @@ void ScUndoImportData::Redo()
rDoc.FitBlock( aOld, aNew );
rDoc.DeleteAreaTab( aNew.aStart.Col(), aNew.aStart.Row(),
- aNew.aEnd.Col(), aNew.aEnd.Row(), nTab, IDF_ALL & ~IDF_NOTE );
+ aNew.aEnd.Col(), aNew.aEnd.Row(), nTab, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE );
- pRedoDoc->CopyToDocument( aNew, IDF_ALL & ~IDF_NOTE, false, &rDoc ); // including formulas
+ pRedoDoc->CopyToDocument( aNew, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE, false, &rDoc ); // including formulas
}
else
{
rDoc.DeleteAreaTab( aImportParam.nCol1,aImportParam.nRow1,
- nEndCol,nEndRow, nTab, IDF_ALL & ~IDF_NOTE );
+ nEndCol,nEndRow, nTab, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE );
pRedoDoc->CopyToDocument( aImportParam.nCol1,aImportParam.nRow1,nTab,
- nEndCol,nEndRow,nTab, IDF_ALL & ~IDF_NOTE, false, &rDoc );
+ nEndCol,nEndRow,nTab, InsertDeleteFlags::ALL & ~InsertDeleteFlags::NOTE, false, &rDoc );
}
if (pCurrentData)
@@ -1358,9 +1358,9 @@ void ScUndoRepeatDB::Undo()
pUndoTable->GetRowArray().GetRange( nStartRow, nEndRow );
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab,
- static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, false,
+ static_cast<SCCOL>(nEndCol), MAXROW, nTab, InsertDeleteFlags::NONE, false,
&rDoc );
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, &rDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, InsertDeleteFlags::NONE, false, &rDoc );
pViewShell->UpdateScrollBars();
}
@@ -1369,12 +1369,12 @@ void ScUndoRepeatDB::Undo()
ScUndoUtil::MarkSimpleBlock( pDocShell, 0, aBlockStart.Row(), nTab,
MAXCOL, aBlockEnd.Row(), nTab );
rDoc.DeleteAreaTab( 0, aBlockStart.Row(),
- MAXCOL, aBlockEnd.Row(), nTab, IDF_ALL );
+ MAXCOL, aBlockEnd.Row(), nTab, InsertDeleteFlags::ALL );
pUndoDoc->CopyToDocument( 0, aBlockStart.Row(), nTab, MAXCOL, aBlockEnd.Row(), nTab,
- IDF_NONE, false, &rDoc ); // Flags
+ InsertDeleteFlags::NONE, false, &rDoc ); // Flags
pUndoDoc->UndoToDocument( 0, aBlockStart.Row(), nTab, MAXCOL, aBlockEnd.Row(), nTab,
- IDF_ALL, false, &rDoc );
+ InsertDeleteFlags::ALL, false, &rDoc );
ScUndoUtil::MarkSimpleBlock( pDocShell, aBlockStart.Col(),aBlockStart.Row(),nTab,
aBlockEnd.Col(),aBlockEnd.Row(),nTab );
@@ -1474,14 +1474,14 @@ void ScUndoDataPilot::Undo()
if ( pNewDPObject && pNewUndoDoc )
{
aNewRange = pNewDPObject->GetOutRange();
- rDoc.DeleteAreaTab( aNewRange, IDF_ALL );
- pNewUndoDoc->CopyToDocument( aNewRange, IDF_ALL, false, &rDoc );
+ rDoc.DeleteAreaTab( aNewRange, InsertDeleteFlags::ALL );
+ pNewUndoDoc->CopyToDocument( aNewRange, InsertDeleteFlags::ALL, false, &rDoc );
}
if ( pOldDPObject && pOldUndoDoc )
{
aOldRange = pOldDPObject->GetOutRange();
- rDoc.DeleteAreaTab( aOldRange, IDF_ALL );
- pOldUndoDoc->CopyToDocument( aOldRange, IDF_ALL, false, &rDoc );
+ rDoc.DeleteAreaTab( aOldRange, InsertDeleteFlags::ALL );
+ pOldUndoDoc->CopyToDocument( aOldRange, InsertDeleteFlags::ALL, false, &rDoc );
}
// update objects in collection
@@ -1628,19 +1628,19 @@ void ScUndoConsolidate::Undo()
rDoc.SetOutlineTable( nTab, pUndoTab );
// Row status
- pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, false, &rDoc );
+ pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, InsertDeleteFlags::NONE, false, &rDoc );
// Data and references
- rDoc.DeleteAreaTab( 0,aDestArea.nRowStart, MAXCOL,aDestArea.nRowEnd, nTab, IDF_ALL );
+ rDoc.DeleteAreaTab( 0,aDestArea.nRowStart, MAXCOL,aDestArea.nRowEnd, nTab, InsertDeleteFlags::ALL );
pUndoDoc->UndoToDocument( 0, aDestArea.nRowStart, nTab,
MAXCOL, aDestArea.nRowEnd, nTab,
- IDF_ALL, false, &rDoc );
+ InsertDeleteFlags::ALL, false, &rDoc );
// Original range
if (pUndoData)
{
- rDoc.DeleteAreaTab(aOldRange, IDF_ALL);
- pUndoDoc->CopyToDocument(aOldRange, IDF_ALL, false, &rDoc);
+ rDoc.DeleteAreaTab(aOldRange, InsertDeleteFlags::ALL);
+ pUndoDoc->CopyToDocument(aOldRange, InsertDeleteFlags::ALL, false, &rDoc);
}
pDocShell->PostPaint( 0,aDestArea.nRowStart,nTab, MAXCOL,MAXROW,nTab,
@@ -1649,16 +1649,16 @@ void ScUndoConsolidate::Undo()
else
{
rDoc.DeleteAreaTab( aDestArea.nColStart,aDestArea.nRowStart,
- aDestArea.nColEnd,aDestArea.nRowEnd, nTab, IDF_ALL );
+ aDestArea.nColEnd,aDestArea.nRowEnd, nTab, InsertDeleteFlags::ALL );
pUndoDoc->CopyToDocument( aDestArea.nColStart, aDestArea.nRowStart, nTab,
aDestArea.nColEnd, aDestArea.nRowEnd, nTab,
- IDF_ALL, false, &rDoc );
+ InsertDeleteFlags::ALL, false, &rDoc );
// Original range
if (pUndoData)
{
- rDoc.DeleteAreaTab(aOldRange, IDF_ALL);
- pUndoDoc->CopyToDocument(aOldRange, IDF_ALL, false, &rDoc);
+ rDoc.DeleteAreaTab(aOldRange, InsertDeleteFlags::ALL);
+ pUndoDoc->CopyToDocument(aOldRange, InsertDeleteFlags::ALL, false, &rDoc);
}
SCCOL nEndX = aDestArea.nColEnd;
@@ -1844,7 +1844,7 @@ OUString ScUndoDataForm::GetComment() const
void ScUndoDataForm::SetChangeTrack()
{
ScChangeTrack* pChangeTrack = pDocShell->GetDocument().GetChangeTrack();
- if ( pChangeTrack && (nFlags & IDF_CONTENTS) )
+ if ( pChangeTrack && (nFlags & InsertDeleteFlags::CONTENTS) )
pChangeTrack->AppendContentRange( aBlockRange, pUndoDoc,
nStartChangeAction, nEndChangeAction, SC_CACM_PASTE );
else
@@ -1893,11 +1893,11 @@ void ScUndoDataForm::DoChange( const bool bUndo )
ScRefUndoData* pWorkRefData = bUndo ? pRefUndoData : pRefRedoData;
// Always back-up either all or none of the content for Undo
- InsertDeleteFlags nUndoFlags = IDF_NONE;
- if (nFlags & IDF_CONTENTS)
- nUndoFlags |= IDF_CONTENTS;
- if (nFlags & IDF_ATTRIB)
- nUndoFlags |= IDF_ATTRIB;
+ InsertDeleteFlags nUndoFlags = InsertDeleteFlags::NONE;
+ if (nFlags & InsertDeleteFlags::CONTENTS)
+ nUndoFlags |= InsertDeleteFlags::CONTENTS;
+ if (nFlags & InsertDeleteFlags::ATTRIB)
+ nUndoFlags |= InsertDeleteFlags::ATTRIB;
bool bPaintAll = false;
@@ -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, IDF_VALUE, false, pRedoDoc );
+ rDoc.CopyToDocument( aCopyRange, InsertDeleteFlags::VALUE, false, pRedoDoc );
bRedoFilled = true;
}
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 044035d1a2cc..46862b68463f 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -330,7 +330,7 @@ void ScUndoDeleteTab::Undo()
bDrawIsInUndo = false;
if (bOk)
{
- pRefUndoDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,false, &rDoc );
+ pRefUndoDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, InsertDeleteFlags::ALL,false, &rDoc );
OUString aOldName;
pRefUndoDoc->GetName( nTab, aOldName );
@@ -938,7 +938,7 @@ void ScUndoImportTab::Undo()
{
SCTAB nTabPos=nTab+i;
- rDoc.CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, IDF_ALL,false, pRedoDoc );
+ rDoc.CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, InsertDeleteFlags::ALL,false, pRedoDoc );
rDoc.GetName( nTabPos, aOldName );
pRedoDoc->RenameTab( nTabPos, aOldName, false );
pRedoDoc->SetTabBgColor( nTabPos, rDoc.GetTabBgColor(nTabPos) );
@@ -995,7 +995,7 @@ void ScUndoImportTab::Redo()
for (i=0; i<nCount; i++) // then copy into inserted sheets
{
SCTAB nTabPos=nTab+i;
- pRedoDoc->CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, IDF_ALL,false, &rDoc );
+ pRedoDoc->CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, InsertDeleteFlags::ALL,false, &rDoc );
rDoc.SetTabBgColor( nTabPos, pRedoDoc->GetTabBgColor(nTabPos) );
if ( pRedoDoc->IsScenario(nTabPos) )
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index a42c40740237..62dd3743110d 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -1062,7 +1062,7 @@ void ScHelperFunctions::ApplyBorder( ScDocShell* pDocShell, const ScRangeList& r
pUndoDoc->InitUndo( &rDoc, nTab, nTab );
else
pUndoDoc->AddUndoTab( nTab, nTab );
- rDoc.CopyToDocument( aRange, IDF_ATTRIB, false, pUndoDoc );
+ rDoc.CopyToDocument( aRange, InsertDeleteFlags::ATTRIB, false, pUndoDoc );
}
ScMarkData aMark;
@@ -1122,10 +1122,10 @@ static bool lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( &rDoc, nTab, nTab );
- rDoc.CopyToDocument( rRange, IDF_CONTENTS|IDF_NOCAPTIONS, false, pUndoDoc );
+ rDoc.CopyToDocument( rRange, InsertDeleteFlags::CONTENTS|InsertDeleteFlags::NOCAPTIONS, false, pUndoDoc );
}
- rDoc.DeleteAreaTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, IDF_CONTENTS );
+ rDoc.DeleteAreaTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, InsertDeleteFlags::CONTENTS );
bool bError = false;
SCROW nDocRow = nStartRow;
@@ -1215,7 +1215,7 @@ static bool lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoPaste(
&rDocShell, ScRange(nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab),
- aDestMark, pUndoDoc, NULL, IDF_CONTENTS, NULL, false));
+ aDestMark, pUndoDoc, NULL, InsertDeleteFlags::CONTENTS, NULL, false));
}
if (!bHeight)
@@ -1261,10 +1261,10 @@ static bool lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( &rDoc, nTab, nTab );
- rDoc.CopyToDocument( rRange, IDF_CONTENTS, false, pUndoDoc );
+ rDoc.CopyToDocument( rRange, InsertDeleteFlags::CONTENTS, false, pUndoDoc );
}
- rDoc.DeleteAreaTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, IDF_CONTENTS );
+ rDoc.DeleteAreaTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, InsertDeleteFlags::CONTENTS );
bool bError = false;
SCROW nDocRow = nStartRow;
@@ -1316,7 +1316,7 @@ static bool lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoPaste( &rDocShell,
ScRange(nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab), aDestMark,
- pUndoDoc, NULL, IDF_CONTENTS, NULL, false));
+ pUndoDoc, NULL, InsertDeleteFlags::CONTENTS, NULL, false));
}
if (!bHeight)
@@ -1845,9 +1845,9 @@ 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
- InsertDeleteFlags nDelFlags = InsertDeleteFlags::fromInt(nContentFlags) & IDF_ALL;
- if ( ( nDelFlags & IDF_EDITATTR ) && ( nDelFlags & IDF_CONTENTS ) == IDF_NONE )
- nDelFlags |= IDF_EDITATTR;
+ InsertDeleteFlags nDelFlags = static_cast<InsertDeleteFlags>(nContentFlags) & InsertDeleteFlags::ALL;
+ if ( ( nDelFlags & InsertDeleteFlags::EDITATTR ) && ( nDelFlags & InsertDeleteFlags::CONTENTS ) == InsertDeleteFlags::NONE )
+ nDelFlags |= InsertDeleteFlags::EDITATTR;
pDocShell->GetDocFunc().DeleteContents( *GetMarkData(), nDelFlags, true, true );
}
@@ -5119,7 +5119,7 @@ void ScCellRangeObj::SetArrayFormula_Impl(const OUString& rFormula,
ScMarkData aMark;
aMark.SetMarkArea( aRange );
aMark.SelectTable( aRange.aStart.Tab(), true );
- pDocSh->GetDocFunc().DeleteContents( aMark, IDF_CONTENTS, true, true );
+ pDocSh->GetDocFunc().DeleteContents( aMark, InsertDeleteFlags::CONTENTS, true, true );
}
}
}
@@ -5198,7 +5198,7 @@ void SAL_CALL ScCellRangeObj::setArrayTokens( const uno::Sequence<sheet::Formula
ScMarkData aMark;
aMark.SetMarkArea( aRange );
aMark.SelectTable( aRange.aStart.Tab(), true );
- pDocSh->GetDocFunc().DeleteContents( aMark, IDF_CONTENTS, true, true );
+ pDocSh->GetDocFunc().DeleteContents( aMark, InsertDeleteFlags::CONTENTS, true, true );
}
}
}
@@ -7132,7 +7132,7 @@ void SAL_CALL ScTableSheetObj::removeAllManualPageBreaks() throw(uno::RuntimeExc
{
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( &rDoc, nTab, nTab, true, true );
- rDoc.CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, false, pUndoDoc );
+ rDoc.CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoRemoveBreaks( pDocSh, nTab, pUndoDoc ) );
}
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index cc1004522024..cfd7957c31db 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -4085,7 +4085,7 @@ void SAL_CALL ScAnnotationsObj::removeByIndex( sal_Int32 nIndex ) throw(uno::Run
aMarkData.SelectTable( aPos.Tab(), true );
aMarkData.SetMultiMarkArea( ScRange(aPos) );
- pDocShell->GetDocFunc().DeleteContents( aMarkData, IDF_NOTE, true, true );
+ pDocShell->GetDocFunc().DeleteContents( aMarkData, InsertDeleteFlags::NOTE, true, true );
}
}
}
diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index 337d98514d14..6526eb30e0a7 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -167,7 +167,7 @@ static bool lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange,
ScMarkData aDestMark;
aDestMark.SelectOneTable( nDestTab );
aDestMark.SetMarkArea( aNewRange );
- pDestDoc->CopyFromClip( aNewRange, aDestMark, IDF_ALL & ~IDF_FORMULA, NULL, pClipDoc, false );
+ pDestDoc->CopyFromClip( aNewRange, aDestMark, InsertDeleteFlags::ALL & ~InsertDeleteFlags::FORMULA, NULL, pClipDoc, false );
delete pClipDoc;
return true;
@@ -651,8 +651,8 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const OUString& aName,
bArgErr = true;
}
- pDoc->DeleteAreaTab( 0, 0, MAXCOL, MAXROW, 0, IDF_ALL );
- pDoc->DeleteAreaTab( 0, 0, 0, 0, nTempSheet, IDF_ALL );
+ pDoc->DeleteAreaTab( 0, 0, MAXCOL, MAXROW, 0, InsertDeleteFlags::ALL );
+ pDoc->DeleteAreaTab( 0, 0, 0, 0, nTempSheet, InsertDeleteFlags::ALL );
}
if (bOverflow)
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index a8feafbef04c..557764cd4a88 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -204,7 +204,7 @@ void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, InsertDele
pDoc = pOwnClip->GetDocument();
pTabViewShell->PasteFromClip( nFlags, pDoc,
nFunction, bSkipEmpty, bTranspose, false,
- eMoveMode, IDF_NONE, true );
+ eMoveMode, InsertDeleteFlags::NONE, true );
pTabViewShell->CellContentChanged();
}
}
diff --git a/sc/source/ui/vba/vbahelper.cxx b/sc/source/ui/vba/vbahelper.cxx
index cbb4fff51eff..8faddb8cd0df 100644
--- a/sc/source/ui/vba/vbahelper.cxx
+++ b/sc/source/ui/vba/vbahelper.cxx
@@ -220,7 +220,7 @@ void implnPasteSpecial(sal_uInt16 nFlags,sal_uInt16 nFunction,sal_Bool bSkipEmpt
pDoc = pOwnClip->GetDocument();
pTabViewShell->PasteFromClip( nFlags, pDoc,
nFunction, bSkipEmpty, bTranspose, bAsLink,
- eMoveMode, IDF_NONE, sal_True );
+ eMoveMode, InsertDeleteFlags::NONE, sal_True );
pTabViewShell->CellContentChanged();
}
}
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index afa3ba625232..86554ff299b5 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -2799,26 +2799,26 @@ uno::Any ScVbaRange::getCellRange( const uno::Reference< excel::XRange >& rxRang
static InsertDeleteFlags getPasteFlags (sal_Int32 Paste)
{
- InsertDeleteFlags nFlags = IDF_NONE;
+ InsertDeleteFlags nFlags = InsertDeleteFlags::NONE;
switch (Paste) {
case excel::XlPasteType::xlPasteComments:
- nFlags = IDF_NOTE;break;
+ nFlags = InsertDeleteFlags::NOTE;break;
case excel::XlPasteType::xlPasteFormats:
- nFlags = IDF_ATTRIB;break;
+ nFlags = InsertDeleteFlags::ATTRIB;break;
case excel::XlPasteType::xlPasteFormulas:
- nFlags = IDF_FORMULA;break;
+ nFlags = InsertDeleteFlags::FORMULA;break;
case excel::XlPasteType::xlPasteFormulasAndNumberFormats :
case excel::XlPasteType::xlPasteValues:
- nFlags = ( IDF_VALUE | IDF_DATETIME | IDF_STRING | IDF_SPECIAL_BOOLEAN ); break;
+ nFlags = ( InsertDeleteFlags::VALUE | InsertDeleteFlags::DATETIME | InsertDeleteFlags::STRING | InsertDeleteFlags::SPECIAL_BOOLEAN ); break;
case excel::XlPasteType::xlPasteValuesAndNumberFormats:
- nFlags = IDF_VALUE | IDF_ATTRIB; break;
+ nFlags = InsertDeleteFlags::VALUE | InsertDeleteFlags::ATTRIB; break;
case excel::XlPasteType::xlPasteColumnWidths:
case excel::XlPasteType::xlPasteValidation:
- nFlags = IDF_NONE;break;
+ nFlags = InsertDeleteFlags::NONE;break;
case excel::XlPasteType::xlPasteAll:
case excel::XlPasteType::xlPasteAllExceptBorders:
default:
- nFlags = IDF_ALL;break;
+ nFlags = InsertDeleteFlags::ALL;break;
}
return nFlags;
}
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 821255ee4c1d..20e8fd72e0f2 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -329,13 +329,13 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
// delete contents from cells
case SID_DELETE_CONTENTS:
- pTabViewShell->DeleteContents( IDF_CONTENTS );
+ pTabViewShell->DeleteContents( InsertDeleteFlags::CONTENTS );
rReq.Done();
break;
case SID_DELETE:
{
- InsertDeleteFlags nFlags = IDF_NONE;
+ InsertDeleteFlags nFlags = InsertDeleteFlags::NONE;
if ( pReqArgs!=nullptr && pTabViewShell->SelectionEditable() )
{
@@ -353,16 +353,16 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
switch (aFlags[i])
{
case 'A': // all
- nFlags |= IDF_ALL;
+ nFlags |= InsertDeleteFlags::ALL;
bCont = false; // don't continue!
break;
- case 'S': nFlags |= IDF_STRING; break;
- case 'V': nFlags |= IDF_VALUE; break;
- case 'D': nFlags |= IDF_DATETIME; break;
- case 'F': nFlags |= IDF_FORMULA; break;
- case 'N': nFlags |= IDF_NOTE; break;
- case 'T': nFlags |= IDF_ATTRIB; break;
- case 'O': nFlags |= IDF_OBJECTS; break;
+ case 'S': nFlags |= InsertDeleteFlags::STRING; break;
+ case 'V': nFlags |= InsertDeleteFlags::VALUE; break;
+ case 'D': nFlags |= InsertDeleteFlags::DATETIME; break;
+ case 'F': nFlags |= InsertDeleteFlags::FORMULA; break;
+ case 'N': nFlags |= InsertDeleteFlags::NOTE; break;
+ case 'T': nFlags |= InsertDeleteFlags::ATTRIB; break;
+ case 'O': nFlags |= InsertDeleteFlags::OBJECTS; break;
}
}
}
@@ -389,7 +389,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
pTabViewShell->ErrorMessage(aTester.GetMessageId());
}
- if( nFlags != IDF_NONE )
+ if( nFlags != InsertDeleteFlags::NONE )
{
pTabViewShell->DeleteContents( nFlags );
@@ -397,19 +397,19 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
OUString aFlags;
- if( nFlags == IDF_ALL )
+ if( nFlags == InsertDeleteFlags::ALL )
{
aFlags += "A";
}
else
{
- if( nFlags & IDF_STRING ) aFlags += "S";
- if( nFlags & IDF_VALUE ) aFlags += "V";
- if( nFlags & IDF_DATETIME ) aFlags += "D";
- if( nFlags & IDF_FORMULA ) aFlags += "F";
- if( nFlags & IDF_NOTE ) aFlags += "N";
- if( nFlags & IDF_ATTRIB ) aFlags += "T";
- if( nFlags & IDF_OBJECTS ) aFlags += "O";
+ if( nFlags & InsertDeleteFlags::STRING ) aFlags += "S";
+ if( nFlags & InsertDeleteFlags::VALUE ) aFlags += "V";
+ if( nFlags & InsertDeleteFlags::DATETIME ) aFlags += "D";
+ if( nFlags & InsertDeleteFlags::FORMULA ) aFlags += "F";
+ if( nFlags & InsertDeleteFlags::NOTE ) aFlags += "N";
+ if( nFlags & InsertDeleteFlags::ATTRIB ) aFlags += "T";
+ if( nFlags & InsertDeleteFlags::OBJECTS ) aFlags += "O";
}
rReq.AppendItem( SfxStringItem( SID_DELETE, aFlags ) );
@@ -443,7 +443,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case FID_FILL_TAB:
{
- InsertDeleteFlags nFlags = IDF_NONE;
+ InsertDeleteFlags nFlags = InsertDeleteFlags::NONE;
ScPasteFunc nFunction = ScPasteFunc::NONE;
bool bSkipEmpty = false;
bool bAsLink = false;
@@ -464,15 +464,15 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
switch (aFlags[i])
{
case 'A': // all
- nFlags |= IDF_ALL;
+ nFlags |= InsertDeleteFlags::ALL;
bCont = false; // don't continue!
break;
- case 'S': nFlags |= IDF_STRING; break;
- case 'V': nFlags |= IDF_VALUE; break;
- case 'D': nFlags |= IDF_DATETIME; break;
- case 'F': nFlags |= IDF_FORMULA; break;
- case 'N': nFlags |= IDF_NOTE; break;
- case 'T': nFlags |= IDF_ATTRIB; break;
+ case 'S': nFlags |= InsertDeleteFlags::STRING; break;
+ case 'V': nFlags |= InsertDeleteFlags::VALUE; break;
+ case 'D': nFlags |= InsertDeleteFlags::DATETIME; break;
+ case 'F': nFlags |= InsertDeleteFlags::FORMULA; break;
+ case 'N': nFlags |= InsertDeleteFlags::NOTE; break;
+ case 'T': nFlags |= InsertDeleteFlags::ATTRIB; break;
}
}
}
@@ -482,7 +482,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
std::unique_ptr<AbstractScInsertContentsDlg> pDlg(pFact->CreateScInsertContentsDlg( pTabViewShell->GetDialogParent(),
- IDF_NONE, /* nCheckDefaults */
+ InsertDeleteFlags::NONE, /* nCheckDefaults */
&ScGlobal::GetRscString(STR_FILL_TAB)));
OSL_ENSURE(pDlg, "Dialog create fail!");
pDlg->SetFillMode(true);
@@ -497,7 +497,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
}
- if( nFlags != IDF_NONE )
+ if( nFlags != InsertDeleteFlags::NONE )
{
pTabViewShell->FillTab( nFlags, nFunction, bSkipEmpty, bAsLink );
@@ -505,18 +505,18 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
OUString aFlags;
- if( nFlags == IDF_ALL )
+ if( nFlags == InsertDeleteFlags::ALL )
{
aFlags += "A";
}
else
{
- if( nFlags & IDF_STRING ) aFlags += "S";
- if( nFlags & IDF_VALUE ) aFlags += "V";
- if( nFlags & IDF_DATETIME ) aFlags += "D";
- if( nFlags & IDF_FORMULA ) aFlags += "F";
- if( nFlags & IDF_NOTE ) aFlags += "N";
- if( nFlags & IDF_ATTRIB ) aFlags += "T";
+ if( nFlags & InsertDeleteFlags::STRING ) aFlags += "S";
+ if( nFlags & InsertDeleteFlags::VALUE ) aFlags += "V";
+ if( nFlags & InsertDeleteFlags::DATETIME ) aFlags += "D";
+ if( nFlags & InsertDeleteFlags::FORMULA ) aFlags += "F";
+ if( nFlags & InsertDeleteFlags::NOTE ) aFlags += "N";
+ if( nFlags & InsertDeleteFlags::ATTRIB ) aFlags += "T";
}
rReq.AppendItem( SfxStringItem( FID_FILL_TAB, aFlags ) );
@@ -1315,7 +1315,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case FID_INS_CELL_CONTENTS:
{
- InsertDeleteFlags nFlags = IDF_NONE;
+ InsertDeleteFlags nFlags = InsertDeleteFlags::NONE;
ScPasteFunc nFunction = ScPasteFunc::NONE;
InsCellCmd eMoveMode = INS_NONE;
@@ -1347,15 +1347,15 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
switch (aFlags[i])
{
case 'A': // all
- nFlags |= IDF_ALL;
+ nFlags |= InsertDeleteFlags::ALL;
bCont = false; // don't continue!
break;
- case 'S': nFlags |= IDF_STRING; break;
- case 'V': nFlags |= IDF_VALUE; break;
- case 'D': nFlags |= IDF_DATETIME; break;
- case 'F': nFlags |= IDF_FORMULA; break;
- case 'N': nFlags |= IDF_NOTE; break;
- case 'T': nFlags |= IDF_ATTRIB; break;
+ case 'S': nFlags |= InsertDeleteFlags::STRING; break;
+ case 'V': nFlags |= InsertDeleteFlags::VALUE; break;
+ case 'D': nFlags |= InsertDeleteFlags::DATETIME; break;
+ case 'F': nFlags |= InsertDeleteFlags::FORMULA; break;
+ case 'N': nFlags |= InsertDeleteFlags::NOTE; break;
+ case 'T': nFlags |= InsertDeleteFlags::ATTRIB; break;
}
}
@@ -1462,7 +1462,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
pTabViewShell->ErrorMessage(aTester.GetMessageId());
}
- if( nFlags != IDF_NONE )
+ if( nFlags != InsertDeleteFlags::NONE )
{
{
WaitObject aWait( GetViewData()->GetDialogParent() );
@@ -1472,7 +1472,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
pTabViewShell->PasteFromClip( nFlags, pOwnClip->GetDocument(),
nFunction, bSkipEmpty, bTranspose, bAsLink,
- eMoveMode, IDF_NONE, true ); // allow warning dialog
+ eMoveMode, InsertDeleteFlags::NONE, true ); // allow warning dialog
}
}
@@ -1480,18 +1480,18 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
OUString aFlags;
- if( nFlags == IDF_ALL )
+ if( nFlags == InsertDeleteFlags::ALL )
{
aFlags += "A";
}
else
{
- if( nFlags & IDF_STRING ) aFlags += "S";
- if( nFlags & IDF_VALUE ) aFlags += "V";
- if( nFlags & IDF_DATETIME ) aFlags += "D";
- if( nFlags & IDF_FORMULA ) aFlags += "F";
- if( nFlags & IDF_NOTE ) aFlags += "N";
- if( nFlags & IDF_ATTRIB ) aFlags += "T";
+ if( nFlags & InsertDeleteFlags::STRING ) aFlags += "S";
+ if( nFlags & InsertDeleteFlags::VALUE ) aFlags += "V";
+ if( nFlags & InsertDeleteFlags::DATETIME ) aFlags += "D";
+ if( nFlags & InsertDeleteFlags::FORMULA ) aFlags += "F";
+ if( nFlags & InsertDeleteFlags::NOTE ) aFlags += "N";
+ if( nFlags & InsertDeleteFlags::ATTRIB ) aFlags += "T";
}
rReq.AppendItem( SfxStringItem( FID_INS_CELL_CONTENTS, aFlags ) );
@@ -2295,7 +2295,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
break;
case SID_DELETE_NOTE:
- pTabViewShell->DeleteContents( IDF_NOTE ); // delete all notes in selection
+ pTabViewShell->DeleteContents( InsertDeleteFlags::NOTE ); // delete all notes in selection
rReq.Done();
break;
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 6b2dd8de432f..934295b1c6d2 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -704,7 +704,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
case SID_CELL_FORMAT_RESET:
{
- pTabViewShell->DeleteContents( IDF_HARDATTR | IDF_EDITATTR );
+ pTabViewShell->DeleteContents( InsertDeleteFlags::HARDATTR | InsertDeleteFlags::EDITATTR );
rReq.Done();
}
break;
diff --git a/sc/source/ui/view/cliputil.cxx b/sc/source/ui/view/cliputil.cxx
index a1e52ffb70f6..bb4fc02966ce 100644
--- a/sc/source/ui/view/cliputil.cxx
+++ b/sc/source/ui/view/cliputil.cxx
@@ -59,13 +59,13 @@ void ScClipUtil::PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTab
else
{
ScDocument* pClipDoc = pOwnClip->GetDocument();
- InsertDeleteFlags nFlags = IDF_ALL;
+ InsertDeleteFlags nFlags = InsertDeleteFlags::ALL;
if (pClipDoc->GetClipParam().isMultiRange())
// For multi-range paste, we paste values by default.
- nFlags &= ~IDF_FORMULA;
+ nFlags &= ~InsertDeleteFlags::FORMULA;
pTabViewShell->PasteFromClip( nFlags, pClipDoc,
- ScPasteFunc::NONE, false, false, false, INS_NONE, IDF_NONE,
+ ScPasteFunc::NONE, false, false, false, INS_NONE, InsertDeleteFlags::NONE,
bShowDialog ); // allow warning dialog
}
}
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index b57419d930e2..e1ddb60e97cf 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -432,19 +432,19 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, bool bRecord,
pTable->GetRowArray().GetRange( nOutStartRow, nOutEndRow );
pUndoDoc->InitUndo( &rDoc, nTab, nTab, true, true );
- rDoc.CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab, IDF_NONE, false, pUndoDoc );
- rDoc.CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, false, pUndoDoc );
+ rDoc.CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
+ rDoc.CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
}
else
pUndoDoc->InitUndo( &rDoc, nTab, nTab, false, bOldFilter );
// record data range - including filter results
rDoc.CopyToDocument( 0,rParam.nRow1+1,nTab, MAXCOL,rParam.nRow2,nTab,
- IDF_ALL, false, pUndoDoc );
+ InsertDeleteFlags::ALL, false, pUndoDoc );
// all formulas for reference
rDoc.CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1,
- IDF_FORMULA, false, pUndoDoc );
+ InsertDeleteFlags::FORMULA, false, pUndoDoc );
// data base and othe ranges
ScRangeName* pDocRange = rDoc.GetRangeName();
@@ -2051,7 +2051,7 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet
OUString aNewTabName;
pDoc->CreateValidTabName(aNewTabName);
if ( InsertTable(aNewTabName, nNewTab) )
- PasteFromClip( IDF_ALL, pInsDoc.get() );
+ PasteFromClip( InsertDeleteFlags::ALL, pInsDoc.get() );
pMgr->LeaveListAction();
}
@@ -2127,17 +2127,17 @@ void ScDBFunc::RepeatDB( bool bRecord )
pTable->GetRowArray().GetRange( nOutStartRow, nOutEndRow );
pUndoDoc->InitUndo( pDoc, nTab, nTab, true, true );
- pDoc->CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab, IDF_NONE, false, pUndoDoc );
- pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, false, pUndoDoc );
+ pDoc->CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
+ pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
}
else
pUndoDoc->InitUndo( pDoc, nTab, nTab, false, true );
// Record data range - including filter results
- pDoc->CopyToDocument( 0,nStartRow,nTab, MAXCOL,nEndRow,nTab, IDF_ALL, false, pUndoDoc );
+ pDoc->CopyToDocument( 0,nStartRow,nTab, MAXCOL,nEndRow,nTab, InsertDeleteFlags::ALL, false, pUndoDoc );
// all formulas for reference
- pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, IDF_FORMULA, false, pUndoDoc );
+ pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, InsertDeleteFlags::FORMULA, false, pUndoDoc );
// data base and other ranges
ScRangeName* pDocRange = pDoc->GetRangeName();
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 676cb0653b57..6c523cc8e477 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2235,7 +2235,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if ( bIsDel )
{
pView->MarkRange( aDelRange, false );
- pView->DeleteContents( IDF_CONTENTS );
+ pView->DeleteContents( InsertDeleteFlags::CONTENTS );
SCTAB nTab = pViewData->GetTabNo();
ScRange aBlockRange( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab );
if ( aBlockRange != aDelRange )
@@ -2334,7 +2334,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
ScDocument* pBrushDoc = pView->GetBrushDocument();
if ( pBrushDoc )
{
- pView->PasteFromClip( IDF_ATTRIB, pBrushDoc );
+ pView->PasteFromClip( InsertDeleteFlags::ATTRIB, pBrushDoc );
if ( !pView->IsPaintBrushLocked() )
pView->ResetBrushDocument(); // invalidates pBrushDoc pointer
}
@@ -4463,7 +4463,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
{
pView->Unmark(); // before SetCursor, so CheckSelectionTransfer isn't called with a selection
pView->SetCursor( nDestPosX, nDestPosY );
- bDone = pView->PasteFromClip( IDF_ALL, pTransObj->GetDocument() ); // clip-doc
+ bDone = pView->PasteFromClip( InsertDeleteFlags::ALL, pTransObj->GetDocument() ); // clip-doc
if ( bDone )
{
pView->MarkRange( aDest, false );
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 7fd92aa5bdc2..5a34f901222d 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -793,8 +793,8 @@ void ScViewFunc::EnterBlock( const OUString& rString, const EditTextObject* pDat
pInsDoc->SetClipArea( ScRange(aPos) );
// insert Block, with Undo etc.
- if ( PasteFromClip( IDF_CONTENTS, pInsDoc.get(), ScPasteFunc::NONE, false, false,
- false, INS_NONE, IDF_ATTRIB ) )
+ if ( PasteFromClip( InsertDeleteFlags::CONTENTS, pInsDoc.get(), ScPasteFunc::NONE, false, false,
+ false, INS_NONE, InsertDeleteFlags::ATTRIB ) )
{
const SfxUInt32Item* pItem = static_cast<const SfxUInt32Item*>( pInsDoc->GetAttr(
nCol, nRow, nTab, ATTR_VALUE_FORMAT ) );
@@ -859,7 +859,7 @@ void ScViewFunc::RemoveManualBreaks()
{
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( &rDoc, nTab, nTab, true, true );
- rDoc.CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, false, pUndoDoc );
+ rDoc.CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, InsertDeleteFlags::NONE, false, pUndoDoc );
pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoRemoveBreaks( pDocSh, nTab, pUndoDoc ) );
}
@@ -1461,7 +1461,7 @@ void ScViewFunc::FillTab( InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool
pUndoDoc->AddUndoTab( i, i );
aMarkRange.aStart.SetTab( i );
aMarkRange.aEnd.SetTab( i );
- rDoc.CopyToDocument( aMarkRange, IDF_ALL, bMulti, pUndoDoc );
+ rDoc.CopyToDocument( aMarkRange, InsertDeleteFlags::ALL, bMulti, pUndoDoc );
}
}
@@ -2236,7 +2236,7 @@ bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, bool bRecord )
else
pUndoDoc->AddUndoTab( nTab,nTab, true,true ); // incl. column/fow flags
- rDoc.CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,false, pUndoDoc );
+ rDoc.CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, InsertDeleteFlags::ALL,false, pUndoDoc );
rDoc.GetName( nTab, aOldName );
pUndoDoc->RenameTab( nTab, aOldName, false );
if (rDoc.IsLinked(nTab))
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index af8dbeca931e..e0f6deb408f8 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -120,7 +120,7 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, bool bIncludeObjects )
ScRange aCopyRange = aRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(pDoc->GetTableCount()-1);
- pDoc->CopyToDocument( aCopyRange, (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS, false, pUndoDoc );
+ pDoc->CopyToDocument( aCopyRange, (InsertDeleteFlags::ALL & ~InsertDeleteFlags::OBJECTS) | InsertDeleteFlags::NOCAPTIONS, false, pUndoDoc );
pDoc->BeginDrawUndo();
}
@@ -128,7 +128,7 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, bool bIncludeObjects )
pDocSh->UpdatePaintExt( nExtFlags, aRange );
rMark.MarkToMulti();
- pDoc->DeleteSelection( IDF_ALL, rMark );
+ pDoc->DeleteSelection( InsertDeleteFlags::ALL, rMark );
if ( bIncludeObjects )
pDoc->DeleteObjectsInSelection( rMark );
rMark.MarkToSimple();
@@ -462,8 +462,8 @@ void ScViewFunc::PasteFromSystem()
{
// keep a reference in case the clipboard is changed during PasteFromClip
uno::Reference<datatransfer::XTransferable> aOwnClipRef( pOwnClip );
- PasteFromClip( IDF_ALL, pOwnClip->GetDocument(),
- ScPasteFunc::NONE, false, false, false, INS_NONE, IDF_NONE,
+ PasteFromClip( InsertDeleteFlags::ALL, pOwnClip->GetDocument(),
+ ScPasteFunc::NONE, false, false, false, INS_NONE, InsertDeleteFlags::NONE,
true ); // allow warning dialog
}
else if (pDrawClip)
@@ -604,8 +604,8 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran
if (pOwnClip)
{
- PasteFromClip( IDF_ALL, pOwnClip->GetDocument(),
- ScPasteFunc::NONE, false, false, false, INS_NONE, IDF_NONE,
+ PasteFromClip( InsertDeleteFlags::ALL, pOwnClip->GetDocument(),
+ ScPasteFunc::NONE, false, false, false, INS_NONE, InsertDeleteFlags::NONE,
true ); // allow warning dialog
}
else if (pDrawClip)
@@ -698,8 +698,8 @@ bool ScViewFunc::PasteFromSystem( SotClipboardFormatId nFormatId, bool bApi )
{
// keep a reference in case the clipboard is changed during PasteFromClip
uno::Reference<datatransfer::XTransferable> aOwnClipRef( pOwnClip );
- PasteFromClip( IDF_ALL, pOwnClip->GetDocument(),
- ScPasteFunc::NONE, false, false, false, INS_NONE, IDF_NONE,
+ PasteFromClip( InsertDeleteFlags::ALL, pOwnClip->GetDocument(),
+ ScPasteFunc::NONE, false, false, false, INS_NONE, InsertDeleteFlags::NONE,
!bApi ); // allow warning dialog
}
else
@@ -854,17 +854,17 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
}
// undo: save all or no content
- InsertDeleteFlags nContFlags = IDF_NONE;
- if (nFlags & IDF_CONTENTS)
- nContFlags |= IDF_CONTENTS;
- if (nFlags & IDF_ATTRIB)
- nContFlags |= IDF_ATTRIB;
+ InsertDeleteFlags nContFlags = InsertDeleteFlags::NONE;
+ if (nFlags & InsertDeleteFlags::CONTENTS)
+ nContFlags |= InsertDeleteFlags::CONTENTS;
+ if (nFlags & InsertDeleteFlags::ATTRIB)
+ nContFlags |= InsertDeleteFlags::ATTRIB;
// move attributes to undo without copying them from clip to doc
InsertDeleteFlags nUndoFlags = nContFlags;
- if (nUndoExtraFlags & IDF_ATTRIB)
- nUndoFlags |= IDF_ATTRIB;
+ if (nUndoExtraFlags & InsertDeleteFlags::ATTRIB)
+ nUndoFlags |= InsertDeleteFlags::ATTRIB;
// do not copy note captions into undo document
- nUndoFlags |= IDF_NOCAPTIONS;
+ nUndoFlags |= InsertDeleteFlags::NOCAPTIONS;
ScClipParam& rClipParam = pClipDoc->GetClipParam();
if (rClipParam.isMultiRange())
@@ -887,8 +887,8 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
bool bCutMode = pClipDoc->IsCutMode(); // if transposing, take from original clipdoc
bool bIncludeFiltered = bCutMode;
- // paste drawing: also if IDF_NOTE is set (to create drawing layer for note captions)
- bool bPasteDraw = ( pClipDoc->GetDrawLayer() && ( nFlags & (IDF_OBJECTS|IDF_NOTE) ) );
+ // paste drawing: also if InsertDeleteFlags::NOTE is set (to create drawing layer for note captions)
+ bool bPasteDraw = ( pClipDoc->GetDrawLayer() && ( nFlags & (InsertDeleteFlags::OBJECTS|InsertDeleteFlags::NOTE) ) );
ScDocShellRef aTransShellRef; // for objects in xTransClip - must remain valid as long as xTransClip
ScDocument* pOrigClipDoc = NULL;
@@ -1118,7 +1118,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
else if (!bOffLimits)
{
bool bAskIfNotEmpty = bAllowDialogs &&
- ( nFlags & IDF_CONTENTS ) &&
+ ( nFlags & InsertDeleteFlags::CONTENTS ) &&
nFunction == ScPasteFunc::NONE &&
SC_MOD()->GetInputOptions().GetReplaceCellsWarn();
if ( bAskIfNotEmpty )
@@ -1249,12 +1249,12 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
if (nFunction != ScPasteFunc::NONE)
{
bSkipEmpty = false;
- if ( nFlags & IDF_CONTENTS )
+ if ( nFlags & InsertDeleteFlags::CONTENTS )
{
pMixDoc.reset(new ScDocument( SCDOCMODE_UNDO ));
pMixDoc->InitUndo( pDoc, nStartTab, nEndTab );
pDoc->CopyToDocument( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab,
- IDF_CONTENTS, false, pMixDoc.get() );
+ InsertDeleteFlags::CONTENTS, false, pMixDoc.get() );
}
}
@@ -1267,7 +1267,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
if ( bRecord )
pDoc->BeginDrawUndo();
- InsertDeleteFlags nNoObjFlags = nFlags & ~IDF_OBJECTS;
+ InsertDeleteFlags nNoObjFlags = nFlags & ~InsertDeleteFlags::OBJECTS;
if (!bAsLink)
{
// copy normally (original range)
@@ -1276,7 +1276,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
bSkipEmpty, (bMarkIsFiltered ? &aRangeList : NULL) );
// adapt refs manually in case of transpose
- if ( bTranspose && bCutMode && (nFlags & IDF_CONTENTS) )
+ if ( bTranspose && bCutMode && (nFlags & InsertDeleteFlags::CONTENTS) )
pDoc->UpdateTranspose( aUserRange.aStart, pOrigClipDoc, aFilteredMark, pRefUndoDoc );
}
else if (!bTranspose)
@@ -1309,7 +1309,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
::std::vector< OUString > aExcludedChartNames;
SdrPage* pPage = NULL;
- if ( nFlags & IDF_OBJECTS )
+ if ( nFlags & InsertDeleteFlags::OBJECTS )
{
ScDrawView* pScDrawView = GetScDrawView();
SdrModel* pModel = ( pScDrawView ? pScDrawView->GetModel() : NULL );
@@ -1321,7 +1321,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
// Paste the drawing objects after the row heights have been updated.
- pDoc->CopyFromClip( aUserRange, aFilteredMark, IDF_OBJECTS, pRefUndoDoc, pClipDoc,
+ pDoc->CopyFromClip( aUserRange, aFilteredMark, InsertDeleteFlags::OBJECTS, pRefUndoDoc, pClipDoc,
true, false, bIncludeFiltered );
}
@@ -1361,9 +1361,9 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
// not charts?
pUndoDoc->AddUndoTab( 0, nTabCount-1 );
- pRefUndoDoc->DeleteArea( nStartCol, nStartRow, nEndCol, nEndRow, aFilteredMark, IDF_ALL );
+ pRefUndoDoc->DeleteArea( nStartCol, nStartRow, nEndCol, nEndRow, aFilteredMark, InsertDeleteFlags::ALL );
pRefUndoDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1,
- IDF_FORMULA, false, pUndoDoc );
+ InsertDeleteFlags::FORMULA, false, pUndoDoc );
delete pRefUndoDoc;
}
@@ -1414,7 +1414,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
aModificator.SetDocumentModified();
PostPasteFromClip(aUserRange, rMark);
- if ( nFlags & IDF_OBJECTS )
+ if ( nFlags & InsertDeleteFlags::OBJECTS )
{
ScModelObj* pModelObj = ScModelObj::getImplementation( pDocSh->GetModel() );
if ( pPage && pModelObj )
@@ -1486,7 +1486,7 @@ bool ScViewFunc::PasteMultiRangesFromClip(
}
bool bAskIfNotEmpty =
- bAllowDialogs && (nFlags & IDF_CONTENTS) &&
+ bAllowDialogs && (nFlags & InsertDeleteFlags::CONTENTS) &&
nFunction == ScPasteFunc::NONE && SC_MOD()->GetInputOptions().GetReplaceCellsWarn();
if (bAskIfNotEmpty)
@@ -1518,11 +1518,11 @@ bool ScViewFunc::PasteMultiRangesFromClip(
::std::unique_ptr<ScDocument> pMixDoc;
if ( bSkipEmpty || nFunction != ScPasteFunc::NONE)
{
- if ( nFlags & IDF_CONTENTS )
+ if ( nFlags & InsertDeleteFlags::CONTENTS )
{
pMixDoc.reset(new ScDocument(SCDOCMODE_UNDO));
pMixDoc->InitUndoSelected(pDoc, aMark);
- pDoc->CopyToDocument(aMarkedRange, IDF_CONTENTS, false, pMixDoc.get(), &aMark);
+ pDoc->CopyToDocument(aMarkedRange, InsertDeleteFlags::CONTENTS, false, pMixDoc.get(), &aMark);
}
}
@@ -1530,12 +1530,12 @@ bool ScViewFunc::PasteMultiRangesFromClip(
- Needed before AdjustBlockHeight to track moved drawing objects.
- Needed before pDoc->CopyFromClip to track inserted note caption objects.
*/
- if (nFlags & IDF_OBJECTS)
+ if (nFlags & InsertDeleteFlags::OBJECTS)
pDocSh->MakeDrawLayer();
if (pDoc->IsUndoEnabled())
pDoc->BeginDrawUndo();
- InsertDeleteFlags nNoObjFlags = nFlags & ~IDF_OBJECTS;
+ InsertDeleteFlags nNoObjFlags = nFlags & ~InsertDeleteFlags::OBJECTS;
pDoc->CopyMultiRangeFromClip(rCurPos, aMark, nNoObjFlags, pClipDoc,
true, bAsLink, false, bSkipEmpty);
@@ -1544,10 +1544,10 @@ bool ScViewFunc::PasteMultiRangesFromClip(
AdjustBlockHeight(); // update row heights before pasting objects
- if (nFlags & IDF_OBJECTS)
+ if (nFlags & InsertDeleteFlags::OBJECTS)
{
// Paste the drawing objects after the row heights have been updated.
- pDoc->CopyMultiRangeFromClip(rCurPos, aMark, IDF_OBJECTS, pClipDoc,
+ pDoc->CopyMultiRangeFromClip(rCurPos, aMark, InsertDeleteFlags::OBJECTS, pClipDoc,
true, false, false, true);
}
@@ -1644,7 +1644,7 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
ScDocShellModificator aModificator(*pDocSh);
bool bAskIfNotEmpty =
- bAllowDialogs && (nFlags & IDF_CONTENTS) &&
+ bAllowDialogs && (nFlags & InsertDeleteFlags::CONTENTS) &&
nFunction == ScPasteFunc::NONE && SC_MOD()->GetInputOptions().GetReplaceCellsWarn();
if (bAskIfNotEmpty)
@@ -1668,19 +1668,19 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
std::unique_ptr<ScDocument> pMixDoc;
if (bSkipEmpty || nFunction != ScPasteFunc::NONE)
{
- if (nFlags & IDF_CONTENTS)
+ if (nFlags & InsertDeleteFlags::CONTENTS)
{
pMixDoc.reset(new ScDocument(SCDOCMODE_UNDO));
pMixDoc->InitUndoSelected(pDoc, aMark);
for (size_t i = 0, n = aRanges.size(); i < n; ++i)
{
pDoc->CopyToDocument(
- *aRanges[i], IDF_CONTENTS, false, pMixDoc.get(), &aMark);
+ *aRanges[i], InsertDeleteFlags::CONTENTS, false, pMixDoc.get(), &aMark);
}
}
}
- if (nFlags & IDF_OBJECTS)
+ if (nFlags & InsertDeleteFlags::OBJECTS)
pDocSh->MakeDrawLayer();
if (pDoc->IsUndoEnabled())
pDoc->BeginDrawUndo();
@@ -1689,7 +1689,7 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
for (size_t i = 0, n = aRanges.size(); i < n; ++i)
{
pDoc->CopyFromClip(
- *aRanges[i], aMark, (nFlags & ~IDF_OBJECTS), NULL, pClipDoc,
+ *aRanges[i], aMark, (nFlags & ~InsertDeleteFlags::OBJECTS), NULL, pClipDoc,
false, false, true, bSkipEmpty);
}
@@ -1702,12 +1702,12 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
AdjustBlockHeight(); // update row heights before pasting objects
// Then paste the objects.
- if (nFlags & IDF_OBJECTS)
+ if (nFlags & InsertDeleteFlags::OBJECTS)
{
for (size_t i = 0, n = aRanges.size(); i < n; ++i)
{
pDoc->CopyFromClip(
- *aRanges[i], aMark, IDF_OBJECTS, NULL, pClipDoc,
+ *aRanges[i], aMark, InsertDeleteFlags::OBJECTS, NULL, pClipDoc,
false, false, true, bSkipEmpty);
}
}
@@ -1899,7 +1899,7 @@ bool ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, b
// Paste
- PasteFromClip( IDF_ALL, pClipDoc.get(), ScPasteFunc::NONE, false, false, true ); // as a link
+ PasteFromClip( InsertDeleteFlags::ALL, pClipDoc.get(), ScPasteFunc::NONE, false, false, true ); // as a link
return true;
}
@@ -1935,13 +1935,13 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
bool bRowInfo = ( nStartCol==0 && nEndCol==MAXCOL );
SCCOL nUndoEndCol = nStartCol+aColLength-1;
SCROW nUndoEndRow = nCurrentRow;
- InsertDeleteFlags nUndoFlags = IDF_NONE;
+ InsertDeleteFlags nUndoFlags = InsertDeleteFlags::NONE;
if ( bRecord )
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndoSelected( pDoc , rMark , bColInfo , bRowInfo );
- pDoc->CopyToDocument( aUserRange , IDF_VALUE , false , pUndoDoc );
+ pDoc->CopyToDocument( aUserRange , InsertDeleteFlags::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/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index e89705363660..241106dd0e5a 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -119,7 +119,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( &rDoc, nTab, nTab );
- rDoc.CopyToDocument( nStartCol,nStartRow,nTab, nStartCol,nEndRow,nTab, IDF_ALL, false, pUndoDoc );
+ rDoc.CopyToDocument( nStartCol,nStartRow,nTab, nStartCol,nEndRow,nTab, InsertDeleteFlags::ALL, false, pUndoDoc );
}
SCROW nRow = nStartRow;
@@ -140,14 +140,14 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
{
ScDocument* pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndo( &rDoc, nTab, nTab );
- rDoc.CopyToDocument( nStartCol,nStartRow,nTab, nStartCol,nEndRow,nTab, IDF_ALL|IDF_NOCAPTIONS, false, pRedoDoc );
+ rDoc.CopyToDocument( nStartCol,nStartRow,nTab, nStartCol,nEndRow,nTab, InsertDeleteFlags::ALL|InsertDeleteFlags::NOCAPTIONS, false, pRedoDoc );
ScRange aMarkRange(nStartCol, nStartRow, nTab, nStartCol, nEndRow, nTab);
ScMarkData aDestMark;
aDestMark.SetMarkArea( aMarkRange );
pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoPaste( pDocSh, aMarkRange, aDestMark,
- pUndoDoc, pRedoDoc, IDF_ALL, NULL));
+ pUndoDoc, pRedoDoc, InsertDeleteFlags::ALL, NULL));
}
}
@@ -223,7 +223,7 @@ void ScViewFunc::DoRefConversion( bool bRecord )
ScRange aCopyRange = aMarkRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pDoc->CopyToDocument( aCopyRange, IDF_ALL, bMulti, pUndoDoc, &rMark );
+ pDoc->CopyToDocument( aCopyRange, InsertDeleteFlags::ALL, bMulti, pUndoDoc, &rMark );
}
ScRangeListRef xRanges;
@@ -284,11 +284,11 @@ void ScViewFunc::DoRefConversion( bool bRecord )
ScRange aCopyRange = aMarkRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pDoc->CopyToDocument( aCopyRange, IDF_ALL, bMulti, pRedoDoc, &rMark );
+ pDoc->CopyToDocument( aCopyRange, InsertDeleteFlags::ALL, bMulti, pRedoDoc, &rMark );
pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoRefConversion( pDocSh,
- aMarkRange, rMark, pUndoDoc, pRedoDoc, bMulti, IDF_ALL) );
+ aMarkRange, rMark, pUndoDoc, pRedoDoc, bMulti, InsertDeleteFlags::ALL) );
}
pDocSh->PostPaint( aMarkRange, PAINT_GRID );
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 1891ec07ec34..c8b8ea0af7eb 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -157,8 +157,8 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
SetCursor( nPosX, nPosY );
Unmark();
- PasteFromClip( IDF_ALL, pClipDoc.get(),
- ScPasteFunc::NONE, false, false, false, INS_NONE, IDF_NONE,
+ PasteFromClip( InsertDeleteFlags::ALL, pClipDoc.get(),
+ ScPasteFunc::NONE, false, false, false, INS_NONE, InsertDeleteFlags::NONE,
bAllowDialogs );
bRet = true;
}
@@ -578,8 +578,8 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
}
pInsDoc->SetClipArea( aSource );
- PasteFromClip( IDF_ALL, pInsDoc,
- ScPasteFunc::NONE, false, false, false, INS_NONE, IDF_NONE,
+ PasteFromClip( InsertDeleteFlags::ALL, pInsDoc,
+ ScPasteFunc::NONE, false, false, false, INS_NONE, InsertDeleteFlags::NONE,
bAllowDialogs );
delete pInsDoc;
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 58bfb8a38976..1308f905bbfe 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1054,7 +1054,7 @@ void ScViewFunc::ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem
ScRange aCopyRange = aMarkRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, bMulti, pUndoDoc, &aFuncMark );
+ pDoc->CopyToDocument( aCopyRange, InsertDeleteFlags::ATTRIB, bMulti, pUndoDoc, &aFuncMark );
pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoSelectionAttr(
@@ -1162,7 +1162,7 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
for (; itr != itrEnd; ++itr)
if (*itr != nStartTab)
pUndoDoc->AddUndoTab( *itr, *itr );
- rDoc.CopyToDocument( aCopyRange, IDF_ATTRIB, bMulti, pUndoDoc, &aFuncMark );
+ rDoc.CopyToDocument( aCopyRange, InsertDeleteFlags::ATTRIB, bMulti, pUndoDoc, &aFuncMark );
aFuncMark.MarkToMulti();
@@ -1337,7 +1337,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, bool bRecord
ScRange aCopyRange = aMarkRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- rDoc.CopyToDocument( aCopyRange, IDF_ATTRIB, true, pUndoDoc, &aFuncMark );
+ rDoc.CopyToDocument( aCopyRange, InsertDeleteFlags::ATTRIB, true, pUndoDoc, &aFuncMark );
aFuncMark.MarkToMulti();
OUString aName = pStyleSheet->GetName();
@@ -1368,7 +1368,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, bool bRecord
pUndoDoc->AddUndoTab( *itr, *itr );
ScRange aCopyRange( nCol, nRow, 0, nCol, nRow, nTabCount-1 );
- rDoc.CopyToDocument( aCopyRange, IDF_ATTRIB, false, pUndoDoc );
+ rDoc.CopyToDocument( aCopyRange, InsertDeleteFlags::ATTRIB, false, pUndoDoc );
ScRange aMarkRange ( nCol, nRow, nTab );
ScMarkData aUndoMark = aFuncMark;
@@ -1652,17 +1652,17 @@ void ScViewFunc::DeleteMulti( bool bRows, bool bRecord )
SCCOLROW nStart = aSpans[i].mnStart;
SCCOLROW nEnd = aSpans[i].mnEnd;
if (bRows)
- rDoc.CopyToDocument( 0,nStart,nTab, MAXCOL,nEnd,nTab, IDF_ALL,false,pUndoDoc );
+ rDoc.CopyToDocument( 0,nStart,nTab, MAXCOL,nEnd,nTab, InsertDeleteFlags::ALL,false,pUndoDoc );
else
rDoc.CopyToDocument( static_cast<SCCOL>(nStart),0,nTab,
static_cast<SCCOL>(nEnd),MAXROW,nTab,
- IDF_ALL,false,pUndoDoc );
+ InsertDeleteFlags::ALL,false,pUndoDoc );
}
// all Formulas because of references
SCTAB nTabCount = rDoc.GetTableCount();
pUndoDoc->AddUndoTab( 0, nTabCount-1 );
- rDoc.CopyToDocument( 0,0,0, MAXCOL,MAXROW,MAXTAB, IDF_FORMULA,false,pUndoDoc );
+ rDoc.CopyToDocument( 0,0,0, MAXCOL,MAXROW,MAXTAB, InsertDeleteFlags::FORMULA,false,pUndoDoc );
pUndoData = new ScRefUndoData( &rDoc );
@@ -1747,7 +1747,7 @@ void ScViewFunc::DeleteContents( InsertDeleteFlags nFlags, bool bRecord )
if ( !bEditable )
{
if ( !(bOnlyNotBecauseOfMatrix &&
- ((nFlags & (IDF_ATTRIB | IDF_EDITATTR)) == nFlags)) )
+ ((nFlags & (InsertDeleteFlags::ATTRIB | InsertDeleteFlags::EDITATTR)) == nFlags)) )
{
ErrorMessage(bOnlyNotBecauseOfMatrix ? STR_MATRIXFRAGMENTERR : STR_PROTECTIONERR);
return;
@@ -1806,9 +1806,9 @@ void ScViewFunc::DeleteContents( InsertDeleteFlags nFlags, bool bRecord )
CellContentChanged();
ShowAllCursors();
- if ( nFlags & IDF_ATTRIB )
+ if ( nFlags & InsertDeleteFlags::ATTRIB )
{
- if ( nFlags & IDF_CONTENTS )
+ if ( nFlags & InsertDeleteFlags::CONTENTS )
ForgetFormatArea();
else
StartFormatArea(); // delete attribute is also attribute-change
@@ -1896,7 +1896,7 @@ void ScViewFunc::SetWidthOrHeight(
else
pUndoDoc->AddUndoTab( *itr, *itr, true );
rDoc.CopyToDocument( static_cast<SCCOL>(nStart), 0, *itr,
- static_cast<SCCOL>(nEnd), MAXROW, *itr, IDF_NONE,
+ static_cast<SCCOL>(nEnd), MAXROW, *itr, InsertDeleteFlags::NONE,
false, pUndoDoc );
}
else
@@ -1905,7 +1905,7 @@ void ScViewFunc::SetWidthOrHeight(
pUndoDoc->InitUndo( &rDoc, *itr, *itr, false, true );
else
pUndoDoc->AddUndoTab( *itr, *itr, false, true );
- rDoc.CopyToDocument( 0, nStart, *itr, MAXCOL, nEnd, *itr, IDF_NONE, false, pUndoDoc );
+ rDoc.CopyToDocument( 0, nStart, *itr, MAXCOL, nEnd, *itr, InsertDeleteFlags::NONE, false, pUndoDoc );
}
}