Bug Hunting Session
Bug 88001 - Default document view, force single page rather than automatic
Summary: Default document view, force single page rather than automatic
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: ux-advise (show other bugs)
Version:
(earliest affected)
4.5.0.0.alpha0+ Master
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:4.5.0
Keywords:
Depends on:
Blocks: Start-Center Statusbar
  Show dependency treegraph
 
Reported: 2015-01-03 23:02 UTC by Yousuf Philips (jay) (retired)
Modified: 2015-05-08 15:28 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
how it looks on my desktop (76.59 KB, image/png)
2015-01-03 23:11 UTC, Yousuf Philips (jay) (retired)
Details
proposed patch to change default view in Writer to single page, and relable automatic views to be multi page (2.62 KB, text/plain)
2015-01-21 15:09 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2015-01-03 23:02:16 UTC
When Writer is loaded for the first time, it is loaded in two-page view and this has a bad appearance when loaded on a high resolution screen, as there would be alot of blank space on the right side, as the page isnt centered in the view. So i'd like to recommend that this be changed to single-page view.

I noticed this twice when opening Writer 4.3 in Kubuntu 15.04 and Ubuntu Gnome 14.10 from a live USB on a 1920x1080 screen.
Comment 1 Yousuf Philips (jay) (retired) 2015-01-03 23:11:00 UTC
Created attachment 111703 [details]
how it looks on my desktop
Comment 2 V Stuart Foote 2015-01-04 02:49:40 UTC
@Jay, *,

No, that is not correct. This is wrapped up in how to handle window size attributes per module including Start Center of bug 75644, resolving that should improve this.

As is, with an empty profile, on the initial launch of Writer if its window is maximized, the document mode will be two-page. But if module window is sized anything less for Writer it will open in single-page mode.

Unfortunately, Start Center or Writer open maximized when under OS and DE control (the ,,,5 value and settings).  And then Writer will open in two-page mode--that happens in Linux but not Windows. Not sure about OS X builds.

At this point, absent work on 75644 The user can choose to either open in a maximized Start Center or Writer frame; or to a set a size of the Start Center or Writer frame.

But once opened, and with window size settings recorded into the registry ( registrymodifications.xcu ) it will honor either the single-page mode or two-page mode for subsequent launches.
Comment 3 Yousuf Philips (jay) (retired) 2015-01-04 11:59:58 UTC
Hi Stuart,

(In reply to V Stuart Foote from comment #2)
> As is, with an empty profile, on the initial launch of Writer if its window
> is maximized, the document mode will be two-page. But if module window is
> sized anything less for Writer it will open in single-page mode.

So is there no means of forcing Writer to always load in single-page mode no matter what the window size is?
Comment 4 V Stuart Foote 2015-01-04 17:03:31 UTC
@Jay, *,

Looking at the source. The default setting is not for two-page, rather it is to Automatic--such that at a given zoom level, when the frame size width can accommodate two pages at that zoom, the page is repositioned for showing of two.

The other setting is for a fixed single-page view.

UI is via the three ViewLayout buttons on the Status bar, and is recorded into the LO registry in Writer Layout ViewLayout stanza for the Columns property.

<item oor:path="/org.openoffice.Office.Writer/Layout/ViewLayout"><prop oor:name="Columns" oor:op="fuse"><value>1</value></prop></item>

Columns:

0 - automatic (statusbar two-page view button is set, and drawing layer will shift when frame is large enough to hold two pages at current zoom level)
1 - single-page view button is set on status bar
2 - if BookMode property is set on status bar and is true in registry
3+ - none, but positions page view to upper left with minimum padding

The "Columms" value can also be set from the Tools -> Options -> Advanced: Expert Config panel

All that said, it should be possible to add a check box to the Tools -> LO Writer -> View to Always force Single-page view (set Columns to 1) and override default of automatic.  Not sure we would want to hard code change from current default to Automatic. Again, doing something with bug 75644 should help with this as well.

-=code refs=-
The Statusbar control (single, auto, book) are here:
http://opengrok.libreoffice.org/xref/core/sw/source/uibase/utlui/viewlayoutctrl.cxx#42
The registry hint is here: 
http://opengrok.libreoffice.org/xref/core/officecfg/registry/schema/org/openoffice/Office/Writer.xcs#1582
Comment 5 V Stuart Foote 2015-01-21 15:09:48 UTC
Created attachment 112604 [details]
proposed patch to change default view in Writer to single page, and relable automatic views to be multi page

As discussed Design / UX meeting 2015-01-14

@Kendy, please have a close look and commit. I think I got all the pieces, but can't test to be sure.
Comment 6 Yousuf Philips (jay) (retired) 2015-01-21 16:41:31 UTC
@Stuart: Looked over the tooltip part and think that 'Multiple' is more suitable as it would be better for translations as Mirek mentioned in bug 80838 comment 6. Also think it should be a separate patch as it isnt directly related to this bug report. :D
Comment 7 V Stuart Foote 2015-01-21 17:53:46 UTC
(In reply to Jay Philips from comment #6)
> @Stuart: Looked over the tooltip part and think that 'Multiple' is more
> suitable as it would be better for translations as Mirek mentioned in bug
> 80838 comment 6. Also think it should be a separate patch as it isnt
> directly related to this bug report. :D

Sure, using "Multiple" Sounds good, but that is just for the tooltip. The VIEW_LAYOUT_MULTI seems fine. And I wouldn't gripe about two commits as I've no gerrit access and someone else is inputting the patch...
Comment 8 V Stuart Foote 2015-01-21 17:56:02 UTC
s/VIEW_LAYOUT_MULTI/STR_VIEWLAYOUT_MULTI/
Comment 9 Yousuf Philips (jay) (retired) 2015-02-03 16:36:35 UTC
@Stuart: Kendy asked that you push your patch into gerrit. Is that something you are able to do.
Comment 10 V Stuart Foote 2015-02-03 17:14:01 UTC
Sorry, no credentials, I thought I'd mentioned that.
Comment 11 Yousuf Philips (jay) (retired) 2015-02-04 00:13:34 UTC
(In reply to V Stuart Foote from comment #10)
> Sorry, no credentials, I thought I'd mentioned that.

@Stuart: not sure what you mean by no credentials. You need to setup the git repo, and connect it with gerrit (https://wiki.documentfoundation.org/Development/gerrit) and then send the commit to gerrit.
Comment 12 V Stuart Foote 2015-03-12 04:30:28 UTC
(In reply to V Stuart Foote from comment #5)
> Created attachment 112604 [details]
> proposed patch to change default view in Writer to single page, and relable
> automatic views to be multi page
> 
> As discussed Design / UX meeting 2015-01-14
> 
> @Kendy, please have a close look and commit. I think I got all the pieces,
> but can't test to be sure.

OK, up for review...

https://gerrit.libreoffice.org/#/c/14835/

Be gentle Kendy, I hope I didn't screw the steps up too bad ;D
Comment 13 Commit Notification 2015-03-23 16:58:34 UTC
vsfoote committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=603c8845728cb96908388ab26db934735825bf10

tdf#88001 -- Default document view, force single page rather than automatic

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 14 Jan Holesovsky 2015-03-23 17:06:16 UTC
Setting no fixed now - thanks! :-)