summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-03-13 18:01:21 -0400
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-03-13 17:58:06 -0500
commitb5b9da46ceae23b25e963087d00b0ae5b4785c93 (patch)
treeb9e2aca7a56f9b045641a901c5f1e8e3ae133fca
parentcde6d800698522a804dc8f82c158ce7e0c3e05f5 (diff)
fdo#76032: This row index is 1-based whereas our own mnRow is 0-based.
Change-Id: I098d300532bef164bef0d40ebf62a6848bc19cb8 (cherry picked from commit ff56553e34dfed01b9226ce7a516dbeb6da32124) Reviewed-on: https://gerrit.libreoffice.org/8577 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sc/source/filter/inc/sheetdatacontext.hxx4
-rw-r--r--sc/source/filter/oox/sheetdatacontext.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/filter/inc/sheetdatacontext.hxx b/sc/source/filter/inc/sheetdatacontext.hxx
index 3f3e377f5c54..880c60e8ab18 100644
--- a/sc/source/filter/inc/sheetdatacontext.hxx
+++ b/sc/source/filter/inc/sheetdatacontext.hxx
@@ -129,8 +129,8 @@ private:
bool mbHasFormula; /// True = current cell has formula data (OOXML only).
bool mbValidRange; /// True = maFmlaData.maFormulaRef is valid (OOXML only).
- sal_Int32 mnRow;
- sal_Int32 mnCol;
+ sal_Int32 mnRow; /// row index (0-based)
+ sal_Int32 mnCol; /// column index (0-based)
};
// ============================================================================
diff --git a/sc/source/filter/oox/sheetdatacontext.cxx b/sc/source/filter/oox/sheetdatacontext.cxx
index 4bd841d4dd0a..bbda95922ec4 100644
--- a/sc/source/filter/oox/sheetdatacontext.cxx
+++ b/sc/source/filter/oox/sheetdatacontext.cxx
@@ -279,11 +279,11 @@ ContextHandlerRef SheetDataContext::onCreateRecordContext( sal_Int32 nRecId, Seq
void SheetDataContext::importRow( const AttributeList& rAttribs )
{
RowModel aModel;
- sal_Int32 nRow = rAttribs.getInteger( XML_r, -1 );
+ sal_Int32 nRow = rAttribs.getInteger( XML_r, -1 ); // 1-based row index
if(nRow != -1)
{
aModel.mnRow = nRow;
- mnRow = nRow;
+ mnRow = nRow-1; // to 0-based row index.
}
else
aModel.mnRow = ++mnRow;