xref: /AOO41X/test/testuno/source/fvt/uno/sw/puretext/CharacterFontname.java (revision eba4d44a33e5be0b2528d5a9a6f0dcbf65adaa0d)
1*eba4d44aSLiu Zhe package fvt.uno.sw.puretext;
2*eba4d44aSLiu Zhe 
3*eba4d44aSLiu Zhe import static org.junit.Assert.*;
4*eba4d44aSLiu Zhe 
5*eba4d44aSLiu Zhe import org.junit.After;
6*eba4d44aSLiu Zhe import org.junit.Before;
7*eba4d44aSLiu Zhe import org.junit.Test;
8*eba4d44aSLiu Zhe import org.openoffice.test.common.FileUtil;
9*eba4d44aSLiu Zhe import org.openoffice.test.common.Testspace;
10*eba4d44aSLiu Zhe import org.openoffice.test.uno.UnoApp;
11*eba4d44aSLiu Zhe import com.sun.star.text.*;
12*eba4d44aSLiu Zhe import com.sun.star.beans.*;
13*eba4d44aSLiu Zhe import com.sun.star.frame.XStorable;
14*eba4d44aSLiu Zhe import com.sun.star.uno.UnoRuntime;
15*eba4d44aSLiu Zhe 
16*eba4d44aSLiu Zhe public class CharacterFontname {
17*eba4d44aSLiu Zhe 	private static final UnoApp app = new UnoApp();
18*eba4d44aSLiu Zhe 	XText xText = null;
19*eba4d44aSLiu Zhe 
20*eba4d44aSLiu Zhe 	@Before
21*eba4d44aSLiu Zhe 	public void setUp() throws Exception {
22*eba4d44aSLiu Zhe 		app.start();
23*eba4d44aSLiu Zhe 
24*eba4d44aSLiu Zhe 	}
25*eba4d44aSLiu Zhe 
26*eba4d44aSLiu Zhe 	@After
27*eba4d44aSLiu Zhe 	public void tearDown() throws Exception {
28*eba4d44aSLiu Zhe 		app.close();
29*eba4d44aSLiu Zhe 	}
30*eba4d44aSLiu Zhe 	@Test
31*eba4d44aSLiu Zhe 	public void testCharacterFontSetting() throws Exception {
32*eba4d44aSLiu Zhe 		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
33*eba4d44aSLiu Zhe 		xText = xTextDocument.getText();
34*eba4d44aSLiu Zhe 		xText.setString("We are Chinese,they are American. We are all living in one earth!"
35*eba4d44aSLiu Zhe 				+ "and we all love our home very much!!!We are Chinese,they are American. " +
36*eba4d44aSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
37*eba4d44aSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
38*eba4d44aSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
39*eba4d44aSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
40*eba4d44aSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American." +
41*eba4d44aSLiu Zhe 				" We are all living in one earth!We are Chinese,they are American. " +
42*eba4d44aSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
43*eba4d44aSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
44*eba4d44aSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
45*eba4d44aSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
46*eba4d44aSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
47*eba4d44aSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
48*eba4d44aSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
49*eba4d44aSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
50*eba4d44aSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
51*eba4d44aSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
52*eba4d44aSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
53*eba4d44aSLiu Zhe 				"We are all living in one earth!We are all living in one earth!We are Chinese,they are American. " +
54*eba4d44aSLiu Zhe 				"We are all living in one earth!We are all living in one earth!We are Chinese,they are American. " +
55*eba4d44aSLiu Zhe 				"We are all living in one earth!We are all living in one earth!We are Chinese,they are American. " +
56*eba4d44aSLiu Zhe 				"We are all living in one earth!We are all living in one earth!We are Chinese,they are American. " +
57*eba4d44aSLiu Zhe 				"We are all living in one earth!We are all living in one earth!We are Chinese,they are American. " +
58*eba4d44aSLiu Zhe 				"We are all living in one earth!We are all living in one earth!We are Chinese,they are American. " +
59*eba4d44aSLiu Zhe 				"We are all living in one earth!");
60*eba4d44aSLiu Zhe 		// create text cursor for selecting and formatting text
61*eba4d44aSLiu Zhe 		XTextCursor xTextCursor = xText.createTextCursor();
62*eba4d44aSLiu Zhe 		XPropertySet xCursorProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
63*eba4d44aSLiu Zhe 		xTextCursor.gotoStart(false);
64*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
65*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharFontName", "Times New Roman");
66*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
67*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
68*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharFontName", "Arial Black");
69*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
70*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
71*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharFontName", "Aharoni");
72*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
73*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
74*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharFontName", "Agency FB");
75*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
76*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
77*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharFontName", "Algerian");
78*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
79*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
80*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharFontName", "Andalus");
81*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
82*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
83*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharFontName", "Bodoni MT Black");
84*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
85*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
86*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharFontName", "BatangChe");
87*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
88*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
89*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharFontName", "Britannic Bold");
90*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
91*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
92*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharFontName", "Cooper Black");
93*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
94*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
95*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharFontName", "DaunPenh");
96*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
97*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
98*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharFontName", "Estrangelo Edessa");
99*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
100*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
101*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharFontName", "Wingdings");
102*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
103*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
104*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharFontName", "Rage Italic");
105*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
106*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
107*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharFontName", "Symbol");
108*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
109*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
110*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharFontName", "Tw Cen MT Condensed Extra Bold");
111*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
112*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
113*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharFontName", "Vivaldi");
114*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
115*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
116*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharFontName", "SimSun");
117*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
118*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
119*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharFontName", "Lucida Bright");
120*eba4d44aSLiu Zhe 		//save to odt
121*eba4d44aSLiu Zhe 		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
122*eba4d44aSLiu Zhe 		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
123*eba4d44aSLiu Zhe 		aStoreProperties_odt[0] = new PropertyValue();
124*eba4d44aSLiu Zhe 		aStoreProperties_odt[1] = new PropertyValue();
125*eba4d44aSLiu Zhe 		aStoreProperties_odt[0].Name = "Override";
126*eba4d44aSLiu Zhe 		aStoreProperties_odt[0].Value = true;
127*eba4d44aSLiu Zhe 		aStoreProperties_odt[1].Name = "FilterName";
128*eba4d44aSLiu Zhe 		aStoreProperties_odt[1].Value = "StarOffice XML (Writer)";
129*eba4d44aSLiu Zhe 		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
130*eba4d44aSLiu Zhe 		//save to doc
131*eba4d44aSLiu Zhe 		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
132*eba4d44aSLiu Zhe 		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
133*eba4d44aSLiu Zhe 		aStoreProperties_doc[0] = new PropertyValue();
134*eba4d44aSLiu Zhe 		aStoreProperties_doc[1] = new PropertyValue();
135*eba4d44aSLiu Zhe 		aStoreProperties_doc[0].Name = "Override";
136*eba4d44aSLiu Zhe 		aStoreProperties_doc[0].Value = true;
137*eba4d44aSLiu Zhe 		aStoreProperties_doc[1].Name = "FilterName";
138*eba4d44aSLiu Zhe 		aStoreProperties_doc[1].Value = "MS Word 97";
139*eba4d44aSLiu Zhe 		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);
140*eba4d44aSLiu Zhe 		app.closeDocument(xTextDocument);
141*eba4d44aSLiu Zhe 
142*eba4d44aSLiu Zhe 		//reopen the document and assert font style
143*eba4d44aSLiu Zhe 		XTextDocument assertDocument=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
144*eba4d44aSLiu Zhe 		XTextCursor xTextCursor_assert = assertDocument.getText().createTextCursor();
145*eba4d44aSLiu Zhe 		XPropertySet xCursorProps_assert = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor_assert);
146*eba4d44aSLiu Zhe 
147*eba4d44aSLiu Zhe 		xTextCursor_assert.gotoStart(false);
148*eba4d44aSLiu Zhe 		xTextCursor_assert.goRight((short) 100, true);
149*eba4d44aSLiu Zhe 		assertEquals("Times New Roman",xCursorProps_assert.getPropertyValue("CharFontName"));
150*eba4d44aSLiu Zhe 		xTextCursor_assert.gotoRange(xTextCursor_assert, false);
151*eba4d44aSLiu Zhe 		xTextCursor_assert.goRight((short) 100, true);
152*eba4d44aSLiu Zhe 		assertEquals("Arial Black",xCursorProps_assert.getPropertyValue("CharFontName"));
153*eba4d44aSLiu Zhe 		xTextCursor_assert.gotoRange(xTextCursor_assert, false);
154*eba4d44aSLiu Zhe 		xTextCursor_assert.goRight((short) 100, true);
155*eba4d44aSLiu Zhe 		assertEquals("Aharoni",xCursorProps_assert.getPropertyValue("CharFontName"));
156*eba4d44aSLiu Zhe 		xTextCursor_assert.gotoRange(xTextCursor_assert, false);
157*eba4d44aSLiu Zhe 		xTextCursor_assert.goRight((short) 100, true);
158*eba4d44aSLiu Zhe 		assertEquals("Agency FB",xCursorProps_assert.getPropertyValue("CharFontName"));
159*eba4d44aSLiu Zhe 		xTextCursor_assert.gotoRange(xTextCursor_assert, false);
160*eba4d44aSLiu Zhe 		xTextCursor_assert.goRight((short) 100, true);
161*eba4d44aSLiu Zhe 		assertEquals("Algerian",xCursorProps_assert.getPropertyValue("CharFontName"));
162*eba4d44aSLiu Zhe 		xTextCursor_assert.gotoRange(xTextCursor_assert, false);
163*eba4d44aSLiu Zhe 		xTextCursor_assert.goRight((short) 100, true);
164*eba4d44aSLiu Zhe 		assertEquals("Andalus",xCursorProps_assert.getPropertyValue("CharFontName"));
165*eba4d44aSLiu Zhe 		xTextCursor_assert.gotoRange(xTextCursor_assert, false);
166*eba4d44aSLiu Zhe 		xTextCursor_assert.goRight((short) 100, true);
167*eba4d44aSLiu Zhe 		assertEquals("Bodoni MT Black",xCursorProps_assert.getPropertyValue("CharFontName"));
168*eba4d44aSLiu Zhe 		xTextCursor_assert.gotoRange(xTextCursor_assert, false);
169*eba4d44aSLiu Zhe 		xTextCursor_assert.goRight((short) 100, true);
170*eba4d44aSLiu Zhe 		assertEquals("BatangChe",xCursorProps_assert.getPropertyValue("CharFontName"));
171*eba4d44aSLiu Zhe 		xTextCursor_assert.gotoRange(xTextCursor_assert, false);
172*eba4d44aSLiu Zhe 		xTextCursor_assert.goRight((short) 100, true);
173*eba4d44aSLiu Zhe 		assertEquals("Britannic Bold",xCursorProps_assert.getPropertyValue("CharFontName"));
174*eba4d44aSLiu Zhe 		xTextCursor_assert.gotoRange(xTextCursor_assert, false);
175*eba4d44aSLiu Zhe 		xTextCursor_assert.goRight((short) 100, true);
176*eba4d44aSLiu Zhe 		assertEquals("Cooper Black",xCursorProps_assert.getPropertyValue("CharFontName"));
177*eba4d44aSLiu Zhe 		xTextCursor_assert.gotoRange(xTextCursor_assert, false);
178*eba4d44aSLiu Zhe 		xTextCursor_assert.goRight((short) 100, true);
179*eba4d44aSLiu Zhe 		assertEquals("DaunPenh",xCursorProps_assert.getPropertyValue("CharFontName"));
180*eba4d44aSLiu Zhe 		xTextCursor_assert.gotoRange(xTextCursor_assert, false);
181*eba4d44aSLiu Zhe 		xTextCursor_assert.goRight((short) 100, true);
182*eba4d44aSLiu Zhe 		assertEquals("Estrangelo Edessa",xCursorProps_assert.getPropertyValue("CharFontName"));
183*eba4d44aSLiu Zhe 		xTextCursor_assert.gotoRange(xTextCursor_assert, false);
184*eba4d44aSLiu Zhe 		xTextCursor_assert.goRight((short) 100, true);
185*eba4d44aSLiu Zhe 		assertEquals("Wingdings",xCursorProps_assert.getPropertyValue("CharFontName"));
186*eba4d44aSLiu Zhe 		xTextCursor_assert.gotoRange(xTextCursor_assert, false);
187*eba4d44aSLiu Zhe 		xTextCursor_assert.goRight((short) 100, true);
188*eba4d44aSLiu Zhe 		assertEquals("Rage Italic",xCursorProps_assert.getPropertyValue("CharFontName"));
189*eba4d44aSLiu Zhe 		xTextCursor_assert.gotoRange(xTextCursor_assert, false);
190*eba4d44aSLiu Zhe 		xTextCursor_assert.goRight((short) 100, true);
191*eba4d44aSLiu Zhe 		assertEquals("Symbol",xCursorProps_assert.getPropertyValue("CharFontName"));
192*eba4d44aSLiu Zhe 		xTextCursor_assert.gotoRange(xTextCursor_assert, false);
193*eba4d44aSLiu Zhe 		xTextCursor_assert.goRight((short) 100, true);
194*eba4d44aSLiu Zhe 		assertEquals("Tw Cen MT Condensed Extra Bold",xCursorProps_assert.getPropertyValue("CharFontName"));
195*eba4d44aSLiu Zhe 		xTextCursor_assert.gotoRange(xTextCursor_assert, false);
196*eba4d44aSLiu Zhe 		xTextCursor_assert.goRight((short) 100, true);
197*eba4d44aSLiu Zhe 		assertEquals("Vivaldi",xCursorProps_assert.getPropertyValue("CharFontName"));
198*eba4d44aSLiu Zhe 		xTextCursor_assert.gotoRange(xTextCursor_assert, false);
199*eba4d44aSLiu Zhe 		xTextCursor_assert.goRight((short) 100, true);
200*eba4d44aSLiu Zhe 		assertEquals("SimSun",xCursorProps_assert.getPropertyValue("CharFontName"));
201*eba4d44aSLiu Zhe 		xTextCursor_assert.gotoRange(xTextCursor_assert, false);
202*eba4d44aSLiu Zhe 		xTextCursor_assert.goRight((short) 100, true);
203*eba4d44aSLiu Zhe 		assertEquals("Lucida Bright",xCursorProps_assert.getPropertyValue("CharFontName"));
204*eba4d44aSLiu Zhe 
205*eba4d44aSLiu Zhe 		//reopen the document and assert font style
206*eba4d44aSLiu Zhe 		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
207*eba4d44aSLiu Zhe 		XTextCursor xTextCursor_assert_doc = assertDocument_doc.getText().createTextCursor();
208*eba4d44aSLiu Zhe 		XPropertySet xCursorProps_assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor_assert_doc);
209*eba4d44aSLiu Zhe 
210*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoStart(false);
211*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
212*eba4d44aSLiu Zhe 		assertEquals("Times New Roman",xCursorProps_assert_doc.getPropertyValue("CharFontName"));
213*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
214*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
215*eba4d44aSLiu Zhe 		assertEquals("Arial Black",xCursorProps_assert_doc.getPropertyValue("CharFontName"));
216*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
217*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
218*eba4d44aSLiu Zhe 		assertEquals("Aharoni",xCursorProps_assert_doc.getPropertyValue("CharFontName"));
219*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
220*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
221*eba4d44aSLiu Zhe 		assertEquals("Agency FB",xCursorProps_assert_doc.getPropertyValue("CharFontName"));
222*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
223*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
224*eba4d44aSLiu Zhe 		assertEquals("Algerian",xCursorProps_assert_doc.getPropertyValue("CharFontName"));
225*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
226*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
227*eba4d44aSLiu Zhe 		assertEquals("Andalus",xCursorProps_assert_doc.getPropertyValue("CharFontName"));
228*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
229*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
230*eba4d44aSLiu Zhe 		assertEquals("Bodoni MT Black",xCursorProps_assert_doc.getPropertyValue("CharFontName"));
231*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
232*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
233*eba4d44aSLiu Zhe 		assertEquals("BatangChe",xCursorProps_assert_doc.getPropertyValue("CharFontName"));
234*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
235*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
236*eba4d44aSLiu Zhe 		assertEquals("Britannic Bold",xCursorProps_assert_doc.getPropertyValue("CharFontName"));
237*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
238*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
239*eba4d44aSLiu Zhe 		assertEquals("Cooper Black",xCursorProps_assert_doc.getPropertyValue("CharFontName"));
240*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
241*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
242*eba4d44aSLiu Zhe 		assertEquals("DaunPenh",xCursorProps_assert_doc.getPropertyValue("CharFontName"));
243*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
244*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
245*eba4d44aSLiu Zhe 		assertEquals("Estrangelo Edessa",xCursorProps_assert_doc.getPropertyValue("CharFontName"));
246*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
247*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
248*eba4d44aSLiu Zhe 		assertEquals("Wingdings",xCursorProps_assert_doc.getPropertyValue("CharFontName"));
249*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
250*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
251*eba4d44aSLiu Zhe 		assertEquals("Rage Italic",xCursorProps_assert_doc.getPropertyValue("CharFontName"));
252*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
253*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
254*eba4d44aSLiu Zhe 		assertEquals("Symbol",xCursorProps_assert_doc.getPropertyValue("CharFontName"));
255*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
256*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
257*eba4d44aSLiu Zhe 		assertEquals("Tw Cen MT Condensed Extra Bold",xCursorProps_assert_doc.getPropertyValue("CharFontName"));
258*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
259*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
260*eba4d44aSLiu Zhe 		assertEquals("Vivaldi",xCursorProps_assert_doc.getPropertyValue("CharFontName"));
261*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
262*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
263*eba4d44aSLiu Zhe 		assertEquals("SimSun",xCursorProps_assert_doc.getPropertyValue("CharFontName"));
264*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
265*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
266*eba4d44aSLiu Zhe 		assertEquals("Lucida Bright",xCursorProps_assert_doc.getPropertyValue("CharFontName"));
267*eba4d44aSLiu Zhe 	}
268*eba4d44aSLiu Zhe }
269