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

New commits:
commit e37f06f534ac864f9fe8cd20b07a85c36e697d41
Author:     Heiko Tietze <tietze.he...@gmail.com>
AuthorDate: Sat Jan 7 10:23:07 2023 +0100
Commit:     Heiko Tietze <heiko.tie...@documentfoundation.org>
CommitDate: Sun Jan 8 09:13:10 2023 +0000

    Resolves tdf#139141 - Make variable date/time field the default
    
    Switched the fixed and variable/current field
    See also I18136feebed225f7645b6869d3600ee78f945bfb and
    I56f42b4ce104dbb96d8fda1bc71af727fa46d536
    
    Change-Id: Id885c09410dc9aecc9570c8d3b7750e9d69e9c9c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145170
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <rayk...@gmail.com>

diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx
index 39c00f68a235..6c452072e926 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/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index e29bd09d828a..66d6e63d6259 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 8a0e81c882ec..d8f1fcc04ad0 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_FIX,
-    FLD_TIME_STD
+    FLD_TIME_STD,
+    FLD_TIME_FIX
 };
 
 const TranslateId FMT_NUM_ARY[] =

Reply via email to