summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-09-25 21:48:54 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-09-25 21:54:07 +0200
commit51734600c5c9826d6c9a0d5f4cb983d08f2ab698 (patch)
tree534e32a0bc6e24a8dcddda80b456b7a97cdad713 /sc
parent342211da33d7b604791fa8ebe2a6cb10445d8392 (diff)
workaround broken uno implementation with ScRangeList in ScCellRangeObj
ScCellRangesBase uses a ScRangeList to keep track of the range but the ScCellRangeObj class which inherits from it can not deal with more than one range. This is a temporary workaround for this problem. We need to think about a better solution for ScCellRangeObj to prevent such problems in the future. Change-Id: I4403e55f605267ef99eb6a73302366cf024b3866
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/rangelst.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index 8aae801a626a..c9c4c3e19097 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -434,6 +434,9 @@ bool ScRangeList::UpdateReference(
}
}
+ if(maRanges.empty())
+ return true;
+
iterator itr = maRanges.begin(), itrEnd = maRanges.end();
for (; itr != itrEnd; ++itr)
{
@@ -456,6 +459,17 @@ bool ScRangeList::UpdateReference(
pR->aEnd.Set( theCol2, theRow2, theTab2 );
}
}
+
+ if(eUpdateRefMode == URM_INSDEL)
+ {
+ if( nDx < 0 || nDy < 0 )
+ {
+ size_t n = maRanges.size();
+ for(size_t i = n-1; i > 0; --i)
+ Join(*maRanges[i], true);
+ }
+ }
+
return bChanged;
}