From 54d462a3f6fda9493eca34f4cfa9af7a965c60b0 Mon Sep 17 00:00:00 2001 From: Andreas Beeker Date: Sun, 2 Feb 2014 01:56:02 +0000 Subject: [PATCH] Bug 53282 - Hyperlink with a non-breaking space throws java.lang.IllegalStateException git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1563540 13f79535-47bb-0310-9956-ffa450edef68 --- .../opc/PackageRelationshipCollection.java | 723 +++++++++--------- .../poi/xssf/usermodel/XSSFRelation.java | 414 +++++----- .../poi/xssf/usermodel/TestXSSFBugs.java | 50 +- test-data/spreadsheet/53282b.xlsx | Bin 0 -> 9319 bytes 4 files changed, 607 insertions(+), 580 deletions(-) create mode 100644 test-data/spreadsheet/53282b.xlsx diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java index e157176ebe..7a3d791410 100644 --- a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java +++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java @@ -22,14 +22,14 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.TreeMap; +import org.apache.poi.openxml4j.exceptions.InvalidFormatException; +import org.apache.poi.openxml4j.exceptions.InvalidOperationException; +import org.apache.poi.util.POILogFactory; +import org.apache.poi.util.POILogger; import org.dom4j.Attribute; import org.dom4j.Document; import org.dom4j.Element; import org.dom4j.io.SAXReader; -import org.apache.poi.openxml4j.exceptions.InvalidFormatException; -import org.apache.poi.openxml4j.exceptions.InvalidOperationException; -import org.apache.poi.util.POILogger; -import org.apache.poi.util.POILogFactory; /** * Represents a collection of PackageRelationship elements that are owned by a @@ -39,179 +39,179 @@ import org.apache.poi.util.POILogFactory; * @version 0.1 */ public final class PackageRelationshipCollection implements - Iterable { + Iterable { private static POILogger logger = POILogFactory.getLogger(PackageRelationshipCollection.class); - /** - * Package relationships ordered by ID. - */ - private TreeMap relationshipsByID; + /** + * Package relationships ordered by ID. + */ + private TreeMap relationshipsByID; - /** - * Package relationships ordered by type. - */ - private TreeMap relationshipsByType; + /** + * Package relationships ordered by type. + */ + private TreeMap relationshipsByType; - /** - * This relationshipPart. - */ - private PackagePart relationshipPart; + /** + * This relationshipPart. + */ + private PackagePart relationshipPart; - /** - * Source part. - */ - private PackagePart sourcePart; + /** + * Source part. + */ + private PackagePart sourcePart; - /** - * This part name. - */ - private PackagePartName partName; + /** + * This part name. + */ + private PackagePartName partName; - /** - * Reference to the package. - */ - private OPCPackage container; - - /** - * The ID number of the next rID# to generate, or -1 - * if that is still to be determined. - */ - private int nextRelationshipId = -1; + /** + * Reference to the package. + */ + private OPCPackage container; + + /** + * The ID number of the next rID# to generate, or -1 + * if that is still to be determined. + */ + private int nextRelationshipId = -1; - /** - * Constructor. - */ - PackageRelationshipCollection() { - relationshipsByID = new TreeMap(); - relationshipsByType = new TreeMap(); - } + /** + * Constructor. + */ + PackageRelationshipCollection() { + relationshipsByID = new TreeMap(); + relationshipsByType = new TreeMap(); + } - /** - * Copy constructor. - * - * This collection will contain only elements from the specified collection - * for which the type is compatible with the specified relationship type - * filter. - * - * @param coll - * Collection to import. - * @param filter - * Relationship type filter. - */ - public PackageRelationshipCollection(PackageRelationshipCollection coll, - String filter) { - this(); - for (PackageRelationship rel : coll.relationshipsByID.values()) { - if (filter == null || rel.getRelationshipType().equals(filter)) - addRelationship(rel); - } - } + /** + * Copy constructor. + * + * This collection will contain only elements from the specified collection + * for which the type is compatible with the specified relationship type + * filter. + * + * @param coll + * Collection to import. + * @param filter + * Relationship type filter. + */ + public PackageRelationshipCollection(PackageRelationshipCollection coll, + String filter) { + this(); + for (PackageRelationship rel : coll.relationshipsByID.values()) { + if (filter == null || rel.getRelationshipType().equals(filter)) + addRelationship(rel); + } + } - /** - * Constructor. - */ - public PackageRelationshipCollection(OPCPackage container) - throws InvalidFormatException { - this(container, null); - } + /** + * Constructor. + */ + public PackageRelationshipCollection(OPCPackage container) + throws InvalidFormatException { + this(container, null); + } - /** - * Constructor. - * - * @throws InvalidFormatException - * Throws if the format of the content part is invalid. - * - * @throws InvalidOperationException - * Throws if the specified part is a relationship part. - */ - public PackageRelationshipCollection(PackagePart part) - throws InvalidFormatException { - this(part._container, part); - } + /** + * Constructor. + * + * @throws InvalidFormatException + * Throws if the format of the content part is invalid. + * + * @throws InvalidOperationException + * Throws if the specified part is a relationship part. + */ + public PackageRelationshipCollection(PackagePart part) + throws InvalidFormatException { + this(part._container, part); + } - /** - * Constructor. Parse the existing package relationship part if one exists. - * - * @param container - * The parent package. - * @param part - * The part that own this relationships collection. If null - * then this part is considered as the package root. - * @throws InvalidFormatException - * If an error occurs during the parsing of the relatinships - * part fo the specified part. - */ - public PackageRelationshipCollection(OPCPackage container, PackagePart part) - throws InvalidFormatException { - this(); + /** + * Constructor. Parse the existing package relationship part if one exists. + * + * @param container + * The parent package. + * @param part + * The part that own this relationships collection. If null + * then this part is considered as the package root. + * @throws InvalidFormatException + * If an error occurs during the parsing of the relatinships + * part fo the specified part. + */ + public PackageRelationshipCollection(OPCPackage container, PackagePart part) + throws InvalidFormatException { + this(); - if (container == null) - throw new IllegalArgumentException("container"); + if (container == null) + throw new IllegalArgumentException("container"); - // Check if the specified part is not a relationship part - if (part != null && part.isRelationshipPart()) - throw new IllegalArgumentException("part"); + // Check if the specified part is not a relationship part + if (part != null && part.isRelationshipPart()) + throw new IllegalArgumentException("part"); - this.container = container; - this.sourcePart = part; - this.partName = getRelationshipPartName(part); - if ((container.getPackageAccess() != PackageAccess.WRITE) - && container.containPart(this.partName)) { - relationshipPart = container.getPart(this.partName); - parseRelationshipsPart(relationshipPart); - } - } + this.container = container; + this.sourcePart = part; + this.partName = getRelationshipPartName(part); + if ((container.getPackageAccess() != PackageAccess.WRITE) + && container.containPart(this.partName)) { + relationshipPart = container.getPart(this.partName); + parseRelationshipsPart(relationshipPart); + } + } - /** - * Get the relationship part name of the specified part. - * - * @param part - * The part . - * @return The relationship part name of the specified part. Be careful, - * only the correct name is returned, this method does not check if - * the part really exist in a package ! - * @throws InvalidOperationException - * Throws if the specified part is a relationship part. - */ - private static PackagePartName getRelationshipPartName(PackagePart part) - throws InvalidOperationException { - PackagePartName partName; - if (part == null) { - partName = PackagingURIHelper.PACKAGE_ROOT_PART_NAME; - } else { - partName = part.getPartName(); - } - return PackagingURIHelper.getRelationshipPartName(partName); - } + /** + * Get the relationship part name of the specified part. + * + * @param part + * The part . + * @return The relationship part name of the specified part. Be careful, + * only the correct name is returned, this method does not check if + * the part really exist in a package ! + * @throws InvalidOperationException + * Throws if the specified part is a relationship part. + */ + private static PackagePartName getRelationshipPartName(PackagePart part) + throws InvalidOperationException { + PackagePartName partName; + if (part == null) { + partName = PackagingURIHelper.PACKAGE_ROOT_PART_NAME; + } else { + partName = part.getPartName(); + } + return PackagingURIHelper.getRelationshipPartName(partName); + } - /** - * Add the specified relationship to the collection. - * - * @param relPart - * The relationship to add. - */ - public void addRelationship(PackageRelationship relPart) { - relationshipsByID.put(relPart.getId(), relPart); - relationshipsByType.put(relPart.getRelationshipType(), relPart); - } + /** + * Add the specified relationship to the collection. + * + * @param relPart + * The relationship to add. + */ + public void addRelationship(PackageRelationship relPart) { + relationshipsByID.put(relPart.getId(), relPart); + relationshipsByType.put(relPart.getRelationshipType(), relPart); + } - /** - * Add a relationship to the collection. - * - * @param targetUri - * Target URI. - * @param targetMode - * The target mode : INTERNAL or EXTERNAL - * @param relationshipType - * Relationship type. - * @param id - * Relationship ID. - * @return The newly created relationship. - * @see PackageAccess - */ - public PackageRelationship addRelationship(URI targetUri, - TargetMode targetMode, String relationshipType, String id) { + /** + * Add a relationship to the collection. + * + * @param targetUri + * Target URI. + * @param targetMode + * The target mode : INTERNAL or EXTERNAL + * @param relationshipType + * Relationship type. + * @param id + * Relationship ID. + * @return The newly created relationship. + * @see PackageAccess + */ + public PackageRelationship addRelationship(URI targetUri, + TargetMode targetMode, String relationshipType, String id) { if (id == null) { // Generate a unique ID is id parameter is null. if (nextRelationshipId == -1) { @@ -224,229 +224,230 @@ public final class PackageRelationshipCollection implements } while (relationshipsByID.get(id) != null); } - PackageRelationship rel = new PackageRelationship(container, - sourcePart, targetUri, targetMode, relationshipType, id); - relationshipsByID.put(rel.getId(), rel); - relationshipsByType.put(rel.getRelationshipType(), rel); - return rel; - } + PackageRelationship rel = new PackageRelationship(container, + sourcePart, targetUri, targetMode, relationshipType, id); + relationshipsByID.put(rel.getId(), rel); + relationshipsByType.put(rel.getRelationshipType(), rel); + return rel; + } - /** - * Remove a relationship by its ID. - * - * @param id - * The relationship ID to remove. - */ - public void removeRelationship(String id) { - if (relationshipsByID != null && relationshipsByType != null) { - PackageRelationship rel = relationshipsByID.get(id); - if (rel != null) { - relationshipsByID.remove(rel.getId()); - relationshipsByType.values().remove(rel); - } - } - } + /** + * Remove a relationship by its ID. + * + * @param id + * The relationship ID to remove. + */ + public void removeRelationship(String id) { + if (relationshipsByID != null && relationshipsByType != null) { + PackageRelationship rel = relationshipsByID.get(id); + if (rel != null) { + relationshipsByID.remove(rel.getId()); + relationshipsByType.values().remove(rel); + } + } + } - /** - * Remove a relationship by its reference. - * - * @param rel - * The relationship to delete. - */ - public void removeRelationship(PackageRelationship rel) { - if (rel == null) - throw new IllegalArgumentException("rel"); + /** + * Remove a relationship by its reference. + * + * @param rel + * The relationship to delete. + */ + public void removeRelationship(PackageRelationship rel) { + if (rel == null) + throw new IllegalArgumentException("rel"); - relationshipsByID.values().remove(rel); - relationshipsByType.values().remove(rel); - } + relationshipsByID.values().remove(rel); + relationshipsByType.values().remove(rel); + } - /** - * Retrieves a relationship by its index in the collection. - * - * @param index - * Must be a value between [0-relationships_count-1] - */ - public PackageRelationship getRelationship(int index) { - if (index < 0 || index > relationshipsByID.values().size()) - throw new IllegalArgumentException("index"); + /** + * Retrieves a relationship by its index in the collection. + * + * @param index + * Must be a value between [0-relationships_count-1] + */ + public PackageRelationship getRelationship(int index) { + if (index < 0 || index > relationshipsByID.values().size()) + throw new IllegalArgumentException("index"); - PackageRelationship retRel = null; - int i = 0; - for (PackageRelationship rel : relationshipsByID.values()) { - if (index == i++) - return rel; - } - return retRel; - } + PackageRelationship retRel = null; + int i = 0; + for (PackageRelationship rel : relationshipsByID.values()) { + if (index == i++) + return rel; + } + return retRel; + } - /** - * Retrieves a package relationship based on its id. - * - * @param id - * ID of the package relationship to retrieve. - * @return The package relationship identified by the specified id. - */ - public PackageRelationship getRelationshipByID(String id) { - return relationshipsByID.get(id); - } + /** + * Retrieves a package relationship based on its id. + * + * @param id + * ID of the package relationship to retrieve. + * @return The package relationship identified by the specified id. + */ + public PackageRelationship getRelationshipByID(String id) { + return relationshipsByID.get(id); + } - /** - * Get the numbe rof relationships in the collection. - */ - public int size() { - return relationshipsByID.values().size(); - } + /** + * Get the numbe rof relationships in the collection. + */ + public int size() { + return relationshipsByID.values().size(); + } - /** - * Parse the relationship part and add all relationship in this collection. - * - * @param relPart - * The package part to parse. - * @throws InvalidFormatException - * Throws if the relationship part is invalid. - */ - private void parseRelationshipsPart(PackagePart relPart) - throws InvalidFormatException { - try { - SAXReader reader = new SAXReader(); - logger.log(POILogger.DEBUG, "Parsing relationship: " + relPart.getPartName()); - Document xmlRelationshipsDoc = reader - .read(relPart.getInputStream()); + /** + * Parse the relationship part and add all relationship in this collection. + * + * @param relPart + * The package part to parse. + * @throws InvalidFormatException + * Throws if the relationship part is invalid. + */ + private void parseRelationshipsPart(PackagePart relPart) + throws InvalidFormatException { + try { + SAXReader reader = new SAXReader(); + logger.log(POILogger.DEBUG, "Parsing relationship: " + relPart.getPartName()); + Document xmlRelationshipsDoc = reader + .read(relPart.getInputStream()); - // Browse default types - Element root = xmlRelationshipsDoc.getRootElement(); + // Browse default types + Element root = xmlRelationshipsDoc.getRootElement(); - // Check OPC compliance M4.1 rule - boolean fCorePropertiesRelationship = false; + // Check OPC compliance M4.1 rule + boolean fCorePropertiesRelationship = false; - for (Iterator i = root - .elementIterator(PackageRelationship.RELATIONSHIP_TAG_NAME); i - .hasNext();) { - Element element = (Element) i.next(); - // Relationship ID - String id = element.attribute( - PackageRelationship.ID_ATTRIBUTE_NAME).getValue(); - // Relationship type - String type = element.attribute( - PackageRelationship.TYPE_ATTRIBUTE_NAME).getValue(); + @SuppressWarnings("unchecked") + Iterator iter = (Iterator) + root.elementIterator(PackageRelationship.RELATIONSHIP_TAG_NAME); + while (iter.hasNext()) { + Element element = iter.next(); + // Relationship ID + String id = element.attribute( + PackageRelationship.ID_ATTRIBUTE_NAME).getValue(); + // Relationship type + String type = element.attribute( + PackageRelationship.TYPE_ATTRIBUTE_NAME).getValue(); - /* Check OPC Compliance */ - // Check Rule M4.1 - if (type.equals(PackageRelationshipTypes.CORE_PROPERTIES)) - if (!fCorePropertiesRelationship) - fCorePropertiesRelationship = true; - else - throw new InvalidFormatException( - "OPC Compliance error [M4.1]: there is more than one core properties relationship in the package !"); + /* Check OPC Compliance */ + // Check Rule M4.1 + if (type.equals(PackageRelationshipTypes.CORE_PROPERTIES)) + if (!fCorePropertiesRelationship) + fCorePropertiesRelationship = true; + else + throw new InvalidFormatException( + "OPC Compliance error [M4.1]: there is more than one core properties relationship in the package !"); - /* End OPC Compliance */ + /* End OPC Compliance */ - // TargetMode (default value "Internal") - Attribute targetModeAttr = element - .attribute(PackageRelationship.TARGET_MODE_ATTRIBUTE_NAME); - TargetMode targetMode = TargetMode.INTERNAL; - if (targetModeAttr != null) { - targetMode = targetModeAttr.getValue().toLowerCase() - .equals("internal") ? TargetMode.INTERNAL - : TargetMode.EXTERNAL; - } - - // Target converted in URI - URI target; - String value = ""; - try { - value = element.attribute( - PackageRelationship.TARGET_ATTRIBUTE_NAME) - .getValue(); + // TargetMode (default value "Internal") + Attribute targetModeAttr = element + .attribute(PackageRelationship.TARGET_MODE_ATTRIBUTE_NAME); + TargetMode targetMode = TargetMode.INTERNAL; + if (targetModeAttr != null) { + targetMode = targetModeAttr.getValue().toLowerCase() + .equals("internal") ? TargetMode.INTERNAL + : TargetMode.EXTERNAL; + } + // Target converted in URI + URI target = PackagingURIHelper.toURI("http://invalid.uri"); // dummy url + String value = element.attribute( + PackageRelationship.TARGET_ATTRIBUTE_NAME) + .getValue(); + try { + // when parsing of the given uri fails, we can either + // ignore this relationship, which leads to IllegalStateException + // later on, or use a dummy value and thus enable processing of the + // package target = PackagingURIHelper.toURI(value); + } catch (URISyntaxException e) { + logger.log(POILogger.ERROR, "Cannot convert " + value + + " in a valid relationship URI-> dummy-URI used", e); + } + addRelationship(target, targetMode, type, id); + } + } catch (Exception e) { + logger.log(POILogger.ERROR, e); + throw new InvalidFormatException(e.getMessage()); + } + } - } catch (URISyntaxException e) { - logger.log(POILogger.ERROR, "Cannot convert " + value - + " in a valid relationship URI-> ignored", e); - continue; - } - addRelationship(target, targetMode, type, id); - } - } catch (Exception e) { - logger.log(POILogger.ERROR, e); - throw new InvalidFormatException(e.getMessage()); - } - } + /** + * Retrieves all relations with the specified type. + * + * @param typeFilter + * Relationship type filter. If null then all + * relationships are returned. + * @return All relationships of the type specified by the filter. + */ + public PackageRelationshipCollection getRelationships(String typeFilter) { + PackageRelationshipCollection coll = new PackageRelationshipCollection( + this, typeFilter); + return coll; + } - /** - * Retrieves all relations with the specified type. - * - * @param typeFilter - * Relationship type filter. If null then all - * relationships are returned. - * @return All relationships of the type specified by the filter. - */ - public PackageRelationshipCollection getRelationships(String typeFilter) { - PackageRelationshipCollection coll = new PackageRelationshipCollection( - this, typeFilter); - return coll; - } + /** + * Get this collection's iterator. + */ + public Iterator iterator() { + return relationshipsByID.values().iterator(); + } - /** - * Get this collection's iterator. - */ - public Iterator iterator() { - return relationshipsByID.values().iterator(); - } + /** + * Get an iterator of a collection with all relationship with the specified + * type. + * + * @param typeFilter + * Type filter. + * @return An iterator to a collection containing all relationships with the + * specified type contain in this collection. + */ + public Iterator iterator(String typeFilter) { + ArrayList retArr = new ArrayList(); + for (PackageRelationship rel : relationshipsByID.values()) { + if (rel.getRelationshipType().equals(typeFilter)) + retArr.add(rel); + } + return retArr.iterator(); + } - /** - * Get an iterator of a collection with all relationship with the specified - * type. - * - * @param typeFilter - * Type filter. - * @return An iterator to a collection containing all relationships with the - * specified type contain in this collection. - */ - public Iterator iterator(String typeFilter) { - ArrayList retArr = new ArrayList(); - for (PackageRelationship rel : relationshipsByID.values()) { - if (rel.getRelationshipType().equals(typeFilter)) - retArr.add(rel); - } - return retArr.iterator(); - } + /** + * Clear all relationships. + */ + public void clear() { + relationshipsByID.clear(); + relationshipsByType.clear(); + } - /** - * Clear all relationships. - */ - public void clear() { - relationshipsByID.clear(); - relationshipsByType.clear(); - } + @Override + public String toString() { + String str; + if (relationshipsByID == null) { + str = "relationshipsByID=null"; + } else { + str = relationshipsByID.size() + " relationship(s) = ["; + } + if ((relationshipPart != null) && (relationshipPart._partName != null)) { + str = str + "," + relationshipPart._partName; + } else { + str = str + ",relationshipPart=null"; + } - @Override - public String toString() { - String str; - if (relationshipsByID == null) { - str = "relationshipsByID=null"; - } else { - str = relationshipsByID.size() + " relationship(s) = ["; - } - if ((relationshipPart != null) && (relationshipPart._partName != null)) { - str = str + "," + relationshipPart._partName; - } else { - str = str + ",relationshipPart=null"; - } - - // Source of this relationship - if ((sourcePart != null) && (sourcePart._partName != null)) { - str = str + "," + sourcePart._partName; - } else { - str = str + ",sourcePart=null"; - } - if (partName != null) { - str = str + "," + partName; - } else { - str = str + ",uri=null)"; - } - return str + "]"; - } + // Source of this relationship + if ((sourcePart != null) && (sourcePart._partName != null)) { + str = str + "," + sourcePart._partName; + } else { + str = str + ",sourcePart=null"; + } + if (partName != null) { + str = str + "," + partName; + } else { + str = str + ",uri=null)"; + } + return str + "]"; + } } diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRelation.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRelation.java index 1f5c5120a9..bdb1ea818b 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRelation.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRelation.java @@ -30,6 +30,7 @@ import org.apache.poi.openxml4j.opc.PackagePart; import org.apache.poi.openxml4j.opc.PackagePartName; import org.apache.poi.openxml4j.opc.PackageRelationship; import org.apache.poi.openxml4j.opc.PackageRelationshipCollection; +import org.apache.poi.openxml4j.opc.PackageRelationshipTypes; import org.apache.poi.openxml4j.opc.PackagingURIHelper; import org.apache.poi.util.POILogFactory; import org.apache.poi.util.POILogger; @@ -54,252 +55,278 @@ public final class XSSFRelation extends POIXMLRelation { protected static Map _table = new HashMap(); - public static final XSSFRelation WORKBOOK = new XSSFRelation( - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/workbook", - "/xl/workbook.xml", - null - ); - public static final XSSFRelation MACROS_WORKBOOK = new XSSFRelation( - "application/vnd.ms-excel.sheet.macroEnabled.main+xml", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", - "/xl/workbook.xml", - null - ); + public static final XSSFRelation WORKBOOK = new XSSFRelation( + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml", + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/workbook", + "/xl/workbook.xml", + null + ); + public static final XSSFRelation MACROS_WORKBOOK = new XSSFRelation( + "application/vnd.ms-excel.sheet.macroEnabled.main+xml", + PackageRelationshipTypes.CORE_DOCUMENT, + "/xl/workbook.xml", + null + ); public static final XSSFRelation TEMPLATE_WORKBOOK = new XSSFRelation( - "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", - "/xl/workbook.xml", - null + "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml", + PackageRelationshipTypes.CORE_DOCUMENT, + "/xl/workbook.xml", + null ); + public static final XSSFRelation MACRO_TEMPLATE_WORKBOOK = new XSSFRelation( - "application/vnd.ms-excel.template.macroEnabled.main+xml", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", - "/xl/workbook.xml", - null + "application/vnd.ms-excel.template.macroEnabled.main+xml", + PackageRelationshipTypes.CORE_DOCUMENT, + "/xl/workbook.xml", + null ); + public static final XSSFRelation MACRO_ADDIN_WORKBOOK = new XSSFRelation( - "application/vnd.ms-excel.addin.macroEnabled.main+xml", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", - "/xl/workbook.xml", - null + "application/vnd.ms-excel.addin.macroEnabled.main+xml", + PackageRelationshipTypes.CORE_DOCUMENT, + "/xl/workbook.xml", + null ); - public static final XSSFRelation WORKSHEET = new XSSFRelation( - "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet", - "/xl/worksheets/sheet#.xml", - XSSFSheet.class - ); - public static final XSSFRelation CHARTSHEET = new XSSFRelation( - "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet", - "/xl/chartsheets/sheet#.xml", - XSSFChartSheet.class - ); - public static final XSSFRelation SHARED_STRINGS = new XSSFRelation( - "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings", - "/xl/sharedStrings.xml", - SharedStringsTable.class - ); - public static final XSSFRelation STYLES = new XSSFRelation( - "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles", - "/xl/styles.xml", - StylesTable.class - ); - public static final XSSFRelation DRAWINGS = new XSSFRelation( - "application/vnd.openxmlformats-officedocument.drawing+xml", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing", - "/xl/drawings/drawing#.xml", - XSSFDrawing.class - ); - public static final XSSFRelation VML_DRAWINGS = new XSSFRelation( - "application/vnd.openxmlformats-officedocument.vmlDrawing", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing", - "/xl/drawings/vmlDrawing#.vml", - XSSFVMLDrawing.class - ); - public static final XSSFRelation CHART = new XSSFRelation( - "application/vnd.openxmlformats-officedocument.drawingml.chart+xml", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart", - "/xl/charts/chart#.xml", - XSSFChart.class - ); - public static final XSSFRelation CUSTOM_XML_MAPPINGS = new XSSFRelation( - "application/xml", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/xmlMaps", - "/xl/xmlMaps.xml", - MapInfo.class - ); + public static final XSSFRelation WORKSHEET = new XSSFRelation( + "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml", + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet", + "/xl/worksheets/sheet#.xml", + XSSFSheet.class + ); - public static final XSSFRelation SINGLE_XML_CELLS = new XSSFRelation( - "application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableSingleCells", - "/xl/tables/tableSingleCells#.xml", - SingleXmlCells.class - ); + public static final XSSFRelation CHARTSHEET = new XSSFRelation( + "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml", + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet", + "/xl/chartsheets/sheet#.xml", + XSSFChartSheet.class + ); - public static final XSSFRelation TABLE = new XSSFRelation( - "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/table", - "/xl/tables/table#.xml", - XSSFTable.class - ); + public static final XSSFRelation SHARED_STRINGS = new XSSFRelation( + "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml", + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings", + "/xl/sharedStrings.xml", + SharedStringsTable.class + ); + + public static final XSSFRelation STYLES = new XSSFRelation( + "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml", + PackageRelationshipTypes.STYLE_PART, + "/xl/styles.xml", + StylesTable.class + ); + + public static final XSSFRelation DRAWINGS = new XSSFRelation( + "application/vnd.openxmlformats-officedocument.drawing+xml", + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing", + "/xl/drawings/drawing#.xml", + XSSFDrawing.class + ); + + public static final XSSFRelation VML_DRAWINGS = new XSSFRelation( + "application/vnd.openxmlformats-officedocument.vmlDrawing", + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing", + "/xl/drawings/vmlDrawing#.vml", + XSSFVMLDrawing.class + ); + + public static final XSSFRelation CHART = new XSSFRelation( + "application/vnd.openxmlformats-officedocument.drawingml.chart+xml", + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart", + "/xl/charts/chart#.xml", + XSSFChart.class + ); + + public static final XSSFRelation CUSTOM_XML_MAPPINGS = new XSSFRelation( + "application/xml", + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/xmlMaps", + "/xl/xmlMaps.xml", + MapInfo.class + ); + + public static final XSSFRelation SINGLE_XML_CELLS = new XSSFRelation( + "application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml", + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableSingleCells", + "/xl/tables/tableSingleCells#.xml", + SingleXmlCells.class + ); + + public static final XSSFRelation TABLE = new XSSFRelation( + "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml", + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/table", + "/xl/tables/table#.xml", + XSSFTable.class + ); public static final XSSFRelation IMAGES = new XSSFRelation( - null, - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", - null, - XSSFPictureData.class + null, + PackageRelationshipTypes.IMAGE_PART, + null, + XSSFPictureData.class ); + public static final XSSFRelation IMAGE_EMF = new XSSFRelation( - "image/x-emf", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", - "/xl/media/image#.emf", - XSSFPictureData.class + "image/x-emf", + PackageRelationshipTypes.IMAGE_PART, + "/xl/media/image#.emf", + XSSFPictureData.class ); + public static final XSSFRelation IMAGE_WMF = new XSSFRelation( - "image/x-wmf", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", - "/xl/media/image#.wmf", - XSSFPictureData.class + "image/x-wmf", + PackageRelationshipTypes.IMAGE_PART, + "/xl/media/image#.wmf", + XSSFPictureData.class ); + public static final XSSFRelation IMAGE_PICT = new XSSFRelation( - "image/pict", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", - "/xl/media/image#.pict", - XSSFPictureData.class + "image/pict", + PackageRelationshipTypes.IMAGE_PART, + "/xl/media/image#.pict", + XSSFPictureData.class ); + public static final XSSFRelation IMAGE_JPEG = new XSSFRelation( - "image/jpeg", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", - "/xl/media/image#.jpeg", - XSSFPictureData.class + "image/jpeg", + PackageRelationshipTypes.IMAGE_PART, + "/xl/media/image#.jpeg", + XSSFPictureData.class ); + public static final XSSFRelation IMAGE_PNG = new XSSFRelation( - "image/png", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", - "/xl/media/image#.png", - XSSFPictureData.class + "image/png", + PackageRelationshipTypes.IMAGE_PART, + "/xl/media/image#.png", + XSSFPictureData.class ); + public static final XSSFRelation IMAGE_DIB = new XSSFRelation( - "image/dib", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", - "/xl/media/image#.dib", - XSSFPictureData.class + "image/dib", + PackageRelationshipTypes.IMAGE_PART, + "/xl/media/image#.dib", + XSSFPictureData.class ); public static final XSSFRelation IMAGE_GIF = new XSSFRelation( - "image/gif", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", - "/xl/media/image#.gif", - XSSFPictureData.class + "image/gif", + PackageRelationshipTypes.IMAGE_PART, + "/xl/media/image#.gif", + XSSFPictureData.class ); public static final XSSFRelation IMAGE_TIFF = new XSSFRelation( - "image/tiff", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", - "/xl/media/image#.tiff", - XSSFPictureData.class + "image/tiff", + PackageRelationshipTypes.IMAGE_PART, + "/xl/media/image#.tiff", + XSSFPictureData.class ); + public static final XSSFRelation IMAGE_EPS = new XSSFRelation( - "image/x-eps", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", - "/xl/media/image#.eps", - XSSFPictureData.class + "image/x-eps", + PackageRelationshipTypes.IMAGE_PART, + "/xl/media/image#.eps", + XSSFPictureData.class ); + public static final XSSFRelation IMAGE_BMP = new XSSFRelation( - "image/x-ms-bmp", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", - "/xl/media/image#.bmp", - XSSFPictureData.class + "image/x-ms-bmp", + PackageRelationshipTypes.IMAGE_PART, + "/xl/media/image#.bmp", + XSSFPictureData.class ); + public static final XSSFRelation IMAGE_WPG = new XSSFRelation( - "image/x-wpg", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", - "/xl/media/image#.wpg", - XSSFPictureData.class + "image/x-wpg", + PackageRelationshipTypes.IMAGE_PART, + "/xl/media/image#.wpg", + XSSFPictureData.class ); - public static final XSSFRelation SHEET_COMMENTS = new XSSFRelation( - "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments", - "/xl/comments#.xml", - CommentsTable.class - ); - public static final XSSFRelation SHEET_HYPERLINKS = new XSSFRelation( - null, - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", - null, - null - ); - public static final XSSFRelation OLEEMBEDDINGS = new XSSFRelation( - null, - POIXMLDocument.OLE_OBJECT_REL_TYPE, - null, - null - ); - public static final XSSFRelation PACKEMBEDDINGS = new XSSFRelation( - null, - POIXMLDocument.PACK_OBJECT_REL_TYPE, - null, - null + public static final XSSFRelation SHEET_COMMENTS = new XSSFRelation( + "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml", + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments", + "/xl/comments#.xml", + CommentsTable.class ); - public static final XSSFRelation VBA_MACROS = new XSSFRelation( - "application/vnd.ms-office.vbaProject", - "http://schemas.microsoft.com/office/2006/relationships/vbaProject", - "/xl/vbaProject.bin", - null + public static final XSSFRelation SHEET_HYPERLINKS = new XSSFRelation( + null, + PackageRelationshipTypes.HYPERLINK_PART, + null, + null ); - public static final XSSFRelation ACTIVEX_CONTROLS = new XSSFRelation( - "application/vnd.ms-office.activeX+xml", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/control", - "/xl/activeX/activeX#.xml", - null - ); - public static final XSSFRelation ACTIVEX_BINS = new XSSFRelation( - "application/vnd.ms-office.activeX", - "http://schemas.microsoft.com/office/2006/relationships/activeXControlBinary", - "/xl/activeX/activeX#.bin", - null - ); + + public static final XSSFRelation OLEEMBEDDINGS = new XSSFRelation( + null, + POIXMLDocument.OLE_OBJECT_REL_TYPE, + null, + null + ); + + public static final XSSFRelation PACKEMBEDDINGS = new XSSFRelation( + null, + POIXMLDocument.PACK_OBJECT_REL_TYPE, + null, + null + ); + + public static final XSSFRelation VBA_MACROS = new XSSFRelation( + "application/vnd.ms-office.vbaProject", + "http://schemas.microsoft.com/office/2006/relationships/vbaProject", + "/xl/vbaProject.bin", + null + ); + + public static final XSSFRelation ACTIVEX_CONTROLS = new XSSFRelation( + "application/vnd.ms-office.activeX+xml", + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/control", + "/xl/activeX/activeX#.xml", + null + ); + + public static final XSSFRelation ACTIVEX_BINS = new XSSFRelation( + "application/vnd.ms-office.activeX", + "http://schemas.microsoft.com/office/2006/relationships/activeXControlBinary", + "/xl/activeX/activeX#.bin", + null + ); + public static final XSSFRelation THEME = new XSSFRelation( - "application/vnd.openxmlformats-officedocument.theme+xml", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme", - "/xl/theme/theme#.xml", - ThemesTable.class + "application/vnd.openxmlformats-officedocument.theme+xml", + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme", + "/xl/theme/theme#.xml", + ThemesTable.class ); + public static final XSSFRelation CALC_CHAIN = new XSSFRelation( - "application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain", - "/xl/calcChain.xml", - CalculationChain.class + "application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml", + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain", + "/xl/calcChain.xml", + CalculationChain.class ); + public static final XSSFRelation PRINTER_SETTINGS = new XSSFRelation( - "application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings", - "/xl/printerSettings/printerSettings#.bin", - null - ); + "application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings", + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings", + "/xl/printerSettings/printerSettings#.bin", + null + ); - private XSSFRelation(String type, String rel, String defaultName, Class cls) { + private XSSFRelation(String type, String rel, String defaultName, Class cls) { super(type, rel, defaultName, cls); if(cls != null && !_table.containsKey(rel)) _table.put(rel, this); } /** - * Fetches the InputStream to read the contents, based - * of the specified core part, for which we are defined - * as a suitable relationship - */ - public InputStream getContents(PackagePart corePart) throws IOException, InvalidFormatException { + * Fetches the InputStream to read the contents, based + * of the specified core part, for which we are defined + * as a suitable relationship + */ + public InputStream getContents(PackagePart corePart) throws IOException, InvalidFormatException { PackageRelationshipCollection prc = - corePart.getRelationshipsByType(_relation); + corePart.getRelationshipsByType(_relation); Iterator it = prc.iterator(); if(it.hasNext()) { PackageRelationship rel = it.next(); @@ -309,8 +336,7 @@ public final class XSSFRelation extends POIXMLRelation { } log.log(POILogger.WARN, "No part " + _defaultName + " found"); return null; - } - + } /** * Get POIXMLRelation by relation type diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java index faf5825b0d..3c24acc7fd 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java @@ -26,7 +26,6 @@ import static org.junit.Assert.fail; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; -import java.io.InputStream; import java.util.List; import org.apache.poi.EncryptedDocumentException; @@ -1414,30 +1413,31 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues { * error message when called via WorkbookFactory. * (You need to supply a password explicitly for them) */ + @Test(expected=EncryptedDocumentException.class) + public void bug55692_stream() throws Exception { + // Directly on a Stream + WorkbookFactory.create(POIDataSamples.getPOIFSInstance().openResourceAsStream("protect.xlsx")); + } + + @Test(expected=EncryptedDocumentException.class) + public void bug55692_poifs() throws Exception { + // Via a POIFSFileSystem + POIFSFileSystem fsP = new POIFSFileSystem(POIDataSamples.getPOIFSInstance().openResourceAsStream("protect.xlsx")); + WorkbookFactory.create(fsP); + } + + @Test(expected=EncryptedDocumentException.class) + public void bug55692_npoifs() throws Exception { + // Via a NPOIFSFileSystem + NPOIFSFileSystem fsNP = new NPOIFSFileSystem(POIDataSamples.getPOIFSInstance().openResourceAsStream("protect.xlsx")); + WorkbookFactory.create(fsNP); + } + @Test - public void bug55692() throws Exception { - InputStream inpA = POIDataSamples.getPOIFSInstance().openResourceAsStream("protect.xlsx"); - InputStream inpB = POIDataSamples.getPOIFSInstance().openResourceAsStream("protect.xlsx"); - InputStream inpC = POIDataSamples.getPOIFSInstance().openResourceAsStream("protect.xlsx"); - - // Directly on a Stream - try { - WorkbookFactory.create(inpA); - fail("Should've raised a EncryptedDocumentException error"); - } catch (EncryptedDocumentException e) {} - - // Via a POIFSFileSystem - POIFSFileSystem fsP = new POIFSFileSystem(inpB); - try { - WorkbookFactory.create(fsP); - fail("Should've raised a EncryptedDocumentException error"); - } catch (EncryptedDocumentException e) {} - - // Via a NPOIFSFileSystem - NPOIFSFileSystem fsNP = new NPOIFSFileSystem(inpC); - try { - WorkbookFactory.create(fsNP); - fail("Should've raised a EncryptedDocumentException error"); - } catch (EncryptedDocumentException e) {} + public void bug53282() { + Workbook wb = XSSFTestDataSamples.openSampleWorkbook("53282b.xlsx"); + Cell c = wb.getSheetAt(0).getRow(1).getCell(0); + assertEquals("#@_#", c.getStringCellValue()); + assertEquals("http://invalid.uri", c.getHyperlink().getAddress()); } } diff --git a/test-data/spreadsheet/53282b.xlsx b/test-data/spreadsheet/53282b.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..3ad5ad865a4926b93b0eba3cb6ace35e9d4eda51 GIT binary patch literal 9319 zcmeHNXH-+$whp~Rq972u6zN5ZG(kWi^xiup(g`KfktT=`L5lP$NEMV4ngpba9O=DC zN17ngl=`CQp659n?;H2m`*Y9ENcPwxncv=Pt@+J4*Egf3ii1lDzy}Zl000(1$)Qoc z9~J;Wi4Oo=1`uMKD!^S4Fjs`7p069s)12SO#hLjTE;eTl02}lBe~$m+8Td`F+p$d$ zh^9WGP#n9&qnw*~>Doj7F0m(jIFwG#(c|&`YJ*GLQeIb7-iA8lpvT7t8(|T?VFM-H zdF;3%y&TV|z3Ah9MK`_YBRPDChQg(iO zb+C%{rnHevw^5xx=f+Unax6R>v#MWuMH?9T77?pamuYl)M`!XhT|K-*zSqmwrc^)9#gT zYA9qV*7{12aeMrTDB@_Ty3}QcAeNPeY`_T5&ydPLxm4$Vylg|aApLDqeYAF5#(NrIuQr3cK}Q-J^b=RZ{aFXrc;hK`Ky(`XYU z?c9bmDl8qZyFv(apTAavyk^m3e8aZIgnFFEcI)uq0Zyoj?bN`*$39up4_hk^dQ9{- z0vc@%oN^VyHvVIdK4sYk6gf6m?Hnk(z%lgJhBF_WEq(G6({09%iz=g|!3~KgtTrMH znv^6vn;y^O1hwB;+Ycnr7Qv3N&k4QaCk#Bh6IBF5=&XEe&D>IZaY%JI^{CiY?oO?K}4R>SS6K~nF*DY8jjj*k#s;PF3Q~|T5TmP zzCn9>6o97FU639N<;i2oQ*uKj&3;fbwXL1)bS5IUPab%8e77})hr6hrE(KpiL&er< z3p7dQ`52Gi3~$bmxO)1O_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