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.Test; 8352c0eacSLiu Zhe import org.openoffice.test.common.FileUtil; 9352c0eacSLiu Zhe import org.openoffice.test.common.Testspace; 10352c0eacSLiu Zhe import org.openoffice.test.uno.UnoApp; 11352c0eacSLiu Zhe import com.sun.star.text.*; 12352c0eacSLiu Zhe import com.sun.star.beans.*; 13352c0eacSLiu Zhe import com.sun.star.frame.XStorable; 14352c0eacSLiu Zhe import com.sun.star.uno.UnoRuntime; 15352c0eacSLiu Zhe 16352c0eacSLiu Zhe public class CharacterFontname { 17352c0eacSLiu Zhe private static final UnoApp app = new UnoApp(); 18352c0eacSLiu Zhe XText xText = null; 19352c0eacSLiu Zhe 20352c0eacSLiu Zhe @Before 21352c0eacSLiu Zhe public void setUp() throws Exception { 22352c0eacSLiu Zhe app.start(); 23352c0eacSLiu Zhe 24352c0eacSLiu Zhe } 25352c0eacSLiu Zhe 26352c0eacSLiu Zhe @After 27352c0eacSLiu Zhe public void tearDown() throws Exception { 28352c0eacSLiu Zhe app.close(); 29352c0eacSLiu Zhe } 30352c0eacSLiu Zhe @Test 31352c0eacSLiu Zhe public void testCharacterFontSetting() throws Exception { 32352c0eacSLiu Zhe XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document 33352c0eacSLiu Zhe xText = xTextDocument.getText(); 34352c0eacSLiu Zhe xText.setString("We are Chinese,they are American. We are all living in one earth!" 35352c0eacSLiu Zhe + "and we all love our home very much!!!We are Chinese,they are American. " + 36352c0eacSLiu Zhe "We are all living in one earth!We are Chinese,they are American. " + 37352c0eacSLiu Zhe "We are all living in one earth!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 all living in one earth!We are Chinese,they are American. " + 54352c0eacSLiu Zhe "We are all living in one earth!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!"); 60352c0eacSLiu Zhe // create text cursor for selecting and formatting text 61352c0eacSLiu Zhe XTextCursor xTextCursor = xText.createTextCursor(); 62352c0eacSLiu Zhe XPropertySet xCursorProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor); 63352c0eacSLiu Zhe xTextCursor.gotoStart(false); 64352c0eacSLiu Zhe xTextCursor.goRight((short) 100, true); 65352c0eacSLiu Zhe xCursorProps.setPropertyValue("CharFontName", "Times New Roman"); 66352c0eacSLiu Zhe xTextCursor.gotoRange(xTextCursor, false); 67352c0eacSLiu Zhe xTextCursor.goRight((short) 100, true); 68352c0eacSLiu Zhe xCursorProps.setPropertyValue("CharFontName", "Arial Black"); 69352c0eacSLiu Zhe xTextCursor.gotoRange(xTextCursor, false); 70352c0eacSLiu Zhe xTextCursor.goRight((short) 100, true); 71352c0eacSLiu Zhe xCursorProps.setPropertyValue("CharFontName", "Aharoni"); 72352c0eacSLiu Zhe xTextCursor.gotoRange(xTextCursor, false); 73352c0eacSLiu Zhe xTextCursor.goRight((short) 100, true); 74352c0eacSLiu Zhe xCursorProps.setPropertyValue("CharFontName", "Agency FB"); 75352c0eacSLiu Zhe xTextCursor.gotoRange(xTextCursor, false); 76352c0eacSLiu Zhe xTextCursor.goRight((short) 100, true); 77352c0eacSLiu Zhe xCursorProps.setPropertyValue("CharFontName", "Algerian"); 78352c0eacSLiu Zhe xTextCursor.gotoRange(xTextCursor, false); 79352c0eacSLiu Zhe xTextCursor.goRight((short) 100, true); 80352c0eacSLiu Zhe xCursorProps.setPropertyValue("CharFontName", "Andalus"); 81352c0eacSLiu Zhe xTextCursor.gotoRange(xTextCursor, false); 82352c0eacSLiu Zhe xTextCursor.goRight((short) 100, true); 83352c0eacSLiu Zhe xCursorProps.setPropertyValue("CharFontName", "Bodoni MT Black"); 84352c0eacSLiu Zhe xTextCursor.gotoRange(xTextCursor, false); 85352c0eacSLiu Zhe xTextCursor.goRight((short) 100, true); 86352c0eacSLiu Zhe xCursorProps.setPropertyValue("CharFontName", "BatangChe"); 87352c0eacSLiu Zhe xTextCursor.gotoRange(xTextCursor, false); 88352c0eacSLiu Zhe xTextCursor.goRight((short) 100, true); 89352c0eacSLiu Zhe xCursorProps.setPropertyValue("CharFontName", "Britannic Bold"); 90352c0eacSLiu Zhe xTextCursor.gotoRange(xTextCursor, false); 91352c0eacSLiu Zhe xTextCursor.goRight((short) 100, true); 92352c0eacSLiu Zhe xCursorProps.setPropertyValue("CharFontName", "Cooper Black"); 93352c0eacSLiu Zhe xTextCursor.gotoRange(xTextCursor, false); 94352c0eacSLiu Zhe xTextCursor.goRight((short) 100, true); 95352c0eacSLiu Zhe xCursorProps.setPropertyValue("CharFontName", "DaunPenh"); 96352c0eacSLiu Zhe xTextCursor.gotoRange(xTextCursor, false); 97352c0eacSLiu Zhe xTextCursor.goRight((short) 100, true); 98352c0eacSLiu Zhe xCursorProps.setPropertyValue("CharFontName", "Estrangelo Edessa"); 99352c0eacSLiu Zhe xTextCursor.gotoRange(xTextCursor, false); 100352c0eacSLiu Zhe xTextCursor.goRight((short) 100, true); 101352c0eacSLiu Zhe xCursorProps.setPropertyValue("CharFontName", "Wingdings"); 102352c0eacSLiu Zhe xTextCursor.gotoRange(xTextCursor, false); 103352c0eacSLiu Zhe xTextCursor.goRight((short) 100, true); 104352c0eacSLiu Zhe xCursorProps.setPropertyValue("CharFontName", "Rage Italic"); 105352c0eacSLiu Zhe xTextCursor.gotoRange(xTextCursor, false); 106352c0eacSLiu Zhe xTextCursor.goRight((short) 100, true); 107352c0eacSLiu Zhe xCursorProps.setPropertyValue("CharFontName", "Symbol"); 108352c0eacSLiu Zhe xTextCursor.gotoRange(xTextCursor, false); 109352c0eacSLiu Zhe xTextCursor.goRight((short) 100, true); 110352c0eacSLiu Zhe xCursorProps.setPropertyValue("CharFontName", "Tw Cen MT Condensed Extra Bold"); 111352c0eacSLiu Zhe xTextCursor.gotoRange(xTextCursor, false); 112352c0eacSLiu Zhe xTextCursor.goRight((short) 100, true); 113352c0eacSLiu Zhe xCursorProps.setPropertyValue("CharFontName", "Vivaldi"); 114352c0eacSLiu Zhe xTextCursor.gotoRange(xTextCursor, false); 115352c0eacSLiu Zhe xTextCursor.goRight((short) 100, true); 116352c0eacSLiu Zhe xCursorProps.setPropertyValue("CharFontName", "SimSun"); 117352c0eacSLiu Zhe xTextCursor.gotoRange(xTextCursor, false); 118352c0eacSLiu Zhe xTextCursor.goRight((short) 100, true); 119352c0eacSLiu Zhe xCursorProps.setPropertyValue("CharFontName", "Lucida Bright"); 120352c0eacSLiu Zhe //save to odt 121352c0eacSLiu Zhe XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument); 122352c0eacSLiu Zhe PropertyValue[] aStoreProperties_odt = new PropertyValue[2]; 123352c0eacSLiu Zhe aStoreProperties_odt[0] = new PropertyValue(); 124352c0eacSLiu Zhe aStoreProperties_odt[1] = new PropertyValue(); 125352c0eacSLiu Zhe aStoreProperties_odt[0].Name = "Override"; 126352c0eacSLiu Zhe aStoreProperties_odt[0].Value = true; 127352c0eacSLiu Zhe aStoreProperties_odt[1].Name = "FilterName"; 128352c0eacSLiu Zhe aStoreProperties_odt[1].Value = "StarOffice XML (Writer)"; 129352c0eacSLiu Zhe xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt); 130352c0eacSLiu Zhe //save to doc 131352c0eacSLiu Zhe XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument); 132352c0eacSLiu Zhe PropertyValue[] aStoreProperties_doc = new PropertyValue[2]; 133352c0eacSLiu Zhe aStoreProperties_doc[0] = new PropertyValue(); 134352c0eacSLiu Zhe aStoreProperties_doc[1] = new PropertyValue(); 135352c0eacSLiu Zhe aStoreProperties_doc[0].Name = "Override"; 136352c0eacSLiu Zhe aStoreProperties_doc[0].Value = true; 137352c0eacSLiu Zhe aStoreProperties_doc[1].Name = "FilterName"; 138352c0eacSLiu Zhe aStoreProperties_doc[1].Value = "MS Word 97"; 139352c0eacSLiu Zhe xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 140352c0eacSLiu Zhe app.closeDocument(xTextDocument); 141352c0eacSLiu Zhe 142352c0eacSLiu Zhe //reopen the document and assert font style 143352c0eacSLiu Zhe XTextDocument assertDocument=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 144352c0eacSLiu Zhe XTextCursor xTextCursor_assert = assertDocument.getText().createTextCursor(); 145352c0eacSLiu Zhe XPropertySet xCursorProps_assert = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor_assert); 146352c0eacSLiu Zhe 147352c0eacSLiu Zhe xTextCursor_assert.gotoStart(false); 148352c0eacSLiu Zhe xTextCursor_assert.goRight((short) 100, true); 149352c0eacSLiu Zhe assertEquals("Times New Roman",xCursorProps_assert.getPropertyValue("CharFontName")); 150352c0eacSLiu Zhe xTextCursor_assert.gotoRange(xTextCursor_assert, false); 151352c0eacSLiu Zhe xTextCursor_assert.goRight((short) 100, true); 152352c0eacSLiu Zhe assertEquals("Arial Black",xCursorProps_assert.getPropertyValue("CharFontName")); 153352c0eacSLiu Zhe xTextCursor_assert.gotoRange(xTextCursor_assert, false); 154352c0eacSLiu Zhe xTextCursor_assert.goRight((short) 100, true); 155352c0eacSLiu Zhe assertEquals("Aharoni",xCursorProps_assert.getPropertyValue("CharFontName")); 156352c0eacSLiu Zhe xTextCursor_assert.gotoRange(xTextCursor_assert, false); 157352c0eacSLiu Zhe xTextCursor_assert.goRight((short) 100, true); 158352c0eacSLiu Zhe assertEquals("Agency FB",xCursorProps_assert.getPropertyValue("CharFontName")); 159352c0eacSLiu Zhe xTextCursor_assert.gotoRange(xTextCursor_assert, false); 160352c0eacSLiu Zhe xTextCursor_assert.goRight((short) 100, true); 161352c0eacSLiu Zhe assertEquals("Algerian",xCursorProps_assert.getPropertyValue("CharFontName")); 162352c0eacSLiu Zhe xTextCursor_assert.gotoRange(xTextCursor_assert, false); 163352c0eacSLiu Zhe xTextCursor_assert.goRight((short) 100, true); 164352c0eacSLiu Zhe assertEquals("Andalus",xCursorProps_assert.getPropertyValue("CharFontName")); 165352c0eacSLiu Zhe xTextCursor_assert.gotoRange(xTextCursor_assert, false); 166352c0eacSLiu Zhe xTextCursor_assert.goRight((short) 100, true); 167352c0eacSLiu Zhe assertEquals("Bodoni MT Black",xCursorProps_assert.getPropertyValue("CharFontName")); 168352c0eacSLiu Zhe xTextCursor_assert.gotoRange(xTextCursor_assert, false); 169352c0eacSLiu Zhe xTextCursor_assert.goRight((short) 100, true); 170352c0eacSLiu Zhe assertEquals("BatangChe",xCursorProps_assert.getPropertyValue("CharFontName")); 171352c0eacSLiu Zhe xTextCursor_assert.gotoRange(xTextCursor_assert, false); 172352c0eacSLiu Zhe xTextCursor_assert.goRight((short) 100, true); 173352c0eacSLiu Zhe assertEquals("Britannic Bold",xCursorProps_assert.getPropertyValue("CharFontName")); 174352c0eacSLiu Zhe xTextCursor_assert.gotoRange(xTextCursor_assert, false); 175352c0eacSLiu Zhe xTextCursor_assert.goRight((short) 100, true); 176352c0eacSLiu Zhe assertEquals("Cooper Black",xCursorProps_assert.getPropertyValue("CharFontName")); 177352c0eacSLiu Zhe xTextCursor_assert.gotoRange(xTextCursor_assert, false); 178352c0eacSLiu Zhe xTextCursor_assert.goRight((short) 100, true); 179352c0eacSLiu Zhe assertEquals("DaunPenh",xCursorProps_assert.getPropertyValue("CharFontName")); 180352c0eacSLiu Zhe xTextCursor_assert.gotoRange(xTextCursor_assert, false); 181352c0eacSLiu Zhe xTextCursor_assert.goRight((short) 100, true); 182352c0eacSLiu Zhe assertEquals("Estrangelo Edessa",xCursorProps_assert.getPropertyValue("CharFontName")); 183352c0eacSLiu Zhe xTextCursor_assert.gotoRange(xTextCursor_assert, false); 184352c0eacSLiu Zhe xTextCursor_assert.goRight((short) 100, true); 185352c0eacSLiu Zhe assertEquals("Wingdings",xCursorProps_assert.getPropertyValue("CharFontName")); 186352c0eacSLiu Zhe xTextCursor_assert.gotoRange(xTextCursor_assert, false); 187352c0eacSLiu Zhe xTextCursor_assert.goRight((short) 100, true); 188352c0eacSLiu Zhe assertEquals("Rage Italic",xCursorProps_assert.getPropertyValue("CharFontName")); 189352c0eacSLiu Zhe xTextCursor_assert.gotoRange(xTextCursor_assert, false); 190352c0eacSLiu Zhe xTextCursor_assert.goRight((short) 100, true); 191352c0eacSLiu Zhe assertEquals("Symbol",xCursorProps_assert.getPropertyValue("CharFontName")); 192352c0eacSLiu Zhe xTextCursor_assert.gotoRange(xTextCursor_assert, false); 193352c0eacSLiu Zhe xTextCursor_assert.goRight((short) 100, true); 194352c0eacSLiu Zhe assertEquals("Tw Cen MT Condensed Extra Bold",xCursorProps_assert.getPropertyValue("CharFontName")); 195352c0eacSLiu Zhe xTextCursor_assert.gotoRange(xTextCursor_assert, false); 196352c0eacSLiu Zhe xTextCursor_assert.goRight((short) 100, true); 197352c0eacSLiu Zhe assertEquals("Vivaldi",xCursorProps_assert.getPropertyValue("CharFontName")); 198352c0eacSLiu Zhe xTextCursor_assert.gotoRange(xTextCursor_assert, false); 199352c0eacSLiu Zhe xTextCursor_assert.goRight((short) 100, true); 200352c0eacSLiu Zhe assertEquals("SimSun",xCursorProps_assert.getPropertyValue("CharFontName")); 201352c0eacSLiu Zhe xTextCursor_assert.gotoRange(xTextCursor_assert, false); 202352c0eacSLiu Zhe xTextCursor_assert.goRight((short) 100, true); 203352c0eacSLiu Zhe assertEquals("Lucida Bright",xCursorProps_assert.getPropertyValue("CharFontName")); 204352c0eacSLiu Zhe 205352c0eacSLiu Zhe //reopen the document and assert font style 206352c0eacSLiu Zhe XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 207352c0eacSLiu Zhe XTextCursor xTextCursor_assert_doc = assertDocument_doc.getText().createTextCursor(); 208352c0eacSLiu Zhe XPropertySet xCursorProps_assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor_assert_doc); 209352c0eacSLiu Zhe 210352c0eacSLiu Zhe xTextCursor_assert_doc.gotoStart(false); 211352c0eacSLiu Zhe xTextCursor_assert_doc.goRight((short) 100, true); 212352c0eacSLiu Zhe assertEquals("Times New Roman",xCursorProps_assert_doc.getPropertyValue("CharFontName")); 213352c0eacSLiu Zhe xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false); 214352c0eacSLiu Zhe xTextCursor_assert_doc.goRight((short) 100, true); 215352c0eacSLiu Zhe assertEquals("Arial Black",xCursorProps_assert_doc.getPropertyValue("CharFontName")); 216352c0eacSLiu Zhe xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false); 217352c0eacSLiu Zhe xTextCursor_assert_doc.goRight((short) 100, true); 218352c0eacSLiu Zhe assertEquals("Aharoni",xCursorProps_assert_doc.getPropertyValue("CharFontName")); 219352c0eacSLiu Zhe xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false); 220352c0eacSLiu Zhe xTextCursor_assert_doc.goRight((short) 100, true); 221352c0eacSLiu Zhe assertEquals("Agency FB",xCursorProps_assert_doc.getPropertyValue("CharFontName")); 222352c0eacSLiu Zhe xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false); 223352c0eacSLiu Zhe xTextCursor_assert_doc.goRight((short) 100, true); 224352c0eacSLiu Zhe assertEquals("Algerian",xCursorProps_assert_doc.getPropertyValue("CharFontName")); 225352c0eacSLiu Zhe xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false); 226352c0eacSLiu Zhe xTextCursor_assert_doc.goRight((short) 100, true); 227352c0eacSLiu Zhe assertEquals("Andalus",xCursorProps_assert_doc.getPropertyValue("CharFontName")); 228352c0eacSLiu Zhe xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false); 229352c0eacSLiu Zhe xTextCursor_assert_doc.goRight((short) 100, true); 230352c0eacSLiu Zhe assertEquals("Bodoni MT Black",xCursorProps_assert_doc.getPropertyValue("CharFontName")); 231352c0eacSLiu Zhe xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false); 232352c0eacSLiu Zhe xTextCursor_assert_doc.goRight((short) 100, true); 233352c0eacSLiu Zhe assertEquals("BatangChe",xCursorProps_assert_doc.getPropertyValue("CharFontName")); 234352c0eacSLiu Zhe xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false); 235352c0eacSLiu Zhe xTextCursor_assert_doc.goRight((short) 100, true); 236352c0eacSLiu Zhe assertEquals("Britannic Bold",xCursorProps_assert_doc.getPropertyValue("CharFontName")); 237352c0eacSLiu Zhe xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false); 238352c0eacSLiu Zhe xTextCursor_assert_doc.goRight((short) 100, true); 239352c0eacSLiu Zhe assertEquals("Cooper Black",xCursorProps_assert_doc.getPropertyValue("CharFontName")); 240352c0eacSLiu Zhe xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false); 241352c0eacSLiu Zhe xTextCursor_assert_doc.goRight((short) 100, true); 242352c0eacSLiu Zhe assertEquals("DaunPenh",xCursorProps_assert_doc.getPropertyValue("CharFontName")); 243352c0eacSLiu Zhe xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false); 244352c0eacSLiu Zhe xTextCursor_assert_doc.goRight((short) 100, true); 245352c0eacSLiu Zhe assertEquals("Estrangelo Edessa",xCursorProps_assert_doc.getPropertyValue("CharFontName")); 246352c0eacSLiu Zhe xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false); 247352c0eacSLiu Zhe xTextCursor_assert_doc.goRight((short) 100, true); 248352c0eacSLiu Zhe assertEquals("Wingdings",xCursorProps_assert_doc.getPropertyValue("CharFontName")); 249352c0eacSLiu Zhe xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false); 250352c0eacSLiu Zhe xTextCursor_assert_doc.goRight((short) 100, true); 251352c0eacSLiu Zhe assertEquals("Rage Italic",xCursorProps_assert_doc.getPropertyValue("CharFontName")); 252352c0eacSLiu Zhe xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false); 253352c0eacSLiu Zhe xTextCursor_assert_doc.goRight((short) 100, true); 254352c0eacSLiu Zhe assertEquals("Symbol",xCursorProps_assert_doc.getPropertyValue("CharFontName")); 255352c0eacSLiu Zhe xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false); 256352c0eacSLiu Zhe xTextCursor_assert_doc.goRight((short) 100, true); 257352c0eacSLiu Zhe assertEquals("Tw Cen MT Condensed Extra Bold",xCursorProps_assert_doc.getPropertyValue("CharFontName")); 258352c0eacSLiu Zhe xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false); 259352c0eacSLiu Zhe xTextCursor_assert_doc.goRight((short) 100, true); 260352c0eacSLiu Zhe assertEquals("Vivaldi",xCursorProps_assert_doc.getPropertyValue("CharFontName")); 261352c0eacSLiu Zhe xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false); 262352c0eacSLiu Zhe xTextCursor_assert_doc.goRight((short) 100, true); 263352c0eacSLiu Zhe assertEquals("SimSun",xCursorProps_assert_doc.getPropertyValue("CharFontName")); 264352c0eacSLiu Zhe xTextCursor_assert_doc.gotoRange(xTextCursor_assert_doc, false); 265352c0eacSLiu Zhe xTextCursor_assert_doc.goRight((short) 100, true); 266352c0eacSLiu Zhe assertEquals("Lucida Bright",xCursorProps_assert_doc.getPropertyValue("CharFontName")); 267352c0eacSLiu Zhe } 268352c0eacSLiu Zhe } 269