starmath/source/unomodel.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 8bf38cc394f96a1f1592a7bbd62e1f7db03f3db6
Author:     Khaled Hosny <kha...@libreoffice.org>
AuthorDate: Wed Sep 20 09:26:33 2023 +0300
Commit:     خالد حسني <kha...@libreoffice.org>
CommitDate: Wed Sep 20 10:12:00 2023 +0200

    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 <kha...@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: خالد حسني <kha...@libreoffice.org>

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);

Reply via email to