Bug 76108 - File Corruption - issue with complex field character end tag [ w:fldChar w:fldCharType="end"
Summary: File Corruption - issue with complex field character end tag [ w:fldChar w:fl...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Sourav
URL:
Whiteboard: target:4.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-13 09:31 UTC by Sourav
Modified: 2014-03-18 12:50 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
The original file (21.07 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-03-13 09:31 UTC, Sourav
Details
The RT file. (9.52 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-03-13 09:32 UTC, Sourav
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sourav 2014-03-13 09:31:55 UTC
Created attachment 95702 [details]
The original file

Simulation:
1) Open the attached document in LO.
2) Do Save as docx

Expected :
The RT file should get opened successfully in MSWord.

Actual:
The RT file does not open up.It gets corrupted.
Comment 1 Sourav 2014-03-13 09:32:41 UTC
Created attachment 95703 [details]
The RT file.
Comment 2 Jorendc 2014-03-14 16:32:26 UTC
Reproducible, tested using Mac OSX 10.9 with LibreOffice Version: 4.3.0.0.alpha0+
Build ID: 1b6e87fc232e78790d45a54b7a4ac7fe02d2c587
TinderBox: MacOSX-x86@49-TDF, Branch:master, Time: 2014-03-08_23:04:18

Kind regards,
Joren
Comment 3 Commit Notification 2014-03-17 16:24:00 UTC
Sourav committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d44abe1724ee5470c88f5fba5c0217fb37e2205c

fdo#76108 : The RT file is getting corrupted.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 4 Sourav 2014-03-18 12:50:24 UTC
The issue is resolved and code changes are pushed.
The <w:fldChar w:fldCharType="end" /> tag is there inside the hyperlink tag where as the <w:fldChar w:fldCharType="begin"> is starting before the hyperlink tag.This is causing the issue.

The rootcause found is in DocxAttributeOutput::EndRun().
A check is introduced before the code that writes the <w:fldChar w:fldCharType="end" /> after the hyperlink to check if the m_startedHyperlink is false.