diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-07-06 12:45:31 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-07-10 16:14:59 +0200 |
commit | eb6ff07605a55675e7007ac0cb5604fb13a9ddf9 (patch) | |
tree | 6d5899b5aa7befa5d0c87e78ae8e5cd1e803f7bb /sw/source/filter/xml/xmlfonte.cxx | |
parent | 76b4820076eb24a4f3e5c8583c117cbf09fb8a8a (diff) |
[API CHANGE] tdf#65353 Add more doc. settings more embedding fonts
- Add setting to embed used fonts only
- Add setting for filtering of Latin, Asian, Complex script fonts
Change-Id: I8d093ed05fdcef3715616c008f6eeaa8cfbcc850
Reviewed-on: https://gerrit.libreoffice.org/57167
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sw/source/filter/xml/xmlfonte.cxx')
-rw-r--r-- | sw/source/filter/xml/xmlfonte.cxx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/sw/source/filter/xml/xmlfonte.cxx b/sw/source/filter/xml/xmlfonte.cxx index 7738d51ba50e..8c11072327f2 100644 --- a/sw/source/filter/xml/xmlfonte.cxx +++ b/sw/source/filter/xml/xmlfonte.cxx @@ -32,13 +32,12 @@ using namespace ::com::sun::star::text; class SwXMLFontAutoStylePool_Impl: public XMLFontAutoStylePool { - public: - SwXMLFontAutoStylePool_Impl( SwXMLExport& rExport, bool blockFontEmbedding ); +public: + SwXMLFontAutoStylePool_Impl(SwXMLExport& rExport, bool bFontEmbedding); }; -SwXMLFontAutoStylePool_Impl::SwXMLFontAutoStylePool_Impl( - SwXMLExport& _rExport, bool blockFontEmbedding ) : - XMLFontAutoStylePool( _rExport, blockFontEmbedding ) +SwXMLFontAutoStylePool_Impl::SwXMLFontAutoStylePool_Impl(SwXMLExport& _rExport, bool bFontEmbedding) + : XMLFontAutoStylePool(_rExport, bFontEmbedding) { sal_uInt16 const aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT }; @@ -65,6 +64,13 @@ SwXMLFontAutoStylePool_Impl::SwXMLFontAutoStylePool_Impl( } } } + auto const & pDocument = _rExport.getDoc(); + + m_bEmbedUsedOnly = pDocument->getIDocumentSettingAccess().get(DocumentSettingId::EMBED_USED_FONTS); + m_bEmbedLatinScript = pDocument->getIDocumentSettingAccess().get(DocumentSettingId::EMBED_LATIN_SCRIPT_FONTS); + m_bEmbedAsianScript = pDocument->getIDocumentSettingAccess().get(DocumentSettingId::EMBED_ASIAN_SCRIPT_FONTS); + m_bEmbedComplexScript = pDocument->getIDocumentSettingAccess().get(DocumentSettingId::EMBED_COMPLEX_SCRIPT_FONTS); + } XMLFontAutoStylePool* SwXMLExport::CreateFontAutoStylePool() @@ -87,4 +93,3 @@ void SwXMLImport::NotifyEmbeddedFontRead() } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ - |