sc/qa/unit/tiledrendering/tiledrendering2.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
New commits: commit ae5a7a622468f1c4c77b55daa53fddd0ad03a308 Author: Aron Budea <aron.bu...@collabora.com> AuthorDate: Fri May 2 00:31:13 2025 +0930 Commit: Aron Budea <aron.bu...@collabora.com> CommitDate: Mon May 5 08:45:49 2025 +0200 cool#11739 backport unit-test Already exists in 25.04 and master branches. Backported from 7881f4c18305a3e3b67a5f9f000a7999fe7647df. Change-Id: I07b719aaa9d75ec76b9a1f4a43b461c869bc09e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184868 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Aron Budea <aron.bu...@collabora.com> diff --git a/sc/qa/unit/tiledrendering/tiledrendering2.cxx b/sc/qa/unit/tiledrendering/tiledrendering2.cxx index a140ce12c1c9..14f57779e026 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering2.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering2.cxx @@ -19,6 +19,7 @@ #include <test/lokcallback.hxx> #include <vcl/scheduler.hxx> #include <tabvwsh.hxx> +#include <scmod.hxx> #include <docuno.hxx> @@ -204,6 +205,21 @@ CPPUNIT_TEST_FIXTURE(Test, testDecimalSeparatorInfo) // Cell B1 has language set to Turkish. Decimal separator should be ",". CPPUNIT_ASSERT_EQUAL(std::string(","), aView1.decimalSeparator); } + +CPPUNIT_TEST_FIXTURE(Test, testCool11739LocaleDialogFieldUnit) +{ + createDoc("empty.ods"); + SfxViewShell* pView1 = SfxViewShell::Current(); + pView1->SetLOKLocale("fr-FR"); + + FieldUnit eMetric = SC_MOD()->GetMetric(); + + // Without the fix, it fails with + // - Expected: 2 + // - Actual : 8 + // where 2 is FieldUnit::CM and 8 is FieldUnit::INCH + CPPUNIT_ASSERT_EQUAL(FieldUnit::CM, eMetric); +} } CPPUNIT_PLUGIN_IMPLEMENT();