Bug 161790 - DOCX file looks empty when opened in LibreOffice
Summary: DOCX file looks empty when opened in LibreOffice
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.0.3 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-Opening
  Show dependency treegraph
 
Reported: 2024-06-26 07:04 UTC by Hemp
Modified: 2024-06-28 15:06 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
DOCX file which looks empty but it is not (7.21 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-06-26 07:06 UTC, Hemp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hemp 2024-06-26 07:04:26 UTC
Description:
This file is generated using DOCX Node.JS library. 
It contains a sentence “This TextRun contains several children TextRuns” and is correctly displayed in MS Word and other (online) viewers.
But LibreOffice displays nothing.

Version: 24.2.0.3 (X86_64) / LibreOffice Community
Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1
CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: be-BY (be_BY); UI: en-US
Calc: CL threaded

Steps to Reproduce:
1. Open the attached file in LibreOffice and you will see nothing
2. Open the attached file in MS Word or any other docx viewer and you will see text “This TextRun contains several children TextRuns”

Actual Results:
The file is empty

Expected Results:
File contains text “This TextRun contains several children TextRuns”


Reproducible: Always


User Profile Reset: Yes

Additional Info:
This file is generated using DOCX Node.JS library. To make this bug happen, Paragraph should contain TextRun which contains children property. Children property value should be an array with some TextRuns.

const checkTextRun = new TextRun({
    //This textRun contains several children
    children: [
        new TextRun({
            text: "This TextRun ",
        }),
        new TextRun({
            text: "contains ",
        }),
        new TextRun({
            text: "several children TextRuns",
        }),
    ],
});

const doc = new Document({
    sections: [
        {
            properties: {},
            children: [
                new Paragraph({
                    children: [checkTextRun],
                }),
            ],
        },
    ],
});

This is not a bug in NodeJS library because other editors display text correctly
Comment 1 Hemp 2024-06-26 07:06:09 UTC
Created attachment 194968 [details]
DOCX file which looks empty but it is not

DOCX file which looks empty in LibreOffice but it is not
Comment 2 Julien Nabet 2024-06-26 09:05:42 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

I noticed these logs on console:
warn:writerfilter.dmapper:535277:535277:sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx:2200: no style sheet found
warn:writerfilter:535277:535277:sw/source/writerfilter/dmapper/PropertyMap.cxx:612: Paper source not found com.sun.star.lang.IllegalArgumentException message: "at /home/julien/lo/libreoffice/sw/source/core/unocore/unostyle.cxx:1601" ArgumentPosition: 0
warn:legacy.osl:535277:535277:oox/source/helper/storagebase.cxx:67: StorageBase::StorageBase - missing base input stream