[Libreoffice-commits] core.git: vcl/inc vcl/source

Khaled Hosny khaledhosny at eglug.org
Thu Feb 8 20:13:54 UTC 2018


 vcl/inc/sft.hxx                        |    6 +-----
 vcl/source/fontsubset/sft.cxx          |    2 --
 vcl/source/gdi/embeddedfontshelper.cxx |    2 +-
 3 files changed, 2 insertions(+), 8 deletions(-)

New commits:
commit 59e1fced2b4115a882ffc1ac31a66f8d8e8793ff
Author: Khaled Hosny <khaledhosny at eglug.org>
Date:   Thu Feb 8 14:41:51 2018 +0200

    Remove unused macros
    
    TYPEFLAG_PS_OPENTYPE is set but never used, and dropping it means we no
    longer need TYPEFLAG_COPYRIGHT_MASK either.
    
    Change-Id: Iefb45b32f53a806f2477ce54b7062b5846a6a806
    Reviewed-on: https://gerrit.libreoffice.org/49427
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Khaled Hosny <khaledhosny at eglug.org>

diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx
index 0edec67ac376..e184ff164291 100644
--- a/vcl/inc/sft.hxx
+++ b/vcl/inc/sft.hxx
@@ -174,14 +174,10 @@ namespace vcl
         int   winDescent;         /**< descender metric for Windows                            */
         bool  symbolEncoded;      /**< true: MS symbol encoded */
         sal_uInt8  panose[10];    /**< PANOSE classification number                            */
-        sal_uInt32 typeFlags;     /**< type flags (copyright bits + PS-OpenType flag)       */
+        sal_uInt32 typeFlags;     /**< type flags (copyright bits)                             */
         sal_uInt16 fsSelection;   /**< OS/2 fsSelection */
     } TTGlobalFontInfo;
 
-#define TYPEFLAG_INVALID        0x8000000
-#define TYPEFLAG_COPYRIGHT_MASK 0x000000E
-#define TYPEFLAG_PS_OPENTYPE    0x0010000
-
 /** ControlPoint structure used by GetTTGlyphPoints() */
     typedef struct {
         sal_uInt32 flags;             /**< 00000000 00000000 e0000000 bbbbbbbb */
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 70b52fa1298d..cae835510712 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -2392,8 +2392,6 @@ void GetTTGlobalFontInfo(TrueTypeFont *ttf, TTGlobalFontInfo *info)
         }
         memcpy(info->panose, table + 32, 10);
         info->typeFlags = GetUInt16( table, 8 );
-        if( getTable(ttf, O_CFF) )
-            info->typeFlags |= TYPEFLAG_PS_OPENTYPE;
     }
 
     table = getTable(ttf, O_post);
diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx
index 8ed0295c3736..ca744e70d850 100644
--- a/vcl/source/gdi/embeddedfontshelper.cxx
+++ b/vcl/source/gdi/embeddedfontshelper.cxx
@@ -195,7 +195,7 @@ bool EmbeddedFontsHelper::sufficientTTFRights( const void* data, long size, Font
         GetTTGlobalFontInfo( font, &info );
         CloseTTFont( font );
         // https://www.microsoft.com/typography/otspec/os2.htm#fst
-        int copyright = info.typeFlags & TYPEFLAG_COPYRIGHT_MASK;
+        int copyright = info.typeFlags;
         switch( rights )
         {
             case FontRights::ViewingAllowed:


More information about the Libreoffice-commits mailing list