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 | 1459e2ba9e441d55c57345130a7c6f3353fa967a (patch) | |
| tree | 3bad4b1dc52adede72858b1d8d6141716c475624 | |
| parent | 0b370a117297af90c021c56fc360c1208f897146 (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.
| -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 1d02144d3..7da454fca 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; |
