sd/source/filter/eppt/pptx-epptooxml.cxx |   37 -------------------------------
 1 file changed, 1 insertion(+), 36 deletions(-)

New commits:
commit e246bb2bd36517d62ffa52a8b265e3257f4946d1
Author:     Marco Cecchetti <[email protected]>
AuthorDate: Sun Feb 8 20:58:29 2026 +0100
Commit:     Marco Cecchetti <[email protected]>
CommitDate: Wed Mar 11 16:48:37 2026 +0100

    fix pptx font embedding issues
    
    - file size too big since Noto CJK included even if not used
    - PowerPoint warning on opening document: not possible to install Noto
    CJK
    
    Change-Id: I0459d0acc00c49a9cb1bb98b24bd8911d9fde92b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201065
    Reviewed-by: Tomaž Vajngerl <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201441
    Reviewed-by: Marco Cecchetti <[email protected]>
    (cherry picked from commit eccdeb6c78c8d6a1f7aec345c4d0a2825c3fd18c)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201466
    Tested-by: Jenkins

diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 7f2375951e5e..7bac79eb8b82 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -609,26 +609,6 @@ private:
         std::vector<editeng::Section> aSections;
         rEditText.GetAllSections(aSections);
 
-        {
-            SfxStyleSheet* pStyleSheet = 
pTextObject->getSdrPageFromSdrObject()->GetTextStyleSheetForObject(pTextObject);
-            if (pStyleSheet)
-            {
-                const SfxItemSet& rItemSet = pStyleSheet->GetItemSet();
-                if (const SvxFontItem* pItem = 
rItemSet.GetItemIfSet(EE_CHAR_FONTINFO, false))
-                {
-                    addFontItem(pItem);
-                }
-                if (const SvxFontItem* pItem = 
rItemSet.GetItemIfSet(EE_CHAR_FONTINFO_CJK, false))
-                {
-                    addFontItem(pItem);
-                }
-                if (const SvxFontItem* pItem = 
rItemSet.GetItemIfSet(EE_CHAR_FONTINFO_CTL, false))
-                {
-                    addFontItem(pItem);
-                }
-            }
-        }
-
         for (editeng::Section const& rSection : aSections)
         {
             if (SvxFontItem const* pFontItem = getFontItem(rSection, 
EE_CHAR_FONTINFO); pFontItem && mbEmbedLatinScript)
@@ -658,23 +638,8 @@ protected:
     void handleSdrObject(SdrObject* pObject) override
     {
         SdrTextObj* pTextShape = DynCastSdrTextObj(pObject);
-        if (pTextShape)
+        if (pTextShape && !pTextShape->IsEmptyPresObj())
         {
-            auto& rItemSet = pTextShape->GetMergedItemSet();
-
-            if (SvxFontItem const* pFontItem = 
rItemSet.GetItemIfSet(EE_CHAR_FONTINFO, true); pFontItem && mbEmbedLatinScript)
-            {
-                addFontItem(pFontItem);
-            }
-            if (SvxFontItem const* pFontItem = 
rItemSet.GetItemIfSet(EE_CHAR_FONTINFO_CJK, true); pFontItem && 
mbEmbedAsianScript)
-            {
-                addFontItem(pFontItem);
-            }
-            if (SvxFontItem const* pFontItem = 
rItemSet.GetItemIfSet(EE_CHAR_FONTINFO_CTL, true); pFontItem && 
mbEmbedComplexScript)
-            {
-                addFontItem(pFontItem);
-            }
-
             traverseEditEng(pTextShape);
         }
     }

Reply via email to