diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-03-07 19:45:49 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-03-08 13:35:27 +0100 |
commit | e2cd75f005dd5bf57336f39abd8820ecac0b048e (patch) | |
tree | 429e024b52781adc38817f4039c833b12d340cf4 /sw | |
parent | 8fcc60bee755b812489ef652ab2fa779babddeac (diff) |
embed also view-only fonts, but do not use them
MSO embeds even fonts which allow only embedding for viewing the document
but not editing it. So embed such fonts too, but do not actually use
them from the document. What MSO does when such a font is not present
locally when opening the document is switching to read-only mode,
warning about this and providing a button for switching to editing mode
by dumping the font(s). That should be done for LO too, but right now
dropping view-only fonts is better than using them for editing.
Change-Id: I19c28fadb091e6b21beaf4cbf8b47e3078256d1c
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index e5366eeab1f3..1b8da731baad 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3073,7 +3073,10 @@ static inline char toHexChar( int value ) void DocxAttributeOutput::EmbedFontStyle( const OUString& name, int tag, FontFamily family, FontItalic italic, FontWeight weight, FontPitch pitch, rtl_TextEncoding encoding ) { - OUString fontUrl = EmbeddedFontsHelper::fontFileUrl( name, family, italic, weight, pitch, encoding ); + // Embed font if at least viewing is allowed (in which case the opening app must check + // the font license rights too and open either read-only or not use the font for editing). + OUString fontUrl = EmbeddedFontsHelper::fontFileUrl( name, family, italic, weight, pitch, encoding, + EmbeddedFontsHelper::ViewingAllowed ); if( fontUrl.isEmpty()) return; // TODO IDocumentSettingAccess::EMBED_SYSTEM_FONTS |