sw/inc/fldbas.hxx | 6 ++++-- sw/source/uibase/fldui/fldmgr.cxx | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-)
New commits: commit f7588e928a6de891e1fbf3b4d591e7d69347813a Author: Andreas Heinisch <[email protected]> AuthorDate: Fri Jan 23 18:24:45 2026 +0100 Commit: Andreas Heinisch <[email protected]> CommitDate: Sat Jan 31 12:28:32 2026 +0100 tdf#170392 - Align file name format constants with translate constants Otherwise, conversions during the save/insert process will change the format of the file name field because the constants need to be converted from SwFileNameFormat to FilenameDisplayFormat and vice versa. Change-Id: I6ee3ae3adc34a86560381f8e9585a016d4f312ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198019 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <[email protected]> diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx index 0f60a85a0e00..1d29362b3caa 100644 --- a/sw/inc/fldbas.hxx +++ b/sw/inc/fldbas.hxx @@ -148,12 +148,14 @@ enum class SwFieldTypesEnum : sal_uInt16 { LAST = ParagraphSignature, Unknown = USHRT_MAX // used by SwFieldMgr::GetCurTypeId }; + +// tdf#170392 - this should be aligned with FMT_FF_ARY in sw/source/uibase/fldui/fldmgr.cxx enum class SwFileNameFormat { // most of the constants are a regular enum - Name, - PathName, Path, + PathName, NameNoExt, + Name, UIName, UIRange, End, // marker value, used for asserts diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index 0ad355618552..802d7f37f219 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -188,12 +188,13 @@ const TranslateId FMT_NUM_ARY[] = FMT_NUM_PAGESPECIAL }; +// tdf#170392 - this should be aligned with enum SwFileNameFormat in sw/inc/fldbas.hxx const TranslateId FMT_FF_ARY[] = { - FMT_FF_NAME, - FMT_FF_PATHNAME, FMT_FF_PATH, + FMT_FF_PATHNAME, FMT_FF_NAME_NOEXT, + FMT_FF_NAME, FMT_FF_UI_NAME, FMT_FF_UI_RANGE };
