From 91eb9901be5d61d6fcd930a898f2ddc372667aab Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Tue, 14 Jun 2016 14:07:26 +0200 Subject: check ExternalSingleRef token for svDouble type ... before accessing GetDouble(). Else convert the string. The new assert() introduced in FormulaToken::GetDouble() virtual dummy was hit by loading gnome334723-1.sxc Change-Id: I144b0cabee3aac44d206d76a83b1c4d81ab4a02e (cherry picked from commit 243f19a1878d52a4074b59041dc3bc57ab84e417) Reviewed-on: https://gerrit.libreoffice.org/26261 Reviewed-by: Markus Mohrhard Tested-by: Jenkins --- sc/source/core/tool/interpr4.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index cbdc51e50f41..9cf3ed1a413e 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -1990,7 +1990,12 @@ double ScInterpreter::GetDouble() ScExternalRefCache::TokenRef pToken; PopExternalSingleRef(pToken); if (!nGlobalError && pToken) - nVal = pToken->GetDouble(); + { + if (pToken->GetType() == svDouble) + nVal = pToken->GetDouble(); + else + nVal = ConvertStringToValue( pToken->GetString().getString()); + } } break; case svExternalDoubleRef: -- cgit