summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-02-06 14:11:43 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-02-06 14:15:05 -0500
commit0c12aa670b83b76241077dfb8bc21f40a55b1667 (patch)
treee7af2f708e23e05cfc376befc88791644c248a70
parent4f2482c6a82e2c32511cd9bd9adea863191f7199 (diff)
fdo#74573: Skip deletion of destination area when 'skip empty' is on.
Also, adjust handling of mix document aka paste functions with this change. When using paste function (add, subtract, etc), the behavior between the 'skip empty' flag on and off makes no difference. Let's set the flag to off when paste function is used. Change-Id: I67724ba923c9260b2c14464e4123b8445712dbaf
-rw-r--r--sc/source/core/data/column3.cxx1
-rw-r--r--sc/source/core/data/document.cxx3
-rw-r--r--sc/source/ui/view/viewfun3.cxx3
3 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index fb6518e1db9d..b97e396d12f5 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -731,7 +731,6 @@ public:
void operator() (const sc::CellStoreType::value_type& node, size_t nOffset, size_t nDataSize)
{
-
SCROW nSrcRow1 = node.position + nOffset;
bool bCopyCellNotes = mrCxt.isCloneNotes();
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 9f5b3bb36fa5..fdbb1fa198e3 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2690,7 +2690,8 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
SCCOL nCol2 = pRange->aEnd.Col();
SCROW nRow2 = pRange->aEnd.Row();
- DeleteArea(nCol1, nRow1, nCol2, nRow2, rMark, nDelFlag);
+ if (!bSkipAttrForEmpty)
+ DeleteArea(nCol1, nRow1, nCol2, nRow2, rMark, nDelFlag);
if (CopyOneCellFromClip(aCxt, nCol1, nRow1, nCol2, nRow2))
continue;
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index e501458c8685..fd16a6011e78 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1188,8 +1188,9 @@ bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
//
ScDocument* pMixDoc = NULL;
- if ( bSkipEmpty || nFunction )
+ if (nFunction)
{
+ bSkipEmpty = false;
if ( nFlags & IDF_CONTENTS )
{
pMixDoc = new ScDocument( SCDOCMODE_UNDO );