You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ms...@apache.org on 2014/12/26 00:37:36 UTC
svn commit: r1647926 - in
/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight: ./
exception/ font/util/ process/ process/reflect/
Author: msahyoun
Date: Thu Dec 25 23:37:35 2014
New Revision: 1647926
URL: http://svn.apache.org/r1647926
Log:
PDFBOX-2576 remove commented-out code
Modified:
pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightContext.java
pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightDocument.java
pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/exception/CrossRefParseException.java
pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/PreflightType3Stream.java
pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/StreamValidationProcess.java
pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/ExtGStateValidationProcess.java
Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightContext.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightContext.java?rev=1647926&r1=1647925&r2=1647926&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightContext.java (original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightContext.java Thu Dec 25 23:37:35 2014
@@ -52,12 +52,6 @@ public class PreflightContext implements
* The datasource to load the document from
*/
protected DataSource source = null;
- //
- // /**
- // * JavaCC Token Manager used to get some content of the PDF file as string (ex
- // * : Trailers)
- // */
- // protected ExtractorTokenManager pdfExtractor = null;
/**
* Contains all Xref/trailer objects and resolves them into single object using startxref reference.
@@ -117,22 +111,6 @@ public class PreflightContext implements
this.metadata = metadata;
}
- // /**
- // * @return the value of the pdfExtractor attribute.
- // */
- // public ExtractorTokenManager getPdfExtractor() {
- // return pdfExtractor;
- // }
- //
- // /**
- // * Initialize the pdfExtractor attribute.
- // *
- // * @param pdfExtractor
- // */
- // public void setPdfExtractor(ExtractorTokenManager pdfExtractor) {
- // this.pdfExtractor = pdfExtractor;
- // }
-
/**
* @return the PDFBox object representation of the document
*/
Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightDocument.java?rev=1647926&r1=1647925&r2=1647926&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightDocument.java (original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightDocument.java Thu Dec 25 23:37:35 2014
@@ -100,10 +100,6 @@ public class PreflightDocument extends P
{
switch (format)
{
- // case PDF_A1A:
- //
- // break;
-
default: // default is PDF/A1-b
this.config = PreflightConfiguration.createPdfA1BConfiguration();
break;
Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/exception/CrossRefParseException.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/exception/CrossRefParseException.java?rev=1647926&r1=1647925&r2=1647926&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/exception/CrossRefParseException.java (original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/exception/CrossRefParseException.java Thu Dec 25 23:37:35 2014
@@ -70,11 +70,6 @@ public class CrossRefParseException exte
@Override
public String getErrorCode()
{
- // if (!isTokenMgrError) {
- // // use token information to know the cause
- // }
- // else Token Management Error or Unknown Error during the CrossRefTable
- // Validation
return PreflightConstants.ERROR_SYNTAX_CROSS_REF;
}
}
Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/PreflightType3Stream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/PreflightType3Stream.java?rev=1647926&r1=1647925&r2=1647926&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/PreflightType3Stream.java (original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/PreflightType3Stream.java Thu Dec 25 23:37:35 2014
@@ -103,27 +103,17 @@ public class PreflightType3Stream extend
if (operation.equals("d0"))
{
- // set glyph with for a type3 font
- // COSNumber horizontalWidth = (COSNumber)arguments.get( 0 );
- // COSNumber verticalWidth = (COSNumber)arguments.get( 1 );
- // width = horizontalWidth.intValue();
- // height = verticalWidth.intValue();
-
+
checkType3FirstOperator(operands);
}
else if (operation.equals("d1"))
{
- // set glyph with and bounding box for type 3 font
- // COSNumber horizontalWidth = (COSNumber)arguments.get( 0 );
- // COSNumber verticalWidth = (COSNumber)arguments.get( 1 );
COSNumber llx = (COSNumber) operands.get(2);
COSNumber lly = (COSNumber) operands.get(3);
COSNumber urx = (COSNumber) operands.get(4);
COSNumber ury = (COSNumber) operands.get(5);
- // width = horizontalWidth.intValue();
- // height = verticalWidth.intValue();
box = new BoundingBox();
box.setLowerLeftX(llx.floatValue());
box.setLowerLeftY(lly.floatValue());
Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/StreamValidationProcess.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/StreamValidationProcess.java?rev=1647926&r1=1647925&r2=1647926&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/StreamValidationProcess.java (original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/StreamValidationProcess.java Thu Dec 25 23:37:35 2014
@@ -123,7 +123,6 @@ public class StreamValidationProcess ext
private boolean readUntilStream(InputStream ra) throws IOException
{
boolean search = true;
- // String stream = "";
boolean maybe = false;
int lastChar = -1;
do
@@ -132,15 +131,12 @@ public class StreamValidationProcess ext
switch (c)
{
case 's':
- // stream = "s";
maybe = true;
lastChar = c;
break;
case 't':
- // if (maybe && stream.endsWith("s")) {
if (maybe && lastChar == 's')
{
- // stream = stream + "t";
lastChar = c;
}
else
@@ -150,10 +146,8 @@ public class StreamValidationProcess ext
}
break;
case 'r':
- // if (maybe && stream.endsWith("t")) {
if (maybe && lastChar == 't')
{
- // stream = stream + "r";
lastChar = c;
}
else
@@ -163,11 +157,9 @@ public class StreamValidationProcess ext
}
break;
case 'e':
- // if (maybe && stream.endsWith("r")) {
if (maybe && lastChar == 'r')
{
lastChar = c;
- // stream = stream + "e";
}
else
{
@@ -175,11 +167,9 @@ public class StreamValidationProcess ext
}
break;
case 'a':
- // if (maybe && stream.endsWith("e")) {
if (maybe && lastChar == 'e')
{
lastChar = c;
- // stream = stream + "a";
}
else
{
@@ -187,7 +177,6 @@ public class StreamValidationProcess ext
}
break;
case 'm':
- // if (maybe && stream.endsWith("a")) {
if (maybe && lastChar == 'a')
{
return true;
Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/ExtGStateValidationProcess.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/ExtGStateValidationProcess.java?rev=1647926&r1=1647925&r2=1647926&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/ExtGStateValidationProcess.java (original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/ExtGStateValidationProcess.java Thu Dec 25 23:37:35 2014
@@ -243,27 +243,4 @@ public class ExtGStateValidationProcess
}
}
}
- //
- // /**
- // * Check the RI entry of the Graphic State. If the rendering intent entry is
- // * present, the value must be one of the four values defined in the PDF
- // * reference. (@see net.awl.edoc.pdfa.validation.utils.RenderingIntents)
- // *
- // * @param egs
- // * the graphic state to check
- // * @param error
- // * the list of error to update if the validation fails.
- // * @return true if RI entry is valid, false otherwise.
- // */
- // protected boolean checkRIKey(COSDictionary egs, List<ValidationError> error) {
- // String rendenringIntent = egs.getNameAsString(COSName.getPDFName("RI"));
- // if (rendenringIntent != null && !"".equals(rendenringIntent)
- // && !RenderingIntents.contains(rendenringIntent)) {
- // error.add(new ValidationError(
- // PreflightConstants.ERROR_GRAPHIC_UNEXPECTED_VALUE_FOR_KEY,
- // "Invalid rendering intent value in Extended graphics state"));
- // return false;
- // }
- // return true;
- // }
}