Bug 78947 - FILESAVE: File when saved in LO gets corrupted.
Summary: FILESAVE: File when saved in LO gets corrupted.
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.0.alpha0+ Master
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-20 06:27 UTC by bisal.nayal
Modified: 2015-05-17 09:39 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
The file is right protected, (693.71 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-05-20 06:27 UTC, bisal.nayal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bisal.nayal 2014-05-20 06:27:32 UTC
Created attachment 99390 [details]
The file is right protected,

Problem description: 

Steps to reproduce:
1. Open the attached file in LO.
2. Save the file with docx extension.
3. Try to open the file with MS Word 2010

Current behavior:
1) We get a dialogue stating the file is corrupted.

Expected behavior:

1) The file should open properly

              
Operating System: Ubuntu
Version: 4.3.0.0.alpha0+ Master
Comment 1 Jorendc 2014-05-20 17:54:01 UTC
Repro, Version: 4.3.0.0.alpha1+
Build ID: cd11bc699ac50af4f560ed5f2e5e7903de0898b8
TinderBox: Win-x86@51-TDF, Branch:MASTER, Time: 2014-05-20_08:02:54
Comment 2 bisal.nayal 2014-05-30 10:47:01 UTC
1) After further analysis of nodes.xml and layout.xml following things were found
a) The actual cause of the issue is a WATERMARK.
b) There is a condition in void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) wrtw8nds.cxx which checks that if we are in document.xml then we shouldn't write watermark information as it should be in the header.xml file.
c) Further more analysis led to the conclusion that during import itself the watermark is getting anchored on the text in the first row of the table which is in document.xml.
d) Due to this when we go to write the first row of the table the following condition wrtw8nds.cxx

if (( TXT_HDFT != nTxtTyp) && aWatermarkAttrIter.IsWatermarkFrame())
    {
       return;
    }

becomes true and it returns..
Comment 3 bisal.nayal 2014-06-13 11:57:32 UTC
The issue is in the import itself.
The watermark which is a part of the header is getting anchored on the row of the table in the body..
Comment 4 Jorendc 2015-05-17 09:39:11 UTC
Fail to reproduce

Windows 7
LibreOffice Version: 5.0.0.0.alpha1+ (x64)
Build ID: 9d0c51daea67104349cac26de9839afa8baeb099
TinderBox: Win-x86_64@42, Branch:master, Time: 2015-05-15_23:59:35
Locale: nl-BE (nl_BE)

Opened using Word 2010.