Bug 156218 - When whitespace is hidden and new content is added, page count in status bar is not updated correctly (see comment 21)
Summary: When whitespace is hidden and new content is added, page count in status bar ...
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.0.4 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Show/Hide-Whitespace
  Show dependency treegraph
 
Reported: 2023-07-10 00:28 UTC by ksso
Modified: 2024-03-14 07:30 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
without space (243.25 KB, image/png)
2023-07-10 21:17 UTC, ksso
Details
with space between pages (186.19 KB, image/png)
2023-07-10 21:18 UTC, ksso
Details
another file (53.70 KB, application/vnd.oasis.opendocument.text)
2023-07-12 01:45 UTC, ksso
Details
text off the page (17.26 KB, application/vnd.oasis.opendocument.text)
2024-01-21 03:33 UTC, ksso
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ksso 2023-07-10 00:28:05 UTC
Description:
with long and worked texts
when you "double click" in order to minimize the space between pages
the separation between pages behaves funny, not in accordance with the real number of pages
also the first row, or  other part of the tables may get separated in appearance and need to change the display of pages in order to see the real pages and tables

Steps to Reproduce:
1. work in a long text, different formats
2. minimize the space between pages
3. continue working, the display of pages isn't in accordance with the real structure of the text

Actual Results:
funny display of pages and tables as separated, or many pages in a short space

Expected Results:
real display of "interpages minimized" in accordance with "interpage normal"


Reproducible: Sometimes


User Profile Reset: No

Additional Info:
https://www.vidlii.com/watch?v=c3EzRWvvwAy
Comment 1 m_a_riosv 2023-07-10 02:38:42 UTC
Please, what do you mean by minimize de space between pages, how you do it?
Comment 2 ksso 2023-07-10 21:17:42 UTC
Created attachment 188302 [details]
without space

the arrows point to where the pages are supposed to be separated, also an arrow points to the number of pages displayed on the screen.
Comment 3 ksso 2023-07-10 21:18:32 UTC
Created attachment 188303 [details]
with space between pages

with space between pages
Comment 4 ksso 2023-07-10 21:19:25 UTC
I also got the terms wrong, they don't even exist....
I attach images of what I am referring to
I also point out the page numbering (indicating that the table occupies two pages), but in reality it only occupies one page.
Comment 5 m_a_riosv 2023-07-11 00:09:24 UTC
Please attach a sample file with only two pages to see the issue.
And how do you change between the views.
Comment 6 ksso 2023-07-11 00:26:52 UTC
double click between the pages
the file already deleted, sorry
Comment 7 QA Administrators 2023-07-11 03:14:08 UTC Comment hidden (obsolete)
Comment 8 ksso 2023-07-12 01:45:38 UTC
Created attachment 188324 [details]
another file
Comment 9 ksso 2023-07-12 01:46:08 UTC
is easy to redo this bug
another file
https://www.vidlii.com/watch?v=iPkDxFGLiWM
Comment 10 m_a_riosv 2023-07-12 13:04:46 UTC
I think I'm not smart enough to follow you.

