Bug 129582 - FILEOPEN: DOCX: footer is missing on page 2
Summary: FILEOPEN: DOCX: footer is missing on page 2
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.1.2 release
Hardware: All All
: medium normal
Assignee: Michael Stahl (CIB)
URL:
Whiteboard: target:6.5.0 target:6.4.1 target:6.3.6
Keywords: bibisected, bisected, regression
: 129834 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-12-23 13:43 UTC by Xisco Faulí
Modified: 2020-02-19 14:45 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
comparison MSO 2010 and LibreOffice 6.5 Master (53.38 KB, image/png)
2019-12-23 13:43 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2019-12-23 13:43:45 UTC
Created attachment 156755 [details]
comparison MSO 2010 and LibreOffice 6.5 Master

Steps to reproduce:
1. Open attachment 96828 [details] from bug 76941

-> Footer on page 2 is missing. See comparison image

Reproduced in

Version: 6.5.0.0.alpha0+
Build ID: dee81fb2e1df5091702b3c8b0e4a3f2b58e89291
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

[Bug found by office-interoperability-tools]
Comment 1 Xisco Faulí 2019-12-23 13:44:47 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=28b77c89dfcafae82cf2a6d85731b643ff9290e5

author	Michael Stahl <Michael.Stahl@cib.de>	2019-07-11 18:37:28 +0200
committer	Michael Stahl <Michael.Stahl@cib.de>	2019-07-22 08:32:07 +0200
commit	28b77c89dfcafae82cf2a6d85731b643ff9290e5 (patch)
tree	4d26e493cebd1d83025094a3a97b9e878bc2b930
parent	22f2ecbcabf3928d5486690ca6465b7b37bc8a10 (diff)
tdf#117185 tdf#110442 sw: bring harmony & peace to fly at-char selection

Bisected with: bibisect-linux64-6.4

Adding Cc: to Michael Stahl
Comment 2 Michael Stahl (CIB) 2020-01-20 13:53:56 UTC Comment hidden (obsolete)
Comment 3 Michael Stahl (CIB) 2020-01-20 13:58:18 UTC
... turns out that it was already fixed by:

commit 04b2310aaa094794ceedaa1bb6ff1823a2d29d3e
Author:     Miklos Vajna <vmiklos@collabora.com>
AuthorDate: Fri Jan 10 13:20:40 2020 +0100

    DOCX import: fix lost objects anchored to the single para of a linked header
    
    Regression from commit 08f13ab85b5c65b5dc8adfa15918fb3e426fcc3c
    (tdf#112202 writerfilter,sw: fix loss of headers, 2019-12-16), the
    problem is that on one hand, copyText() is meant to copy a complete
    XText (header, table cell, footnote, etc), OTOH the internal API use
    used only copies at-para anchored objects for complete text nodes, so a
    one-paragraph header will loose its anchored objects when a linked
    header is copied.
    
    Introduce a new "CopyText" flag that provides the expected copyText()
    behavior and use that when the copyText() UNO API is invoked, but leave
    the selection behavior unchanged.
    
    Perform the inclusive check in IsSelectFrameAnchoredAtPara(), opt in for
    that from SwXText::copyText(), the rest is just passing the flag around.
Comment 4 Michael Stahl (CIB) 2020-01-20 14:04:31 UTC
err no i don't think it's fixed, that commit only fixes at-paragraph ones but this one is at-character? i'll test that once i have a new master build...
Comment 5 Xisco Faulí 2020-01-20 14:08:34 UTC
Hi Michael,
The issue is still reproducible for me in

Version: 6.5.0.0.alpha0+
Build ID: fc1f85127968d1c2e0a53dace51bf8a78f9e6ca5
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 6 Miklos Vajna 2020-01-20 14:57:28 UTC
Yes, I focused on at-para anchoring as that was my use-case. But now that we pass that "is copy text" flag everywhere, hopefully it's not too hard to fix at-char anchored objects in a similar way.
Comment 7 Commit Notification 2020-01-20 18:26:23 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/81ec0039b2085faab49380c7a56af0c562d4c9e4

tdf#129582 sw: fix copying of flys in header/footer in DOCX/RTF import

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 Michael Stahl (CIB) 2020-01-21 10:24:17 UTC
fixed it now
Comment 9 Xisco Faulí 2020-01-21 11:26:30 UTC
Verified in

Version: 6.5.0.0.alpha0+
Build ID: b92293b3943423324064a8513c2e114d18817179
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

@Michael, thanks for fixing this issue!
Comment 10 Commit Notification 2020-01-21 15:09:36 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/34bdbb98846115671dcc71e34f6f2900fb638154

tdf#129582 sw: fix copying of flys in header/footer in DOCX/RTF import

It will be available in 6.4.1.

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 11 Commit Notification 2020-02-04 12:38:35 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/6293f86d3d6ba7db8e772d7bd02111f6f301f15d

tdf#129582 sw: fix copying of flys in header/footer in DOCX/RTF import

It will be available in 6.3.6.

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 12 Michael Stahl (CIB) 2020-02-19 14:45:22 UTC
*** Bug 129834 has been marked as a duplicate of this bug. ***