diff options
author | Eike Rathke <erack@redhat.com> | 2016-06-14 14:07:26 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-06-14 14:27:53 +0200 |
commit | 243f19a1878d52a4074b59041dc3bc57ab84e417 (patch) | |
tree | f3ea8aec696194d9c9578384ca3f1eadfc39b798 /sc | |
parent | 2b8efb33743cdbdcd5ae976627fa6e8a7abaf686 (diff) |
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
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/interpr4.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index eff287105e86..2f6c4fa43bf0 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -2040,7 +2040,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: |