[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Fri Apr 15 09:47:27 PDT 2011


 sc/source/filter/excel/xistyle.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3a9bb11850250718978d67fbd8e0adbf354d8d68
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Fri Apr 15 12:43:37 2011 -0400

    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).

diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index d4eb332..11381e5 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<const ScPatternAttr*>(&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;


More information about the Libreoffice-commits mailing list