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