Kaydet (Commit) 042a8282 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#9704 null deref

Change-Id: Ieb3854af97a7c5cbe5679de09925f6802757ebf1
Reviewed-on: https://gerrit.libreoffice.org/58567
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 19fa988c
......@@ -40,6 +40,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_filters_test, \
salhelper \
sax \
sc \
scfilt \
scqahelper \
sfx \
sot \
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "scdll.hxx"
class SvStream;
extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportWKS(SvStream& rStream);
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -33,6 +33,7 @@
#include <userdat.hxx>
#include <formulacell.hxx>
#include <tabprotection.hxx>
#include <testlotus.hxx>
#include <dbdocfun.hxx>
#include <globalnames.hxx>
#include <dbdata.hxx>
......@@ -72,6 +73,7 @@ public:
void testContentXLSX();
void testContentXLSXStrict(); // strict OOXML
void testContentLotus123();
void testContentofz9704();
void testContentDIF();
void testContentXLSB();
void testContentXLS_XML();
......@@ -95,6 +97,7 @@ public:
CPPUNIT_TEST(testContentXLSX);
CPPUNIT_TEST(testContentXLSXStrict);
CPPUNIT_TEST(testContentLotus123);
CPPUNIT_TEST(testContentofz9704);
CPPUNIT_TEST(testContentDIF);
CPPUNIT_TEST(testContentXLSB);
CPPUNIT_TEST(testContentXLS_XML);
......@@ -302,6 +305,14 @@ void ScFiltersTest::testContentLotus123()
xDocSh->DoClose();
}
void ScFiltersTest::testContentofz9704()
{
OUString aFileName;
createFileURL("ofz9704.", "123", aFileName);
SvFileStream aFileStream(aFileName, StreamMode::READ);
TestImportWKS(aFileStream);
}
void ScFiltersTest::testContentDIF()
{
ScDocShellRef xDocSh = loadDoc("universal-content.", FORMAT_DIF);
......
......@@ -5989,7 +5989,11 @@ void ScCompiler::PostProcessCode()
void ScCompiler::ReplaceDoubleRefII(FormulaToken** ppDoubleRefTok)
{
const ScComplexRefData& rRange = *(*ppDoubleRefTok)->GetDoubleRef();
const ScComplexRefData* pRange = (*ppDoubleRefTok)->GetDoubleRef();
if (!pRange)
return;
const ScComplexRefData& rRange = *pRange;
// Can't do optimization reliably in this case (when row references are absolute).
// Example : =SIN(A$1:A$10) filled in a formula group starting at B5 and of length 100.
......
......@@ -26,6 +26,7 @@
#include "lotfilter.hxx"
#include <lotimpop.hxx>
#include <lotattr.hxx>
#include <testlotus.hxx>
#include <fprogressbar.hxx>
#include <sal/log.hxx>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment