sc/source/filter/excel/xename.cxx | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit 3fc46f09b525f03913b7d0c5aec7e0221c994403 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Wed Jan 15 13:58:34 2025 +0900 Commit: Aron Budea <aron.bu...@collabora.com> CommitDate: Thu Feb 13 02:23:15 2025 +1030 tdf#148812 write #NAME? for an empty definedName value This keeps MSOffice silent when opening the documents that don't have the any range/formula expression set for the define name. Change-Id: Ib4cc01a5c51b3875c0d8e0870e2bdf9c15794df1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180258 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx index 5607a9068d4f..aa33b31deeb3 100644 --- a/sc/source/filter/excel/xename.cxx +++ b/sc/source/filter/excel/xename.cxx @@ -322,6 +322,8 @@ OUString XclExpName::GetWithDefaultRangeSeparator( const OUString& rSymbol ) con } } } + if (rSymbol.isEmpty()) + return u"#NAME?"_ustr; return rSymbol; }