diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-09-17 17:58:27 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-09-17 20:52:35 +0200 |
commit | 764e7e71038d5ae66061f44bc0cd51ce33ae96ed (patch) | |
tree | 3ce21bc7c8dce615d71336c0414ea81baf760adc | |
parent | f165111cf4f62353a674bd3497d8cf4a0480a3ab (diff) |
hopefully a corect way to deal with deleting rows and cols, fdo#54842
Change-Id: I4ec1a8225ae3c84352643876065fb4cc7073b9f4
-rw-r--r-- | sc/source/core/tool/rangelst.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index e81ec824b9ba..c6b3bfc2dd31 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -417,6 +417,23 @@ bool ScRangeList::UpdateReference( SCTAB nTab2; rWhere.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 ); + if(eUpdateRefMode == URM_INSDEL) + { + // right now this only works for nTab1 == nTab2 + if(nTab1 == nTab2) + { + if(nDx < 0) + { + DeleteArea(nCol1+nDx, nRow1, nTab1, nCol1-1, nRow1, nTab2); + } + if(nDy < 0) + { + DeleteArea(nCol1, nRow1+nDy, nTab1, nCol1, nRow1-1, nTab2); + } + SAL_WARN_IF(nDx < 0 && nDy < 0, "sc", "nDx and nDy are negative, check why"); + } + } + vector<ScRange*>::iterator itr = maRanges.begin(), itrEnd = maRanges.end(); for (; itr != itrEnd; ++itr) { |