aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2013-11-12 11:32:10 +0000
committerNick Burch <nick@apache.org>2013-11-12 11:32:10 +0000
commitc842462a7771b19b09db0e81dcf7347c2d7134cc (patch)
treeb2bcd26e06a8e9f06f434ef3192821cc51aa49ae
parent7c740518ef1d93500b519ecaf6b2b073b627a8cb (diff)
downloadpoi-c842462a7771b19b09db0e81dcf7347c2d7134cc.tar.gz
poi-c842462a7771b19b09db0e81dcf7347c2d7134cc.zip
Fix whitespace
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1541005 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/ooxml/testcases/org/apache/poi/xwpf/TestXWPFBugs.java66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/TestXWPFBugs.java b/src/ooxml/testcases/org/apache/poi/xwpf/TestXWPFBugs.java
index d0286f671e..cf20f4d1fe 100644
--- a/src/ooxml/testcases/org/apache/poi/xwpf/TestXWPFBugs.java
+++ b/src/ooxml/testcases/org/apache/poi/xwpf/TestXWPFBugs.java
@@ -16,37 +16,37 @@ import org.apache.poi.xwpf.extractor.XWPFWordExtractor;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
public class TestXWPFBugs extends TestCase {
- /**
- * A word document that's encrypted with non-standard
- * Encryption options, and no cspname section. See bug 53475
- */
- public void test53475() throws Exception {
- try {
- Biff8EncryptionKey.setCurrentUserPassword("solrcell");
- File file = POIDataSamples.getDocumentInstance().getFile("bug53475-password-is-solrcell.docx");
- NPOIFSFileSystem filesystem = new NPOIFSFileSystem(file, true);
-
- // Check the encryption details
- EncryptionInfo info = new EncryptionInfo(filesystem);
- assertEquals(128, info.getHeader().getKeySize());
- assertEquals(EncryptionHeader.ALGORITHM_AES_128, info.getHeader().getAlgorithm());
- assertEquals(EncryptionHeader.HASH_SHA1, info.getHeader().getHashAlgorithm());
-
- // Check it can be decoded
- Decryptor d = Decryptor.getInstance(info);
- assertTrue("Unable to process: document is encrypted", d.verifyPassword("solrcell"));
-
- // Check we can read the word document in that
- InputStream dataStream = d.getDataStream(filesystem);
- OPCPackage opc = OPCPackage.open(dataStream);
- XWPFDocument doc = new XWPFDocument(opc);
- XWPFWordExtractor ex = new XWPFWordExtractor(doc);
- String text = ex.getText();
- assertNotNull(text);
- assertEquals("This is password protected Word document.", text.trim());
- ex.close();
- } finally {
- Biff8EncryptionKey.setCurrentUserPassword(null);
- }
- }
+ /**
+ * A word document that's encrypted with non-standard
+ * Encryption options, and no cspname section. See bug 53475
+ */
+ public void test53475() throws Exception {
+ try {
+ Biff8EncryptionKey.setCurrentUserPassword("solrcell");
+ File file = POIDataSamples.getDocumentInstance().getFile("bug53475-password-is-solrcell.docx");
+ NPOIFSFileSystem filesystem = new NPOIFSFileSystem(file, true);
+
+ // Check the encryption details
+ EncryptionInfo info = new EncryptionInfo(filesystem);
+ assertEquals(128, info.getHeader().getKeySize());
+ assertEquals(EncryptionHeader.ALGORITHM_AES_128, info.getHeader().getAlgorithm());
+ assertEquals(EncryptionHeader.HASH_SHA1, info.getHeader().getHashAlgorithm());
+
+ // Check it can be decoded
+ Decryptor d = Decryptor.getInstance(info);
+ assertTrue("Unable to process: document is encrypted", d.verifyPassword("solrcell"));
+
+ // Check we can read the word document in that
+ InputStream dataStream = d.getDataStream(filesystem);
+ OPCPackage opc = OPCPackage.open(dataStream);
+ XWPFDocument doc = new XWPFDocument(opc);
+ XWPFWordExtractor ex = new XWPFWordExtractor(doc);
+ String text = ex.getText();
+ assertNotNull(text);
+ assertEquals("This is password protected Word document.", text.trim());
+ ex.close();
+ } finally {
+ Biff8EncryptionKey.setCurrentUserPassword(null);
+ }
+ }
}