summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-03-13 18:01:21 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-03-13 18:39:22 -0400
commitff56553e34dfed01b9226ce7a516dbeb6da32124 (patch)
tree60fcbb380ad5c64839bf297fdba6de3a53ad4f1a
parenta145e8859c5a878110ec1b346f244c51d1e5a80b (diff)
fdo#76032: This row index is 1-based whereas our own mnRow is 0-based.
Change-Id: I098d300532bef164bef0d40ebf62a6848bc19cb8
-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 dba7a7e88b14..e352cd0865b5 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 9628e78bbdf9..4d2c57a568c1 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;