ParagraphNumberingAndBulletTabStop.java (07d7dbdc) ParagraphNumberingAndBulletTabStop.java (06fb39a1)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 53 unchanged lines hidden (view full) ---

62 */
63 @Test
64 public void testNumberingBulletTabStop() throws Exception {
65
66 XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
67 xText = xTextDocument.getText();
68 xText.setString("we are Chinese,they are American.we are all living in one earth!Hello,world!Hello,world!Hello,world!Hello,world!Hello,world!Hello,world!" +
69 "Hello,world!Hello,world!");
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 53 unchanged lines hidden (view full) ---

62 */
63 @Test
64 public void testNumberingBulletTabStop() throws Exception {
65
66 XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
67 xText = xTextDocument.getText();
68 xText.setString("we are Chinese,they are American.we are all living in one earth!Hello,world!Hello,world!Hello,world!Hello,world!Hello,world!Hello,world!" +
69 "Hello,world!Hello,world!");
70 //create cursor to select paragraph and formating paragraph
70 //create cursor to select paragraph and formatting paragraph
71 XTextCursor xTextCursor = xText.createTextCursor();
72 //create paragraph property set
73 XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
74 //create document service factory
75 XMultiServiceFactory xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
76 //set numbering character
77 XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
78 PropertyValue[] propsRule = {new PropertyValue()};

--- 48 unchanged lines hidden ---
71 XTextCursor xTextCursor = xText.createTextCursor();
72 //create paragraph property set
73 XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
74 //create document service factory
75 XMultiServiceFactory xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
76 //set numbering character
77 XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
78 PropertyValue[] propsRule = {new PropertyValue()};

--- 48 unchanged lines hidden ---