You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by le...@apache.org on 2014/01/26 18:45:07 UTC
svn commit: r1561523 - in /pdfbox/branches/1.8: ./
pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java
pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
Author: lehmi
Date: Sun Jan 26 17:45:06 2014
New Revision: 1561523
URL: http://svn.apache.org/r1561523
Log:
PDFBOX-1822: revert changes commited in r1560498
Modified:
pdfbox/branches/1.8/ (props changed)
pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java
pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
Propchange: pdfbox/branches/1.8/
------------------------------------------------------------------------------
Reverse-merged /pdfbox/trunk:r1560474
Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java?rev=1561523&r1=1561522&r2=1561523&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java Sun Jan 26 17:45:06 2014
@@ -93,8 +93,6 @@ public class COSDocument extends COSBase
private boolean closed = false;
- private boolean isXRefStream;
-
/**
* Flag to skip malformed or otherwise unparseable input where possible.
*/
@@ -757,22 +755,16 @@ public class COSDocument extends COSBase
}
/**
- * Determines if the trailer is a XRef stream or not.
+ * Determines it the trailer is a XRef stream or not.
*
* @return true if the trailer is a XRef stream
*/
public boolean isXRefStream()
{
- return isXRefStream;
- }
-
- /**
- * Sets isXRefStream to the given value.
- *
- * @param isXRefStreamValue the new value for isXRefStream
- */
- public void setIsXRefStream(boolean isXRefStreamValue)
- {
- isXRefStream = isXRefStreamValue;
+ if (trailer != null)
+ {
+ return COSName.XREF.equals(trailer.getItem(COSName.TYPE));
+ }
+ return false;
}
}
Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java?rev=1561523&r1=1561522&r2=1561523&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java Sun Jan 26 17:45:06 2014
@@ -353,7 +353,6 @@ public class NonSequentialPDFParser exte
// -- parse xref
if (pdfSource.peek() == X)
{
- document.setIsXRefStream(false);
// xref table and trailer
// use existing parser to parse xref table
parseXrefTable(prev);
@@ -377,7 +376,6 @@ public class NonSequentialPDFParser exte
}
else
{
- document.setIsXRefStream(true);
// parse xref stream
prev = parseXrefObjStream(prev);
if (isLenient && prev > -1)