Bug 112559 - FILESAVE: ODS - Default cell style font size not set
Summary: FILESAVE: ODS - Default cell style font size not set
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
Whiteboard: target:7.2.0
: 106125 (view as bug list)
Depends on:
Blocks: Calc-Styles
  Show dependency treegraph
Reported: 2017-09-22 05:37 UTC by Yousuf Philips (jay) (retired)
Modified: 2021-08-03 09:58 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2017-09-22 05:37:52 UTC
The 'Default' cell style doesnt have font size set and as a result, opening an LO ods in excel results in a default font size of 11 and opening it in calligra results in a default font size of 9, rather than calc's default of 10.

Assume the necessary code pointer is at
Comment 1 V Stuart Foote 2017-09-22 06:11:00 UTC
Confirming that on save to ODF, Default table-cell style has no fo:font-size set and that on opening into MS Excel an Excel default of 11pt is used rather than the 10pt size used by Calc.
Comment 2 QA Administrators 2018-09-23 02:49:57 UTC Comment hidden (obsolete)
Comment 3 Roman Kuznetsov 2018-09-23 11:49:34 UTC
still repro in LO on Windows 10
Comment 4 Buovjaga 2021-01-26 15:01:22 UTC
Eike commented on this topic:
"I think that setting the Default style's font to a fixed 10pt size is not the proper approach. If the problem is that font size is not written to file then the export should check for it and add it to the document's default style instead. I'm not sure at the moment where this internally used 10pt actually originates and why export omits it, but the Default standard style never defined a hard 10pt font size."
Comment 5 Buovjaga 2021-02-07 12:09:10 UTC
Quoting myself from my bug 139281:

(In reply to Buovjaga from comment #0)
> I was looking into bug 112559 "FILESAVE: ODS - Default cell style font size
> not set". It is indeed possible to solve it by editing
> sc/source/core/data/stlpool.cxx so it has
> #include <editeng/fhgtitem.hxx>
> and in ScStyleSheetPool::CreateStandardStyles()
> pSet->Put( SvxFontHeightItem( 200, 100, ATTR_FONT_HEIGHT ) ); // 10pt

(Just as an additional note on how *not* to solve this)
Comment 6 Maxim Monastirsky 2021-02-07 16:12:47 UTC
Here is my attempt at fixing this:


Hope this is the right approach.
Comment 7 Commit Notification 2021-05-13 16:27:20 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":


tdf#112559 sc: Expose font height via the Defaults UNO API

It will be available in 7.2.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:

Affected users are encouraged to test the fix and report feedback.
Comment 8 Buovjaga 2021-06-03 10:24:44 UTC
Let's close as fixed
Comment 9 Buovjaga 2021-08-03 09:58:03 UTC
*** Bug 106125 has been marked as a duplicate of this bug. ***