diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2019-10-15 21:51:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-16 07:58:11 +0200 |
commit | 35b0a64c3c8f11e15d689ecb5598b09c4459e5cd (patch) | |
tree | 99a716104b8e0372d7b4c507bcbbcaa043b4892b | |
parent | 3ee177a14d8b816ef5b62500aeb54524c289e045 (diff) |
Replace define by constexpr in sft.hxx (vcl)
+ add required vcl namespace prefix to a call
from outside in fontsubset.cxx
Change-Id: Ib8d5c2e5a409957221c81b17dafaf3323760e8e5
Reviewed-on: https://gerrit.libreoffice.org/80857
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | vcl/inc/sft.hxx | 36 | ||||
-rw-r--r-- | vcl/source/fontsubset/fontsubset.cxx | 2 |
2 files changed, 19 insertions, 19 deletions
diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx index b3f783fdeb77..8c7e4aaa8711 100644 --- a/vcl/inc/sft.hxx +++ b/vcl/inc/sft.hxx @@ -701,24 +701,24 @@ constexpr sal_uInt32 T_CFF = 0x43464620; /*- private definitions */ /* indexes into TrueTypeFont::tables[] and TrueTypeFont::tlens[] */ -#define O_maxp 0 /* 'maxp' */ -#define O_glyf 1 /* 'glyf' */ -#define O_head 2 /* 'head' */ -#define O_loca 3 /* 'loca' */ -#define O_name 4 /* 'name' */ -#define O_hhea 5 /* 'hhea' */ -#define O_hmtx 6 /* 'hmtx' */ -#define O_cmap 7 /* 'cmap' */ -#define O_vhea 8 /* 'vhea' */ -#define O_vmtx 9 /* 'vmtx' */ -#define O_OS2 10 /* 'OS/2' */ -#define O_post 11 /* 'post' */ -#define O_cvt 12 /* 'cvt_' - only used in TT->TT generation */ -#define O_prep 13 /* 'prep' - only used in TT->TT generation */ -#define O_fpgm 14 /* 'fpgm' - only used in TT->TT generation */ -#define O_gsub 15 /* 'GSUB' */ -#define O_CFF 16 /* 'CFF' */ -#define NUM_TAGS 17 +constexpr int O_maxp = 0; +constexpr int O_glyf = 1; /* 'glyf' */ +constexpr int O_head = 2; /* 'head' */ +constexpr int O_loca = 3; /* 'loca' */ +constexpr int O_name = 4; /* 'name' */ +constexpr int O_hhea = 5; /* 'hhea' */ +constexpr int O_hmtx = 6; /* 'hmtx' */ +constexpr int O_cmap = 7; /* 'cmap' */ +constexpr int O_vhea = 8; /* 'vhea' */ +constexpr int O_vmtx = 9; /* 'vmtx' */ +constexpr int O_OS2 = 10; /* 'OS/2' */ +constexpr int O_post = 11; /* 'post' */ +constexpr int O_cvt = 12; /* 'cvt_' - only used in TT->TT generation */ +constexpr int O_prep = 13; /* 'prep' - only used in TT->TT generation */ +constexpr int O_fpgm = 14; /* 'fpgm' - only used in TT->TT generation */ +constexpr int O_gsub = 15; /* 'GSUB' */ +constexpr int O_CFF = 16; /* 'CFF' */ +constexpr int NUM_TAGS = 17; struct TrueTypeFont { char *fname; diff --git a/vcl/source/fontsubset/fontsubset.cxx b/vcl/source/fontsubset/fontsubset.cxx index 412a1ddca3b4..f92498e80247 100644 --- a/vcl/source/fontsubset/fontsubset.cxx +++ b/vcl/source/fontsubset/fontsubset.cxx @@ -114,7 +114,7 @@ bool FontSubsetInfo::CreateFontSubsetFromSfnt( sal_Int32* pOutGlyphWidths ) // handle SFNT_CFF fonts int nCffLength = 0; const sal_uInt8* pCffBytes = nullptr; - if( GetSfntTable( mpSftTTFont, O_CFF, &pCffBytes, &nCffLength)) + if( GetSfntTable( mpSftTTFont, vcl::O_CFF, &pCffBytes, &nCffLength)) { LoadFont( FontType::CFF_FONT, pCffBytes, nCffLength); const bool bOK = CreateFontSubsetFromCff( pOutGlyphWidths); |