Author: uschindler
Date: Sun Nov  2 20:53:02 2014
New Revision: 1636188

URL: http://svn.apache.org/r1636188
Log:
Fix bug 57162: Content_types.xml and .rels files had elements with wrong 
namespace (the default one)

Modified:
    poi/site/src/documentation/content/xdocs/status.xml
    
poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java
    
poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/marshallers/ZipPartMarshaller.java

Modified: poi/site/src/documentation/content/xdocs/status.xml
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/status.xml?rev=1636188&r1=1636187&r2=1636188&view=diff
==============================================================================
--- poi/site/src/documentation/content/xdocs/status.xml (original)
+++ poi/site/src/documentation/content/xdocs/status.xml Sun Nov  2 20:53:02 2014
@@ -38,6 +38,7 @@
     </devs>
 
     <release version="3.11-beta3" date="2014-??-??">
+        <action dev="PD" type="fix" fixes-bug="57162">Could not open macro 
enabled xlsm file after writing using POI3.11beta2 version</action>
         <action dev="PD" type="add" fixes-bug="57010">Add implementation of 
function PROPER</action>
         <action dev="PD" type="fix" fixes-bug="57166">Add missing HSSFWorkbook 
constructor javadocs</action>
         <action dev="PD" type="add" fixes-bug="57151">And documentation and 
validation in CellRangeAddress to prevent invalid row/column 
combinations</action>

Modified: 
poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java?rev=1636188&r1=1636187&r2=1636188&view=diff
==============================================================================
--- 
poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java
 (original)
+++ 
poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java
 Sun Nov  2 20:53:02 2014
@@ -444,7 +444,7 @@ public abstract class ContentTypeManager
         */
        private void appendSpecificTypes(Element root,
                        Entry<PackagePartName, String> entry) {
-        Element specificType = 
root.getOwnerDocument().createElement(OVERRIDE_TAG_NAME);
+        Element specificType = 
root.getOwnerDocument().createElementNS(TYPES_NAMESPACE_URI, OVERRIDE_TAG_NAME);
         specificType.setAttribute(PART_NAME_ATTRIBUTE_NAME, 
entry.getKey().getName());
         specificType.setAttribute(CONTENT_TYPE_ATTRIBUTE_NAME, 
entry.getValue());
         root.appendChild(specificType);
@@ -460,7 +460,7 @@ public abstract class ContentTypeManager
         * @see #save(java.io.OutputStream)
         */
        private void appendDefaultType(Element root, Entry<String, String> 
entry) {
-        Element defaultType = 
root.getOwnerDocument().createElement(DEFAULT_TAG_NAME);
+        Element defaultType = 
root.getOwnerDocument().createElementNS(TYPES_NAMESPACE_URI, DEFAULT_TAG_NAME);
         defaultType.setAttribute(EXTENSION_ATTRIBUTE_NAME, entry.getKey());
         defaultType.setAttribute(CONTENT_TYPE_ATTRIBUTE_NAME, 
entry.getValue());
         root.appendChild(defaultType);

Modified: 
poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/marshallers/ZipPartMarshaller.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/marshallers/ZipPartMarshaller.java?rev=1636188&r1=1636187&r2=1636188&view=diff
==============================================================================
--- 
poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/marshallers/ZipPartMarshaller.java
 (original)
+++ 
poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/marshallers/ZipPartMarshaller.java
 Sun Nov  2 20:53:02 2014
@@ -36,8 +36,8 @@ import org.apache.poi.openxml4j.opc.Targ
 import org.apache.poi.openxml4j.opc.internal.PartMarshaller;
 import org.apache.poi.openxml4j.opc.internal.ZipHelper;
 import org.apache.poi.util.DocumentHelper;
-import org.apache.poi.util.POILogger;
 import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -134,7 +134,7 @@ public final class ZipPartMarshaller imp
 
                for (PackageRelationship rel : rels) {
                        // the relationship element
-            Element relElem = 
xmlOutDoc.createElement(PackageRelationship.RELATIONSHIP_TAG_NAME);
+            Element relElem = 
xmlOutDoc.createElementNS(PackageNamespaces.RELATIONSHIPS, 
PackageRelationship.RELATIONSHIP_TAG_NAME);
             root.appendChild(relElem);
 
                        // the relationship ID



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to