https://bugs.documentfoundation.org/show_bug.cgi?id=146317

            Bug ID: 146317
           Summary: form control texts in xlsx are gone due to failure in
                    loading vml
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: filters and storage
          Assignee: [email protected]
          Reporter: [email protected]

Description:
see steps to reproduce

Steps to Reproduce:
1. open the attached file in excel
2. open the attached file in libreoffice
3. compare the result

Actual Results:
see the attached screenshots.
There is a letter 'あ' (U+3042) in Excel, but not in Calc

Expected Results:
Calc shows 'あ'


Reproducible: Always


User Profile Reset: No



Additional Info:
I personally applied the following patch on my local build to avoid this issue.

diff --git a/oox/source/vml/vmlinputstream.cxx
b/oox/source/vml/vmlinputstream.cxx
index 93204ac50710..b41e697ab5c0 100644
--- a/oox/source/vml/vmlinputstream.cxx
+++ b/oox/source/vml/vmlinputstream.cxx
@@ -42,7 +42,7 @@ const char* lclFindCharacter( const char* pcBeg, const char*
pcEnd, char cChar )

 bool lclIsWhiteSpace( char cChar )
 {
-    return cChar <= 32;
+    return 0 <= cChar && cChar <= 32;
 }

 const char* lclFindWhiteSpace( const char* pcBeg, const char* pcEnd )
@@ -268,7 +268,7 @@ constexpr OStringLiteral gaClosingCData( "]]>" );

 InputStream::InputStream( const Reference< XComponentContext >& rxContext,
const Reference< XInputStream >& rxInStrm ) :
     // use single-byte ISO-8859-1 encoding which maps all byte characters to
the first 256 Unicode characters
-    mxTextStrm( TextInputStream::createXTextInputStream( rxContext, rxInStrm,
RTL_TEXTENCODING_ISO_8859_1 ) ),
+    mxTextStrm( TextInputStream::createXTextInputStream( rxContext, rxInStrm,
RTL_TEXTENCODING_UTF8 ) ),
     maOpeningBracket{ '<' },
     maClosingBracket{ '>' },
     mnBufferPos( 0 )
@@ -378,12 +378,12 @@ void InputStream::updateBuffer()

 OString InputStream::readToElementBegin()
 {
-    return OUStringToOString( mxTextStrm->readString( maOpeningBracket, false
), RTL_TEXTENCODING_ISO_8859_1 );
+    return OUStringToOString( mxTextStrm->readString( maOpeningBracket, false
), RTL_TEXTENCODING_UTF8 );
 }

 OString InputStream::readToElementEnd()
 {
-    OString aText = OUStringToOString( mxTextStrm->readString(
maClosingBracket, false ), RTL_TEXTENCODING_ISO_8859_1 );
+    OString aText = OUStringToOString( mxTextStrm->readString(
maClosingBracket, false ), RTL_TEXTENCODING_UTF8 );
     OSL_ENSURE( aText.endsWith(">"), "InputStream::readToElementEnd - missing
closing bracket of XML element" );
     return aText;
 }

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to