[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sc/source
Kohei Yoshida
kohei.yoshida at collabora.com
Thu Mar 13 15:58:32 PDT 2014
sc/source/filter/inc/sheetdatacontext.hxx | 4 ++--
sc/source/filter/oox/sheetdatacontext.cxx | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit b5b9da46ceae23b25e963087d00b0ae5b4785c93
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Thu Mar 13 18:01:21 2014 -0400
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 at googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/filter/inc/sheetdatacontext.hxx b/sc/source/filter/inc/sheetdatacontext.hxx
index 3f3e377..880c60e 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 4bd841d..bbda959 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;
More information about the Libreoffice-commits
mailing list