Bug 133951 - specific document: left-right following page styles (circular dependency) don't export nicely to DOCX - excessive page styles/breaks.
Summary: specific document: left-right following page styles (circular dependency) don...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: Wiki_request
Keywords: filter:docx
Depends on:
Blocks: DOCX-Page
  Show dependency treegraph
 
Reported: 2020-06-13 08:04 UTC by Telesto
Modified: 2021-10-14 13:53 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
work fine for me (44.15 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-06-15 15:23 UTC, Xisco Faulí
Details
Screenshot ODT (149.24 KB, image/png)
2020-06-15 20:42 UTC, Telesto
Details
Screenshot DOCX (LibreOffice (149.20 KB, image/png)
2020-06-15 20:44 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-06-13 08:04:10 UTC
Description:
Additional page break inserted on export to DOCX

Steps to Reproduce:
1. Open attachment 161941 [details] (bug 133930)
2. Export to DOCX
3. Notice a page break before page 6

Actual Results:
Page break on pag 6

Expected Results:
No page break


Reproducible: Always


User Profile Reset: No



Additional Info:
Found in
Version: 7.1.0.0.alpha0+ (x86)
Build ID: 26483950760f0aac7bc45e93db4127f66a98fdc6
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

page breaks on every page with
Versie: 4.4.7.2 
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: nl_NL
Comment 1 Xisco Faulí 2020-06-15 15:23:50 UTC
Created attachment 162012 [details]
work fine for me

I can't reproduce it in

Version: 7.1.0.0.alpha0+
Build ID: 37d5cccceb9f02d60de326f5b1fc5098dc004739
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 2 Xisco Faulí 2020-06-15 15:24:53 UTC
After RT, do you open the file in LibreOffice or MSO ?
Comment 3 Telesto 2020-06-15 20:42:59 UTC
Created attachment 162023 [details]
Screenshot ODT
Comment 4 Telesto 2020-06-15 20:44:31 UTC
Created attachment 162024 [details]
Screenshot DOCX (LibreOffice

Page 6 and 8 are getting a page break (using LibO)
Comment 5 Dieter 2020-06-18 06:33:46 UTC
No additional page in docx in

Version: 7.0.0.0.beta1 (x64)
Build ID: 94f789cbb33335b4a511c319542c7bdc31ff3b3c
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

but 10 pages in Word 2016 (text from page 7 to 9 is now on page 7 to 10)

Because this different to the behaviour you describe, Telesto, I heven't changed status of the bug.
Comment 6 Xisco Faulí 2020-07-27 11:30:43 UTC
Dear Telesto,
Could you please try to reproduce it with a master build from http://dev-builds.libreoffice.org/daily/master/ ?
You can install it alongside the standard version.
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the master build
Comment 7 Telesto 2020-07-27 13:03:27 UTC
(In reply to Xisco Faulí from comment #1)
> Created attachment 162012 [details]
> work fine for me
> 
> I can't reproduce it in
> 
> Version: 7.1.0.0.alpha0+
> Build ID: 37d5cccceb9f02d60de326f5b1fc5098dc004739
> CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
> Locale: en-US (en_US.UTF-8); UI: en-US
> Calc: threaded

attachment 162012 [details] has the flaw. There is a page break between page 5 and page 6, not seen in the ODT

No change
Version: 7.1.0.0.alpha0+ (x64)
Build ID: <buildversion>
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

-> Build of today
Comment 8 Telesto 2020-07-27 13:08:21 UTC
Page breaks on every page until
Version: 5.4.0.2
Build ID: 2b906d450a44f2bbe506dcd22c51b3fa11dc65fd
CPU threads: 4; OS: Windows 6.2; UI render: default; 
Locale: nl-NL (nl_NL); Calc: CL

After 6.0 the situation improved with a page break between 5/6 remaining
Comment 9 Telesto 2020-07-27 13:10:43 UTC
(In reply to Telesto from comment #8)
> Page breaks on every page until
> Version: 5.4.0.2
> Build ID: 2b906d450a44f2bbe506dcd22c51b3fa11dc65fd
> CPU threads: 4; OS: Windows 6.2; UI render: default; 
> Locale: nl-NL (nl_NL); Calc: CL
> 
> After 6.0 the situation improved with a page break between 5/6 remaining

Sorry and between 7/8
Comment 10 Telesto 2020-07-27 20:07:12 UTC
@Justin
If there is rainy day and you're in the mood to look at spurious page breaks on export
Comment 11 Justin L 2020-07-28 07:05:10 UTC
Yeah. This requires serious emulation because MS formats don't have a concept such as "left page style follows a right page style.".  But this one ought to fall under IsPlausableSingleWordSection, and thus define both right and left page in a single style.

That will be fairly hard to do. The exporter will need to look specifically for a circular page-style relationship, keep track of those two names, and define a single section that applies while those two names are uninterrupted.

Currently, every other page is going to have a pagebreak-with-style -> NEW.

I notice that the even pages are missing the footer content - which is the most concerning to me.
Comment 12 Justin L 2020-07-28 12:55:18 UTC
(In reply to Justin L from comment #11)
> I notice that the even pages are missing the footer content - which is the
> most concerning to me.
Reported as bug 135216
Comment 13 Justin L 2020-07-29 19:19:02 UTC
(In reply to Justin L from comment #11)
> Yeah. This requires serious emulation
Confirmed.

> This one ought to fall under IsPlausableSingleWordSection
Well, at least in test test files I made, IsPlausable... returned false. And I think this L/R style merging will need to pre-empt the first/follow style merging.

> That will be fairly hard to do. The exporter will need to look specifically
> for a circular page-style relationship
The exporter already identifies the circular relationship in sw/source/filter/ww8/wrtw8sty.cxx's SectionProperties().

Yup - hard to do - partly because all of these styles are "const". Too hard for me.
Comment 14 Telesto 2020-07-29 19:42:53 UTC
(In reply to Justin L from comment #13)
> (In reply to Justin L from comment #11)
> > Yeah. This requires serious emulation
> Confirmed.
> 
> > This one ought to fall under IsPlausableSingleWordSection
> Well, at least in test test files I made, IsPlausable... returned false. And
> I think this L/R style merging will need to pre-empt the first/follow style
> merging.
> 
> > That will be fairly hard to do. The exporter will need to look specifically
> > for a circular page-style relationship
> The exporter already identifies the circular relationship in
> sw/source/filter/ww8/wrtw8sty.cxx's SectionProperties().
> 
> Yup - hard to do - partly because all of these styles are "const". Too hard
> for me.

Thanks for looking into it. Some bugs look so 'simple' at first sight from an non DEV perspective :-). Every time write the stuff out, I get scared about they complexity of all of this
Comment 15 Justin L 2020-07-30 05:09:17 UTC
A nice complicated-but-minimal version of this bug is attachment 163674 [details]. A similar-but-different cleanroom example will be ooxmlexport15's tdf135216_evenOddFooter.odt
Comment 16 Justin L 2020-08-04 09:02:49 UTC
There is a simple solution to this. As a user, don't use different LeftPage/RightPage page styles.  Instead, use a single page style with different left/right headers.
Comment 17 Telesto 2020-08-04 09:51:47 UTC
(In reply to Justin L from comment #16)
> There is a simple solution to this. As a user, don't use different
> LeftPage/RightPage page styles.  Instead, use a single page style with
> different left/right headers.

I'm likely not the person who uses Left/Right page styles (or I have never done that). This is simply a re-cycled bug doc :-)

Is there a wikipage with developer DOCX comp-ability tips. I have seen more documents with left/right page styles. Posting wisdom/insights here is somewhat pointless, I fear.
Comment 18 Justin L 2021-10-14 13:53:53 UTC
The issue with jjjgg.odt (attachment 161941 [details]) is that it fails plausableSingleWordSection b/c:

                HdFtDistanceGlue aOne(rTitleFormat.GetAttrSet());
                HdFtDistanceGlue aTwo(rFollowFormat.GetAttrSet());
                //e.g. #i14509#
                if (!aOne.StrictEqualTopBottom(aTwo))
                    bPlausableSingleWordSection = false;

But if you make a new document from scratch and do not monkey around with changing the sizes of header stuff, then right/left get merged into a single style on import.

I am going to mark this as NOTABUG, because (even though the human eye can't tell), the Left and Right style have different internal settings and thus cannot be considered equivalent.