Skip to content

Commit 6867da5

Browse files
committed
清除了所有的页面TODO
1 parent 233675e commit 6867da5

File tree

7 files changed

+100
-5
lines changed

7 files changed

+100
-5
lines changed

ofdrw-core/src/main/java/org/ofdrw/core/basicStructure/pageObj/Content.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ public Content() {
2626
super("Content");
2727
}
2828

29-
// TODO 2019-10-10 21:57:22 测试
30-
3129
/**
3230
* 【必选】
3331
* 增加 层节点

ofdrw-core/src/main/java/org/ofdrw/core/basicStructure/pageObj/Page.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
*/
2525
public class Page extends OFDElement {
2626

27-
// TODO 2019-10-11 17:53:53 test case
28-
2927
public Page(Element proxy) {
3028
super(proxy);
3129
}

ofdrw-core/src/main/java/org/ofdrw/core/basicStructure/pageTree/Page.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
/**
99
* 页节点
1010
* <p>
11-
* 表 11 页树属性
11+
* 7.6 页树 表 11 页树属性
12+
*
1213
*
1314
* @author 权观宇
1415
* @since 2019-10-05 10:49:09
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package org.ofdrw.core.basicStructure.pageObj;
2+
3+
import org.junit.jupiter.api.Test;
4+
import org.ofdrw.TestTool;
5+
import org.ofdrw.core.basicStructure.pageObj.layer.CT_LayerTest;
6+
7+
import static org.junit.jupiter.api.Assertions.*;
8+
9+
public class ContentTest {
10+
public static Content contentCase(){
11+
return new Content()
12+
.addLayer(CT_LayerTest.layerCase());
13+
}
14+
15+
@Test
16+
public void gen() throws Exception {
17+
TestTool.genXml("Content", contentCase());
18+
}
19+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package org.ofdrw.core.basicStructure.pageObj;
2+
3+
import org.junit.jupiter.api.Test;
4+
import org.ofdrw.TestTool;
5+
import org.ofdrw.core.basicStructure.doc.CT_PageArea;
6+
import org.ofdrw.core.basicType.ST_Box;
7+
8+
import static org.junit.jupiter.api.Assertions.*;
9+
10+
public class PageTest {
11+
public static Page pageCase(){
12+
13+
CT_PageArea area = new CT_PageArea()
14+
.setPhysicalBox(new ST_Box(0, 0, 210, 297));
15+
return new Page()
16+
.setArea(area)
17+
.setContent(ContentTest.contentCase());
18+
}
19+
20+
@Test
21+
public void gen() throws Exception {
22+
TestTool.genXml("Page", pageCase());
23+
}
24+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package org.ofdrw.core.basicStructure.pageObj.layer;
2+
3+
import org.junit.jupiter.api.Test;
4+
import org.ofdrw.TestTool;
5+
import org.ofdrw.core.basicStructure.pageObj.layer.block.TextObject;
6+
import org.ofdrw.core.basicStructure.pageObj.layer.block.TextObjectTest;
7+
import org.ofdrw.core.basicType.ST_ID;
8+
9+
import static org.junit.jupiter.api.Assertions.*;
10+
11+
public class CT_LayerTest {
12+
public static CT_Layer layerCase() {
13+
CT_Layer layer = new CT_Layer();
14+
layer.addPageBlock(TextObjectTest.textObjectCase());
15+
layer.setObjID(new ST_ID(2));
16+
return layer;
17+
}
18+
19+
@Test
20+
public void gen() throws Exception {
21+
TestTool.genXml("CT_Layer", layerCase());
22+
}
23+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package org.ofdrw.core.basicStructure.pageObj.layer.block;
2+
3+
import org.junit.jupiter.api.Test;
4+
import org.ofdrw.TestTool;
5+
import org.ofdrw.core.basicType.ST_Array;
6+
import org.ofdrw.core.basicType.ST_Box;
7+
import org.ofdrw.core.basicType.ST_ID;
8+
import org.ofdrw.core.basicType.ST_RefID;
9+
import org.ofdrw.core.text.TextCode;
10+
import org.ofdrw.core.text.text.CT_Text;
11+
12+
import static org.junit.jupiter.api.Assertions.*;
13+
14+
public class TextObjectTest {
15+
public static TextObject textObjectCase() {
16+
TextCode textCode = new TextCode()
17+
.setX(0.6747)
18+
.setY(3.5101)
19+
.setDeltaX(new ST_Array(1.9472, 1.8201, 0.8467, 0.8467))
20+
.setContent("hello");
21+
return new CT_Text().setBoundary(new ST_Box(31.0753, 25.9115, 8.5915, 4.4979))
22+
.setFont(ST_RefID.getInstance("4"))
23+
.setSize(3.6865)
24+
.addTextCode(textCode)
25+
.toObj(new ST_ID(3));
26+
}
27+
28+
@Test
29+
public void gen() throws Exception {
30+
TestTool.genXml("TextObject", textObjectCase());
31+
}
32+
}

0 commit comments

Comments
 (0)