summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-08-22 17:45:18 +0100
committerMichael Meeks <michael.meeks@suse.com>2013-08-26 15:47:37 +0100
commit07a69320a7b475e8b09b2faca8b6f728a62372ec (patch)
tree661cbb3f47d39c3a5f922a2ffe572a7ae72e7607
parent8ea056e716d87c07343adc8532ce6f265de13624 (diff)
fdo#39484 - don't loose outlines while trying to undo formulae changes.
Reviewed-on: https://gerrit.libreoffice.org/5592 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org> Conflicts: sc/source/core/data/table2.cxx Change-Id: Ib3b2bab5beffb8164a8cd2c0b4db4c97f427507e
-rw-r--r--sc/inc/global.hxx9
-rw-r--r--sc/source/core/data/table2.cxx3
-rw-r--r--sc/source/ui/view/viewfun3.cxx2
3 files changed, 8 insertions, 6 deletions
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index d559d7457729..e3066699d5c0 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -187,12 +187,13 @@ const sal_uInt16 IDF_HARDATTR = 0x0020; /// Hard cell attributes.
const sal_uInt16 IDF_STYLES = 0x0040; /// Cell styles.
const sal_uInt16 IDF_OBJECTS = 0x0080; /// Drawing objects.
const sal_uInt16 IDF_EDITATTR = 0x0100; /// Rich-text attributes.
-const sal_uInt16 IDF_SPECIAL_BOOLEAN = 0x1000;
-const sal_uInt16 IDF_ATTRIB = IDF_HARDATTR | IDF_STYLES;
-const sal_uInt16 IDF_CONTENTS = IDF_VALUE | IDF_DATETIME | IDF_STRING | IDF_NOTE | IDF_FORMULA;
-const sal_uInt16 IDF_ALL = IDF_CONTENTS | IDF_ATTRIB | IDF_OBJECTS;
+const sal_uInt16 IDF_OUTLINE = 0x0800; /// Sheet / outlining (grouping) information
const sal_uInt16 IDF_NOCAPTIONS = 0x0200; /// Internal use only (undo etc.): do not copy/delete caption objects of cell notes.
const sal_uInt16 IDF_ADDNOTES = 0x0400; /// Internal use only (copy from clip): do not delete existing cell contents when pasting notes.
+const sal_uInt16 IDF_SPECIAL_BOOLEAN = 0x1000;
+const sal_uInt16 IDF_ATTRIB = IDF_HARDATTR | IDF_STYLES | IDF_OUTLINE;
+const sal_uInt16 IDF_CONTENTS = IDF_VALUE | IDF_DATETIME | IDF_STRING | IDF_NOTE | IDF_FORMULA | IDF_OUTLINE;
+const sal_uInt16 IDF_ALL = IDF_CONTENTS | IDF_ATTRIB | IDF_OBJECTS;
/// Copy flags for auto/series fill functions: do not touch notes and drawing objects.
const sal_uInt16 IDF_AUTOFILL = IDF_ALL & ~(IDF_NOTE | IDF_OBJECTS);
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 00d0632e2a40..f34f08763522 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1111,7 +1111,8 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (bFlagChange)
pDestTab->InvalidatePageBreaks();
- pDestTab->SetOutlineTable( pOutlineTable ); // auch nur wenn bColRowFlags
+ if(nFlags & IDF_OUTLINE) // also only when bColRowFlags
+ pDestTab->SetOutlineTable( pOutlineTable );
}
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index e4417ab6a7d8..b7de8ce33b38 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1205,7 +1205,7 @@ bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
// all sheets - CopyToDocument skips those that don't exist in pUndoDoc
SCTAB nTabCount = pDoc->GetTableCount();
pDoc->CopyToDocument( nStartCol, nStartRow, 0, nUndoEndCol, nUndoEndRow, nTabCount-1,
- nUndoFlags, false, pUndoDoc );
+ nUndoFlags, false, pUndoDoc );
if ( bCutMode )
{