Bug 98446 - Book and multi-page view: Deselecting "Show Whitespace" should automatically change to single-page view (see comment 29)
Summary: Book and multi-page view: Deselecting "Show Whitespace" should automatically ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Page-View Show/Hide-Whitespace 123432
  Show dependency treegraph
 
Reported: 2016-03-05 13:56 UTC by LibreTraining
Modified: 2022-11-25 09:31 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
possible to hide whitespace (15.16 KB, application/vnd.oasis.opendocument.text)
2017-03-30 09:58 UTC, Dieter
Details
Hide whitespace grayed out (12.44 KB, application/vnd.oasis.opendocument.text)
2017-03-30 09:59 UTC, Dieter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description LibreTraining 2016-03-05 13:56:53 UTC
The "Hide Whitespace" option is sometimes grayed-out for no apparent reason.
I have had this issue as have 2 other users in the LibreOffice forum.

I cannot find any rhyme or reason why some documents work and others do not.

Examples:

1. Getting Started with LibreOffice (GS50-GettingStartedLO.odt)
This is the latest draft of the new doc for LO 5.0 as of 2016-03-04.
DOES NOT WORK – Hide Whitespace is grayed-out.

2. Introducing LibreOffice (GS5001-IntroducingLibreOffice.odt)
This is the separate first chapter of the above document.
WORKS – Hide Whitespace is available.

Both of these documents are available here:
https://wiki.documentfoundation.org/Documentation/Publications

3. New document
Insert multiple pages of demo text and Save.
DOES NOT WORK – Hide Whitespace is grayed out.

4. Opened a document I was working on a few days ago to test some fonts.
One page with a few lines for couple large font tests
WORKS – Hide Whitespace is available.

I have looked at styles, document properties, saving, closing and re-opening, changing views, etc., etc.

Either I am missing something, or it looks like this is a bug.
Comment 1 MM 2016-03-05 19:59:20 UTC
Tested with v5.1.1.3 under ubuntu 14.04 x64.

If you save it to docx or doc and reload, you can select 'hide whitespace' again.
Also when you *then* re-save it to odt and reload, you can select this option again.
Comment 2 LibreTraining 2016-03-06 06:16:38 UTC
"Note to Bug Reporter:
This bug is (most likely) in NEEDINFO status because someone has asked for information or data."

