sc/inc/globstr.hrc | 2 +- sc/qa/uitest/range_name/tdf86214.py | 2 +- sc/source/ui/unoobj/nameuno.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit b8f23b6946f819f57c4115d2f6fd75b923b76c6b Author: Olivier Hallot <olivier.hal...@libreoffice.org> AuthorDate: Tue May 20 15:16:02 2025 +0200 Commit: Olivier Hallot <olivier.hal...@libreoffice.org> CommitDate: Wed May 21 01:07:12 2025 +0200 tdf#166662 Improve bad range name error msg. Change-Id: I1cab4ba325422a7ebc9fa5a48fc9ac7419599742 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185559 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hal...@libreoffice.org> diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc index c641672a7bbc..f5c88c82be06 100644 --- a/sc/inc/globstr.hrc +++ b/sc/inc/globstr.hrc @@ -461,7 +461,7 @@ #define STR_MULTI_SELECT NC_("STR_MULTI_SELECT", "(multiple)") #define STR_GLOBAL_SCOPE NC_("STR_GLOBAL_SCOPE", "Document (Global)") #define STR_ERR_NAME_EXISTS NC_("STR_ERR_NAME_EXISTS", "Invalid name. Already in use for the selected scope.") -#define STR_ERR_NAME_INVALID NC_("STR_ERR_NAME_INVALID", "Invalid name. Start with a letter, use only letters, numbers and underscore.") +#define STR_ERR_NAME_INVALID NC_("STR_ERR_NAME_INVALID", "Invalid name. It must start with a letter (excluding c, C, r, or R followed by a number) or underscore. Only letters, numbers, and underscores are permitted.") #define STR_UNSAVED_EXT_REF NC_("STR_UNSAVED_EXT_REF", "This Document contains external references to unsaved documents. Do you want to continue?") #define STR_CLOSE_WITH_UNSAVED_REFS NC_("STR_CLOSE_WITH_UNSAVED_REFS", "This Document is referenced by another document and not yet saved. Closing it without saving will result in data loss.") #define STR_COND_CONDITION NC_("STR_COND_CONDITION", "Cell value") diff --git a/sc/qa/uitest/range_name/tdf86214.py b/sc/qa/uitest/range_name/tdf86214.py index 8cbed2f00da6..c13e839fb99e 100644 --- a/sc/qa/uitest/range_name/tdf86214.py +++ b/sc/qa/uitest/range_name/tdf86214.py @@ -40,7 +40,7 @@ class InvalidNames(UITestCase): type_text(xEdit, name) # tdf#132869 - Without the fix in place, this test would have failed with - # - Expected: "Invalid name. Start with a letter, use only letters, numbers and underscore." + # - Expected: "Invalid name. It must start with a letter (excluding c, C, r, or R followed by a number) or underscore. Only letters, numbers, and underscores are permitted." # - Actual : "" self.assertNotEqual(success_text, get_state_as_dict(xEdit)["QuickHelpText"]) self.assertEqual(get_state_as_dict(xAddBtn)["Enabled"], "false") diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index 5497e0fc7569..388c07e96120 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -477,7 +477,7 @@ void SAL_CALL ScNamedRangesObj::addNewByName( const OUString& aName, break; case ScRangeData::IsNameValidType::NAME_INVALID_BAD_STRING: throw uno::RuntimeException( - u"Invalid name. Start with a letter, use only letters, numbers and underscore"_ustr, + u"Invalid name. It must start with a letter (excluding c, C, r, or R followed by a number) or underscore. Only letters, numbers, and underscores are permitted."_ustr, getXWeak()); break; case ScRangeData::IsNameValidType::NAME_VALID: