basic/source/sbx/sbxscan.cxx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
New commits: commit d65f9ebab1b27d37d46e76b60eb80487fd2125fc Author: Mike Kaganski <[email protected]> AuthorDate: Sat Sep 27 22:29:07 2025 +0500 Commit: Mike Kaganski <[email protected]> CommitDate: Sat Sep 27 21:34:33 2025 +0200 Simplify date handling a bit GetNumberIntl already has the required logic for that. Change-Id: I2dcc26294a6aaa970412498653c36c48266c9694 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191572 Reviewed-by: Mike Kaganski <[email protected]> Tested-by: Jenkins diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index ed332d6ff645..839135d8f387 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -483,8 +483,8 @@ std::optional<double> GetNumberIntl(const SbxValue& val, OUString& rStrVal, case SbxUINT: case SbxSINGLE: case SbxDOUBLE: - case SbxDATE: return val.GetDouble(); + case SbxDATE: case SbxBOOL: if (extendedNumberDetection) return val.GetDouble(); @@ -555,11 +555,6 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const rRes = SbxBasicFormater::BasicFormatNull(pFmt ? *pFmt : std::u16string_view{}); return; } - if (eType == SbxDATE && !pFmt) - { - rRes = GetOUString(); - return; - } std::shared_ptr<SvNumberFormatter> pFormatter; std::optional<double> number = GetNumberIntl(*this, rRes, pFormatter, pFmt != nullptr);
