aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml/java/org/apache/poi/openxml4j
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2014-08-10 18:25:10 +0000
committerAndreas Beeker <kiwiwings@apache.org>2014-08-10 18:25:10 +0000
commit9660a04c19304996f30bf8f815daeeb141c5a26f (patch)
tree50322487ed90e8f24e6b8d98e4af2aa61b2cef2f /src/ooxml/java/org/apache/poi/openxml4j
parentb74e89ad014e5880d7458f16233c1c238ea16244 (diff)
downloadpoi-9660a04c19304996f30bf8f815daeeb141c5a26f.tar.gz
poi-9660a04c19304996f30bf8f815daeeb141c5a26f.zip
Xml signature support - version 1
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/xml_signature@1617141 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/java/org/apache/poi/openxml4j')
-rw-r--r--src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationship.java2
-rw-r--r--src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java2
-rw-r--r--src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java7
3 files changed, 4 insertions, 7 deletions
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationship.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationship.java
index 2a5ade28d6..7d4741b219 100644
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationship.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationship.java
@@ -182,8 +182,6 @@ public final class PackageRelationship {
}
/**
- * public URI getSourceUri(){ }
- *
* @return the targetMode
*/
public TargetMode getTargetMode() {
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 6adc737926..bef53f4a6e 100644
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java
@@ -306,7 +306,7 @@ public final class PackageRelationshipCollection implements
* @throws InvalidFormatException
* Throws if the relationship part is invalid.
*/
- private void parseRelationshipsPart(PackagePart relPart)
+ public void parseRelationshipsPart(PackagePart relPart)
throws InvalidFormatException {
try {
logger.log(POILogger.DEBUG, "Parsing relationship: " + relPart.getPartName());
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java
index 2c3b97a7f4..381d26b9c8 100644
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java
@@ -148,11 +148,10 @@ public abstract class ContentTypeManager {
* </p>
*/
public void addContentType(PackagePartName partName, String contentType) {
- boolean defaultCTExists = false;
+ boolean defaultCTExists = this.defaultContentType.containsValue(contentType);
String extension = partName.getExtension().toLowerCase();
if ((extension.length() == 0)
- || (this.defaultContentType.containsKey(extension) && !(defaultCTExists = this.defaultContentType
- .containsValue(contentType))))
+ || (this.defaultContentType.containsKey(extension) && !defaultCTExists))
this.addOverrideContentType(partName, contentType);
else if (!defaultCTExists)
this.addDefaultContentType(extension, contentType);
@@ -461,7 +460,7 @@ public abstract class ContentTypeManager {
}
/**
- * Use to append default types XML elements, use by the save() metid.
+ * Use to append default types XML elements, use by the save() method.
*
* @param root
* XML parent element use to append this default type element.