diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-01-19 00:24:24 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-01-19 00:24:24 -0500 |
commit | ada9698d918ffd6859680acbd361599d8f8dbd19 (patch) | |
tree | f91d5e4280788ee86a62f999ebe1308569ff78b6 /sc/source/filter/excel/xistyle.cxx | |
parent | 8735c8f61d694cb09fa72b7683c006849fbde3ac (diff) |
Fixed incorrect import of cell attributes from Excel documents.
When a cell with non-default formatting attribute starts with non-first
row in a column, the filter would incorrectly apply the same format to
all the cells above it if they didn't have any formats. This commit
fixes it.
Diffstat (limited to 'sc/source/filter/excel/xistyle.cxx')
-rw-r--r-- | sc/source/filter/excel/xistyle.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 1d02144d3793..7da454fca531 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -1313,7 +1313,16 @@ void XclImpXF::ApplyPatternToAttrList( if (pPat) { + // Check for a gap between the last entry and this one. + bool bHasGap = false; + if (rAttrs.empty() && nRow1 > 0) + // First attribute range doesn't start at row 0. + bHasGap = true; + if (!rAttrs.empty() && rAttrs.back().nRow + 1 < nRow1) + bHasGap = true; + + if (bHasGap) { // Fill this gap with the default pattern. ScAttrEntry aEntry; |