ASF Bugzilla – Attachment 27174 Details for
Bug 51389
Add support for sprmPJc paragraph SPRM
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
test case
TestSprms.java (text/plain), 1.43 KB, created by
Sergey Vladimirov
on 2011-06-18 19:22:23 UTC
(
hide
)
Description:
test case
Filename:
MIME Type:
Creator:
Sergey Vladimirov
Created:
2011-06-18 19:22:23 UTC
Size:
1.43 KB
patch
obsolete
>package org.apache.poi.hwpf.extractor; > >import java.io.ByteArrayInputStream; >import java.io.ByteArrayOutputStream; >import java.io.IOException; >import java.io.InputStream; > >import junit.framework.TestCase; >import org.apache.poi.POIDataSamples; >import org.apache.poi.hwpf.HWPFDocument; > >public class TestSprms extends TestCase >{ > /** > * Test correct processing of "sprmPJc" by uncompressor > */ > public void testSprmPJc() throws IOException > { > InputStream resourceAsStream = POIDataSamples.getDocumentInstance() > .openResourceAsStream("Bug49820.doc"); > HWPFDocument hwpfDocument = new HWPFDocument(resourceAsStream); > assertEquals(1, hwpfDocument.getStyleSheet().getParagraphStyle(8) > .getJustification()); > resourceAsStream.close(); > } > > /** > * Test correct processing of "sprmPJc" by compressor and uncompressor > */ > public void testSprmPJcResave() throws IOException > { > InputStream resourceAsStream = POIDataSamples.getDocumentInstance() > .openResourceAsStream("Bug49820.doc"); > HWPFDocument hwpfDocument = new HWPFDocument(resourceAsStream); > resourceAsStream.close(); > > ByteArrayOutputStream baos = new ByteArrayOutputStream(); > hwpfDocument.write(baos); > hwpfDocument = new HWPFDocument( > new ByteArrayInputStream(baos.toByteArray())); > > assertEquals(1, hwpfDocument.getStyleSheet().getParagraphStyle(8) > .getJustification()); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 51389
:
27166
|
27167
| 27174