Please explain with detail steps what the issue is.
Comment 11 ksso 2023-07-13 20:26:59 UTC
You just have to work with your text document with merged or unspaced pages (double click), sooner or later what is displayed (numbering and position of text and table) will not match the actual structure of the document.
Comment 12 ksso 2023-07-13 20:41:40 UTC
The document has no problems, but the way it looks when working with merged pages (double spacing), makes it difficult to work, in fact.
Comment 13 ksso 2023-07-13 20:42:21 UTC
(double click), sorry
Comment 14 QA Administrators 2023-07-14 03:14:17 UTC Comment hidden (obsolete)
Comment 15 Dieter 2023-07-14 03:59:44 UTC
(In reply to m.a.riosv from comment #10)
> I think I'm not smart enough to follow you.
> 
> Please explain with detail steps what the issue is.

I think bug is about View-> Hiding Whitespace 

Having a look on attachment 188303 [details] I can't see something strange. Could you please explain, what is wrong here?
=> NEEDINFO
Comment 16 ksso 2023-08-13 18:34:23 UTC
sometimes the tables appear cropped when handling high volume of text (I don't know how to reproduce it)
other times it is only in appearance, after joining the pages (double click between the pages), to make the problem appear is to join the pages and create tables or copy and paste, or edit text and tables.
it is an annoying problem because it damages the pagination and you have to go back to restart the structure (double click) so that the text reappears as it is in reality.
Comment 17 QA Administrators 2023-08-14 03:13:55 UTC Comment hidden (obsolete)
Comment 18 Dieter 2023-08-15 20:51:20 UTC
Kss(In reply to ksso from comment #16)

Ksso, I think there might be a misunderstanding her or I don't grasp the problem. So first of all i think, that double click as you explain it hides and shows whitespace. You get the same result, if you select View -> Whitespace in menu. Is this correct?


> it is an annoying problem because it damages the pagination and you have to
> go back to restart the structure (double click) so that the text reappears
> as it is in reality.
"Reality" is text showing whitespace, correct?

If you hide whitespace you don't really see page breaks. So if you add a table, that doesn't fit a page it will break across two pages. This could be seen as damage of layout, athough it is a regular behaviour.
Does this describe your problem?

=> NEEDINFO
Comment 19 ksso 2023-12-01 22:02:27 UTC
Partly, whitespace is the term, thank you.

When you hide the white space, divisions are created, that divisions "in theory" correspond to the separation between pages.

If the user starts to work and edit normally, after a while the divisions will multiply and get in the way, making the work more difficult. The corresponding numbering in the lower left corner of the window will indicate a numbering that does not correspond to the reality of the document (when you show the blank spaces, the real numbering is shown, the correct distribution of the text).
I don't know if this is normal or not.
Comment 20 QA Administrators 2023-12-02 03:16:39 UTC Comment hidden (obsolete)
Comment 21 Buovjaga 2023-12-20 16:03:48 UTC
I noticed both when working with the document and with a new file that if I hide whitespace and then insert new text, so the number of pages increases, the status bar is not updated correctly. With attachment 188324 [details] status bar total page count is not updated at all and is only updated when showing whitespace again. With a blank file, page count is updated, but is too low until I show whitespace.

We have a meta bug collecting reports related to this feature:
https://bugs.documentfoundation.org/showdependencytree.cgi?id=146315&hide_resolved=1

Maybe some of the issues you saw are found in the meta bug.

I will change the summary to be about the status bar page count, if you don't mind.

I bibisected the stopping of the status bar page count with linux-64-5.2 to 2c23d4ee1e1370b20560e47db7efaeaac1d94b26
tdf#96515 sw Hide Whitespace: avoid creating unneeded page frames

I tested by opening attachment 188324 [details], inserting dummy text to page 4 and copying it and pasting it repeatedly in order to increase the length of the document.

Miklos: sorry to bring up such an old issue, but at least the commit is not big.
Comment 22 Miklos Vajna 2024-01-08 13:58:29 UTC
When I open this document, I get the following output in a dbgutil build:

$ ./soffice.bin --nologo /home/vmiklos/git/libreoffice/bugs/tdf156218/orig.odt
warn:legacy.tools:9543:9543:sfx2/source/control/bindings.cxx:1766: No cache for OfficeDispatch!
warn:sw.layout:9543:9543:sw/source/core/layout/tabfrm.cxx:1787: LoopControl_1 in lcl_RecalcRow: Stage 1!
warn:sw.layout:9543:9543:sw/source/core/layout/tabfrm.cxx:1788: LoopControl_1 in lcl_RecalcRow: Stage 2!!
warn:sw.layout:9543:9543:sw/source/core/layout/tabfrm.cxx:1787: LoopControl_1 in lcl_RecalcRow: Stage 1!
warn:sw.layout:9543:9543:sw/source/core/layout/tabfrm.cxx:1788: LoopControl_1 in lcl_RecalcRow: Stage 2!!
warn:sw.layout:9543:9543:sw/source/core/layout/tabfrm.cxx:1789: LoopControl_1 in lcl_RecalcRow: Stage 3!!!

i.e. Writer is unable to correct layout this even in the "show whitespace" case.

My guess would be that the page count is not updated because the layout can't finish successfully. Are you able to reproduce this lack of page count update bug with a document where the initial layout works?

If not, then the root cause may not be the above commit, i.e. even if I revert it, the problem (loop control kicking in) is still there. Thanks.
Comment 23 ksso 2024-01-21 03:33:17 UTC
Hi, thanks for all


An update,

With whitespace and typing enter the pagination is altered, and typing backspace causes the writing to go off the page and can become more convoluted.

https://drive.google.com/file/d/1wh2bngN3patBGeKoMAHmXBM8mX9HigAq/view?usp=drive_link

odt file to attach
Comment 24 ksso 2024-01-21 03:33:52 UTC
Created attachment 192080 [details]
text off the page

text off the page
Comment 25 Miklos Vajna 2024-03-14 07:30:25 UTC
Thanks for the video. I tried to reproduce this on master without success. Could you try if 1) switching the UI language to English and 2) getting a daily build from https://dev-builds.libreoffice.org/daily/master/current.html (master, towards 24.8) would also reproduce this? THanks.