diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-06-09 23:33:38 +0200 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.de> | 2013-07-02 20:17:53 +0000 |
commit | 3875218079cae6f94d938b810109de0222485af6 (patch) | |
tree | 1e3db8fe6444e88bf9f55e3000e5c73b5ce23b17 /sc | |
parent | a28ffcc7b6ea979a3c730ab76a97ecab01f6efb6 (diff) |
don't crash during chart copying, fdo#66508
(cherry picked from commit 92207231c3742873ad3b3a6fed2963d1bf924ad3)
Change-Id: I3a4806fcae7b830e71cda0ab7e6d5ac6f180d4d3
Reviewed-on: https://gerrit.libreoffice.org/4688
Reviewed-by: Kohei Yoshida <kohei.yoshida@suse.de>
Tested-by: Kohei Yoshida <kohei.yoshida@suse.de>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/column2.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index b987a31ad557..efb3a6a9a045 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -1421,7 +1421,7 @@ void ScColumn::CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn& r for (; itBlk != itBlkEnd; ++itBlk) { nBlockEnd = nBlockStart + itBlk->size; - if (nBlockStart <= nRowPos && nRowPos <= nBlockEnd) + if (nBlockStart <= nRowPos && nRowPos < nBlockEnd) { // Found. nOffsetInBlock = nRowPos - nBlockStart; @@ -1443,7 +1443,7 @@ void ScColumn::CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn& r if (!itBlk->data) { // Empty block. - if (nBlockStart <= nRowPos && nRowPos <= nBlockEnd) + if (nBlockStart <= nRowPos && nRowPos < nBlockEnd) // This block contains the end row. rDestCol.maCellTextAttrs.set_empty(nBlockStart + nOffsetInBlock, nRowPos); else @@ -1457,7 +1457,7 @@ void ScColumn::CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn& r itDataEnd = sc::custom_celltextattr_block::end(*itBlk->data); std::advance(itData, nOffsetInBlock); - if (nBlockStart <= nRowPos && nRowPos <= nBlockEnd) + if (nBlockStart <= nRowPos && nRowPos < nBlockEnd) { // This block contains the end row. Only copy partially. size_t nOffset = nRowPos - nBlockStart + 1; |