xref: /AOO41X/test/testuno/source/fvt/uno/sw/puretext/CharacterUnderline.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.Ignore;
8*eba4d44aSLiu Zhe import org.junit.Test;
9*eba4d44aSLiu Zhe import org.openoffice.test.common.FileUtil;
10*eba4d44aSLiu Zhe import org.openoffice.test.common.Testspace;
11*eba4d44aSLiu Zhe import org.openoffice.test.uno.UnoApp;
12*eba4d44aSLiu Zhe import com.sun.star.text.*;
13*eba4d44aSLiu Zhe import com.sun.star.beans.*;
14*eba4d44aSLiu Zhe import com.sun.star.frame.XStorable;
15*eba4d44aSLiu Zhe import com.sun.star.uno.UnoRuntime;
16*eba4d44aSLiu Zhe 
17*eba4d44aSLiu Zhe 
18*eba4d44aSLiu Zhe public class CharacterUnderline {
19*eba4d44aSLiu Zhe 	private static final UnoApp app = new UnoApp();
20*eba4d44aSLiu Zhe 	XText xText = null;
21*eba4d44aSLiu Zhe 
22*eba4d44aSLiu Zhe 	@Before
23*eba4d44aSLiu Zhe 	public void setUp() throws Exception {
24*eba4d44aSLiu Zhe 		app.start();
25*eba4d44aSLiu Zhe 
26*eba4d44aSLiu Zhe 	}
27*eba4d44aSLiu Zhe 
28*eba4d44aSLiu Zhe 	@After
29*eba4d44aSLiu Zhe 	public void tearDown() throws Exception {
30*eba4d44aSLiu Zhe 		app.close();
31*eba4d44aSLiu Zhe 	}
32*eba4d44aSLiu Zhe 	@Test@Ignore("Bug #120657 - [testUNO patch]underline color lost and individual words option disable when save to doc")
33*eba4d44aSLiu Zhe 	public void testCharacterUnderlineSetting() throws Exception {
34*eba4d44aSLiu Zhe 		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
35*eba4d44aSLiu Zhe 		xText = xTextDocument.getText();
36*eba4d44aSLiu Zhe 		xText.setString("We are Chinese,they are American. We are all living in one earth!"
37*eba4d44aSLiu Zhe 				+ "and we all love our home very much!!!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 Chinese,they are American. " +
54*eba4d44aSLiu Zhe 				"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!We are all living in one earth!We are Chinese,they are American. " +
60*eba4d44aSLiu Zhe 				"We are all living in one earth!We are all living in one earth!We are Chinese,they are American. " +
61*eba4d44aSLiu Zhe 				"We are all living in one earth!");
62*eba4d44aSLiu Zhe 		// create text cursor for selecting and formatting text
63*eba4d44aSLiu Zhe 		XTextCursor xTextCursor = xText.createTextCursor();
64*eba4d44aSLiu Zhe 		XPropertySet xCursorProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
65*eba4d44aSLiu Zhe 		xTextCursor.gotoStart(false);
66*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
67*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", true);
68*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.DOUBLE));
69*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
70*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x00FF00FF);
71*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
72*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
73*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
74*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.WAVE));
75*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
76*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x00FF00FF);
77*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
78*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
79*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
80*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.SMALLWAVE));
81*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
82*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x00FF00FF);
83*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
84*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
85*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", true);
86*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.SINGLE));
87*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
88*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
89*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
90*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
91*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", true);
92*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.NONE));
93*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
94*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
95*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
96*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.LONGDASH));
97*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
98*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
99*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
100*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
101*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
102*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.DOUBLEWAVE));
103*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
104*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
105*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
106*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
107*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
108*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.DONTKNOW));
109*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
110*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
111*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
112*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
113*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
114*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.DOTTED));
115*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
116*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
117*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
118*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
119*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
120*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.DASHDOTDOT));
121*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
122*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
123*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
124*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
125*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
126*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.DASHDOT));
127*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
128*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
129*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
130*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
131*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
132*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.DASH));
133*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
134*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
135*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
136*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
137*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
138*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.BOLDWAVE));
139*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
140*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
141*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
142*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
143*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
144*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.BOLDLONGDASH));
145*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
146*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
147*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
148*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
149*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
150*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.BOLDDOTTED));
151*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
152*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
153*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
154*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
155*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
156*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.BOLDDASHDOTDOT));
157*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
158*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
159*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
160*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
161*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
162*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.BOLDDASHDOT));
163*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
164*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
165*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
166*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
167*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
168*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.BOLDDASH));
169*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
170*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
171*eba4d44aSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
172*eba4d44aSLiu Zhe 		xTextCursor.goRight((short) 100, true);
173*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
174*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.BOLD));
175*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
176*eba4d44aSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
177*eba4d44aSLiu Zhe 		//save to odt
178*eba4d44aSLiu Zhe 		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
179*eba4d44aSLiu Zhe 		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
180*eba4d44aSLiu Zhe 		aStoreProperties_odt[0] = new PropertyValue();
181*eba4d44aSLiu Zhe 		aStoreProperties_odt[1] = new PropertyValue();
182*eba4d44aSLiu Zhe 		aStoreProperties_odt[0].Name = "Override";
183*eba4d44aSLiu Zhe 		aStoreProperties_odt[0].Value = true;
184*eba4d44aSLiu Zhe 		aStoreProperties_odt[1].Name = "FilterName";
185*eba4d44aSLiu Zhe 		aStoreProperties_odt[1].Value = "StarOffice XML (Writer)";
186*eba4d44aSLiu Zhe 		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
187*eba4d44aSLiu Zhe 		//save to doc
188*eba4d44aSLiu Zhe 		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
189*eba4d44aSLiu Zhe 		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
190*eba4d44aSLiu Zhe 		aStoreProperties_doc[0] = new PropertyValue();
191*eba4d44aSLiu Zhe 		aStoreProperties_doc[1] = new PropertyValue();
192*eba4d44aSLiu Zhe 		aStoreProperties_doc[0].Name = "Override";
193*eba4d44aSLiu Zhe 		aStoreProperties_doc[0].Value = true;
194*eba4d44aSLiu Zhe 		aStoreProperties_doc[1].Name = "FilterName";
195*eba4d44aSLiu Zhe 		aStoreProperties_doc[1].Value = "MS Word 97";
196*eba4d44aSLiu Zhe 		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);
197*eba4d44aSLiu Zhe 		app.closeDocument(xTextDocument);
198*eba4d44aSLiu Zhe 
199*eba4d44aSLiu Zhe 		//reopen the document and assert row height setting
200*eba4d44aSLiu Zhe 		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
201*eba4d44aSLiu Zhe 		XTextCursor xTextCursor_assert_odt = assertDocument_odt.getText().createTextCursor();
202*eba4d44aSLiu Zhe 		XPropertySet xCursorProps_assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor_assert_odt);
203*eba4d44aSLiu Zhe 
204*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoStart(false);
205*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
206*eba4d44aSLiu Zhe 		assertEquals("assert individual word setting",true,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
207*eba4d44aSLiu Zhe 		assertEquals("assert underline is double",com.sun.star.awt.FontUnderline.DOUBLE,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
208*eba4d44aSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
209*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x00FF00FF,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
210*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
211*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
212*eba4d44aSLiu Zhe 		assertEquals("assert individual word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
213*eba4d44aSLiu Zhe 		assertEquals("assert underline is wave",com.sun.star.awt.FontUnderline.WAVE,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
214*eba4d44aSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
215*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x00FF00FF,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
216*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
217*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
218*eba4d44aSLiu Zhe 		assertEquals("assert individual word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
219*eba4d44aSLiu Zhe 		assertEquals("assert underline is smallwave",com.sun.star.awt.FontUnderline.SMALLWAVE,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
220*eba4d44aSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
221*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x00FF00FF,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
222*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
223*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
224*eba4d44aSLiu Zhe 		assertEquals("assert individual word setting",true,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
225*eba4d44aSLiu Zhe 		assertEquals("assert underline is single",com.sun.star.awt.FontUnderline.SINGLE,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
226*eba4d44aSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
227*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
228*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
229*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
230*eba4d44aSLiu Zhe 		assertEquals("assert individual word setting",true,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
231*eba4d44aSLiu Zhe 		assertEquals("assert underline is without",com.sun.star.awt.FontUnderline.NONE,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
232*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
233*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
234*eba4d44aSLiu Zhe 		assertEquals("assert individual word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
235*eba4d44aSLiu Zhe 		assertEquals("assert underline is LONGDASH",com.sun.star.awt.FontUnderline.LONGDASH,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
236*eba4d44aSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
237*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
238*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
239*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
240*eba4d44aSLiu Zhe 		assertEquals("assert individual word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
241*eba4d44aSLiu Zhe 		assertEquals("assert underline is DOUBLEWAVE",com.sun.star.awt.FontUnderline.DOUBLEWAVE,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
242*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
243*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
244*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
245*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
246*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
247*eba4d44aSLiu Zhe 		assertEquals("assert underline is DONTKNOW",com.sun.star.awt.FontUnderline.NONE,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
248*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
249*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
250*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
251*eba4d44aSLiu Zhe 		assertEquals("assert underline is DOTTED",com.sun.star.awt.FontUnderline.DOTTED,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
252*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
253*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
254*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
255*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
256*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
257*eba4d44aSLiu Zhe 		assertEquals("assert underline is DASHDOTDOT",com.sun.star.awt.FontUnderline.DASHDOTDOT,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
258*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
259*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
260*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
261*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
262*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
263*eba4d44aSLiu Zhe 		assertEquals("assert underline is DASHDOT",com.sun.star.awt.FontUnderline.DASHDOT,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
264*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
265*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
266*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
267*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
268*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
269*eba4d44aSLiu Zhe 		assertEquals("assert underline is DASH",com.sun.star.awt.FontUnderline.DASH,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
270*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
271*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
272*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
273*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
274*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
275*eba4d44aSLiu Zhe 		assertEquals("assert underline is BOLDWAVE",com.sun.star.awt.FontUnderline.BOLDWAVE,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
276*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
277*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
278*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
279*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
280*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
281*eba4d44aSLiu Zhe 		assertEquals("assert underline is BOLDLONGDASH",com.sun.star.awt.FontUnderline.BOLDLONGDASH,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
282*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
283*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
284*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
285*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
286*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
287*eba4d44aSLiu Zhe 		assertEquals("assert underline is BOLDDOTTED",com.sun.star.awt.FontUnderline.BOLDDOTTED,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
288*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
289*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
290*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
291*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
292*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
293*eba4d44aSLiu Zhe 		assertEquals("assert underline is BOLDDASHDOTDOT",com.sun.star.awt.FontUnderline.BOLDDASHDOTDOT,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
294*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
295*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
296*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
297*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
298*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
299*eba4d44aSLiu Zhe 		assertEquals("assert underline is BOLDDASHDOT",com.sun.star.awt.FontUnderline.BOLDDASHDOT,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
300*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
301*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
302*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
303*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
304*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
305*eba4d44aSLiu Zhe 		assertEquals("assert underline is BOLDDASH",com.sun.star.awt.FontUnderline.BOLDDASH,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
306*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
307*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
308*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
309*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
310*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
311*eba4d44aSLiu Zhe 		assertEquals("assert underline is bold",com.sun.star.awt.FontUnderline.BOLD,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
312*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
313*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
314*eba4d44aSLiu Zhe 
315*eba4d44aSLiu Zhe 		//reopen the document and assert row height setting
316*eba4d44aSLiu Zhe 		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
317*eba4d44aSLiu Zhe 		XTextCursor xTextCursor_assert_doc = assertDocument_doc.getText().createTextCursor();
318*eba4d44aSLiu Zhe 		XPropertySet xCursorProps_assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor_assert_doc);
319*eba4d44aSLiu Zhe 
320*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.gotoStart(false);
321*eba4d44aSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
322*eba4d44aSLiu Zhe 		assertEquals("assert individual word setting",true,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
323*eba4d44aSLiu Zhe 		assertEquals("assert underline is double",com.sun.star.awt.FontUnderline.DOUBLE,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
324*eba4d44aSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
325*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x00FF00FF,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
326*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
327*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
328*eba4d44aSLiu Zhe 		assertEquals("assert individual word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
329*eba4d44aSLiu Zhe 		assertEquals("assert underline is wave",com.sun.star.awt.FontUnderline.WAVE,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
330*eba4d44aSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
331*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x00FF00FF,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
332*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
333*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
334*eba4d44aSLiu Zhe 		assertEquals("assert individual word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
335*eba4d44aSLiu Zhe 		assertEquals("assert underline is smallwave",com.sun.star.awt.FontUnderline.SMALLWAVE,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
336*eba4d44aSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
337*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x00FF00FF,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
338*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
339*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
340*eba4d44aSLiu Zhe 		assertEquals("assert individual word setting",true,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
341*eba4d44aSLiu Zhe 		assertEquals("assert underline is single",com.sun.star.awt.FontUnderline.SINGLE,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
342*eba4d44aSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
343*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
344*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
345*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
346*eba4d44aSLiu Zhe 		assertEquals("assert individual word setting",true,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
347*eba4d44aSLiu Zhe 		assertEquals("assert underline is without",com.sun.star.awt.FontUnderline.NONE,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
348*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
349*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
350*eba4d44aSLiu Zhe 		assertEquals("assert individual word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
351*eba4d44aSLiu Zhe 		assertEquals("assert underline is LONGDASH",com.sun.star.awt.FontUnderline.LONGDASH,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
352*eba4d44aSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
353*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
354*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
355*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
356*eba4d44aSLiu Zhe 		assertEquals("assert individual word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
357*eba4d44aSLiu Zhe 		assertEquals("assert underline is DOUBLEWAVE",com.sun.star.awt.FontUnderline.DOUBLEWAVE,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
358*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
359*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
360*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
361*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
362*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
363*eba4d44aSLiu Zhe 		assertEquals("assert underline is DONTKNOW",com.sun.star.awt.FontUnderline.NONE,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
364*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
365*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
366*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
367*eba4d44aSLiu Zhe 		assertEquals("assert underline is DOTTED",com.sun.star.awt.FontUnderline.DOTTED,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
368*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
369*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
370*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
371*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
372*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
373*eba4d44aSLiu Zhe 		assertEquals("assert underline is DASHDOTDOT",com.sun.star.awt.FontUnderline.DASHDOTDOT,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
374*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
375*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
376*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
377*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
378*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
379*eba4d44aSLiu Zhe 		assertEquals("assert underline is DASHDOT",com.sun.star.awt.FontUnderline.DASHDOT,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
380*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
381*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
382*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
383*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
384*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
385*eba4d44aSLiu Zhe 		assertEquals("assert underline is DASH",com.sun.star.awt.FontUnderline.DASH,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
386*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
387*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
388*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
389*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
390*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
391*eba4d44aSLiu Zhe 		assertEquals("assert underline is BOLDWAVE",com.sun.star.awt.FontUnderline.BOLDWAVE,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
392*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
393*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
394*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
395*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
396*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
397*eba4d44aSLiu Zhe 		assertEquals("assert underline is BOLDLONGDASH",com.sun.star.awt.FontUnderline.BOLDLONGDASH,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
398*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
399*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
400*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
401*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
402*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
403*eba4d44aSLiu Zhe 		assertEquals("assert underline is BOLDDOTTED",com.sun.star.awt.FontUnderline.BOLDDOTTED,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
404*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
405*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
406*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
407*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
408*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
409*eba4d44aSLiu Zhe 		assertEquals("assert underline is BOLDDASHDOTDOT",com.sun.star.awt.FontUnderline.BOLDDASHDOTDOT,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
410*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
411*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
412*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
413*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
414*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
415*eba4d44aSLiu Zhe 		assertEquals("assert underline is BOLDDASHDOT",com.sun.star.awt.FontUnderline.BOLDDASHDOT,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
416*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
417*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
418*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
419*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
420*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
421*eba4d44aSLiu Zhe 		assertEquals("assert underline is BOLDDASH",com.sun.star.awt.FontUnderline.BOLDDASH,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
422*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
423*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
424*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
425*eba4d44aSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
426*eba4d44aSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
427*eba4d44aSLiu Zhe 		assertEquals("assert underline is bold",com.sun.star.awt.FontUnderline.BOLD,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
428*eba4d44aSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
429*eba4d44aSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
430*eba4d44aSLiu Zhe 	}
431*eba4d44aSLiu Zhe }
432