]> source.dussan.org Git - poi.git/commitdiff
Fix whitespace
authorNick Burch <nick@apache.org>
Tue, 12 Nov 2013 11:32:10 +0000 (11:32 +0000)
committerNick Burch <nick@apache.org>
Tue, 12 Nov 2013 11:32:10 +0000 (11:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1541005 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/testcases/org/apache/poi/xwpf/TestXWPFBugs.java

index d0286f671e8523c0a082d795ff36bf43992bee6f..cf20f4d1fe7e61505bbf40c75db71d7c027a6efc 100644 (file)
@@ -16,37 +16,37 @@ import org.apache.poi.xwpf.extractor.XWPFWordExtractor;
 import org.apache.poi.xwpf.usermodel.XWPFDocument;\r
 \r
 public class TestXWPFBugs extends TestCase {\r
-       /**\r
-        * A word document that's encrypted with non-standard\r
-        *  Encryption options, and no cspname section. See bug 53475\r
-        */\r
-       public void test53475() throws Exception {\r
-               try {\r
-               Biff8EncryptionKey.setCurrentUserPassword("solrcell");\r
-               File file = POIDataSamples.getDocumentInstance().getFile("bug53475-password-is-solrcell.docx");\r
-               NPOIFSFileSystem filesystem = new NPOIFSFileSystem(file, true);\r
-               \r
-               // Check the encryption details\r
-               EncryptionInfo info = new EncryptionInfo(filesystem);\r
-               assertEquals(128, info.getHeader().getKeySize());\r
-               assertEquals(EncryptionHeader.ALGORITHM_AES_128, info.getHeader().getAlgorithm());\r
-               assertEquals(EncryptionHeader.HASH_SHA1, info.getHeader().getHashAlgorithm());\r
-               \r
-               // Check it can be decoded\r
-               Decryptor d = Decryptor.getInstance(info);              \r
-               assertTrue("Unable to process: document is encrypted", d.verifyPassword("solrcell"));\r
-    \r
-               // Check we can read the word document in that\r
-           InputStream dataStream = d.getDataStream(filesystem);\r
-           OPCPackage opc = OPCPackage.open(dataStream);\r
-           XWPFDocument doc = new XWPFDocument(opc);\r
-           XWPFWordExtractor ex = new XWPFWordExtractor(doc);\r
-           String text = ex.getText();\r
-           assertNotNull(text);\r
-           assertEquals("This is password protected Word document.", text.trim());\r
-           ex.close();\r
-               } finally {\r
-                       Biff8EncryptionKey.setCurrentUserPassword(null);\r
-               }\r
-       }\r
+    /**\r
+     * A word document that's encrypted with non-standard\r
+     *  Encryption options, and no cspname section. See bug 53475\r
+     */\r
+    public void test53475() throws Exception {\r
+        try {\r
+            Biff8EncryptionKey.setCurrentUserPassword("solrcell");\r
+            File file = POIDataSamples.getDocumentInstance().getFile("bug53475-password-is-solrcell.docx");\r
+            NPOIFSFileSystem filesystem = new NPOIFSFileSystem(file, true);\r
+\r
+            // Check the encryption details\r
+            EncryptionInfo info = new EncryptionInfo(filesystem);\r
+            assertEquals(128, info.getHeader().getKeySize());\r
+            assertEquals(EncryptionHeader.ALGORITHM_AES_128, info.getHeader().getAlgorithm());\r
+            assertEquals(EncryptionHeader.HASH_SHA1, info.getHeader().getHashAlgorithm());\r
+\r
+            // Check it can be decoded\r
+            Decryptor d = Decryptor.getInstance(info);         \r
+            assertTrue("Unable to process: document is encrypted", d.verifyPassword("solrcell"));\r
+\r
+            // Check we can read the word document in that\r
+            InputStream dataStream = d.getDataStream(filesystem);\r
+            OPCPackage opc = OPCPackage.open(dataStream);\r
+            XWPFDocument doc = new XWPFDocument(opc);\r
+            XWPFWordExtractor ex = new XWPFWordExtractor(doc);\r
+            String text = ex.getText();\r
+            assertNotNull(text);\r
+            assertEquals("This is password protected Word document.", text.trim());\r
+            ex.close();\r
+        } finally {\r
+            Biff8EncryptionKey.setCurrentUserPassword(null);\r
+        }\r
+    }\r
 }\r