Download it now!
Bug 124470 - Table settings and borders are not saved if checked "Embed fonts" and "Only embed fonts that are used"
Summary: Table settings and borders are not saved if checked "Embed fonts" and "Only e...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.2.2 release
Hardware: All All
: highest major
Assignee: Mike Kaganski
URL:
Whiteboard: target:7.1.0 target:7.0.1 target:6.4.7
Keywords: bibisected, bisected, regression
: 126307 127036 127332 130292 130432 131122 131249 132273 133113 137338 (view as bug list)
Depends on:
Blocks: Writer-Table-Properties-Dialog
  Show dependency treegraph
 
Reported: 2019-04-01 14:03 UTC by Mike Kaganski
Modified: 2020-10-22 07:16 UTC (History)
14 users (show)

See Also:
Crash report or crash signature:


Attachments
Documents with a table which properties are not saved (2.56 MB, application/vnd.oasis.opendocument.text)
2019-04-01 14:03 UTC, Mike Kaganski
Details
Documents with a table which properties are not saved (10.27 KB, application/vnd.oasis.opendocument.text)
2019-04-01 18:23 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2019-04-01 14:03:13 UTC
Created attachment 150452 [details]
Documents with a table which properties are not saved

1. Open the attached document;
2. in the table (it's the only one table in the document), go to Table->Properties;
3. on Text Flow tab, check Break->Page->Before;
4. on Columns tab, change first column width from 8.5 to 3.5 cm;
5. on Background tab, set a color to the cell.
6 Confirm, save and reopen.

The table properties are reset to no break before, equal column widths, no background.
Comment 1 Mike Kaganski 2019-04-01 14:03:28 UTC
Tested with Version: 6.2.2.2 (x64)
Build ID: 2b840030fec2aae0fd2658d8d4f9548af4e3518d
CPU threads: 12; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: CL
Comment 2 Mike Kaganski 2019-04-01 18:23:32 UTC
Created attachment 150467 [details]
Documents with a table which properties are not saved

The file with fonts embedding turned off to minimize sample. The problem is still there.
Comment 3 Mike Kaganski 2019-04-01 18:55:17 UTC
Regression after: https://git.libreoffice.org/core/+/3bc3ddc11fd94877d9c5d2b8313ab53150818236

> author	Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>	Mon Jul 09 00:47:07 2018 +0200
> committer	Tomaž Vajngerl <quikee@gmail.com>	Tue Jul 10 16:15:12 2018 +0200
> 
> tdf#65353 filter fonts when embedding (unused, font script)

To reproduce from scratch:
1. Create an empty text document;
2. Add a 2-cell 1-row table;
3. Decrease width of first cell;
4. Save and reopen
=> everything saved OK
5. Go to File->Properties, and on Font tab, check "Embed fonts in the document"; make sure "Only embed fonts that are used in the documents" is unchecked
6. Save and reopen
=> everything saved OK
7. Go to File->Properties, and on Font tab, check "Only embed fonts that are used in the documents"
8. Save and reopen
=> The problem appears: the cells have same widths; and original table border is lost.
Comment 4 Xisco Faulí 2019-05-02 09:46:15 UTC
Reproduced in

Version: 6.3.0.0.alpha0+
Build ID: f420aa3e027e04e49b7031ebf0613debcaab2ea0
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 5 Timur 2020-03-17 13:20:52 UTC
*** Bug 127332 has been marked as a duplicate of this bug. ***
Comment 6 Timur 2020-03-17 13:24:15 UTC
*** Bug 126307 has been marked as a duplicate of this bug. ***
Comment 7 Timur 2020-03-17 13:44:44 UTC
*** Bug 131249 has been marked as a duplicate of this bug. ***
Comment 8 Impishwhite 2020-04-30 08:37:00 UTC
I encoutered the same bug but I didn't find it in bugzilla, so I reported a new one.
It is the "Bug 132273", how can I put it into the "duplicates" of this bug report ?
Comment 9 Mike Kaganski 2020-04-30 08:38:54 UTC
*** Bug 132273 has been marked as a duplicate of this bug. ***
Comment 10 Mike Kaganski 2020-08-04 15:08:36 UTC
*** Bug 127036 has been marked as a duplicate of this bug. ***
Comment 11 Mike Kaganski 2020-08-04 15:08:54 UTC
*** Bug 130432 has been marked as a duplicate of this bug. ***
Comment 12 Mike Kaganski 2020-08-04 15:09:05 UTC
*** Bug 133113 has been marked as a duplicate of this bug. ***
Comment 13 Mike Kaganski 2020-08-04 15:09:36 UTC
*** Bug 130292 has been marked as a duplicate of this bug. ***
Comment 14 Mike Kaganski 2020-08-04 15:10:08 UTC
*** Bug 131122 has been marked as a duplicate of this bug. ***
Comment 15 Mike Kaganski 2020-08-04 15:53:20 UTC
Citing myself from bug 127036 comment #1 (how could I forget answering to that bug, that I myself filed this one):
> The problem is in XMLFontAutoStylePool::exportXML, which calls
> XMLFontAutoStylePool::getUsedFontList. The latter in turn calls
> SwXMLExport::collectAutoStyles, and that one indirectly writes the autostyle
> entries. It is used in SwXMLExport::ExportAutoStyles_ called from
> SvXMLExport::ImplExportAutoStyles, and there it is wrapped into
> XML_AUTOMATIC_STYLES element.
> 
> The resulting XML structure in content.xml is
> 
> > <office:document-content ...>
> >     ...
> >     <office:font-face-decls>
> >         <style:style style:name="Table1" style:family="table">
> >             <style:table-properties style:width="17.013cm" fo:margin-left="0cm" table:align="left"/>
> >         </style:style>
> >         <style:style style:name="Table1.A" style:family="table-column">
> >             <style:table-column-properties style:column-width="1.508cm"/>
> >         </style:style>
> >         ...
> >         <style:font-face style:name="Arial1" svg:font-family="Arial" style:font-family-generic="swiss"/>
> >         ...
> >     </office:font-face-decls>
> >     <office:automatic-styles/>
> >     ...
> where automatic styles, including those with table properties, are inside
> office:font-face-decls element, and the office:automatic-styles element is
> empty.
> 
> Adding Tomaž Vajngerl, the author of
> https://git.libreoffice.org/core/+/1a8435a23e84f3ceeee580eb9d4404a738d98888.
> Tomaž, the problem existed before the said patch (didn't try to check if
> that's a regression, or had it existed from the start of introducing the
> setting), but you are the expert here; do you have an idea how to fix this?
> 
> Note that this problem occurs even when fonts aren't embedded at all (i.e.,
> the top setting "Embed fonts in the document" in the dialog is unchecked) -
> so there's also likely performance problem, that some code unnecessarily
> runs when not needed.
> 
> Already reproducible with Version: 6.2.0.0.alpha0+
> Build ID: 68d3a44bc96041982cb38c140c0f9628dc8547c5
> CPU threads: 12; OS: Windows 10.0; UI render: GL; 
> Locale: ru-RU (ru_RU); Calc: group threaded
Comment 16 Mike Kaganski 2020-08-05 08:22:50 UTC
https://gerrit.libreoffice.org/c/core/+/100153
Comment 17 Commit Notification 2020-08-05 14:46:47 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/35021cd56b3b4e38035804087f215c80085564be

tdf#124470: Split export of table autostyles out from collection phase

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.
Comment 18 510jrb2301 2020-08-05 15:19:43 UTC
AMDG
Many thanks.  Unchecking the embedded fonts solved the problem.  Win10 save the file with all the table characteristics preserved.

JRBreton
Comment 19 Commit Notification 2020-08-06 22:25:02 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/378537536a135a80d97752368a032814b81cabca

tdf#124470: Split export of table autostyles out from collection phase

It will be available in 7.0.1.

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.
Comment 20 Commit Notification 2020-09-10 10:52:37 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/7b661ad44b81a200caaff0afaa0c822e3d635ee5

tdf#124470: Split export of table autostyles out from collection phase

It will be available in 6.4.7.

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.
Comment 21 Uwe Auer 2020-10-14 12:27:22 UTC
Confirm fixed in:
Version: 6.4.7.2, Build ID: 639b8ac485750d5696d7590a72ef1b496725cfb5
CPU threads: 8; OS: Linux 5.3; UI render: default; VCL: kf5; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US, Calc: threaded
Comment 22 Timur 2020-10-22 07:16:15 UTC
*** Bug 137338 has been marked as a duplicate of this bug. ***