From 925551e7c6cd6174866708ce362d474280878d96 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Fri, 15 Apr 2011 12:43:37 -0400 Subject: fdo#35142: Avoid importing unnamed styles from XLS. This actually causes undefined behavior since every cell is supposed to be associated with some style. One thing affected by this is ODS export (as described in the bug). --- sc/source/filter/excel/xistyle.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sc/source/filter/excel/xistyle.cxx') diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index d4eb332b2fb0..11381e54bb4e 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -1321,8 +1321,8 @@ void XclImpXF::ApplyPatternToAttrList( pPat = static_cast(&aCache.ApplyTo(*pPat, true)); } - - if (pPat) + // Make sure we skip unnamed styles. + if (pPat && pPat->GetStyleName()) { // Check for a gap between the last entry and this one. bool bHasGap = false; -- cgit