diff options
author | Eike Rathke <erack@redhat.com> | 2016-06-28 23:01:05 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-06-28 23:03:13 +0200 |
commit | 23e5540a05e940cb4a591815e6b85a485b01fc32 (patch) | |
tree | d49c1464a6bcc2bccc27621fa1a05c8365d273c9 /sc | |
parent | 0d3f9667bbc7b1a22d33dc92a2028fc712495a8e (diff) |
do not override type SC_MATVAL_BOOLEAN with SC_MATVAL_VALUE
None of the callers checks for SC_MATVAL_VALUE but all use IsValueType()
instead, which includes SC_MATVAL_BOOLEAN, but we may want to explicitly
identify SC_MATVAL_BOOLEAN.
Change-Id: I6737eb2909c819b6c54f7e62cf8ebfc12af14fea
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/interpr4.cxx | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 992b6cbb8e92..848bebbc7f00 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -2301,22 +2301,17 @@ ScMatValType ScInterpreter::GetDoubleOrStringFromMatrix( SetError( errNoValue); } - if (nMatValType == SC_MATVAL_VALUE) - rDouble = nMatVal.fVal; - else if (nMatValType == SC_MATVAL_BOOLEAN) - { - rDouble = nMatVal.fVal; - nMatValType = SC_MATVAL_VALUE; - } - else - rString = nMatVal.GetString(); - if (ScMatrix::IsValueType( nMatValType)) { + rDouble = nMatVal.fVal; sal_uInt16 nError = nMatVal.GetError(); if (nError) SetError( nError); } + else + { + rString = nMatVal.GetString(); + } return nMatValType; } |