summaryrefslogtreecommitdiff
path: root/vcl/source/fontsubset
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-02-21 23:46:33 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-02-21 23:47:23 +0100
commitfe7a4bccfdc6ff7e10789e5512ac469a4dc44f55 (patch)
tree2da6d63a8ff02d78999427a700fe823f07db2f70 /vcl/source/fontsubset
parent216bcceee1ba908f617deb3f2404aff8085d5358 (diff)
Adapt vcl to various loplugin warnings on Mac OS X
Change-Id: I4553ce218fbcf2ac681b284c71e7d558a451511c
Diffstat (limited to 'vcl/source/fontsubset')
-rw-r--r--vcl/source/fontsubset/gsub.cxx2
-rw-r--r--vcl/source/fontsubset/gsub.h2
-rw-r--r--vcl/source/fontsubset/sft.cxx18
3 files changed, 11 insertions, 11 deletions
diff --git a/vcl/source/fontsubset/gsub.cxx b/vcl/source/fontsubset/gsub.cxx
index 68ba4014714d..3d5c5d146643 100644
--- a/vcl/source/fontsubset/gsub.cxx
+++ b/vcl/source/fontsubset/gsub.cxx
@@ -325,7 +325,7 @@ void ReleaseGSUB(struct _TrueTypeFont* pTTFile)
delete pGlyphSubstitution;
}
-int UseGSUB( struct _TrueTypeFont* pTTFile, int nGlyph, bool /*wmode*/ )
+int UseGSUB( struct _TrueTypeFont* pTTFile, int nGlyph )
{
GlyphSubstitution* pGlyphSubstitution = (GlyphSubstitution*)pTTFile->pGSubstitution;
if( pGlyphSubstitution != 0 )
diff --git a/vcl/source/fontsubset/gsub.h b/vcl/source/fontsubset/gsub.h
index ece5aae1195e..362a6196028d 100644
--- a/vcl/source/fontsubset/gsub.h
+++ b/vcl/source/fontsubset/gsub.h
@@ -25,7 +25,7 @@ namespace vcl
int HasVerticalGSUB( struct vcl::_TrueTypeFont* pTTFile );
-int UseGSUB( struct vcl::_TrueTypeFont* pTTFile, int nGlyph, bool wmode );
+int UseGSUB( struct vcl::_TrueTypeFont* pTTFile, int nGlyph );
bool ReadGSUB( struct vcl::_TrueTypeFont* pTTFile, int nRequestedScript, int nRequestedLangsys );
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 93257adc2ef3..b439477f8bca 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -2282,12 +2282,12 @@ int MapString(TrueTypeFont *ttf, sal_uInt16 *str, int nchars, sal_uInt16 *glyphA
for (i = 0; i < nchars; i++) {
cp[i] = (sal_uInt16)ttf->mapper(ttf->cmap, cp[i]);
if (cp[i]!=0 && bvertical)
- cp[i] = (sal_uInt16)UseGSUB(ttf,cp[i],bvertical);
+ cp[i] = (sal_uInt16)UseGSUB(ttf,cp[i]);
}
return nchars;
}
-sal_uInt16 MapChar(TrueTypeFont *ttf, sal_uInt16 ch, int bvertical)
+sal_uInt16 MapChar(TrueTypeFont *ttf, sal_uInt16 ch, bool bvertical)
{
switch (ttf->cmapType) {
case CMAP_MS_Symbol:
@@ -2305,8 +2305,8 @@ sal_uInt16 MapChar(TrueTypeFont *ttf, sal_uInt16 ch, int bvertical)
default: return 0;
}
ch = (sal_uInt16)ttf->mapper(ttf->cmap, ch);
- if (ch!=0 && bvertical!=0)
- ch = (sal_uInt16)UseGSUB(ttf,ch,bvertical);
+ if (ch!=0 && bvertical)
+ ch = (sal_uInt16)UseGSUB(ttf,ch);
return ch;
}
@@ -2336,13 +2336,13 @@ bool GetSfntTable( TrueTypeFont* ttf, int nSubtableIndex,
return bOk;
}
-TTSimpleGlyphMetrics *GetTTSimpleGlyphMetrics(TrueTypeFont *ttf, sal_uInt16 *glyphArray, int nGlyphs, int mode)
+TTSimpleGlyphMetrics *GetTTSimpleGlyphMetrics(TrueTypeFont *ttf, sal_uInt16 *glyphArray, int nGlyphs, bool vertical)
{
const sal_uInt8* pTable;
sal_uInt32 n;
int nTableSize;
- if (mode == 0) {
+ if (!vertical) {
n = ttf->numberOfHMetrics;
pTable = getTable( ttf, O_hmtx );
nTableSize = getTableSize( ttf, O_hmtx );
@@ -2391,7 +2391,7 @@ TTSimpleGlyphMetrics *GetTTSimpleGlyphMetrics(TrueTypeFont *ttf, sal_uInt16 *gly
}
#ifndef NO_MAPPERS
-TTSimpleGlyphMetrics *GetTTSimpleCharMetrics(TrueTypeFont * ttf, sal_uInt16 firstChar, int nChars, int mode)
+TTSimpleGlyphMetrics *GetTTSimpleCharMetrics(TrueTypeFont * ttf, sal_uInt16 firstChar, int nChars, bool vertical)
{
TTSimpleGlyphMetrics *res = 0;
int i, n;
@@ -2400,8 +2400,8 @@ TTSimpleGlyphMetrics *GetTTSimpleCharMetrics(TrueTypeFont * ttf, sal_uInt16 firs
assert(str != 0);
for (i=0; i<nChars; i++) str[i] = (sal_uInt16)(firstChar + i);
- if ((n = MapString(ttf, str, nChars, 0, mode)) != -1) {
- res = GetTTSimpleGlyphMetrics(ttf, str, n, mode);
+ if ((n = MapString(ttf, str, nChars, 0, vertical)) != -1) {
+ res = GetTTSimpleGlyphMetrics(ttf, str, n, vertical);
}
free(str);