summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-09-10 15:52:21 +0200
committerEike Rathke <erack@redhat.com>2015-09-10 15:56:45 +0200
commit44f34c1163882c2e3086282374fee9cd55ee211f (patch)
treeea42ae2bc3bb86d704b5b9f846ea1e55b49e5384 /sc/inc
parentbb71e3a40067e4ef6c6879e6d26ad20f728dd822 (diff)
Resolves: tdf#92995 do not delete caption objects that are held by Undo
Drag&Drop Undo is a special case of ownership.. Change-Id: I2fe7769c4d84efe09d432335d5d8e72d506bf7a1
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/column.hxx2
-rw-r--r--sc/inc/global.hxx3
2 files changed, 3 insertions, 2 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 9d073ef0f4bc..978b3713bebd 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -584,7 +584,7 @@ public:
ScPostIt* GetCellNote( SCROW nRow );
const ScPostIt* GetCellNote( SCROW nRow ) const;
const ScPostIt* GetCellNote( sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow ) const;
- void DeleteCellNotes( sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2 );
+ void DeleteCellNotes( sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, bool bForgetCaptionOwnership );
bool HasCellNotes() const;
void SetCellNote( SCROW nRow, ScPostIt* pNote);
bool IsNotesEmptyBlock(SCROW nStartRow, SCROW nEndRow) const;
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 0faaab6ade23..8312b8478220 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -184,10 +184,11 @@ const InsertDeleteFlags IDF_OUTLINE = InsertDeleteFlags::fromInt(0x0800); //
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;
+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)
{