[Libreoffice-commits] core.git: sc/qa sc/source

Caolán McNamara caolanm at redhat.com
Fri Oct 2 12:38:53 PDT 2015


 sc/qa/unit/data/xls/pass/crash-2.xls |binary
 sc/source/filter/excel/impop.cxx     |    6 ++++++
 2 files changed, 6 insertions(+)

New commits:
commit 9b738520316b329251a9f815751fda4e25d25937
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 2 20:37:14 2015 +0100

    xls: DefColWidth without pColRowBuff
    
    Change-Id: I36f9439e417b380bd3f999c02c55c29337796002

diff --git a/sc/qa/unit/data/xls/pass/crash-2.xls b/sc/qa/unit/data/xls/pass/crash-2.xls
new file mode 100644
index 0000000..99e485a
Binary files /dev/null and b/sc/qa/unit/data/xls/pass/crash-2.xls differ
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index 4339ae4..e252185 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -662,6 +662,12 @@ void ImportExcel::DefColWidth()
     // stored as entire characters -> convert to 1/256 of characters (as in COLINFO)
     double fDefWidth = 256.0 * maStrm.ReaduInt16();
 
+    if (!pColRowBuff)
+    {
+        SAL_WARN("sc", "*ImportExcel::DefColWidth(): pColRowBuff is NULL!");
+        return;
+    }
+
     // #i3006# additional space for default width - Excel adds space depending on font size
     long nFontHt = GetFontBuffer().GetAppFontData().mnHeight;
     fDefWidth += XclTools::GetXclDefColWidthCorrection( nFontHt );


More information about the Libreoffice-commits mailing list