sw/inc/flddat.hxx                 |    2 +-
 sw/qa/uibase/shells/shells.cxx    |    6 ++++--
 sw/source/ui/fldui/flddok.cxx     |    4 ++--
 sw/source/uibase/fldui/fldmgr.cxx |    6 +++---
 4 files changed, 10 insertions(+), 8 deletions(-)

New commits:
commit d6347033f95a4c3d4837f954a6560b83ec2a421d
Author:     Heiko Tietze <heiko.tie...@documentfoundation.org>
AuthorDate: Tue Oct 17 11:15:58 2023 +0200
Commit:     Heiko Tietze <heiko.tie...@documentfoundation.org>
CommitDate: Tue Oct 24 09:18:00 2023 +0200

    Revert "Resolves tdf#139141 - Make variable date/time field the default"
    
    This reverts commit e37f06f534ac864f9fe8cd20b07a85c36e697d41.
    and ui test from Ia1a2387e137f8a672a24056b13234d4275a77ca4
    
    Reason for revert: tdf#157337; macros rely on fix field values
    
    Change-Id: I7a638330aac9b71432556454c0104479fcd05b4c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158041
    Tested-by: Heiko Tietze <heiko.tie...@documentfoundation.org>
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>
    (cherry picked from commit fa569930a0968cdeba4441e19a68e7d78aa25cb4)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158282
    Tested-by: Jenkins

diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx
index 6c452072e926..39c00f68a235 100644
--- a/sw/inc/flddat.hxx
+++ b/sw/inc/flddat.hxx
@@ -30,8 +30,8 @@ namespace tools { class Time; }
 
 enum SwDateSubFormat
 {
-    DATE_VAR,
     DATE_FIX,
+    DATE_VAR
 };
 
 class SAL_DLLPUBLIC_RTTI SwDateTimeFieldType final : public SwValueFieldType
diff --git a/sw/qa/uibase/shells/shells.cxx b/sw/qa/uibase/shells/shells.cxx
index c962f4a5d65e..6543f8f4fcb7 100644
--- a/sw/qa/uibase/shells/shells.cxx
+++ b/sw/qa/uibase/shells/shells.cxx
@@ -1049,7 +1049,9 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, 
testInsertTextFormFieldEndnote)
     // Then this was empty: the fieldmark was inserted before the note anchor, 
not in the note body.
     CPPUNIT_ASSERT_EQUAL(OUString("result"), aActual);
 }
-
+/* 
+// Disabled because tdf#139141 was reverted and the default time field inserts 
a fix value again
+// Should be reactivated once a new UNO command is added for variable time 
fields
 CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testUpdateSelectedField)
 {
     // Given an empty doc:
@@ -1077,7 +1079,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, 
testUpdateSelectedField)
     // Check that the selected field has changed:
     CPPUNIT_ASSERT(aTimeFieldAfter != aTimeFieldBefore);
 }
-
+*/
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index f669fa7b92b2..a195ed026ec0 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -241,9 +241,9 @@ IMPL_LINK_NOARG(SwFieldDokPage, TypeHdl, weld::TreeView&, 
void)
                     case SwFieldTypesEnum::Date:
                     case SwFieldTypesEnum::Time:
                         m_xSelectionLB->append(sId, aLst[i]);
-                        if 
(static_cast<SwDateTimeField*>(GetCurField())->IsFixed() && i)
+                        if 
(static_cast<SwDateTimeField*>(GetCurField())->IsFixed() && !i)
                             m_xSelectionLB->select_id(sId);
-                        if 
(!static_cast<SwDateTimeField*>(GetCurField())->IsFixed() && !i)
+                        if 
(!static_cast<SwDateTimeField*>(GetCurField())->IsFixed() && i)
                             m_xSelectionLB->select_id(sId);
                         break;
                     case SwFieldTypesEnum::ExtendedUser:
diff --git a/sw/source/uibase/fldui/fldmgr.cxx 
b/sw/source/uibase/fldui/fldmgr.cxx
index 143c981a6131..636e2b99058a 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -159,14 +159,14 @@ const TranslateId FMT_AUTHOR_ARY[] =
 
 const TranslateId FLD_DATE_ARY[] =
 {
+    FLD_DATE_FIX,
     FLD_DATE_STD,
-    FLD_DATE_FIX
 };
 
 const TranslateId FLD_TIME_ARY[] =
 {
-    FLD_TIME_STD,
-    FLD_TIME_FIX
+    FLD_TIME_FIX,
+    FLD_TIME_STD
 };
 
 const TranslateId FMT_NUM_ARY[] =

Reply via email to