summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-10-31 12:33:25 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-10-31 20:11:49 +0100
commit28ef7a8ce82e50066c911199ef1280669e732a95 (patch)
tree7368d35d206ad9808307a4e320156f9a3ce16be4
parent31acd9f73686394cb9e7af9c6ef3169276df0f91 (diff)
crashtesting: null deref on import of fdo51601-2.xlsx
Change-Id: I2db907a9247b622b3977aec9686c09d56fe3ef38 Reviewed-on: https://gerrit.libreoffice.org/81846 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/filter/oox/worksheethelper.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx
index b897fc13afc8..a567435fcc28 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -995,7 +995,8 @@ OUString WorksheetGlobals::getHyperlinkUrl( const HyperlinkModel& rHyperlink ) c
if (nSepPos < aUrl.getLength() - 1)
{
ScRange aRange;
- if ((aRange.ParseAny( aUrl.copy( nSepPos + 1 ), nullptr,
+ const ScDocumentImport& rDoc = getDocImport();
+ if ((aRange.ParseAny( aUrl.copy( nSepPos + 1 ), &rDoc.getDoc(),
formula::FormulaGrammar::CONV_XL_R1C1)
& ScRefFlags::VALID) == ScRefFlags::ZERO)
aUrl = aUrl.replaceAt( nSepPos, 1, OUString( '.' ) );