include/svx/flagsdef.hxx                                    |    5 +--
 sc/qa/uitest/csv_dialog/tdf88359.py                         |    2 -
 sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py |   20 ++++++------
 3 files changed, 14 insertions(+), 13 deletions(-)

New commits:
commit 58cfe9ccff7b6aa8ada18234ee73809700c39e02
Author:     Andreas Heinisch <andreas.heini...@yahoo.de>
AuthorDate: Fri Jan 19 13:02:37 2024 +0100
Commit:     Andreas Heinisch <andreas.heini...@yahoo.de>
CommitDate: Mon Jan 22 20:13:59 2024 +0100

    tdf#38231 - Change default example date value to 1999-12-01
    
    Change default example date value from 1999-12-31 to 1999-12-01. Otherwise, 
certain date formats cannot be distiguished in the preview window, e.g., D MM 
(1 Dec / 01 Dec 99 vs. 31 Dec / 31 Dec).
    
    Change-Id: Iebd78de8d5ef8615c4f2bf400357745e7acfb857
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162308
    Tested-by: Jenkins
    Reviewed-by: Andreas Heinisch <andreas.heini...@yahoo.de>

diff --git a/include/svx/flagsdef.hxx b/include/svx/flagsdef.hxx
index 3fbb70ca6b5e..dddde5b292ae 100644
--- a/include/svx/flagsdef.hxx
+++ b/include/svx/flagsdef.hxx
@@ -84,8 +84,9 @@ const o3tl::enumarray<SvxNumValCategory, double> 
fSvxNumValConst = {
     -1234.56789012345678,   // SvxNumValCategory::Standard
     -0.1295,                // SvxNumValCategory::Percent
     -1234.0,                // SvxNumValCategory::Currency
-    36525.5678935185,       // SvxNumValCategory::Date
-    36525.5678935185,       // SvxNumValCategory::Time
+    // tdf#38231 - change default example date value to 1999-12-01
+    36495.5678935185,       // SvxNumValCategory::Date
+    36495.5678935185,       // SvxNumValCategory::Time
     12345.67889,            // SvxNumValCategory::Scientific
     123.456,                // SvxNumValCategory::Fraction
     1.0,                    // SvxNumValCategory::Boolean
diff --git a/sc/qa/uitest/csv_dialog/tdf88359.py 
b/sc/qa/uitest/csv_dialog/tdf88359.py
index 19fa8b91928e..075e891d1e15 100644
--- a/sc/qa/uitest/csv_dialog/tdf88359.py
+++ b/sc/qa/uitest/csv_dialog/tdf88359.py
@@ -34,7 +34,7 @@ class Tdf88359(UITestCase):
             # Without the fix in place, this test would have failed with
             # AssertionError: 'Date' != 'Text'
             self.assertEqual("Date", 
get_state_as_dict(xliststore1)["SelectEntryText"])
-            self.assertEqual("1999-12-31T13:37:46", 
get_state_as_dict(xliststore2)["SelectEntryText"])
+            self.assertEqual("1999-12-01T13:37:46", 
get_state_as_dict(xliststore2)["SelectEntryText"])
             self.assertEqual("YYYY-MM-DD\"T\"HH:MM:SS", 
get_state_as_dict(xformatted)["Text"])
 
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py 
b/sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py
index 0c556b6c2b65..0f8e9f1d305e 100644
--- a/sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py
+++ b/sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py
@@ -24,17 +24,17 @@ class dateFormFieldDialog(UITestCase):
 
                 # check whether we have the right format selected
                 self.assertEqual(get_state_as_dict(itemsList)["Children"], 
"20")
-                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12/31/99")
+                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12/01/99")
 
                 # select a new format
                 itemsList.getChild("11").executeAction("SELECT", tuple());
-                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12-31")
+                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12-01")
 
 
             # open the dialog again
             with 
self.ui_test.execute_dialog_through_command(".uno:ControlProperties") as 
xDialog:
                 itemsList = xDialog.getChild("date_formats_treeview")
-                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12-31")
+                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12-01")
 
 
     def test_date_field_with_custom_format(self):
@@ -55,7 +55,7 @@ class dateFormFieldDialog(UITestCase):
                 # SelectEntryText doesn't match the sample string, so all this
                 # is rather fragile depending on actual locale data.
                 self.assertEqual(get_state_as_dict(itemsList)["Children"], 
"21")
-                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "1999. 
december 31., péntek[System]")
+                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "1999. 
december 1., szerda[System]")
 
 
     def test_date_reformat(self):
@@ -70,11 +70,11 @@ class dateFormFieldDialog(UITestCase):
 
                 # check whether we have the right format selected
                 self.assertEqual(get_state_as_dict(itemsList)["Children"], 
"20")
-                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12/31/99")
+                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12/01/99")
 
                 # select a new format
                 itemsList.getChild("11").executeAction("SELECT", tuple());
-                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12-31")
+                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12-01")
 
 
             # after applying the new format, the field content should be 
updated
@@ -92,11 +92,11 @@ class dateFormFieldDialog(UITestCase):
 
                 # check whether we have the right format selected
                 self.assertEqual(get_state_as_dict(itemsList)["Children"], 
"20")
-                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "Fri 31/Dec 
99")
+                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "Wed 01/Dec 
99")
 
                 # select a new format
                 itemsList.getChild("11").executeAction("SELECT", tuple());
-                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12-31")
+                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12-01")
 
 
             # a placeholder text is not changed by format change
@@ -117,11 +117,11 @@ class dateFormFieldDialog(UITestCase):
 
                 # check whether we have the right format selected
                 self.assertEqual(get_state_as_dict(itemsList)["Children"], 
"20")
-                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12/31/99")
+                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12/01/99")
 
                 # select a new format
                 itemsList.getChild("3").executeAction("SELECT", tuple());
-                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "Dec 31, 
1999")
+                
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "Dec 1, 1999")
 
 
             # a placeholder text is not changed by format change

Reply via email to