Bug 57881 - FORMATTING Page style Default has Page layout 'Mirrored' as default - also for existing documents
Summary: FORMATTING Page style Default has Page layout 'Mirrored' as default - also fo...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.0.alpha1
Hardware: Other All
: medium major
Assignee: Miklos Vajna
URL:
Whiteboard: target:4.1.0 target:4.0.0.1
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-12-04 15:11 UTC by Cor Nouws
Modified: 2012-12-20 08:19 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
patch (2.18 KB, text/plain)
2012-12-19 09:44 UTC, Werner
Details
patch (1.13 KB, text/plain)
2012-12-19 13:38 UTC, Werner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cor Nouws 2012-12-04 15:11:56 UTC
New Writer document
Format > Page
Tab Page > Page layout set to 'Mirrored' 

Was Right and Left previously for new documents ...

Plus, that also opening existing documents now show 'Mirrored' as Page layout !
Comment 1 Miklos Vajna 2012-12-18 20:46:08 UTC
Assign to me, this was introduced with my fa0f42bafbf24e9141ddee728b160b5ab47077f2.
Comment 2 Werner 2012-12-19 09:44:51 UTC
Created attachment 71792 [details]
patch

The constants in sw/inc/pagedesc.hxx (namespace nsUseOnPage) were changed (PD_FIRST added, others changed) and are different from svx/inc/svx/pageitem.hxx (enum SvxPageUsage). 
SvxPageUsage is used in the page format dialog with parameters choosen from nsUseOnPage...
Patch changes namespace nsUseOnPage back to the values from SvxPageUsage and removes PD_FIRST. The changes in GetFirstFmt() are necessary for separate headers and/or footers on the first page (PD_FIRST is never set in the old code).
Comment 3 Miklos Vajna 2012-12-19 10:54:07 UTC
Hi Werner,

Sounds great, thanks for your patch! I'll give it a bit more testing -- in the meantime, could you send a license statement to libreoffice@lists.freedesktop.org, please? Just a normal mail with a body of

"All of my past & future contributions to LibreOffice may be licensed 
under the MPL/LGPLv3+ dual license"

That is necessary before I push your patch.

Thanks,

Miklos
Comment 4 Werner 2012-12-19 11:16:34 UTC
Hi Miklos,

i sent a license statement http://lists.freedesktop.org/archives/libreoffice/2012-December/042823.html.

Werner
Comment 5 Werner 2012-12-19 13:38:55 UTC
Created attachment 71804 [details]
patch

This small bug is the cause for the selection of page style 'mirrored' as default for undef. page style instead of 'right and left'.
Comment 6 Miklos Vajna 2012-12-19 20:14:16 UTC
(In reply to comment #2)
> Created attachment 71792 [details]
> patch
> 
> The constants in sw/inc/pagedesc.hxx (namespace nsUseOnPage) were changed
> (PD_FIRST added, others changed) and are different from
> svx/inc/svx/pageitem.hxx (enum SvxPageUsage). 
> SvxPageUsage is used in the page format dialog with parameters choosen from
> nsUseOnPage...
> Patch changes namespace nsUseOnPage back to the values from SvxPageUsage and
> removes PD_FIRST. The changes in GetFirstFmt() are necessary for separate
> headers and/or footers on the first page (PD_FIRST is never set in the old
> code).

Sadly this breaks the test described at https://bugs.freedesktop.org/show_bug.cgi?id=58376#c14.
Comment 7 Not Assigned 2012-12-19 21:49:10 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

fdo#57881 sw: make UseOnPage independent from SvxPageUsage



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 8 Not Assigned 2012-12-20 08:14:50 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5c3450498b7f818fcff70d8daf1aa0d25f60c663&g=libreoffice-4-0

fdo#57881 sw: make UseOnPage independent from SvxPageUsage


It will be available in LibreOffice 4.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 9 Miklos Vajna 2012-12-20 08:16:12 UTC
Fixed in master and -4-0, marking as resolved.
Comment 10 Miklos Vajna 2012-12-20 08:19:07 UTC
Hi Werner,

So finally I didn't take your patch, but still added your license statement to https://wiki.documentfoundation.org/Development/Developers#First_name_from_G_to_N, so next time you send a patch, you no longer have to care about those details. :)

Thanks,

Miklos