]> source.dussan.org Git - poi.git/commitdiff
Fix bug #49160 - Ensure that CTDigSigBlob is included in poi-ooxml jar
authorNick Burch <nick@apache.org>
Wed, 26 May 2010 13:56:51 +0000 (13:56 +0000)
committerNick Burch <nick@apache.org>
Wed, 26 May 2010 13:56:51 +0000 (13:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@948426 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/content/xdocs/status.xml
src/ooxml/testcases/org/apache/poi/xwpf/TestAllExtendedProperties.java

index be43882899c2de5a2caa97640633d1d50c4f0f77..acbd7e78b8dcb185ed79bbd4e6296293da8e12ce 100644 (file)
@@ -34,6 +34,7 @@
 
     <changes>
         <release version="3.7-SNAPSHOT" date="2010-??-??">
+           <action dev="POI-DEVELOPERS" type="fix">49160 - Ensure that CTDigSigBlob is included in poi-ooxml jar</action>
            <action dev="POI-DEVELOPERS" type="fix">49189 - Detect w:tab and w:cr entries in XWPF paragraphs, even when the XSD is silly and maps them to CTEmpty</action>
            <action dev="POI-DEVELOPERS" type="fix">49273 - Correct handling for Font Character Sets with indicies greater than 127</action>
            <action dev="POI-DEVELOPERS" type="add">49334 - Track the ValueRangeRecords of charts in HSSFChart, to allow the basic axis operations</action>
index 9db3be79ecb61daec5657a63df0f69910b1b8ca8..8b7b08b7c956dddaa26d211e9ec3f679939f451e 100644 (file)
 
 package org.apache.poi.xwpf;
 
-import java.io.File;
-import java.io.IOException;
-import java.text.ParsePosition;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.TimeZone;
-
 import junit.framework.TestCase;
 
 import org.apache.poi.POIXMLProperties.CoreProperties;
-import org.apache.poi.openxml4j.OpenXML4JTestDataSamples;
-import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
-import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
-import org.apache.poi.openxml4j.opc.OPCPackage;
 import org.apache.poi.openxml4j.opc.PackageProperties;
-import org.apache.poi.openxml4j.util.Nullable;
-import org.apache.poi.util.POILogger;
-import org.apache.poi.util.POILogFactory;
 import org.apache.poi.xwpf.usermodel.XWPFDocument;
-import org.openxmlformats.schemas.officeDocument.x2006.docPropsVTypes.CTVariant;
+import org.openxmlformats.schemas.officeDocument.x2006.extendedProperties.CTDigSigBlob;
 import org.openxmlformats.schemas.officeDocument.x2006.extendedProperties.CTProperties;
 import org.openxmlformats.schemas.officeDocument.x2006.extendedProperties.CTVectorLpstr;
 import org.openxmlformats.schemas.officeDocument.x2006.extendedProperties.CTVectorVariant;
@@ -105,5 +91,15 @@ public final class TestAllExtendedProperties extends TestCase {
                assertEquals(3,ctProps.getTotalTime());
                assertEquals(10,ctProps.getWords());
                
+               // Check the digital signature part
+               // Won't be there in this file, but we
+               //  need to do this check so that the
+               //  appropriate parts end up in the
+               //  smaller ooxml schemas file
+               CTDigSigBlob blob = ctProps.getDigSig();
+               assertNull(blob);
+               
+               blob = CTDigSigBlob.Factory.newInstance();
+               blob.setBlob(new byte [] {2,6,7,2,3,4,5,1,2,3});
        }
 }