sc/source/filter/excel/xestream.cxx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
New commits: commit 8f2b1b1cb84e1ae3139eb90b8efdf61e608adbad Author: Justin Luth <justin_l...@sil.org> AuthorDate: Wed Feb 23 22:11:18 2022 +0200 Commit: Justin Luth <jl...@mail.com> CommitDate: Thu Feb 24 09:00:04 2022 +0100 followup tdf#122098 xlsx export: avoid dataloss if not bool value Change-Id: I54b2f44a1ab0b7681667e811be72d1504928fab9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130469 Tested-by: Jenkins Reviewed-by: Justin Luth <jl...@mail.com> diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index a3c1b92fe86d..2178b0b3abc7 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -673,16 +673,8 @@ void XclXmlUtils::GetFormulaTypeAndValue( ScFormulaCell& rCell, const char*& rsT rsValue = ToOUString(lcl_GetErrorString(aResValue.mnError)); break; case sc::FormulaResultValue::Value: - if (rCell.GetFormatType() == SvNumFormatType::LOGICAL) - { - rsType = "b"; - rsValue = rCell.GetValue() == 0.0 ? "0" : "1"; - } - else - { - rsType = "n"; - rsValue = OUString::number(aResValue.mfValue); - } + rsType = rCell.GetFormatType() == SvNumFormatType::LOGICAL ? "b" : "n"; + rsValue = OUString::number(aResValue.mfValue); break; case sc::FormulaResultValue::String: rsType = "str";