Bug 157712 - LibreOffice Calc refuses to save in .UOS format
Summary: LibreOffice Calc refuses to save in .UOS format
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.5.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Format-Filters
  Show dependency treegraph
 
Reported: 2023-10-12 02:48 UTC by Mark Farrell
Modified: 2023-10-13 09:33 UTC (History)
2 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 Mark Farrell 2023-10-12 02:48:29 UTC
Description:
Final determination:
Setting a row as BOLD causes the save to fail as .UOS.
I can select a cell and set it to BOLD and no problem.
I can set all the columns BOLD one at a time and no problem.
I can select the entire spreadsheet and set it to BOLD and no problem.
If I select a row and set it to BOLD, the spreadsheet refuses to save as .UOS.
Once a row is set as BOLD, you must UNDO to be able to save.
Merely changing it by unselecting BOLD has no positive effect.

No other formatting seems to affect the ability to save in .UOS format.
Mark

Thank you in advance.

Steps to Reproduce:
1.select row
2.select BOLD
3.Attempt to "Save" or if changing formats "Save as..." .uos

Actual Results:
Error saving the document xxxxxxx.uos:
Write Error.
The file could not be written.

Expected Results:
Save spreadsheet in .uos format without error.


Reproducible: Always


User Profile Reset: No

Additional Info:
Not sure how far back this goes or if it's particular to my system. Ad far back as the release of Linux Mint 21.0 in terms of dates. At least LibreOffice 7.5.0.3 I think, maybe earlier.

CPU FX6300
CPU threads: 6; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

System:
Kernel: 5.15.0-86-generic x86_64 bits: 64
Compiler: gcc v: 12.3.0
Desktop: Cinnamon 5.8.4
tk: GTK3 3.24.33 (GTK4 4.6.9 available)
wm: muffin
dm: LightDM 1.30.0
Distro: Linux Mint 21.1 Vera
base: Ubuntu 22.04 jammy
Machine:
Type: Desktop Mobo: MSI model: 760GM-P23(FX) (MS-7641) v: 3.0 serial:
BIOS: American Megatrends v: 17.17 date: 04/22/2015
Mem: 16Gb DDR3
Video: Nvdia GTS450SC 1Gb - driver version 390.157-0ubuntu0.22.04.2

OS: (up to date)
Distributor ID:	Linuxmint
Description:	Linux Mint 21.2
Release:	21.2
Codename:	victoria
Comment 2 Julien Nabet 2023-10-12 15:01:19 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

I had this error in console:
warn:legacy.osl:244868:244868:xmloff/source/core/SettingsExportHelper.cxx:176: this type is not implemented now
runtime error: file file:///home/julien/lo/libreoffice/instdir/program/../share/xslt/export/uof/odf2uof_spreadsheet.xsl line 1122 element value-of
xsltApplySequenceConstructor: A potential infinite template recursion was detected.
You can adjust xsltMaxDepth (--maxdepth) in order to raise the maximum number of nested template calls and variables/params (currently set to 3000).


For the test I unzipped a simple ods file containing test in 2 cells, then I select the row and put it bold.

I noticed this in content.xml:

<style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default">
...
<table:table-column table:style-name="co1" table:number-columns-repeated="16384" table:default-cell-style-name="ce1" />


Workaround: select just the range of cells you want to put bold.

xslt files is a PITA to maintain and should be replaced by C++ conversion.
Comment 3 Mike Kaganski 2023-10-13 09:33:42 UTC
In addition to Julien:

increasing xsltMaxDepth to 30000, and xsltMaxVars to 40000 results in memory allocation problems in libxslt; smaller values do not succeed (the defaults are 3000 and 15000, resp.). The change can be done in XSLT::Reader::execute, before the call to xsltNewTransformContext.

If someone has energy and knowledge, one could try to change the respective XSLT: filter/source/xslt/export/uof/odf2uof_spreadsheet.xsl; maybe there's a way to change the recursive handling of repeated columns into some loop or something.