summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-08-16 10:41:56 +0100
committerNoel Power <noel.power@suse.com>2012-08-16 10:44:56 +0100
commit38d18fcd644fafeb0234a1804563853a17b47c4f (patch)
tree944a2148aa184ffd24f249befe933d8155d5eac8
parent6789ec4c1a9c6af84bd62e650a03226a46365d97 (diff)
fdo#47311 don't crash when pasting into more than 1 sheet
Change-Id: I61c2c988eedd91f44a0b9c2553f69a692f47dbfb
-rw-r--r--sc/source/core/data/document.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 93a067eb5a72..cfcce6d69661 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2292,7 +2292,7 @@ void ScDocument::CopyBlockFromClip( SCCOL nCol1, SCROW nRow1,
while ( i + nFollow < nTabEnd
&& rMark.GetTableSelect( i + nFollow + 1 )
&& nClipTab + nFollow < MAXTAB
- && rClipTabs[nClipTab + nFollow + 1] )
+ && rClipTabs[ (nClipTab + nFollow + 1) % (static_cast<SCTAB>(rClipTabs.size()))] )
++nFollow;
if ( pCBFCP->pClipDoc->GetClipParam().mbCutMode )