summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@libreoffice.org>2023-09-12 18:35:46 +0300
committerخالد حسني <khaled@libreoffice.org>2023-09-13 12:54:40 +0200
commit32d2e001bb056e7d98aa143b222f2721967337dc (patch)
treefcfdeeeeb9c2c1918be4c469f3f12c37c57680b5 /starmath
parente9cc014be4150a5adc9950f366c9bdfa50420dcf (diff)
tdf#101174: Don’t hard-code OpenSymbol font for predefined special symbols
Leave the format empty and use the variables font instead. Change-Id: I3e3cdf40dc285dee7375054e85b4a2bed352eb66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156855 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/cfgitem.cxx2
-rw-r--r--starmath/source/node.cxx5
2 files changed, 4 insertions, 3 deletions
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index 6e27a0168e8b..8906474c9f35 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -434,8 +434,6 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
if (pFntFmt)
aFont = pFntFmt->GetFont();
}
- else
- bOK = false;
++pValue;
if (bOK)
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 7a9d42bd4fe1..1572d5f8e67e 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2186,7 +2186,10 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell
sal_UCS4 cChar = pSym->GetCharacter();
OUString aTmp( &cChar, 1 );
SetText( aTmp );
- GetFont() = pSym->GetFace();
+ if (pSym->GetFace().GetFamilyName().isEmpty())
+ GetFont() = rFormat.GetFont(FNT_VARIABLE);
+ else
+ GetFont() = pSym->GetFace();
}
else
{