Bug 129883 - Section links are lost on save and reload (see c3-c4)
Summary: Section links are lost on save and reload (see c3-c4)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha0+ Master
Hardware: All All
: high normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.5.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Section
  Show dependency treegraph
 
Reported: 2020-01-08 13:26 UTC by sdc.blanco
Modified: 2020-01-27 08:47 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sdc.blanco 2020-01-08 13:26:21 UTC
1. Insert>Section, Link, filename
2. Write Protection, uncheck "Protect"
3. Save and reload.

Actual Result:  Link to file is lost.
Expected Result:  Link is preserved.

Tested in: 

Version: 6.5.0.0.alpha0+ (x64)
Build ID: 035c7717c135c66c0ec025500b73ae9c13b7c586
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: GL; VCL: win; 
Locale: da-DK (en_DK); UI-Language: en-US
Calc: threaded


Works as expected in:

Version: 6.3.4.2 (x64)
Build ID: 60da17e045e08f1793c57c00ba83cdfce946d0aa
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: de-DE (en_DK); UI-Language: en-US
Calc: threaded
Comment 1 sdc.blanco 2020-01-08 13:44:05 UTC
Not sure if this is a separate issue but:

1. Insert>Section, Link, filename
2. Write Protection, uncheck "Protect"
3. Modify text in the section.
4. Right-click, "Edit Section" Check "protect"
5. Save and reload.

Actual Result:    Link to file is lost, but modified text is preserved.
Expected Result:  Link to file preserved.

As before, works in 6.3.4.2 (and keeps modified text, if you do not update the external links!), but not in 6.5.0.0.alpha (which does not ask about updating links).
Comment 2 sdc.blanco 2020-01-14 00:28:04 UTC
Modified summary to indicate that links are lost (no matter what).

1. Link an external file in a section.  (external document loads fine.)
2. Save the document and reload.  

Result:  link to external file in the section is lost.

(i.e., nothing to do with "write protection" as in initial report and comment 1).

Still:

Version: 6.5.0.0.alpha0+ (x64)
Build ID: 035c7717c135c66c0ec025500b73ae9c13b7c586
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: GL; VCL: win; 
Locale: da-DK (en_DK); UI-Language: en-US
Calc: threaded
Comment 3 sdc.blanco 2020-01-14 00:57:25 UTC
Additional information.

Even though the link is lost (or not visible) in 6.5.0.0.alpha, if the same file (created with 6.5) is opened in LO 6.3.4.2, then the link is still there (and the external file loads). Suggests that 6.5.0.0 cannot process the stored link information.
Comment 4 Dieter 2020-01-14 16:26:02 UTC
I confirm it with

Version: 6.5.0.0.alpha0+ (x64)
Build ID: 350d25da375f221edfa37309324ce3c68cf297ef
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-GB
Calc: threaded
Comment 5 Dieter 2020-01-14 16:30:15 UTC
Can't confirm with

Version: 6.3.4.2 (x64)
Build-ID: 60da17e045e08f1793c57c00ba83cdfce946d0aa
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: threaded
Comment 6 raal 2020-01-14 17:17:53 UTC
(In reply to sdc.blanco from comment #3)
> Additional information.
> 
> Even though the link is lost (or not visible) in 6.5.0.0.alpha, if the same
> file (created with 6.5) is opened in LO 6.3.4.2, then the link is still
> there (and the external file loads). Suggests that 6.5.0.0 cannot process
> the stored link information.

This seems to have begun at the below commit.
Adding Cc: to Noel Grandin; Could you possibly take a look at this one? Thanks

95db0da841636f21c8fd875be8d128eebb296aa5 is the first bad commit
commit 95db0da841636f21c8fd875be8d128eebb296aa5
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Sat Dec 21 01:08:42 2019 -0800

    source sha:ccdcc25a085299bda45bc5ea4b3594e856f2d315

author	Noel Grandin <noel.grandin@collabora.co.uk>	2019-12-20 15:12:15 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2019-12-21 08:29:31 +0100
commit	ccdcc25a085299bda45bc5ea4b3594e856f2d315 (patch)
tree	da294bdcb433814e8327bbc41c2865d87b76a05d
parent	a445b24d1eef6b81db962894d4c3990e1067f4ad (diff)
convert XMLSectionSourceImportContext to FastParser APIs
Comment 7 Commit Notification 2020-01-19 17:38:02 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/55f224ff57cf16057e0493ee4f9b8a14132d7ec1

tdf#129883 Section links are lost on save and reload

It will be available in 6.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Dieter 2020-01-27 07:20:31 UTC
Verified with

Version: 7.0.0.0.alpha0+ (x64)
Build ID: eeb2d19e77d6dc47c68e8ba0920a02cf64a1247b
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-GB
Calc: threaded
Comment 9 sdc.blanco 2020-01-27 08:47:43 UTC
(In reply to Commit Notification from comment #7)
> Affected users are encouraged to test the fix and report feedback.
Thanks Noel. Works as expected again.  

Tested with:
Version: 7.0.0.0.alpha0+ (x64)
Build ID: eeb2d19e77d6dc47c68e8ba0920a02cf64a1247b