Issue #2008 - Fix lint errors for src/obj.js
This commit is contained in:
parent
9b13cbee69
commit
caaf7e8032
@ -1,5 +1,6 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||||
|
/* globals assertWellFormed, bytesToString, CipherTransformFactory, error, info, InvalidPDFException, isArray, isCmd, isDict, isInt, isName, isRef, isStream, JpegStream, Lexer, log, Page, Parser, Promise, shadow, stringToPDFString, stringToUTF8String, warn */
|
||||||
/* Copyright 2012 Mozilla Foundation
|
/* Copyright 2012 Mozilla Foundation
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -100,7 +101,7 @@ var Dict = (function DictClosure() {
|
|||||||
callback(key, this.get(key));
|
callback(key, this.get(key));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
return Dict;
|
return Dict;
|
||||||
})();
|
})();
|
||||||
@ -442,7 +443,7 @@ var XRef = (function XRefClosure() {
|
|||||||
for (j = 0; j < typeFieldWidth; ++j)
|
for (j = 0; j < typeFieldWidth; ++j)
|
||||||
type = (type << 8) | stream.getByte();
|
type = (type << 8) | stream.getByte();
|
||||||
// if type field is absent, its default value = 1
|
// if type field is absent, its default value = 1
|
||||||
if (typeFieldWidth == 0)
|
if (typeFieldWidth === 0)
|
||||||
type = 1;
|
type = 1;
|
||||||
for (j = 0; j < offsetFieldWidth; ++j)
|
for (j = 0; j < offsetFieldWidth; ++j)
|
||||||
offset = (offset << 8) | stream.getByte();
|
offset = (offset << 8) | stream.getByte();
|
||||||
@ -678,7 +679,7 @@ var XRef = (function XRefClosure() {
|
|||||||
}
|
}
|
||||||
if (!isCmd(obj3, 'obj')) {
|
if (!isCmd(obj3, 'obj')) {
|
||||||
// some bad pdfs use "obj1234" and really mean 1234
|
// some bad pdfs use "obj1234" and really mean 1234
|
||||||
if (obj3.cmd.indexOf('obj') == 0) {
|
if (obj3.cmd.indexOf('obj') === 0) {
|
||||||
num = parseInt(obj3.cmd.substring(3), 10);
|
num = parseInt(obj3.cmd.substring(3), 10);
|
||||||
if (!isNaN(num))
|
if (!isNaN(num))
|
||||||
return num;
|
return num;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user