Bug 94852 - Fileopen: docx with section breaks not displaying correctly text in table
Summary: Fileopen: docx with section breaks not displaying correctly text in table
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: Other All
: high major
Assignee: Justin L
URL:
Whiteboard:
Keywords: bibisected, filter:docx, regression
Depends on:
Blocks: DOCX-Tables
  Show dependency treegraph
 
Reported: 2015-10-07 10:23 UTC by ivicask
Modified: 2017-05-18 18:08 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (634.62 KB, application/zip)
2015-10-07 10:23 UTC, ivicask
Details
Example compared MSO-LO (124.39 KB, image/jpeg)
2015-10-08 16:56 UTC, Timur
Details
Example compared MSO-LO (142.94 KB, image/jpeg)
2015-10-08 17:10 UTC, Timur
Details
log of debug statements leading up to the exception. (24.57 KB, text/plain)
2016-07-01 13:38 UTC, Justin L
Details
copy of original WITH an empty paragraph before the first table (630.09 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2016-07-02 06:32 UTC, Justin L
Details
Example compared LO improved (120.62 KB, image/jpeg)
2016-12-22 17:38 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ivicask 2015-10-07 10:23:59 UTC
Created attachment 119384 [details]
Example file

This document works just fine inside Office, but inside libreoffice fields are empty, can you please check and fix this.
Comment 1 Cor Nouws 2015-10-07 12:17:52 UTC
Hi Ivica,

Thanks for reporting and the document.
Before even being able to look at it.. could you please provide a screen shot or PDF that makes crisp & clear what is missing exactly?

Cheers - Cor
Comment 2 Timur 2015-10-08 16:56:07 UTC
Created attachment 119428 [details]
Example compared MSO-LO
Comment 3 ivicask 2015-10-08 17:08:00 UTC
Comment on attachment 119428 [details]
Example compared MSO-LO

Sorry, was busy so didint had to do it, yes, as he showed thats how its supposed to look, also the document opens and looks just fine in version 4.2.4.2, in everything above that its broken.
Comment 4 Timur 2015-10-08 17:10:14 UTC
Created attachment 119429 [details]
Example compared MSO-LO

Table itself was fine from OO to LO 3.4. Then, LO 3.5 is a mess. Probably Bug 64372, section breaks problem. 
Then, later, before 4.3, upper part was wrong, and after 4.3 up to 5.1+, lower part is wrong. 
Can be a regression for a table, or maybe just a duplicate of Bug 64372.
Comment 5 Justin L 2016-07-01 13:38:47 UTC Comment hidden (obsolete)
Comment 6 Justin L 2016-07-02 06:32:57 UTC
Created attachment 126030 [details]
copy of original WITH an empty paragraph before the first table

Please ignore everything in Comment 5. The missing text bug was hidden by the bug fixed by Vinaya (bug 39056).

Using this replacement document, bibisecting to the range of "Thu Nov 29 17:35:25 2012  thru Nov 28" suggests the likely first bad commit by author Miklos Vajna <vmiklos@suse.cz> 2012-11-28 20:33:54 (GMT) commit 232ad2f2588beff50cb5c1f3b689c581ba317583
API CHANGE: add a "position" parameter to XParagraph/TextPortionAppend methods

Setting version to 4.0.0.3.

A work-around in this case is to use MSOffice to remove the first table.  Then the fields will not be empty.
Comment 7 Cor Nouws 2016-07-04 14:57:05 UTC
(In reply to Justin L from comment #6)

> .... The missing text bug was hidden by
> the bug fixed by Vinaya (bug 39056).

Nice that the relevant commit also has a test included, so that fixing of this issue will be double checked.

> A work-around in this case is to use MSOffice to remove the first table. 
> Then the fields will not be empty.

That sounds as an interesting approach :) but not realistic for most LibreOffice users I guess ;)
Comment 8 Justin L 2016-08-04 14:30:20 UTC
I think this bug will require someone like Miklos Vajna to fix it because it dives into some pretty low level stuff.

Upon loading the document, many exceptions occur - for every paragraph after bRemove (DomainMapper.cxx) RemoveLastParagraph at Node69.  After bRemove=true, every call to gotoRange returns an exception because the internal checking mechanism is messed up - findSttNode doesn't return the same results.

SwXText::insertTextPortion at sw/source/core/unocore/unotext.cxx
	    SolarMutexGuard aGuard;
	    if(!IsValid())
	    uno::Reference< text::XTextRange > xRet;
	    const uno::Reference< text::XTextCursor > xTextCursor = CreateCursor();
	    xTextCursor->gotoRange(xInsertPosition, false);
warn:legacy.osl:14643:1:writerfilter/source/dmapper/DomainMapper_Impl.cxx:13xx: Exception in DomainMapper_Impl::appendTextPortion

warn:DEBUG:26870:1:sw/source/core/unocore/unoobj.cxx:1148: pOwnStartNode[Index:41][TableNode:0x25146c0] pTmp[Index:36][TableNode:0]
            if ( /*avoid problem: false &&*/ pOwnStartNode != pTmp )
                throw uno::RuntimeException();
Comment 9 Timur 2016-12-22 17:38:53 UTC
Created attachment 129882 [details]
Example compared LO improved

I have to ask what is this bug about? 
"Opel Sans Condensed" was not previewed from 4.3 and now is back.. somewhat. 
Due to Bug 61134 I don't see what's the substitute font?
But the text is back with LO 5.4+.
Comment 10 Justin L 2016-12-24 13:37:52 UTC
Not sure which one, but fixed sometime between
Date:   Thu Dec 22 05:57:56 2016 +0100
source-hash-2a4cd80abcf9e515d1ce3b3a944b573bdc42bff2
           and
Date:   Wed Dec 21 06:03:26 2016 +0100
source-hash-36750bc977b3210b23b7822abd395b30a78af6f5
Comment 11 Justin L 2016-12-24 13:51:02 UTC
imagine that- it was my commit for bug 97417:
committer Justin Luth <justin_luth@sil.org> 2016-12-21 04:14:06 (GMT)
commit 893698741a78e56d74b87caff24f67742ddd892b
    related to tdf#97417: fix unit test page count