mirror of https://github.com/apache/poi.git
Fix inconsistent line endings and some eclipse warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1695757 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b21dd0241e
commit
0588fdec98
|
@ -26,16 +26,13 @@ import org.apache.poi.xwpf.XWPFTestDataSamples;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class TestChangeTracking {
|
public class TestChangeTracking {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void detection() throws Exception {
|
public void detection() throws Exception {
|
||||||
|
|
||||||
XWPFDocument documentWithoutChangeTracking = XWPFTestDataSamples.openSampleDocument("bug56075-changeTracking_off.docx");
|
XWPFDocument documentWithoutChangeTracking = XWPFTestDataSamples.openSampleDocument("bug56075-changeTracking_off.docx");
|
||||||
assertFalse(documentWithoutChangeTracking.isTrackRevisions());
|
assertFalse(documentWithoutChangeTracking.isTrackRevisions());
|
||||||
|
|
||||||
XWPFDocument documentWithChangeTracking = XWPFTestDataSamples.openSampleDocument("bug56075-changeTracking_on.docx");
|
XWPFDocument documentWithChangeTracking = XWPFTestDataSamples.openSampleDocument("bug56075-changeTracking_on.docx");
|
||||||
assertTrue(documentWithChangeTracking.isTrackRevisions());
|
assertTrue(documentWithChangeTracking.isTrackRevisions());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -49,6 +46,7 @@ public class TestChangeTracking {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@SuppressWarnings("resource")
|
||||||
public void integration() throws Exception {
|
public void integration() throws Exception {
|
||||||
XWPFDocument doc = new XWPFDocument();
|
XWPFDocument doc = new XWPFDocument();
|
||||||
|
|
||||||
|
@ -67,5 +65,4 @@ public class TestChangeTracking {
|
||||||
|
|
||||||
assertTrue(document.isTrackRevisions());
|
assertTrue(document.isTrackRevisions());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
import org.apache.poi.xwpf.XWPFTestDataSamples;
|
import org.apache.poi.xwpf.XWPFTestDataSamples;
|
||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFonts;
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFonts;
|
||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTLatentStyles;
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTLatentStyles;
|
||||||
|
@ -31,11 +32,6 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTStyles;
|
||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STStyleType;
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STStyleType;
|
||||||
|
|
||||||
public class TestXWPFStyles extends TestCase {
|
public class TestXWPFStyles extends TestCase {
|
||||||
|
|
||||||
// protected void setUp() throws Exception {
|
|
||||||
// super.setUp();
|
|
||||||
// }
|
|
||||||
|
|
||||||
public void testGetUsedStyles() throws IOException {
|
public void testGetUsedStyles() throws IOException {
|
||||||
XWPFDocument sampleDoc = XWPFTestDataSamples.openSampleDocument("Styles.docx");
|
XWPFDocument sampleDoc = XWPFTestDataSamples.openSampleDocument("Styles.docx");
|
||||||
List<XWPFStyle> testUsedStyleList = new ArrayList<XWPFStyle>();
|
List<XWPFStyle> testUsedStyleList = new ArrayList<XWPFStyle>();
|
||||||
|
@ -49,8 +45,6 @@ public class TestXWPFStyles extends TestCase {
|
||||||
|
|
||||||
List<XWPFStyle> usedStyleList = styles.getUsedStyleList(style);
|
List<XWPFStyle> usedStyleList = styles.getUsedStyleList(style);
|
||||||
assertEquals(usedStyleList, testUsedStyleList);
|
assertEquals(usedStyleList, testUsedStyleList);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAddStylesToDocument() throws IOException {
|
public void testAddStylesToDocument() throws IOException {
|
||||||
|
@ -91,6 +85,7 @@ public class TestXWPFStyles extends TestCase {
|
||||||
* YK: tests below don't make much sense,
|
* YK: tests below don't make much sense,
|
||||||
* they exist only to copy xml beans to pi-ooxml-schemas.jar
|
* they exist only to copy xml beans to pi-ooxml-schemas.jar
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("resource")
|
||||||
public void testLanguages() {
|
public void testLanguages() {
|
||||||
XWPFDocument docOut = new XWPFDocument();
|
XWPFDocument docOut = new XWPFDocument();
|
||||||
XWPFStyles styles = docOut.createStyles();
|
XWPFStyles styles = docOut.createStyles();
|
||||||
|
|
|
@ -34,10 +34,9 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText;
|
||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STBorder;
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STBorder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for XWPF Run
|
* Tests for XWPF Tables
|
||||||
*/
|
*/
|
||||||
public class TestXWPFTable extends TestCase {
|
public class TestXWPFTable extends TestCase {
|
||||||
|
|
||||||
protected void setUp() {
|
protected void setUp() {
|
||||||
/*
|
/*
|
||||||
XWPFDocument doc = new XWPFDocument();
|
XWPFDocument doc = new XWPFDocument();
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
package org.apache.poi.xwpf.usermodel;
|
package org.apache.poi.xwpf.usermodel;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
import org.apache.poi.xwpf.usermodel.XWPFTableCell.XWPFVertAlign;
|
import org.apache.poi.xwpf.usermodel.XWPFTableCell.XWPFVertAlign;
|
||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHMerge;
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHMerge;
|
||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTShd;
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTShd;
|
||||||
|
@ -34,7 +35,6 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.STShd;
|
||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STVerticalJc;
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STVerticalJc;
|
||||||
|
|
||||||
public class TestXWPFTableCell extends TestCase {
|
public class TestXWPFTableCell extends TestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
@ -87,6 +87,7 @@ public class TestXWPFTableCell extends TestCase {
|
||||||
/**
|
/**
|
||||||
* ensure that CTHMerge & CTTcBorders go in poi-ooxml.jar
|
* ensure that CTHMerge & CTTcBorders go in poi-ooxml.jar
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public void test54099() {
|
public void test54099() {
|
||||||
XWPFDocument doc = new XWPFDocument();
|
XWPFDocument doc = new XWPFDocument();
|
||||||
CTTbl ctTable = CTTbl.Factory.newInstance();
|
CTTbl ctTable = CTTbl.Factory.newInstance();
|
||||||
|
|
|
@ -22,7 +22,6 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow;
|
||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl;
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl;
|
||||||
|
|
||||||
public class TestXWPFTableRow extends TestCase {
|
public class TestXWPFTableRow extends TestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
Loading…
Reference in New Issue