diff options
-rw-r--r-- | include/vcl/embeddedfontshelper.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/embeddedfontshelper.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/style/XMLFontAutoStylePool.cxx | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/include/vcl/embeddedfontshelper.hxx b/include/vcl/embeddedfontshelper.hxx index e986e500032a..7361195c4dce 100644 --- a/include/vcl/embeddedfontshelper.hxx +++ b/include/vcl/embeddedfontshelper.hxx @@ -26,7 +26,7 @@ class VCL_DLLPUBLIC EmbeddedFontsHelper { public: /// Specification of what kind of operation is allowed when embedding a font - enum FontRights + enum class FontRights { ViewingAllowed, ///< Font may be embedded for viewing the document (but not editing) EditingAllowed ///< Font may be embedded for editing document (implies viewing) diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 7e66549ff8dd..6dc190e64660 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -5865,7 +5865,7 @@ void DocxAttributeOutput::EmbedFontStyle( const OUString& name, int tag, FontFam // 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 ); + EmbeddedFontsHelper::FontRights::ViewingAllowed ); if( fontUrl.isEmpty()) return; // TODO IDocumentSettingAccess::EMBED_SYSTEM_FONTS diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx index c9f4a5ceab62..b39136dafb34 100644 --- a/vcl/source/gdi/embeddedfontshelper.cxx +++ b/vcl/source/gdi/embeddedfontshelper.cxx @@ -143,7 +143,7 @@ bool EmbeddedFontsHelper::addEmbeddedFont( const uno::Reference< io::XInputStrea } if( !eot ) { - sufficientFontRights = sufficientTTFRights( &fontData.front(), fontData.size(), EditingAllowed ); + sufficientFontRights = sufficientTTFRights( &fontData.front(), fontData.size(), FontRights::EditingAllowed ); } if( !sufficientFontRights ) { @@ -197,10 +197,10 @@ bool EmbeddedFontsHelper::sufficientTTFRights( const void* data, long size, Font int copyright = info.typeFlags & TYPEFLAG_COPYRIGHT_MASK; switch( rights ) { - case ViewingAllowed: + case FontRights::ViewingAllowed: // Embedding not restricted completely. return ( copyright & 0x02 ) != 0x02; - case EditingAllowed: + case FontRights::EditingAllowed: // Font is installable or editable. return copyright == 0 || ( copyright & 0x08 ); } diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx index 13bdfe845353..6b4b5a4d59e5 100644 --- a/xmloff/source/style/XMLFontAutoStylePool.cxx +++ b/xmloff/source/style/XMLFontAutoStylePool.cxx @@ -306,7 +306,7 @@ void XMLFontAutoStylePool::exportXML() // the font license rights too and open either read-only or not use the font for editing). OUString fileUrl = EmbeddedFontsHelper::fontFileUrl( pEntry->GetFamilyName(), pEntry->GetFamily(), italic[ j ], weight[ j ], pEntry->GetPitch(), pEntry->GetEncoding(), - EmbeddedFontsHelper::ViewingAllowed ); + EmbeddedFontsHelper::FontRights::ViewingAllowed ); if( fileUrl.isEmpty()) continue; if( !fontFilesMap.count( fileUrl )) |