[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sc/source
Eike Rathke
erack at redhat.com
Tue Jun 14 12:58:19 UTC 2016
sc/source/core/tool/interpr4.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit fcd459234f0256742530698509e4529b2633547e
Author: Eike Rathke <erack at redhat.com>
Date: Tue Jun 14 14:07:26 2016 +0200
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/26262
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 2e9fe7c..7284e306 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -2014,7 +2014,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:
More information about the Libreoffice-commits
mailing list