sc/source/filter/excel/xename.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 1f7a4ef133542b19d5093fe8e02eb366a7888fd7
Author:     Tomaž Vajngerl <[email protected]>
AuthorDate: Wed Jan 15 13:58:34 2025 +0900
Commit:     Tomaž Vajngerl <[email protected]>
CommitDate: Fri Jan 17 04:49:33 2025 +0100

    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 <[email protected]>

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;
 }
 

Reply via email to