What info is needed?
Comment 3 MM 2016-03-06 12:01:55 UTC
(In reply to LibreTraining from comment #2)
> "Note to Bug Reporter:
> This bug is (most likely) in NEEDINFO status because someone has asked for
> information or data."
> 
> What info is needed?

Will this solution work for you ?
Comment 4 LibreTraining 2016-03-07 12:09:49 UTC
Thank you for the workaround.
That will be a useful way to deal with this bug, for now.
But that really does not "solve" the problem.

With your confirmation there is now 4 of us who can confirm this issue.
On different operating systems.
It is not just my unique issue.
So I am hoping the issue is actually investigated and fixed.

I tried to change the status to CONFIRMED, but that is apparently not available to me.
Comment 5 wickles 2016-03-10 22:57:39 UTC
I am also seeing this problem. Just updated to stable release 5.1.1, running OSX 10.11.3.
Comment 6 Buovjaga 2016-03-13 16:13:11 UTC
That is enough confirmations. Severity: minor as workaround exists.
Comment 7 Brad 2016-03-17 06:03:04 UTC
(In reply to Buovjaga from comment #6)
> That is enough confirmations. Severity: minor as workaround exists.

This workaround does not work for me (5.1.1.3, Debian Testing), either reloading doc or docx versions of files.  I am yet to open a file where the hide whitespace option is not grayed out - have tried half a dozen so far including new documents.
Comment 8 blendergeek 2016-04-22 18:35:45 UTC
Tested with Libreoffice 5.1.2.2 on Ubuntu Gnome 16.04. Bug definitely exists and the proposed workaround failed. 
I have no trouble with the daily builds though.
Comment 9 Geoff 2016-05-25 22:14:13 UTC
The "fix" -- at least in Version: 5.1.3.2 -- appears to be to remove it completely! I don't even get a greyed-out menu item in Linux
Comment 10 Dieter 2017-03-30 09:58:04 UTC
Created attachment 132277 [details]
possible to hide whitespace

Accidentaly I recognized, that there are some documents with "hide whitespace" grayed out and some where I can enable this option (see attachments). I really don't know the difference between those documents, but maybe there are some experts who can find it out.
Comment 11 Dieter 2017-03-30 09:59:21 UTC
Created attachment 132278 [details]
Hide whitespace grayed out

Im using

Version: 5.3.2.0.0+ (x64)
Build-ID: c8f0a37ff804e6329b21a4b7bfabb0667263c6e5
CPU-Threads: 4; BS-Version: Windows 6.19; UI-Render: GL; Layout-Engine: neu; 
Gebietsschema: de-DE (de_DE); Calc: grou
Comment 12 LibreTraining 2017-03-30 23:17:47 UTC
I have determined one setting in the settings.xml file which appears to cause the issue.

Using your demo files:
 - Hide whitespace grayed out.odt
 - Hide whitespace possible.odt

I set the LO advanced setting to PrettyPrint the XML files.
Then I extracted the contents of the ODT files so I could compare them.

Then I tried to make the files as similar as possible.
- deleted all custom styles
- deleted all direct formatting
- applied default style to all
- reset document properties

Then I extracted the files.
Ran the compare - found 4 XML files with differences
Replaced the XML files one-by-one to see which one fixed the issue.

When the settings.xml was copied - the issue went away.
So I then replaced each difference line-by-line.
One setting, ViewLayoutColumns, brought back the Hide Whitespace function.


From ODT file: hide whitespace grayed out.odt

File: settings.xml

<office:document-settings xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" office:version="1.2">
 <office:settings>
  <config:config-item-set config:name="ooo:view-settings">
   ...
   <config:config-item-map-indexed config:name="Views">
    <config:config-item-map-entry>
     ...
     <config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item>


From ODT file: hide possible.odt

     <config:config-item config:name="ViewLayoutColumns" config:type="short">1</config:config-item>


So when I changed ViewLayoutColumns from 0 to 1 - the issue went away!

To confirm I went back to the original hide_whitespace_grayed_out.odt file and changed just that line.
It worked.

To confirm I went back to the GS50-GettingStartedLO.odt I first mentioned above.
In the settings.xml file I changed ViewLayoutColumns to 1.
It worked.

Sooooo ... could some knowledgable developer please figure-out what is happening.
 - Why is ViewLayoutColumns getting set to 0?
 - Why does that disable Hide Whitespace?
Comment 13 LibreTraining 2017-03-30 23:18:55 UTC
Testing was done on:

Version: 5.3.1.2 (x64)
Build ID: e80a0e0fd1875e1696614d24c32df0f95f03deb2
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; Layout Engine: new; 
Locale: en-US (en_US); Calc: group
Comment 14 Mike Kaganski 2017-05-23 06:35:30 UTC
This is not a bug.

The "Hide Whitespace" option is only available for Single-page view mode (available in right part of status bar as single sheet icon, or using menu View-.Zoom->Zoom...->View Layout section). In this mode, both inter-page spaces, as well as blank parts of pages, are "skipped", thus each page height is distorted to take as little space as possible.

But for two other modes (Multi-page view, and Book view), this option is unavailable, and that's for a reason: in these modes, the option has (almost) no sense. The modes make pages to be shown in rows of several pages, and making each page to have different height doesn't allow to create a good-looking multi-page layout. Even though it would be possible to remove inter-page space, this would make it less obvious and readable (because then, any column would appear as one long page, while it's expected that user reads left page first, then right, then moves down).

The setting is kept in file, so it's natural that some files open in one mode, and some in another. Also, if a file format doesn't allow for storing the view mode information in it, then saving in this format will "workaround" the situation - but the proper way is to simply enable desired view mode by clicking the relevant icon in status bar.
Comment 15 Dieter 2017-05-23 07:09:07 UTC
I disagree with Mike, because I only used the the single-page view and detectd the different behavours in the two documents (comment 10). So my question to Mike is: What about the results, that are described in comment 12? So my suggestion is: Please compare a document with ViewLayoutColumns=1 with a document ViewLayoutColumns=0. I'm sure you will see the difference and assess this as a bug. => chanceged back to NEW
Comment 16 Mike Kaganski 2017-05-23 07:19:55 UTC
(In reply to Dieter Praas from comment #15)
> I disagree with Mike, because I only used the the single-page view and
> detectd the different behavours in the two documents (comment 10).

Tested both documents from comment 10 and comment 11. The latter (Hide whitespace grayed out.odt) opens in Multi-page view (seen both in status bar, and in Zoom dialog), and the former (Hide whitespace possible.odt) opens in Single-page view, as expected.

> So my
> question to Mike is: What about the results, that are described in comment
> 12? So my suggestion is: Please compare a document with ViewLayoutColumns=1
> with a document ViewLayoutColumns=0. I'm sure you will see the difference
> and assess this as a bug. => chanceged back to NEW

The setting is kept in ODT, as described in comment 14; the comment 12 shows which option specifically keeps the view mode setting. When ViewLayoutColumns is 0, it means that LibreOffice automatically chooses number of pages to show side-by-side (i.e., Automatic view layout = Multi-page view).

Setting it to RESOLVED NOTABUG again. Please don't change the bug's state unless you have evidence that my explanation is incorrect.
Comment 17 Dieter 2017-05-23 07:50:02 UTC
When I open, the documents, both documents are shown in the single-page view (for me it is clear, that hide whitespace option makes now sense with a multi-page view).

But now I know what has happened:
The setting of view layout in the document from comment 10 (viewlayoutcolumn=1) was single page.
The setting of view layout in the document from comment 11 (viewlayoutcolumn=0) was automatic.
So if the setting is automatic the hide whidespace option is grayed out, even if you have a single-page view.

So in summary I now would agree, that it is no bug. But I think some informations about it within the help is needed.
Comment 18 Mike Kaganski 2017-05-23 07:58:39 UTC
Yes; help topic (https://help.libreoffice.org/Writer/View) could be improved with that regard; and patches are welcome :)

To clarify a bit: when you write "When I open, the documents, both documents are shown in the single-page view", you are technically incorrect. What you see in second document is multi-page view (i.e. automatic) that happens on your monitor resolution and your zoom level to only fit one page per row. That might confuse you. Multi-page view means "as many pages per row as fits, including one". Single-page view means "Always one page per row, regardless of how much free space is available to the right".
Comment 19 Michal Suchánek 2018-11-02 01:15:01 UTC
Why can't "Hide Whitespace" switch to single page view as well?

Or is the LO UX design goal to be as asinine as possible?
Comment 20 Dieter 2018-11-02 14:02:45 UTC
(In reply to Michal Suchánek from comment #19)
> Why can't "Hide Whitespace" switch to single page view as well?

Michal, your question is not clear for me: You only have access to "Hide Whitespace" if you choose single mode.
Comment 21 Mike Kaganski 2018-11-02 14:06:31 UTC
(In reply to Dieter Praas from comment #20)
> Michal, your question is not clear for me: You only have access to "Hide
> Whitespace" if you choose single mode.

That was the whole point of that reasonable question that was worded so offending: why disable the option, when we could instead allow it and switch to single mode upon its selection.
Comment 22 Dieter 2018-11-02 14:30:15 UTC
(In reply to Mike Kaganski from comment #21)
> That was the whole point of that reasonable question that was worded so
> offending: why disable the option, when we could instead allow it and switch
> to single mode upon its selection.

Thanks for clarification. So do you think, we should change the bug to enhancement? I would support this proposal.
Comment 23 Mike Kaganski 2018-11-02 14:32:20 UTC
(In reply to Dieter Praas from comment #22)
> So do you think, we should change the bug to enhancement? I would support this proposal.

Without actually looking to the code, I'd guess it shouldn't be too difficult.
Comment 24 Dieter 2018-11-02 15:03:27 UTC
I changed the bug summary and I changed importance to enhancement.
Comment 25 Michal Suchánek 2018-11-03 12:06:38 UTC Comment hidden (obsolete)
Comment 26 Mike Kaganski 2018-11-03 12:17:00 UTC Comment hidden (obsolete)
Comment 27 Michal Suchánek 2018-11-03 12:44:32 UTC Comment hidden (obsolete)
Comment 28 LibreTraining 2018-11-05 03:50:04 UTC Comment hidden (obsolete)
Comment 29 Dieter 2020-05-03 10:55:28 UTC
After resolving bug 124686 the situation is as followed:
- Menu entry is "Show Whtespace" and it is enabled by default"
- Multi-page view: I can disable "Show Whitespace", but nothing happens
- Book view: I can disable "Show Whitespace", but nothing happens

Expected result (in line with bug summary):
View layout should change to single page, if user disables "Show Whitespace" in Multi-page View or Book view