summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-03-13 18:01:21 -0400
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2014-03-17 09:35:36 +0000
commit13686e068a057feb395308dfdce6df6717e1e4e6 (patch)
tree0eb8c5cf7dbc34d8a4f32ffb488b79ab967ff5e2 /sc
parent8f4324d0f407868a5dcc71c8ffcafaf9809f3b8f (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> Reviewed-on: https://gerrit.libreoffice.org/8578 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'sc')
-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;