Bug 103781 - FILEOPEN: Extra page added on top of specific docx file, forcing table to next page
Summary: FILEOPEN: Extra page added on top of specific docx file, forcing table to nex...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: interoperabillity
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks:
 
Reported: 2016-11-08 11:29 UTC by Cor Nouws
Modified: 2016-12-08 13:46 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cor Nouws 2016-11-08 11:29:39 UTC
Open attachment 119587 [details] (from bug 95033)
Notice that there is a nearly empty page and that the table is forced to page 2.

In Word, and in version 4.2.7, the table is on page 1
Comment 1 Cor Nouws 2016-11-08 11:30:54 UTC
OK in 4.2.8.2, wrong in 4.3.7.2
Comment 2 Xisco Faulí 2016-11-12 12:28:19 UTC
Hello Cor,
Just for the record, a bug shouldn't be confirmed by the reporter at least the problematic commit has been identified, Someone else should confirm the bug before moving it to NEW.

Confirmed in

Version: 5.3.0.0.alpha1+
Build ID: 60da087d7e182b58b63d4123c9bd96c82376d450
CPU Threads: 4; OS Version: Linux 4.2; UI Render: default; VCL: gtk3; Layout Engine: new; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 3 Xisco Faulí 2016-11-12 12:36:16 UTC
Regression introduced by

author	Vinaya Mandke <vinaya.mandke@synerzip.com>	2014-04-18 10:20:51 (GMT)
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2014-04-24 10:57:51 (GMT)
commit 2e8aad6d45c53d554ccaf26de998ede708cfc289 (patch)
tree 544798fb9fd2268356056ed12c5841bfd3b2616f
parent cf058da1e5664bc8c30a5777e2c1dbf059a6304f (diff)

fdo#39056 fdo#75431 Section Properties if section starts with table
Section properties are not imported if the section starts with a table for DOCX,
and also for a few RTF files with combination of tables and section breaks.
SwXBodyText::createTextCursorByRange is not able to find the start of section and hence
section properties are not applied.

As a workaround added an empty paragraph at the beginning of every section
which has the the first element as a table. And then removed it when the
section ends ( DomainMapper::lcl_endSectionGroup is called).

Also handled to add the paragraph earlier, if there is a bookmark
so that the bookmark is not attached to the dummy paragraph.

Adding Cc: to Vinaya Mandke
Comment 4 Justin L 2016-12-06 17:00:07 UTC
Tested in Word 2003, 2007, and 2013.  All of them show the (except for the period) empty page1 and the table starts on page2.

So, LibreOffice is currently handling this properly.
Comment 5 Cor Nouws 2016-12-07 12:10:36 UTC
sorry, indeed the same in Word. Must have been sleeping or..