From f0cd6fe9075cd0aa00162474784ad804a07ed138 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Fri, 22 Feb 2013 18:06:18 +0100 Subject: use document settings / embed fonts when exporting odp Change-Id: I9e8db1ae08b570f093b13d50bfde823c85cdba95 --- xmloff/source/draw/sdxmlexp.cxx | 13 +++++++++++++ xmloff/source/draw/sdxmlexp_impl.hxx | 1 + 2 files changed, 14 insertions(+) (limited to 'xmloff') diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index d33db725215f..441dbf05a5cd 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -2901,4 +2901,17 @@ OUString SAL_CALL SdXMLExport::getImplementationName() throw( uno::RuntimeExcept } } +XMLFontAutoStylePool* SdXMLExport::CreateFontAutoStylePool() +{ + bool bEmbedFonts = false; + Reference< lang::XMultiServiceFactory > xFac( GetModel(), UNO_QUERY ); + if( xFac.is() ) + { + Reference< beans::XPropertySet > xProps( xFac->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.Settings" ) ) ), UNO_QUERY ); + if( xProps.is() ) + xProps->getPropertyValue("EmbedFonts") >>= bEmbedFonts; + } + return new XMLFontAutoStylePool( *this, bEmbedFonts ); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/sdxmlexp_impl.hxx b/xmloff/source/draw/sdxmlexp_impl.hxx index 166f57328e17..cc5a5ed2c902 100644 --- a/xmloff/source/draw/sdxmlexp_impl.hxx +++ b/xmloff/source/draw/sdxmlexp_impl.hxx @@ -174,6 +174,7 @@ class SdXMLExport : public SvXMLExport protected: virtual void GetViewSettings(com::sun::star::uno::Sequence& aProps); virtual void GetConfigurationSettings(com::sun::star::uno::Sequence& aProps); + virtual XMLFontAutoStylePool* CreateFontAutoStylePool(); public: SdXMLExport( -- cgit