forms/source/misc/limitedformats.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3e5c424a5b2a2739dd4a50bfc14ac350b9638837
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Oct 1 15:39:51 2024 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Oct 4 10:32:27 2024 +0200

    tdf#162713 Changed format for date-field and time-field in form
    
    regression from
        commit 9c92eb6800468de34c5aec3690c1b990a4e763c9
        Author: Noel Grandin <noel.gran...@collabora.co.uk>
        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 <noel.gran...@collabora.co.uk>
    (cherry picked from commit 54fa4c438bd458d72a8e23a6819c7be639eaee92)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174329
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

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<FormatEntry> 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

Reply via email to