Bug 130639 - EDITING Table is relayouted on scrolling when there are more header rows than empty space
Summary: EDITING Table is relayouted on scrolling when there are more header rows than...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.1.0
Keywords: filter:docx
Depends on:
Blocks: DOCX-Tables
  Show dependency treegraph
 
Reported: 2020-02-13 13:54 UTC by NISZ LibreOffice Team
Modified: 2020-09-08 10:46 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word (5.65 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-02-13 13:55 UTC, NISZ LibreOffice Team
Details
Example file from Writer (39.68 KB, application/vnd.oasis.opendocument.text)
2020-02-13 13:55 UTC, NISZ LibreOffice Team
Details
Screenshot of the problem in Writer with the docx file (80.23 KB, image/png)
2020-02-13 13:56 UTC, NISZ LibreOffice Team
Details
Screenshot of the expected result in Writer with the docx file after triggering relayout (87.14 KB, image/png)
2020-02-13 13:56 UTC, NISZ LibreOffice Team
Details
Screenshot of the problem in Writer with the odt file (52.33 KB, image/png)
2020-02-13 13:58 UTC, NISZ LibreOffice Team
Details
Screenshot of the expected result in Writer with the odt file after triggering relayout (56.05 KB, image/png)
2020-02-13 13:58 UTC, NISZ LibreOffice Team
Details
new Testcase on v.6.4.0.3 (.ODT) (12.89 KB, application/vnd.oasis.opendocument.text)
2020-02-13 18:48 UTC, DiegoM
Details
new Testcase on v.6.4.0.3 - PDF as a check on my PC (53.12 KB, application/pdf)
2020-02-13 18:49 UTC, DiegoM
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2020-02-13 13:54:18 UTC
Description:
This is a spinoff from bug #88496
Attached docx file is extracted from attachment #112346 [details] and contains a table with 10 tall header rows. This table is rendered on top of the second page instead of the center of the first page. The document is three pages instead of two in Word.
However moving the cursor through the table with the DOWN key makes the table being relayouted, and now it starts at the middle of the first page and the document becomes two pages like in Word.
This also happens with the attached odt version of the file, which is 10 pages when opened, but after triggering relayout by scrolling it with the DOWN key, the table start on the first page and the document becomes only 7 pages long.

Steps to Reproduce:
1. Open attached documents
2. Notice the table starts at the top of the second page

Actual Results:
The table should start at the middle of the first page, but after scrolling inside it with the DOWN key (not the mouse+scrollbar) the layout is corrected.
See also: https://bugs.documentfoundation.org/show_bug.cgi?id=88496#c23 

Expected Results:
The table should start at the middle of the first page on opening the example files.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.0.0.0.alpha0+ (x64)
Build ID: 5d00a1c9c6e85f3d7a3e05ab485da79980c38d44
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win; 
Locale: en-US (hu_HU); UI-Language: en-US
Calc: CL

Also happens way back to:
LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 1 NISZ LibreOffice Team 2020-02-13 13:55:21 UTC
Created attachment 157839 [details]
Example file from Word
Comment 2 NISZ LibreOffice Team 2020-02-13 13:55:51 UTC
Created attachment 157840 [details]
Example file from Writer
Comment 3 NISZ LibreOffice Team 2020-02-13 13:56:31 UTC
Created attachment 157841 [details]
Screenshot of the problem in Writer with the docx file
Comment 4 NISZ LibreOffice Team 2020-02-13 13:56:58 UTC
Created attachment 157842 [details]
Screenshot of the expected result in Writer with the docx file after triggering relayout
Comment 5 NISZ LibreOffice Team 2020-02-13 13:58:29 UTC
Created attachment 157843 [details]
Screenshot of the problem in Writer with the odt file
Comment 6 NISZ LibreOffice Team 2020-02-13 13:58:56 UTC
Created attachment 157844 [details]
Screenshot of the expected result in Writer with the odt file after triggering relayout
Comment 7 Durgapriyanka 2020-02-13 16:20:44 UTC
Thank you for reporting this bug. I can reproduce this, but there are 12 pages in the document and moving the cursor through the table with the DOWN key makes no changes in the layout.

Version: 6.4.0.0.alpha1+ (x86)
Build ID: ec7374ff84c71edfbb30d6e4dc5b486b6df7107f
CPU threads: 2; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-11-10_21:37:30
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded

and in

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4

The contents in the document starts from the right side margin.
Comment 8 Dieter 2020-02-13 17:11:34 UTC
I also confirm this with attachment from comment 1 in comparison between LO 6.3.4 and MS Word 2016. But indeed, this document has 12 pages.

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 9 Gabor Kelemen (allotropia) 2020-02-13 17:18:19 UTC
It's 3 pages in current master only, after the recent fix of bug #88496
Before it was 12 pages, this page number reduction is the effect of that fix.
Comment 10 DiegoM 2020-02-13 18:48:44 UTC
Created attachment 157846 [details]
new Testcase on v.6.4.0.3 (.ODT)

see separate comment
Comment 11 DiegoM 2020-02-13 18:49:49 UTC
Created attachment 157847 [details]
new Testcase on v.6.4.0.3 - PDF as a check on my PC
Comment 12 DiegoM 2020-02-13 18:52:18 UTC
On LO v.6.4.0.3 strange/wrong behaviour is still there, even if it has changed.
See testcase in prevoius attachment:
LIBREOFFICE VERSION 6.4.0.3 64BIT ON LINUX MINT 19.3

TEXT BEFORE THE TABLE TEXT BEFORE THE TABLE TEXT BEFORE THE TABLE TEXT BEFORE THE TABLE 

HEREAFTER WE PUT A TABLE WITH 20 ROWS AND 2 COLUMNS; FIRST COLUMN HAS NUMBERS FROM 1 TO 20; SECOND COLUMN HAS A LONG PARAGRAPH; AFTER TEXT IS ENTERED WE TAKES TABLE PROPERTIES AND DEFINE REPEAT HEADER THE FIRST 10 LINES. TABLES GOES TO NEXT PAGE AND SHOWS AS HEADER LINES FROM 1 TO 9; LINES FROM 10 TO 20 DO NOT SHOW UP. IN TOTAL WE HAVE 1+11 PAGES
Comment 13 Commit Notification 2020-08-07 07:33:33 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/db3191f408fa2d04bf5870ea2c117e75d410ab5f

tdf#130639 sw layout: fix table position

It will be available in 7.1.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 14 NISZ LibreOffice Team 2020-09-08 10:46:51 UTC
Verified in:

Version: 7.1.0.0.alpha0+ (x64)
Build ID: a3b4831208da615789bd1e2d5660dd130807f504
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded