This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit be74beec12a557acb36dbc359d5617cfb348a6b5
Author: Jim Jagielski <[email protected]>
AuthorDate: Tue Nov 3 07:57:27 2026 -0500

    sc: ignore white space around the text of an ODF 1.4 error cell
---
 main/sc/source/filter/xml/xmlcelli.cxx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/main/sc/source/filter/xml/xmlcelli.cxx 
b/main/sc/source/filter/xml/xmlcelli.cxx
index d7b0af5435..6c86b3d527 100644
--- a/main/sc/source/filter/xml/xmlcelli.cxx
+++ b/main/sc/source/filter/xml/xmlcelli.cxx
@@ -787,8 +787,9 @@ bool lcl_IsEmptyOrNote( ScDocument* pDoc, const 
table::CellAddress& rCurrentPos
     return ( !pCell || pCell->GetCellType() == CELLTYPE_NOTE );
 }
 
-static sal_uInt16 lcl_GetErrorCode( const rtl::OUString& rText )
+static sal_uInt16 lcl_GetErrorCode( const rtl::OUString& rRawText )
 {
+    const rtl::OUString rText( rRawText.trim() );
     static const struct { const sal_Char* pName; sal_uInt16 nCode; } aErrors[] 
=
     {
         { "#NULL!", errNoCode }, { "#DIV/0!", errDivisionByZero }, { 
"#VALUE!", errNoValue },

Reply via email to