summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-03-05 16:11:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-03-06 06:47:21 +0100
commit83db9afa20b8cf54b522ca9c3f04e7e267684c59 (patch)
treecad0d77f0a76ce8f25e39d72be809f318677bbe2 /vcl/source
parenta2e3705d8b3b05ae664d54b762d6ff72927d5e48 (diff)
remove some unnecessary typedef struct... sugar
Change-Id: I1576282b0a0a3af8ae14c04725d9c4900073f2c4 Reviewed-on: https://gerrit.libreoffice.org/68758 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/fontsubset/sft.cxx16
-rw-r--r--vcl/source/fontsubset/ttcr.cxx24
2 files changed, 20 insertions, 20 deletions
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index e9225e8bb8bf..972f5fbf09b8 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -79,7 +79,7 @@ struct PSPathElement
/*- In horizontal writing mode right sidebearing is calculated using this formula
*- rsb = aw - (lsb + xMax - xMin) -*/
-typedef struct {
+struct TTGlyphMetrics {
sal_Int16 xMin;
sal_Int16 yMin;
sal_Int16 xMax;
@@ -87,21 +87,21 @@ typedef struct {
sal_uInt16 aw; /*- Advance Width (horizontal writing mode) */
sal_Int16 lsb; /*- Left sidebearing (horizontal writing mode) */
sal_uInt16 ah; /*- advance height (vertical writing mode) */
-} TTGlyphMetrics;
+};
#define HFORMAT_LINELEN 64
-typedef struct {
+struct HexFmt {
FILE *o;
char buffer[HFORMAT_LINELEN];
size_t bufpos;
int total;
-} HexFmt;
+};
-typedef struct {
+struct GlyphOffsets {
sal_uInt32 nGlyphs; /* number of glyphs in the font + 1 */
sal_uInt32 *offs; /* array of nGlyphs offsets */
-} GlyphOffsets;
+};
static const sal_uInt32 T_true = 0x74727565; /* 'true' */
static const sal_uInt32 T_ttcf = 0x74746366; /* 'ttcf' */
@@ -1044,12 +1044,12 @@ static sal_uInt32 getGlyph0(const sal_uInt8* cmap, sal_uInt32, sal_uInt32 c) {
}
}
-typedef struct _subHeader2 {
+struct subHeader2 {
sal_uInt16 const firstCode;
sal_uInt16 const entryCount;
sal_uInt16 const idDelta;
sal_uInt16 idRangeOffset;
-} subHeader2;
+};
static sal_uInt32 getGlyph2(const sal_uInt8 *cmap, const sal_uInt32 nMaxCmapSize, sal_uInt32 c) {
sal_uInt16 const *CMAP2 = reinterpret_cast<sal_uInt16 const *>(cmap);
diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx
index 4a1c3e8db848..b4074203d316 100644
--- a/vcl/source/fontsubset/ttcr.cxx
+++ b/vcl/source/fontsubset/ttcr.cxx
@@ -50,11 +50,11 @@ namespace vcl
#define T_cmap 0x636D6170
#define T_post 0x706F7374
-typedef struct {
+struct TableEntry {
sal_uInt32 tag;
sal_uInt32 length;
sal_uInt8 *data;
-} TableEntry;
+};
/*- Data access macros for data stored in big-endian or little-endian format */
static sal_Int16 GetInt16( const sal_uInt8* ptr, sal_uInt32 offset)
@@ -322,39 +322,39 @@ SFErrCodes StreamToFile(TrueTypeCreator *_this, const char* fname)
#define CMAP_PAIR_INIT 500
#define CMAP_PAIR_INCR 500
-typedef struct {
+struct CmapSubTable {
sal_uInt32 id; /* subtable ID (platform/encoding ID) */
sal_uInt32 n; /* number of used translation pairs */
sal_uInt32 m; /* number of allocated translation pairs */
sal_uInt32 *xc; /* character array */
sal_uInt32 *xg; /* glyph array */
-} CmapSubTable;
+};
-typedef struct {
+struct table_cmap {
sal_uInt32 n; /* number of used CMAP sub-tables */
sal_uInt32 m; /* number of allocated CMAP sub-tables */
CmapSubTable *s; /* sorted array of sub-tables */
-} table_cmap;
+};
-typedef struct {
+struct tdata_generic {
sal_uInt32 tag;
sal_uInt32 nbytes;
sal_uInt8 *ptr;
-} tdata_generic;
+};
-typedef struct {
+struct tdata_loca {
sal_uInt32 nbytes; /* number of bytes in loca table */
sal_uInt8 *ptr; /* pointer to the data */
-} tdata_loca;
+};
-typedef struct {
+struct tdata_post {
sal_uInt32 format;
sal_uInt32 italicAngle;
sal_Int16 underlinePosition;
sal_Int16 underlineThickness;
sal_uInt32 isFixedPitch;
void *ptr; /* format-specific pointer */
-} tdata_post;
+};
/* allocate memory for a TT table */
static sal_uInt8 *ttmalloc(sal_uInt32 nbytes)