Bug 78599 - Other: File corrupt because hyperlink close before fldchar end
Summary: Other: File corrupt because hyperlink close before fldchar end
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.0.alpha1
Hardware: Other All
: medium normal
Assignee: Priyanka Gaikwad
URL:
Whiteboard: BSA target:4.3.0 target:4.5.0 target:...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-12 12:10 UTC by Priyanka Gaikwad
Modified: 2016-12-20 05:16 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Docx file (607.74 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-05-12 12:10 UTC, Priyanka Gaikwad
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Priyanka Gaikwad 2014-05-12 12:10:15 UTC
Created attachment 98901 [details]
Docx file

Problem description: 

Steps to reproduce:
1. Open file in LO
2. Save file as DOCX
3. Open RT file

Current behavior:
Docx file corrupt after RT

Expected behavior:
Docx should open after RT

Decsription :
Fldchar begin after <w:hyperlink> tag and it end after </w:hyperlink> 
              
Operating System: All
Version: 4.3.0.0.alpha1
Comment 1 Jorendc 2014-05-12 22:17:54 UTC
Reproducible, tested using Mac OSX 10.9 with LibreOffice Version: 4.3.0.0.alpha1+
Build ID: cc4a3f1a88afff114311bddf462ca4bc00a485c7
TinderBox: MacOSX-x86@49-TDF, Branch:master, Time: 2014-05-12_09:05:53
Comment 2 Commit Notification 2014-05-14 11:00:45 UTC
PriyankaGaikwad committed a patch related to this issue.
It has been pushed to "master":

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

fdo#78599: Fixed for file corruption which contains fields and hyperlink



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 3 Commit Notification 2015-01-23 13:55:58 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Related: fdo#78599 ensure RegisterFormat is called before SetModified

It will be available in 4.5.0.

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 Commit Notification 2015-01-23 16:14:59 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Related: fdo#78599 wrong method

It will be available in 4.5.0.

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 5 Matthew Francis 2015-03-31 09:07:11 UTC
Adding Cc: to caolanm@redhat.com

As near as I can tell, commit 162c72d64077d9e0dae820d881ce2b56a5b2040c which mentions this bug also fixed an embedded object issue in bug 87977 - but I don't see that it's made it into 4.4, any chance this could be backported? (presumably with ad50b9a8636e0ee2f3c80669e8dde96577b26c4e which follows it)
Comment 6 Michael Stahl (allotropia) 2015-09-15 15:31:55 UTC
re comment #5: both commits were backported to libreoffice-4-4 as:

commit 501be50b5de178d6ae1047e1ba4bf144e248eb81
Author:     Caolán McNamara <caolanm@redhat.com>
AuthorDate: Fri Jan 23 13:17:39 2015 +0000
Commit:     David Tardon <dtardon@redhat.com>
CommitDate: Wed Apr 1 07:27:52 2015 +0000

    Resolves: fdo#87977 ensure RegisterFormat is called before SetModified
    
    was Related: fdo#78599 ensure RegisterFormat is called before SetModified
    
    TextToTable is called which calls lcl_SetTableBoxWidths2 which calls
    SwDoc::MakeTableBoxFmt which calls SetModified.
    
    there happens to be a listener on modified which tries to get an updated
    preview for embedded objects which draws the page to a metafile, but this
    SwTableNode in SwTableNode::MakeFrm doesn't have a FrmFmt set on it yet, so
    falls over and dies.
    
    Move the RegisterFormat into SwNodes::TextToTable before the tablebox widths
    are set to avoid this
    
    (cherry picked from commit 162c72d64077d9e0dae820d881ce2b56a5b2040c)
Comment 7 Commit Notification 2016-12-13 14:11:32 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#103938 replace fix for tdf#78599/tdf#87977

It will be available in 5.4.0.

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 8 Commit Notification 2016-12-13 20:57:52 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7bc3175ad1fddf71c2a0108541e538f82872579a&h=libreoffice-5-3

Resolves: tdf#103938 replace fix for tdf#78599/tdf#87977

It will be available in 5.3.0.1.

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 9 Commit Notification 2016-12-20 05:16:17 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a4d4fbeb623013f6377b30711ceedb38ea4b49f8&h=libreoffice-5-2

Resolves: tdf#103938 replace fix for tdf#78599/tdf#87977

It will be available in 5.2.5.

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.