summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2022-02-23 22:11:18 +0200
committerJustin Luth <jluth@mail.com>2022-02-24 09:00:04 +0100
commit8f2b1b1cb84e1ae3139eb90b8efdf61e608adbad (patch)
tree8364c1b1e9618d0171efa14f91dc93718afb09a7 /sc
parent3e67678af2f6f8f7d25c5ad67b3828e96bc293b8 (diff)
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 <jluth@mail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/xestream.cxx12
1 files changed, 2 insertions, 10 deletions
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";