summaryrefslogtreecommitdiff
path: root/vcl/source/fontsubset
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-06-23 14:10:31 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-27 05:16:59 +0000
commit1ac18c60bb280855cfcc8d92886709cd6db35118 (patch)
tree0f81560261212c485a7f4ab6b5844a6e1f5c7aaa /vcl/source/fontsubset
parent3f22898c157995eecf5dbd610591d378820cf992 (diff)
loplugin:singlevalfields in vcl(part2)
Change-Id: I4782c6f6d3d090ba0f9e29af8afdd7d88aa2d382 Reviewed-on: https://gerrit.libreoffice.org/26598 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/source/fontsubset')
-rw-r--r--vcl/source/fontsubset/cff.cxx24
1 files changed, 0 insertions, 24 deletions
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 9fcf8e70b854..dfe29d88bd5f 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -346,7 +346,6 @@ private:
const U8* mpReadEnd;
U8* mpWritePtr;
- bool mbSawError;
bool mbNeedClose;
bool mbIgnoreHints;
sal_Int32 mnCntrMask;
@@ -416,7 +415,6 @@ CffSubsetterContext::CffSubsetterContext( const U8* pBasePtr, int nBaseLen)
, mpReadPtr(nullptr)
, mpReadEnd(nullptr)
, mpWritePtr(nullptr)
- , mbSawError(false)
, mbNeedClose(false)
, mbIgnoreHints(false)
, mnCntrMask(0)
@@ -1212,7 +1210,6 @@ int CffSubsetterContext::convert2Type1Ops( CffLocal* pCffLocal, const U8* const
writeType1Val( 0); // TODO: aSubsetterContext.getLeftSideBearing();
writeType1Val( 1000/*###getCharWidth()###*/);
writeTypeOp( TYPE1OP::HSBW);
-mbSawError = false;
mbNeedClose = false;
mbIgnoreHints = false;
mnHintSize=mnHorzHintSize=mnStackIdx=0; maCharWidth=-1;//#######
@@ -1223,23 +1220,6 @@ mnCntrMask = 0;
// writeTypeOp( TYPE1OP::CLOSEPATH);
// if( bSubRoutine)
// writeTypeOp( TYPE1OP::RETURN);
-if( mbSawError) {
- mpWritePtr = pT1Ops+4;
- // create an "idiotproof" charstring
- writeType1Val( 0);
- writeType1Val( 800);
- writeTypeOp( TYPE1OP::HSBW);
- writeType1Val( 50);
- writeTypeOp( TYPE1OP::HMOVETO);
- writeType1Val( 650);
- writeType1Val( 100);
- writeTypeOp( TYPE1OP::RLINETO);
- writeType1Val( -350);
- writeType1Val( 700);
- writeTypeOp( TYPE1OP::RLINETO);
- writeTypeOp( TYPE1OP::CLOSEPATH);
- writeTypeOp( TYPE1OP::ENDCHAR);
-}
#else // useful for manually encoding charstrings
mpWritePtr = pT1Ops;
mpWritePtr += sprintf( (char*)mpWritePtr, "OOo_\x8b\x8c\x0c\x10\x0b");
@@ -1714,7 +1694,6 @@ public:
void emitValVector( const char* pLineHead, const char* pLineTail, const std::vector<ValType>&);
private:
FILE* mpFileOut;
- bool mbCloseOutfile;
char maBuffer[MAX_T1OPS_SIZE]; // TODO: dynamic allocation
int mnEECryptR;
public:
@@ -1727,7 +1706,6 @@ public:
Type1Emitter::Type1Emitter( FILE* pOutFile, bool bPfbSubset)
: mpFileOut( pOutFile)
-, mbCloseOutfile( false)
, maBuffer{}
, mnEECryptR( 55665) // default eexec seed, TODO: mnEECryptSeed
, mpPtr( maBuffer)
@@ -1741,8 +1719,6 @@ Type1Emitter::~Type1Emitter()
{
if( !mpFileOut)
return;
- if( mbCloseOutfile )
- fclose( mpFileOut);
mpFileOut = nullptr;
}