summaryrefslogtreecommitdiffstats
path: root/svgio/source/svgreader/SvgNumber.cxx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 11:47:06 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 11:47:06 +0000
commit8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59 (patch)
treeca2b0cc4fba88107f5f6e740285184a061011866 /svgio/source/svgreader/SvgNumber.cxx
parentAdding debian version 4:24.2.3-2. (diff)
downloadlibreoffice-8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59.tar.xz
libreoffice-8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59.zip
Merging upstream version 4:24.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'svgio/source/svgreader/SvgNumber.cxx')
-rw-r--r--svgio/source/svgreader/SvgNumber.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/svgio/source/svgreader/SvgNumber.cxx b/svgio/source/svgreader/SvgNumber.cxx
index c1558f3e64..72a44dbdd0 100644
--- a/svgio/source/svgreader/SvgNumber.cxx
+++ b/svgio/source/svgreader/SvgNumber.cxx
@@ -35,10 +35,11 @@ double SvgNumber::solveNonPercentage(const InfoProvider& rInfoProvider) const
switch (meUnit)
{
+ // See https://drafts.csswg.org/css-values-4/#font-relative-length
case SvgUnit::em:
- return mfNumber * rInfoProvider.getCurrentFontSizeInherited();
+ return mfNumber * rInfoProvider.getCurrentFontSize();
case SvgUnit::ex:
- return mfNumber * rInfoProvider.getCurrentXHeightInherited() * 0.5;
+ return mfNumber * rInfoProvider.getCurrentXHeight();
case SvgUnit::px:
return mfNumber;
case SvgUnit::pt: