[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source

Noel Power noelp at kemper.freedesktop.org
Thu Aug 16 02:48:25 PDT 2012


 sc/source/core/data/document.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 38d18fcd644fafeb0234a1804563853a17b47c4f
Author: David Tardon <dtardon at redhat.com>
Date:   Thu Aug 16 10:41:56 2012 +0100

    fdo#47311 don't crash when pasting into more than 1 sheet
    
    Change-Id: I61c2c988eedd91f44a0b9c2553f69a692f47dbfb

diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 93a067e..cfcce6d 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 )


More information about the Libreoffice-commits mailing list