Skip to content

Commit

Permalink
Support MOXy
Browse files Browse the repository at this point in the history
  • Loading branch information
plutext committed Nov 5, 2012
1 parent d963e2a commit a793522
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/main/java/org/docx4j/convert/in/FlatOpcXmlImporter.java
Expand Up @@ -57,6 +57,7 @@
import org.docx4j.openpackaging.parts.opendope.ComponentsPart;
import org.docx4j.openpackaging.parts.opendope.ConditionsPart;
import org.docx4j.openpackaging.parts.opendope.QuestionsPart;
import org.docx4j.openpackaging.parts.opendope.StandardisedAnswersPart;
import org.docx4j.openpackaging.parts.opendope.XPathsPart;
import org.docx4j.openpackaging.parts.relationships.RelationshipsPart;
import org.docx4j.relationships.Relationship;
Expand Down Expand Up @@ -518,6 +519,12 @@ public static Part getRawPart(ContentTypeManager ctm, org.docx4j.xmlPackage.Part
((QuestionsPart)part).setJaxbElement(
(org.opendope.questions.Questionnaire)o);

} else if (o instanceof org.opendope.answers.Answers) {

part = new StandardisedAnswersPart(name);
((StandardisedAnswersPart)part).setJaxbElement(
(org.opendope.answers.Answers)o);

} else if (o instanceof org.opendope.components.Components) {

part = new ComponentsPart(name);
Expand Down
Expand Up @@ -670,8 +670,9 @@ public void parseContentTypesFile(InputStream contentTypes)

log.debug("unmarshalling " + this.getClass().getName() );

Object res = u.unmarshal( contentTypes );
types = (CTTypes)((JAXBElement)res).getValue();
Object res = XmlUtils.unwrap(u.unmarshal( contentTypes ));
//types = (CTTypes)((JAXBElement)res).getValue();
types = (CTTypes)res;
//log.debug( types.getClass().getName() + " unmarshalled" );

if (log.isDebugEnabled()) {
Expand Down

0 comments on commit a793522

Please sign in to comment.