Bug 108970 - DOCX IMPORT: page number is absent in specific document's footer
Summary: DOCX IMPORT: page number is absent in specific document's footer
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: Writer-Header-Footer DOCX
  Show dependency treegraph
 
Reported: 2017-07-05 13:25 UTC by Mike Kaganski
Modified: 2020-01-06 19:15 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
A test file with 2 pages with page numbers in footers' paragraph-attached text boxes (44.73 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-07-05 13:25 UTC, Mike Kaganski
Details
Minimal testcase with inherited footer with text box (2.65 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-07-05 15:32 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2017-07-05 13:25:18 UTC
Created attachment 134492 [details]
A test file with 2 pages with page numbers in footers' paragraph-attached text boxes

Attachment has page number in text box in each of two pages in Word.
When open in Writer, it only has page number in 1st page, the second page has empty footer.

The problem is that the second section in document inherits the footer from first section, so LibreOffice copies the footer data between page styles on import (SectionPropertyMap::CopyLastHeaderFooter), and the functions that do real job (DocumentContentOperationsManager::Copy[Range|Impl]) do not copy last paragraph's anchored objects.
Comment 1 Mike Kaganski 2017-07-05 15:32:13 UTC
Created attachment 134496 [details]
Minimal testcase with inherited footer with text box

This is a better sanitized example.
Comment 2 Xisco Faulí 2017-07-10 17:21:04 UTC
Confirmed in

Version: 6.0.0.0.alpha0+
Build ID: 7931ef2abbcef22de5cdddd26738e4dd8d1d8ca5
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

and

Version: 4.4.0.0.alpha0+
Build ID: f340f0454627939f1830826fb5cc53a90e6c62a4

in previous version, the footer is not even displayed on the first page.
Comment 3 Justin L 2017-11-08 11:46:25 UTC
Sounds similar to bug 104237 - anyone brave enough to tackle one of these is welcome to also look at the other one.
Comment 4 QA Administrators 2018-11-09 03:59:28 UTC Comment hidden (obsolete, spam)
Comment 5 Timur 2020-01-06 19:15:45 UTC
Repro 6.5+.