Skip to content

Commit

Permalink
XLSX open error with template created by Office 365 #128
Browse files Browse the repository at this point in the history
  • Loading branch information
subbotin committed Apr 12, 2020
1 parent 48f2591 commit 6a2109b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ configure(core) {
exclude(group: 'org.codehaus.castor', module: 'castor-xml')
}

testCompile(group: 'org.jmockit', name: 'jmockit', version: '1.15')
testCompile(group: 'org.jmockit', name: 'jmockit', version: '1.48')
testCompile(group: 'junit', name: 'junit', version: '4.5')
testCompile(group: 'com.h2database', name: 'h2', version: '1.4.196')
testCompile(group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.docx4j.XmlUtils;
import org.docx4j.wml.ContentAccessor;
import org.docx4j.wml.P;
import org.docx4j.wml.SdtBlock;
import org.docx4j.wml.Text;
import org.jvnet.jaxb2_commons.ppp.Child;

Expand Down Expand Up @@ -60,7 +61,7 @@ public void walkJAXBElements(Object parent) {
for (Object object : children) {
object = XmlUtils.unwrap(object);

if (object instanceof Child) {
if (object instanceof Child && !(parent instanceof SdtBlock)) {
((Child) object).setParent(parent);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@
import com.haulmont.yarg.formatters.impl.DocxFormatterDelegate;
import org.docx4j.TraversalUtil;
import org.docx4j.XmlUtils;
import org.docx4j.wml.P;
import org.docx4j.wml.Tbl;
import org.docx4j.wml.Text;
import org.docx4j.wml.Tr;
import org.docx4j.wml.*;
import org.jvnet.jaxb2_commons.ppp.Child;

import java.util.*;
Expand Down Expand Up @@ -112,7 +109,7 @@ public void walkJAXBElements(Object parent) {
for (Object o : children) {
o = XmlUtils.unwrap(o);

if (o instanceof Child) {
if (o instanceof Child && !(parent instanceof SdtBlock)) {
((Child) o).setParent(parent);
}

Expand Down

0 comments on commit 6a2109b

Please sign in to comment.