From 54fa4c438bd458d72a8e23a6819c7be639eaee92 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 1 Oct 2024 15:39:51 +0200 Subject: tdf#162713 Changed format for date-field and time-field in form regression from commit 9c92eb6800468de34c5aec3690c1b990a4e763c9 Author: Noel Grandin Date: Mon May 13 15:42:27 2024 +0200 createFromAscii -> OUString literals in OLimitedFormats Change-Id: I620526e3e0efd9e9376e428881e0240e2d3017d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174352 Tested-by: Jenkins Reviewed-by: Noel Grandin --- forms/source/misc/limitedformats.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'forms/source') diff --git a/forms/source/misc/limitedformats.cxx b/forms/source/misc/limitedformats.cxx index c40de6b23430..628a42c55892 100644 --- a/forms/source/misc/limitedformats.cxx +++ b/forms/source/misc/limitedformats.cxx @@ -243,8 +243,8 @@ namespace frm std::span pFormats = lcl_getFormatTable(m_nTableId); // seek to the nValue'th entry - OSL_ENSURE(pFormats.size() < o3tl::make_unsigned(nValue), "OLimitedFormats::getFormatKeyPropertyValue: did not find the value!"); - if (pFormats.size() < o3tl::make_unsigned(nValue)) + OSL_ENSURE(o3tl::make_unsigned(nValue) < pFormats.size(), "OLimitedFormats::getFormatKeyPropertyValue: did not find the value!"); + if (o3tl::make_unsigned(nValue) < pFormats.size()) _rValue <<= pFormats[nValue].nKey; // TODO: should use a standard format for the control type we're working for -- cgit