Bug 77855 - FILEOPEN: Calligra ODF - Tables shown crushed flat as style:rel-width is "0%"
Summary: FILEOPEN: Calligra ODF - Tables shown crushed flat as style:rel-width is "0%"
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.1.0
Keywords: filter:odt
Depends on:
Blocks: Writer-Tables
  Show dependency treegraph
 
Reported: 2014-04-24 03:22 UTC by Yousuf Philips (jay) (retired)
Modified: 2020-09-03 13:34 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
LibO 4.2's display of the table (16.70 KB, image/jpeg)
2014-04-24 03:22 UTC, Yousuf Philips (jay) (retired)
Details
how the table looks after reopening in Calligra Words (72.19 KB, image/jpeg)
2014-04-24 03:24 UTC, Yousuf Philips (jay) (retired)
Details
odt created by calligra words (80.62 KB, application/vnd.oasis.opendocument.text)
2014-04-26 14:39 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-04-24 03:22:10 UTC
Created attachment 97850 [details]
LibO 4.2's display of the table

I downloaded the .docx file found at < http://download.microsoft.com/documents/rus/microsoft4you/How_to_license_the_operating_system_Windows_8_new.docx > and opened it in Calligra Words 2.8 and then saved it as a odt file. Then i opened the saved file in LibO and on page 7, the table is crushed flat with 1 or 2 characters per line. Tested in LibO 3.6+.
Comment 1 Yousuf Philips (jay) (retired) 2014-04-24 03:24:44 UTC
Created attachment 97851 [details]
how the table looks after reopening in Calligra Words
Comment 2 Robinson Tryon (qubit) 2014-04-24 18:51:40 UTC
Comment on attachment 97850 [details]
LibO 4.2's display of the table

Fix mimetype
Comment 3 Jorendc 2014-04-26 14:04:13 UTC
@Jay: you mind attaching the created ODF using Calligra Words 2.8?

Thanks!
Joren
Comment 4 Yousuf Philips (jay) (retired) 2014-04-26 14:39:51 UTC
Created attachment 98036 [details]
odt created by calligra words
Comment 5 Jorendc 2014-04-26 14:41:44 UTC
Reproducible, tested using Windows 8.1 with LibreOffice Version: 4.3.0.0.alpha1+
Build ID: f4a6837025a293312cbc43b9c527851362f11030
TinderBox: Win-x86@47-TDF, Branch:MASTER, Time: 2014-04-26_09:21:18

Kind regards,
Joren
Comment 6 Buovjaga 2014-10-06 05:28:29 UTC
Repro on 4.3.2.2 Win 7, but on dev build the odt doesn't open and gives:
Read-Error.
Error reading file.

Dev build used:
Version: 4.4.0.0.alpha0+
Build ID: 9177329a425cf70b515d1f266132838894fe54c6
TinderBox: Win-x86@39, Branch:master, Time: 2014-10-06_01:02:02
Comment 7 Buovjaga 2015-01-07 10:21:45 UTC
Crushing gone -> WFM.

Win 7 64-bit 4.3.5.2 and Version: 4.5.0.0.alpha0+
Build ID: 8c7f6830e767897d3a0e88f75fc8d7ef7fca95dc
TinderBox: Win-x86@42, Branch:master, Time: 2015-01-06_00:47:25
Comment 8 Yousuf Philips (jay) (retired) 2015-01-07 12:03:19 UTC
Still crushed flat for me with attachment 98036 [details] on pages 7 to the end of the document.

Version: 4.5.0.0.alpha0+
Build ID: 39ac529d141dcd4de534eddbcc6c07bc49367b90
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:master, Time: 2015-01-04_00:40:43
Comment 9 Buovjaga 2015-01-07 12:18:12 UTC
Apologies, misread repro steps.
Comment 10 Robinson Tryon (qubit) 2015-12-10 01:38:20 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2017-01-03 19:40:36 UTC Comment hidden (obsolete)
Comment 12 Yousuf Philips (jay) (retired) 2017-09-27 22:00:40 UTC
still repo.

Version: 6.0.0.0.alpha0+
Build ID: 892c719fffa06de4c7aeab497326cad7bae9e5c6
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-09-27_03:02:09
Locale: en-US (en_US.UTF-8); Calc: group

So looking in the XML, Calligra outputted the table column style like this

<style:style style:name="Table1" style:family="table">
 <style:table-properties fo:keep-with-next="auto" fo:margin="0.000000000000000pt" style:may-break-between-rows="false" style:rel-width="0%" style:writing-mode="page" table:align="left" table:border-model="collapsing"/>
</style:style>

and i'm guess that 'style:rel-width="0%"' is causing the problem, as opening one of the tables in LO shows width = 1% and relative checked. LO outputs it like this

<style:style style:name="Table2" style:family="table">
  <style:table-properties style:width="17.461cm" fo:margin-left="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left" style:writing-mode="lr-tb" />
</style:style>

@Regina, @Michael: your thoughts?
Comment 13 Regina Henschel 2017-09-27 22:59:56 UTC
Yes, style:rel-width="0%" is the problem. Replace it with style:rel-width="100%" and the table will be shown correctly in LibreOffice.

The specification says [part 1,20.332.2 <style:table-properties>]
"The style:rel-width attribute specifies the width of a table relative to the width of the area that the table is in."
and 0% from anything is 0, which means not rendering the table.

I suggest: Not our bug.
Comment 14 Yousuf Philips (jay) (retired) 2017-09-28 17:13:34 UTC
(In reply to Regina Henschel from comment #13)
> and 0% from anything is 0, which means not rendering the table.

Well LO didnt even respect the 0% and changed it to 1%, so maybe we could say that 0% as an invalid percentage value which should be ignored if set.

> I suggest: Not our bug.

If Michael agrees, lets close it.
Comment 15 Michael Stahl (allotropia) 2018-03-11 17:44:06 UTC
agree we interpret 0% correctly
Comment 16 Commit Notification 2020-09-03 13:34:51 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/12a7a3d57d3dcf222b13fa9143c37736f8ea3d0b

Fix crashtest fdo77855.odt

It will be available in 7.1.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.