summaryrefslogtreecommitdiff
path: root/starmath/source/unomodel.cxx
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@libreoffice.org>2023-09-20 09:26:33 +0300
committerخالد حسني <khaled@libreoffice.org>2023-09-20 10:12:00 +0200
commit8bf38cc394f96a1f1592a7bbd62e1f7db03f3db6 (patch)
treea0cf2de1884445a61bdf3933144070dbe46dbea4 /starmath/source/unomodel.cxx
parentb20ca8d951e8205c8b963c6b7407f984053b4094 (diff)
starmath: Don’t set empty font name when reading font format from file
If a setting is missing, e.g. math font when reading old file, we would set it to an empty font instead of using the default. Regression from: commit 626d17a8ec270937575e9684a325eb0669327a25 Author: Khaled Hosny <khaled@libreoffice.org> Date: Thu Aug 31 14:54:52 2023 +0300 tdf#143213: Fix reading math font settings from file Change-Id: Ib8b3cede3d4bea7e03a146b7e5f39ad2c7dfa363 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157094 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'starmath/source/unomodel.cxx')
-rw-r--r--starmath/source/unomodel.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 4e02783b5ebb..0f3d5b4464e0 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -674,6 +674,9 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
for (sal_uInt16 nFontDesc = FNT_BEGIN; nFontDesc <= FNT_END; ++nFontDesc)
{
const SmFace& rFont = maFonts[nFontDesc];
+ if (rFont.GetFamilyName().isEmpty())
+ continue;
+
if (aFormat.GetFont(nFontDesc).GetFamilyName() != rFont.GetFamilyName())
{
const SmFace rOld = aFormat.GetFont(nFontDesc);