]> source.dussan.org Git - poi.git/commitdiff
Temporary switch back to using only ooxml-schemas-1.0 (no lists). Revert this commit...
authorNick Burch <nick@apache.org>
Tue, 15 Jun 2010 11:41:06 +0000 (11:41 +0000)
committerNick Burch <nick@apache.org>
Tue, 15 Jun 2010 11:41:06 +0000 (11:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@954835 13f79535-47bb-0310-9956-ffa450edef68

build.xml
src/ooxml/java/org/apache/poi/xssf/model/CommentsTable.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java

index cf73e62752340f39998382cb8c47f12f5d12c95b..18984f8cabe770f627ab1620100cfc3ee98dca7d 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -135,9 +135,9 @@ under the License.
     <property name="ooxml.jsr173.jar" location="${ooxml.lib}/geronimo-stax-api_1.0_spec-1.0.jar"/>
     <property name="ooxml.jsr173.url"
               value="${repository.m2}/maven2/org/apache/geronimo/specs/geronimo-stax-api_1.0_spec/1.0/geronimo-stax-api_1.0_spec-1.0.jar"/>
-    <property name="ooxml.schemas.jar" location="${ooxml.lib}/ooxml-schemas-1.1.jar"/>
+    <property name="ooxml.schemas.jar" location="${ooxml.lib}/ooxml-schemas-1.0.jar"/>
     <property name="ooxml.schemas.url"
-              value="${repository.m2}/maven2/org/apache/poi/ooxml-schemas/1.1/ooxml-schemas-1.1.jar"/>
+              value="${repository.m2}/maven2/org/apache/poi/ooxml-schemas/1.0/ooxml-schemas-1.0.jar"/>
 
     <!-- See http://www.ecma-international.org/publications/standards/Ecma-376.htm -->
     <!-- "Copy these file(s), free of charge" -->
@@ -146,8 +146,8 @@ under the License.
     <property name="ooxml.xsds.url"
               value="http://www.ecma-international.org/publications/files/ECMA-ST/Office%20Open%20XML%201st%20edition%20Part%204%20(PDF).zip"/>
     <property name="ooxml.xsds.src.dir" location="build/ooxml-xsds-src"/>
-    <property name="ooxml.xsds.src.jar" location="${ooxml.lib}/ooxml-schemas-src-1.1.jar"/>
-    <property name="ooxml.xsds.jar" location="${ooxml.lib}/ooxml-schemas-1.1.jar"/>
+    <property name="ooxml.xsds.src.jar" location="${ooxml.lib}/ooxml-schemas-src-1.0.jar"/>
+    <property name="ooxml.xsds.jar" location="${ooxml.lib}/ooxml-schemas-1.0.jar"/>
 
     <property name="maven.ooxml.xsds.version.id" value="1.0"/>
     <property name="maven.ooxml.xsds.jar" value="ooxml-schemas-${maven.ooxml.xsds.version.id}.jar"/>
@@ -397,7 +397,7 @@ under the License.
                 srcgendir="${ooxml.xsds.src.dir}"
                 optimize="yes"
                 destfile="${ooxml.xsds.jar}"
-                javasource="1.5"
+                javasource="1.4"
                 failonerror="true"
                 fork="true"
                 memoryMaximumSize="512m"
index f443be4837f0fef6dee97d98733b58ec73989702..3e35db871e52b8f5ff27906b75d578c72ca18565 100644 (file)
@@ -116,7 +116,7 @@ public class CommentsTable extends POIXMLDocumentPart {
         // Create the cache if needed
         if(commentRefs == null) {
            commentRefs = new HashMap<String, CTComment>();
-           for (CTComment comment : comments.getCommentList().getCommentList()) {
+           for (CTComment comment : comments.getCommentList().getCommentArray()) {
               commentRefs.put(comment.getRef(), comment);
            }
         }
index 6aabadef95f5308f9dd9ba122a56d193cf83d909..e7714241707a35ed01330fe091ce7022df4aae48 100644 (file)
@@ -93,8 +93,8 @@ public class XWPFParagraph implements IBodyElement{
         }
         
         runs = new ArrayList<XWPFRun>();
-        if (prgrph.getRList().size() > 0) {
-           for(CTR ctRun : prgrph.getRList()) {
+        if (prgrph.getRArray().length > 0) {
+           for(CTR ctRun : prgrph.getRArray()) {
               runs.add(new XWPFRun(ctRun, this));
            }
         }
@@ -111,17 +111,17 @@ public class XWPFParagraph implements IBodyElement{
       // TODO - replace this with some sort of XPath expression
       // to directly find all the CTRs, in the right order
       ArrayList<CTR> rs = new ArrayList<CTR>();
-      rs.addAll( paragraph.getRList() );
+      rs.addAll( Arrays.asList(paragraph.getRArray()) );
       
-      for (CTSdtRun sdt : paragraph.getSdtList()) {
+      for (CTSdtRun sdt : paragraph.getSdtArray()) {
           CTSdtContentRun run = sdt.getSdtContent();
-          rs.addAll( run.getRList() );
+          rs.addAll( Arrays.asList(run.getRArray()) );
       }
-      for (CTRunTrackChange c : paragraph.getDelList()) {
-          rs.addAll( c.getRList() );
+      for (CTRunTrackChange c : paragraph.getDelArray()) {
+          rs.addAll( Arrays.asList(c.getRArray()) );
       }
-      for (CTRunTrackChange c : paragraph.getInsList()) {
-          rs.addAll( c.getRList() );
+      for (CTRunTrackChange c : paragraph.getInsArray()) {
+          rs.addAll( Arrays.asList(c.getRArray()) );
       }
 
       // Get text of the paragraph
@@ -179,7 +179,7 @@ public class XWPFParagraph implements IBodyElement{
 
           // Loop over pictures inside our
           // paragraph, looking for text in them
-          for(CTPicture pict : rs.get(j).getPictList()) {
+          for(CTPicture pict : rs.get(j).getPictArray()) {
               XmlObject[] t = pict
                       .selectPath("declare namespace w='http://schemas.openxmlformats.org/wordprocessingml/2006/main' .//w:t");
               for (int m = 0; m < t.length; m++) {