xmloff/source/core/xmlexp.cxx |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit c444d6678498962d10032673dca4cd8ee7dac0dd
Author:     Caolán McNamara <[email protected]>
AuthorDate: Wed Oct 15 10:16:58 2025 +0100
Commit:     Miklos Vajna <[email protected]>
CommitDate: Thu Oct 16 14:11:22 2025 +0200

    collect autostyles before output fonts
    
    we will do this anyway, and its already common place
    to explicitly call collectAutoStyles before places
    it is additionally needed for various other reasons.
    
    collectAutoStyles returns early if already called.
    
    Change-Id: I0ba36897963ccf5f9394eedc8c4f5a102c73c6c1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192445
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 9475b1ac6e30..a6a1fb65aef0 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -1409,7 +1409,17 @@ ErrCode SvXMLExport::exportDoc( enum 
::xmloff::token::XMLTokenEnum eClass )
 
         // font declarations
         if( mnExportFlags & SvXMLExportFlags::FONTDECLS )
+        {
+            if (mnExportFlags & SvXMLExportFlags::AUTOSTYLES && decomposePDF())
+            {
+                // We will call collectAutoStyles anyway, but do it now before
+                // we export the fonts so we can export embedded fonts used in
+                // the decomposed pdf
+                collectAutoStyles();
+            }
+
             ExportFontDecls_();
+        }
 
         // styles
         if( mnExportFlags & SvXMLExportFlags::STYLES )

Reply via email to