summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-09-12 14:34:03 +0200
committerTomaž Vajngerl <quikee@gmail.com>2023-09-12 20:50:16 +0200
commit0da88ee88255083ec9557ff25005a745dcdbef14 (patch)
tree36c3e4be9cb608d915d3cd45c9fc55964323a5a0 /sc/source/filter/oox
parent6d24e32d0278e1e71cbd1bfdc16899659e47b2a2 (diff)
sc: row import - default style index is 0 and not -1
When importing CT_Row structure, the style index is 0 by default and not -1. The effect of this is that the style is not applied for the rows, because the index is -1. With the change to 0, the style applied is the first style, which is the correct behaviour and this fixes the issue with the test document. Change-Id: If5ab571e8dd7ec1319e7cb4d26ba006ca827eca6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156845 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sc/source/filter/oox')
-rw-r--r--sc/source/filter/oox/sheetdatacontext.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/filter/oox/sheetdatacontext.cxx b/sc/source/filter/oox/sheetdatacontext.cxx
index bc5855e9f4b7..19ad0a2a3465 100644
--- a/sc/source/filter/oox/sheetdatacontext.cxx
+++ b/sc/source/filter/oox/sheetdatacontext.cxx
@@ -279,7 +279,7 @@ void SheetDataContext::importRow( const AttributeList& rAttribs )
mnCol = -1;
aModel.mfHeight = rAttribs.getDouble( XML_ht, -1.0 );
- aModel.mnXfId = rAttribs.getInteger( XML_s, -1 );
+ aModel.mnXfId = rAttribs.getInteger(XML_s, 0); // default style index is 0
aModel.mnLevel = rAttribs.getInteger( XML_outlineLevel, 0 );
aModel.mbCustomHeight = rAttribs.getBool( XML_customHeight, false );
aModel.mbCustomFormat = rAttribs.getBool( XML_customFormat, false );