1*eba4d44aSLiu Zhe package fvt.uno.sw.puretext;
2352c0eacSLiu Zhe 
3352c0eacSLiu Zhe import static org.junit.Assert.*;
4352c0eacSLiu Zhe 
5352c0eacSLiu Zhe import org.junit.After;
6352c0eacSLiu Zhe import org.junit.Before;
7352c0eacSLiu Zhe import org.junit.Ignore;
8352c0eacSLiu Zhe import org.junit.Test;
9352c0eacSLiu Zhe import org.openoffice.test.common.FileUtil;
10352c0eacSLiu Zhe import org.openoffice.test.common.Testspace;
11352c0eacSLiu Zhe import org.openoffice.test.uno.UnoApp;
12352c0eacSLiu Zhe import com.sun.star.text.*;
13352c0eacSLiu Zhe import com.sun.star.beans.*;
14352c0eacSLiu Zhe import com.sun.star.frame.XStorable;
15352c0eacSLiu Zhe import com.sun.star.uno.UnoRuntime;
16352c0eacSLiu Zhe 
17352c0eacSLiu Zhe 
18352c0eacSLiu Zhe public class CharacterUnderline {
19352c0eacSLiu Zhe 	private static final UnoApp app = new UnoApp();
20352c0eacSLiu Zhe 	XText xText = null;
21352c0eacSLiu Zhe 
22352c0eacSLiu Zhe 	@Before
23352c0eacSLiu Zhe 	public void setUp() throws Exception {
24352c0eacSLiu Zhe 		app.start();
25352c0eacSLiu Zhe 
26352c0eacSLiu Zhe 	}
27352c0eacSLiu Zhe 
28352c0eacSLiu Zhe 	@After
29352c0eacSLiu Zhe 	public void tearDown() throws Exception {
30352c0eacSLiu Zhe 		app.close();
31352c0eacSLiu Zhe 	}
32932de486SLiu Zhe 	@Test@Ignore("Bug #120657 - [testUNO patch]underline color lost and individual words option disable when save to doc")
33352c0eacSLiu Zhe 	public void testCharacterUnderlineSetting() throws Exception {
34352c0eacSLiu Zhe 		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
35352c0eacSLiu Zhe 		xText = xTextDocument.getText();
36352c0eacSLiu Zhe 		xText.setString("We are Chinese,they are American. We are all living in one earth!"
37352c0eacSLiu Zhe 				+ "and we all love our home very much!!!We are Chinese,they are American. " +
38352c0eacSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
39352c0eacSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
40352c0eacSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
41352c0eacSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
42352c0eacSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American." +
43352c0eacSLiu Zhe 				" We are all living in one earth!We are Chinese,they are American. " +
44352c0eacSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
45352c0eacSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
46352c0eacSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
47352c0eacSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
48352c0eacSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
49352c0eacSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
50352c0eacSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
51352c0eacSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
52352c0eacSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
53352c0eacSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
54352c0eacSLiu Zhe 				"We are all living in one earth!We are Chinese,they are American. " +
55352c0eacSLiu Zhe 				"We are all living in one earth!We are all living in one earth!We are Chinese,they are American. " +
56352c0eacSLiu Zhe 				"We are all living in one earth!We are all living in one earth!We are Chinese,they are American. " +
57352c0eacSLiu Zhe 				"We are all living in one earth!We are all living in one earth!We are Chinese,they are American. " +
58352c0eacSLiu Zhe 				"We are all living in one earth!We are all living in one earth!We are Chinese,they are American. " +
59352c0eacSLiu Zhe 				"We are all living in one earth!We are all living in one earth!We are Chinese,they are American. " +
60352c0eacSLiu Zhe 				"We are all living in one earth!We are all living in one earth!We are Chinese,they are American. " +
61352c0eacSLiu Zhe 				"We are all living in one earth!");
62352c0eacSLiu Zhe 		// create text cursor for selecting and formatting text
63352c0eacSLiu Zhe 		XTextCursor xTextCursor = xText.createTextCursor();
64352c0eacSLiu Zhe 		XPropertySet xCursorProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
65352c0eacSLiu Zhe 		xTextCursor.gotoStart(false);
66352c0eacSLiu Zhe 		xTextCursor.goRight((short) 100, true);
67352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", true);
68352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.DOUBLE));
69352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
70352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x00FF00FF);
71352c0eacSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
72352c0eacSLiu Zhe 		xTextCursor.goRight((short) 100, true);
73352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
74352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.WAVE));
75352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
76352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x00FF00FF);
77352c0eacSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
78352c0eacSLiu Zhe 		xTextCursor.goRight((short) 100, true);
79352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
80352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.SMALLWAVE));
81352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
82352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x00FF00FF);
83352c0eacSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
84352c0eacSLiu Zhe 		xTextCursor.goRight((short) 100, true);
85352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", true);
86352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.SINGLE));
87352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
88352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
89352c0eacSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
90352c0eacSLiu Zhe 		xTextCursor.goRight((short) 100, true);
91352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", true);
92352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.NONE));
93352c0eacSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
94352c0eacSLiu Zhe 		xTextCursor.goRight((short) 100, true);
95352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
96352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.LONGDASH));
97352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
98352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
99352c0eacSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
100352c0eacSLiu Zhe 		xTextCursor.goRight((short) 100, true);
101352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
102352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.DOUBLEWAVE));
103352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
104352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
105352c0eacSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
106352c0eacSLiu Zhe 		xTextCursor.goRight((short) 100, true);
107352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
108352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.DONTKNOW));
109352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
110352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
111352c0eacSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
112352c0eacSLiu Zhe 		xTextCursor.goRight((short) 100, true);
113352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
114352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.DOTTED));
115352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
116352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
117352c0eacSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
118352c0eacSLiu Zhe 		xTextCursor.goRight((short) 100, true);
119352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
120352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.DASHDOTDOT));
121352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
122352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
123352c0eacSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
124352c0eacSLiu Zhe 		xTextCursor.goRight((short) 100, true);
125352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
126352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.DASHDOT));
127352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
128352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
129352c0eacSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
130352c0eacSLiu Zhe 		xTextCursor.goRight((short) 100, true);
131352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
132352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.DASH));
133352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
134352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
135352c0eacSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
136352c0eacSLiu Zhe 		xTextCursor.goRight((short) 100, true);
137352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
138352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.BOLDWAVE));
139352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
140352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
141352c0eacSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
142352c0eacSLiu Zhe 		xTextCursor.goRight((short) 100, true);
143352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
144352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.BOLDLONGDASH));
145352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
146352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
147352c0eacSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
148352c0eacSLiu Zhe 		xTextCursor.goRight((short) 100, true);
149352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
150352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.BOLDDOTTED));
151352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
152352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
153352c0eacSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
154352c0eacSLiu Zhe 		xTextCursor.goRight((short) 100, true);
155352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
156352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.BOLDDASHDOTDOT));
157352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
158352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
159352c0eacSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
160352c0eacSLiu Zhe 		xTextCursor.goRight((short) 100, true);
161352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
162352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.BOLDDASHDOT));
163352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
164352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
165352c0eacSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
166352c0eacSLiu Zhe 		xTextCursor.goRight((short) 100, true);
167352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
168352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.BOLDDASH));
169352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
170352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
171352c0eacSLiu Zhe 		xTextCursor.gotoRange(xTextCursor, false);
172352c0eacSLiu Zhe 		xTextCursor.goRight((short) 100, true);
173352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharWordMode", false);
174352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderline", new Short(com.sun.star.awt.FontUnderline.BOLD));
175352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineHasColor", true);
176352c0eacSLiu Zhe 		xCursorProps.setPropertyValue("CharUnderlineColor", 0x0000FF00);
177352c0eacSLiu Zhe 		//save to odt
178352c0eacSLiu Zhe 		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
179352c0eacSLiu Zhe 		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
180352c0eacSLiu Zhe 		aStoreProperties_odt[0] = new PropertyValue();
181352c0eacSLiu Zhe 		aStoreProperties_odt[1] = new PropertyValue();
182352c0eacSLiu Zhe 		aStoreProperties_odt[0].Name = "Override";
183352c0eacSLiu Zhe 		aStoreProperties_odt[0].Value = true;
184352c0eacSLiu Zhe 		aStoreProperties_odt[1].Name = "FilterName";
185352c0eacSLiu Zhe 		aStoreProperties_odt[1].Value = "StarOffice XML (Writer)";
186352c0eacSLiu Zhe 		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
187352c0eacSLiu Zhe 		//save to doc
188352c0eacSLiu Zhe 		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
189352c0eacSLiu Zhe 		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
190352c0eacSLiu Zhe 		aStoreProperties_doc[0] = new PropertyValue();
191352c0eacSLiu Zhe 		aStoreProperties_doc[1] = new PropertyValue();
192352c0eacSLiu Zhe 		aStoreProperties_doc[0].Name = "Override";
193352c0eacSLiu Zhe 		aStoreProperties_doc[0].Value = true;
194352c0eacSLiu Zhe 		aStoreProperties_doc[1].Name = "FilterName";
195352c0eacSLiu Zhe 		aStoreProperties_doc[1].Value = "MS Word 97";
196352c0eacSLiu Zhe 		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);
197352c0eacSLiu Zhe 		app.closeDocument(xTextDocument);
198352c0eacSLiu Zhe 
199352c0eacSLiu Zhe 		//reopen the document and assert row height setting
200352c0eacSLiu Zhe 		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
201352c0eacSLiu Zhe 		XTextCursor xTextCursor_assert_odt = assertDocument_odt.getText().createTextCursor();
202352c0eacSLiu Zhe 		XPropertySet xCursorProps_assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor_assert_odt);
203352c0eacSLiu Zhe 
204352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoStart(false);
205352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
206352c0eacSLiu Zhe 		assertEquals("assert individual word setting",true,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
207352c0eacSLiu Zhe 		assertEquals("assert underline is double",com.sun.star.awt.FontUnderline.DOUBLE,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
208352c0eacSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
209352c0eacSLiu Zhe 		assertEquals("assert underline color",0x00FF00FF,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
210352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
211352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
212352c0eacSLiu Zhe 		assertEquals("assert individual word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
213352c0eacSLiu Zhe 		assertEquals("assert underline is wave",com.sun.star.awt.FontUnderline.WAVE,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
214352c0eacSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
215352c0eacSLiu Zhe 		assertEquals("assert underline color",0x00FF00FF,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
216352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
217352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
218352c0eacSLiu Zhe 		assertEquals("assert individual word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
219352c0eacSLiu Zhe 		assertEquals("assert underline is smallwave",com.sun.star.awt.FontUnderline.SMALLWAVE,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
220352c0eacSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
221352c0eacSLiu Zhe 		assertEquals("assert underline color",0x00FF00FF,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
222352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
223352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
224352c0eacSLiu Zhe 		assertEquals("assert individual word setting",true,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
225352c0eacSLiu Zhe 		assertEquals("assert underline is single",com.sun.star.awt.FontUnderline.SINGLE,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
226352c0eacSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
227352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
228352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
229352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
230352c0eacSLiu Zhe 		assertEquals("assert individual word setting",true,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
231352c0eacSLiu Zhe 		assertEquals("assert underline is without",com.sun.star.awt.FontUnderline.NONE,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
232352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
233352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
234352c0eacSLiu Zhe 		assertEquals("assert individual word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
235352c0eacSLiu Zhe 		assertEquals("assert underline is LONGDASH",com.sun.star.awt.FontUnderline.LONGDASH,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
236352c0eacSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
237352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
238352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
239352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
240352c0eacSLiu Zhe 		assertEquals("assert individual word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
241352c0eacSLiu Zhe 		assertEquals("assert underline is DOUBLEWAVE",com.sun.star.awt.FontUnderline.DOUBLEWAVE,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
242352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
243352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
244352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
245352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
246352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
247352c0eacSLiu Zhe 		assertEquals("assert underline is DONTKNOW",com.sun.star.awt.FontUnderline.NONE,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
248352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
249352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
250352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
251352c0eacSLiu Zhe 		assertEquals("assert underline is DOTTED",com.sun.star.awt.FontUnderline.DOTTED,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
252352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
253352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
254352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
255352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
256352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
257352c0eacSLiu Zhe 		assertEquals("assert underline is DASHDOTDOT",com.sun.star.awt.FontUnderline.DASHDOTDOT,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
258352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
259352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
260352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
261352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
262352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
263352c0eacSLiu Zhe 		assertEquals("assert underline is DASHDOT",com.sun.star.awt.FontUnderline.DASHDOT,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
264352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
265352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
266352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
267352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
268352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
269352c0eacSLiu Zhe 		assertEquals("assert underline is DASH",com.sun.star.awt.FontUnderline.DASH,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
270352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
271352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
272352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
273352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
274352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
275352c0eacSLiu Zhe 		assertEquals("assert underline is BOLDWAVE",com.sun.star.awt.FontUnderline.BOLDWAVE,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
276352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
277352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
278352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
279352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
280352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
281352c0eacSLiu Zhe 		assertEquals("assert underline is BOLDLONGDASH",com.sun.star.awt.FontUnderline.BOLDLONGDASH,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
282352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
283352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
284352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
285352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
286352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
287352c0eacSLiu Zhe 		assertEquals("assert underline is BOLDDOTTED",com.sun.star.awt.FontUnderline.BOLDDOTTED,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
288352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
289352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
290352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
291352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
292352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
293352c0eacSLiu Zhe 		assertEquals("assert underline is BOLDDASHDOTDOT",com.sun.star.awt.FontUnderline.BOLDDASHDOTDOT,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
294352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
295352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
296352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
297352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
298352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
299352c0eacSLiu Zhe 		assertEquals("assert underline is BOLDDASHDOT",com.sun.star.awt.FontUnderline.BOLDDASHDOT,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
300352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
301352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
302352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
303352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
304352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
305352c0eacSLiu Zhe 		assertEquals("assert underline is BOLDDASH",com.sun.star.awt.FontUnderline.BOLDDASH,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
306352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
307352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
308352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoRange(xTextCursor_assert_odt, false);
309352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
310352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_odt.getPropertyValue("CharWordMode"));
311352c0eacSLiu Zhe 		assertEquals("assert underline is bold",com.sun.star.awt.FontUnderline.BOLD,xCursorProps_assert_odt.getPropertyValue("CharUnderline"));
312352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_odt.getPropertyValue("CharUnderlineHasColor"));
313352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_odt.getPropertyValue("CharUnderlineColor"));
314352c0eacSLiu Zhe 
315352c0eacSLiu Zhe 		//reopen the document and assert row height setting
316352c0eacSLiu Zhe 		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
317352c0eacSLiu Zhe 		XTextCursor xTextCursor_assert_doc = assertDocument_doc.getText().createTextCursor();
318352c0eacSLiu Zhe 		XPropertySet xCursorProps_assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor_assert_doc);
319352c0eacSLiu Zhe 
320352c0eacSLiu Zhe 		xTextCursor_assert_odt.gotoStart(false);
321352c0eacSLiu Zhe 		xTextCursor_assert_odt.goRight((short) 100, true);
322352c0eacSLiu Zhe 		assertEquals("assert individual word setting",true,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
323352c0eacSLiu Zhe 		assertEquals("assert underline is double",com.sun.star.awt.FontUnderline.DOUBLE,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
324352c0eacSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
325352c0eacSLiu Zhe 		assertEquals("assert underline color",0x00FF00FF,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
326352c0eacSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
327352c0eacSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
328352c0eacSLiu Zhe 		assertEquals("assert individual word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
329352c0eacSLiu Zhe 		assertEquals("assert underline is wave",com.sun.star.awt.FontUnderline.WAVE,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
330352c0eacSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
331352c0eacSLiu Zhe 		assertEquals("assert underline color",0x00FF00FF,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
332352c0eacSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
333352c0eacSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
334352c0eacSLiu Zhe 		assertEquals("assert individual word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
335352c0eacSLiu Zhe 		assertEquals("assert underline is smallwave",com.sun.star.awt.FontUnderline.SMALLWAVE,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
336352c0eacSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
337352c0eacSLiu Zhe 		assertEquals("assert underline color",0x00FF00FF,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
338352c0eacSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
339352c0eacSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
340352c0eacSLiu Zhe 		assertEquals("assert individual word setting",true,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
341352c0eacSLiu Zhe 		assertEquals("assert underline is single",com.sun.star.awt.FontUnderline.SINGLE,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
342352c0eacSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
343352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
344352c0eacSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
345352c0eacSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
346352c0eacSLiu Zhe 		assertEquals("assert individual word setting",true,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
347352c0eacSLiu Zhe 		assertEquals("assert underline is without",com.sun.star.awt.FontUnderline.NONE,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
348352c0eacSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
349352c0eacSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
350352c0eacSLiu Zhe 		assertEquals("assert individual word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
351352c0eacSLiu Zhe 		assertEquals("assert underline is LONGDASH",com.sun.star.awt.FontUnderline.LONGDASH,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
352352c0eacSLiu Zhe 		assertEquals("assert has underline color is true",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
353352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
354352c0eacSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
355352c0eacSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
356352c0eacSLiu Zhe 		assertEquals("assert individual word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
357352c0eacSLiu Zhe 		assertEquals("assert underline is DOUBLEWAVE",com.sun.star.awt.FontUnderline.DOUBLEWAVE,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
358352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
359352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
360352c0eacSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
361352c0eacSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
362352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
363352c0eacSLiu Zhe 		assertEquals("assert underline is DONTKNOW",com.sun.star.awt.FontUnderline.NONE,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
364352c0eacSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
365352c0eacSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
366352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
367352c0eacSLiu Zhe 		assertEquals("assert underline is DOTTED",com.sun.star.awt.FontUnderline.DOTTED,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
368352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
369352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
370352c0eacSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
371352c0eacSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
372352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
373352c0eacSLiu Zhe 		assertEquals("assert underline is DASHDOTDOT",com.sun.star.awt.FontUnderline.DASHDOTDOT,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
374352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
375352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
376352c0eacSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
377352c0eacSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
378352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
379352c0eacSLiu Zhe 		assertEquals("assert underline is DASHDOT",com.sun.star.awt.FontUnderline.DASHDOT,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
380352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
381352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
382352c0eacSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
383352c0eacSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
384352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
385352c0eacSLiu Zhe 		assertEquals("assert underline is DASH",com.sun.star.awt.FontUnderline.DASH,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
386352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
387352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
388352c0eacSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
389352c0eacSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
390352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
391352c0eacSLiu Zhe 		assertEquals("assert underline is BOLDWAVE",com.sun.star.awt.FontUnderline.BOLDWAVE,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
392352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
393352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
394352c0eacSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
395352c0eacSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
396352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
397352c0eacSLiu Zhe 		assertEquals("assert underline is BOLDLONGDASH",com.sun.star.awt.FontUnderline.BOLDLONGDASH,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
398352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
399352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
400352c0eacSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
401352c0eacSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
402352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
403352c0eacSLiu Zhe 		assertEquals("assert underline is BOLDDOTTED",com.sun.star.awt.FontUnderline.BOLDDOTTED,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
404352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
405352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
406352c0eacSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
407352c0eacSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
408352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
409352c0eacSLiu Zhe 		assertEquals("assert underline is BOLDDASHDOTDOT",com.sun.star.awt.FontUnderline.BOLDDASHDOTDOT,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
410352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
411352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
412352c0eacSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
413352c0eacSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
414352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
415352c0eacSLiu Zhe 		assertEquals("assert underline is BOLDDASHDOT",com.sun.star.awt.FontUnderline.BOLDDASHDOT,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
416352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
417352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
418352c0eacSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
419352c0eacSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
420352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
421352c0eacSLiu Zhe 		assertEquals("assert underline is BOLDDASH",com.sun.star.awt.FontUnderline.BOLDDASH,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
422352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
423352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
424352c0eacSLiu Zhe 		xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false);
425352c0eacSLiu Zhe 		xTextCursor_assert_doc.goRight((short) 100, true);
426352c0eacSLiu Zhe 		assertEquals("assert individula word setting",false,xCursorProps_assert_doc.getPropertyValue("CharWordMode"));
427352c0eacSLiu Zhe 		assertEquals("assert underline is bold",com.sun.star.awt.FontUnderline.BOLD,xCursorProps_assert_doc.getPropertyValue("CharUnderline"));
428352c0eacSLiu Zhe 		assertEquals("assert has underline color",true,xCursorProps_assert_doc.getPropertyValue("CharUnderlineHasColor"));
429352c0eacSLiu Zhe 		assertEquals("assert underline color",0x0000FF00,xCursorProps_assert_doc.getPropertyValue("CharUnderlineColor"));
430352c0eacSLiu Zhe 	}
431352c0eacSLiu Zhe }
432