View | Details | Raw Unified | Return to issue 120965
Collapse All | Expand All

(-)testuno/source/testcase/uno/sw/paragraph/ParagraphAlignment.java (-1 / +1 lines)
Lines 36-42 Link Here
36
	 * 4.save and close the document
36
	 * 4.save and close the document
37
	 * 5.reload the saved document and check the paragraph alignment
37
	 * 5.reload the saved document and check the paragraph alignment
38
	 */
38
	 */
39
	@Test@Ignore //bug120636_the expand single word option disable when save to doc
39
	@Test@Ignore("Bug #120636 - [testUNO patch]the expand single word option disable when save to doc")
40
	public void testParagraphAlignmentJustified() throws Exception {
40
	public void testParagraphAlignmentJustified() throws Exception {
41
41
42
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
42
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
(-)testuno/source/testcase/uno/sw/paragraph/ParagraphBackGraphic.java (-11 / +11 lines)
Lines 36-42 Link Here
36
	 * 4.save and close the document
36
	 * 4.save and close the document
37
	 * 5.reload the saved document and check the paragraph background graphic
37
	 * 5.reload the saved document and check the paragraph background graphic
38
	 */
38
	 */
39
	@Test@Ignore //bug120638_graphic background lost when save to doc
39
	@Test@Ignore("Bug #120638 - [testUNO patch]graphic background lost when save to doc")
40
	public void testParagraphBackGraphic_LeftBottom() throws Exception {
40
	public void testParagraphBackGraphic_LeftBottom() throws Exception {
41
41
42
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
42
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 96-102 Link Here
96
	 * 4.save and close the document
96
	 * 4.save and close the document
97
	 * 5.reload the saved document and check the paragraph background graphic
97
	 * 5.reload the saved document and check the paragraph background graphic
98
	 */
98
	 */
99
	@Test@Ignore //bug120638_graphic background lost when save to doc
99
	@Test@Ignore("Bug #120638 - [testUNO patch]graphic background lost when save to doc")
100
	public void testParagraphBackGraphic_LeftMiddle() throws Exception {
100
	public void testParagraphBackGraphic_LeftMiddle() throws Exception {
101
101
102
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
102
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 156-162 Link Here
156
	 * 4.save and close the document
156
	 * 4.save and close the document
157
	 * 5.reload the saved document and check the paragraph background graphic
157
	 * 5.reload the saved document and check the paragraph background graphic
158
	 */
158
	 */
159
	@Test@Ignore //bug120638_graphic background lost when save to doc
159
	@Test@Ignore("Bug #120638 - [testUNO patch]graphic background lost when save to doc")
160
	public void testParagraphBackGraphic_LeftTop() throws Exception {
160
	public void testParagraphBackGraphic_LeftTop() throws Exception {
161
161
162
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
162
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 216-222 Link Here
216
	 * 4.save and close the document
216
	 * 4.save and close the document
217
	 * 5.reload the saved document and check the paragraph background graphic
217
	 * 5.reload the saved document and check the paragraph background graphic
218
	 */
218
	 */
219
	@Test@Ignore //bug120638_graphic background lost when save to doc
219
	@Test@Ignore("Bug #120638 - [testUNO patch]graphic background lost when save to doc")
220
	public void testParagraphBackGraphic_MiddleBottom() throws Exception {
220
	public void testParagraphBackGraphic_MiddleBottom() throws Exception {
221
221
222
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
222
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 276-282 Link Here
276
	 * 4.save and close the document
276
	 * 4.save and close the document
277
	 * 5.reload the saved document and check the paragraph background graphic
277
	 * 5.reload the saved document and check the paragraph background graphic
278
	 */
278
	 */
279
	@Test@Ignore //bug120638_graphic background lost when save to doc
279
	@Test@Ignore("Bug #120638 - [testUNO patch]graphic background lost when save to doc")
280
	public void testParagraphBackGraphic_MiddleMiddle() throws Exception {
280
	public void testParagraphBackGraphic_MiddleMiddle() throws Exception {
281
281
282
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
282
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 336-342 Link Here
336
	 * 4.save and close the document
336
	 * 4.save and close the document
337
	 * 5.reload the saved document and check the paragraph background graphic
337
	 * 5.reload the saved document and check the paragraph background graphic
338
	 */
338
	 */
339
	@Test@Ignore //bug120638_graphic background lost when save to doc
339
	@Test@Ignore("Bug #120638 - [testUNO patch]graphic background lost when save to doc")
340
	public void testParagraphBackGraphic_MiddleTop() throws Exception {
340
	public void testParagraphBackGraphic_MiddleTop() throws Exception {
341
341
342
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
342
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 397-403 Link Here
397
	 * 4.save and close the document
397
	 * 4.save and close the document
398
	 * 5.reload the saved document and check the paragraph background graphic
398
	 * 5.reload the saved document and check the paragraph background graphic
399
	 */
399
	 */
400
	@Test@Ignore //bug120638_graphic background lost when save to doc
400
	@Test@Ignore("Bug #120638 - [testUNO patch]graphic background lost when save to doc")
401
	public void testParagraphBackGraphic_RightBottom() throws Exception {
401
	public void testParagraphBackGraphic_RightBottom() throws Exception {
402
402
403
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
403
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 457-463 Link Here
457
	 * 4.save and close the document
457
	 * 4.save and close the document
458
	 * 5.reload the saved document and check the paragraph background graphic
458
	 * 5.reload the saved document and check the paragraph background graphic
459
	 */
459
	 */
460
	@Test@Ignore //bug120638_graphic background lost when save to doc
460
	@Test@Ignore("Bug #120638 - [testUNO patch]graphic background lost when save to doc")
461
	public void testParagraphBackGraphic_RightMiddle() throws Exception {
461
	public void testParagraphBackGraphic_RightMiddle() throws Exception {
462
462
463
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
463
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 517-523 Link Here
517
	 * 4.save and close the document
517
	 * 4.save and close the document
518
	 * 5.reload the saved document and check the paragraph background graphic
518
	 * 5.reload the saved document and check the paragraph background graphic
519
	 */
519
	 */
520
	@Test@Ignore //bug120638_graphic background lost when save to doc
520
	@Test@Ignore("Bug #120638 - [testUNO patch]graphic background lost when save to doc")
521
	public void testParagraphBackGraphic_RightTop() throws Exception {
521
	public void testParagraphBackGraphic_RightTop() throws Exception {
522
522
523
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
523
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 577-583 Link Here
577
	 * 4.save and close the document
577
	 * 4.save and close the document
578
	 * 5.reload the saved document and check the paragraph background graphic
578
	 * 5.reload the saved document and check the paragraph background graphic
579
	 */
579
	 */
580
	@Test@Ignore //bug120638_graphic background lost when save to doc
580
	@Test@Ignore("Bug #120638 - [testUNO patch]graphic background lost when save to doc")
581
	public void testParagraphBackGraphic_Area() throws Exception {
581
	public void testParagraphBackGraphic_Area() throws Exception {
582
582
583
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
583
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 637-643 Link Here
637
	 * 4.save and close the document
637
	 * 4.save and close the document
638
	 * 5.reload the saved document and check the paragraph background graphic
638
	 * 5.reload the saved document and check the paragraph background graphic
639
	 */
639
	 */
640
	@Test@Ignore //bug120638_graphic background lost when save to doc
640
	@Test@Ignore("Bug #120638 - [testUNO patch]graphic background lost when save to doc")
641
	public void testParagraphBackGraphic_Titled() throws Exception {
641
	public void testParagraphBackGraphic_Titled() throws Exception {
642
642
643
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
643
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
(-)testuno/source/testcase/uno/sw/paragraph/ParagraphBorder.java (-1 / +1 lines)
Lines 38-44 Link Here
38
	 * 4.save and close the document
38
	 * 4.save and close the document
39
	 * 5.reload the saved document and check the paragraph border
39
	 * 5.reload the saved document and check the paragraph border
40
	 */	
40
	 */	
41
	@Test@Ignore //bug120694_the paragraph border line style change when save to doc.
41
	@Test@Ignore("Bug #120694 - [testUNO patch]the paragraph border line style change when save to doc.")
42
	public void testParagraphBorderSetting() throws Exception {
42
	public void testParagraphBorderSetting() throws Exception {
43
43
44
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
44
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
(-)testuno/source/testcase/uno/sw/paragraph/ParagraphIndentAndSpacing.java (-1 / +1 lines)
Lines 97-103 Link Here
97
		assertEquals("assert first line indent",4001,xCursorProps_Assert_doc.getPropertyValue("ParaFirstLineIndent"));
97
		assertEquals("assert first line indent",4001,xCursorProps_Assert_doc.getPropertyValue("ParaFirstLineIndent"));
98
		assertEquals("assert paragraph first line is no autoindent",false,xCursorProps_Assert_doc.getPropertyValue("ParaIsAutoFirstLineIndent"));
98
		assertEquals("assert paragraph first line is no autoindent",false,xCursorProps_Assert_doc.getPropertyValue("ParaIsAutoFirstLineIndent"));
99
	}
99
	}
100
	@Test@Ignore //bug 120646_the auto indent effect of first line lost when save to doc
100
	@Test@Ignore("Bug #120646 - [testUNO patch]the auto indent effect of first line lost when save to doc")
101
	public void testParagraphIndent() throws Exception {
101
	public void testParagraphIndent() throws Exception {
102
102
103
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
103
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
(-)testuno/source/testcase/uno/sw/paragraph/ParagraphInsertBreak.java (-11 / +11 lines)
Lines 132-138 Link Here
132
		assertEquals("assert paragraph break",(byte)2,xCursorProps_Assert_odt.getPropertyValue("ParaOrphans"));
132
		assertEquals("assert paragraph break",(byte)2,xCursorProps_Assert_odt.getPropertyValue("ParaOrphans"));
133
		assertEquals("assert paragraph break",(byte)2,xCursorProps_Assert_odt.getPropertyValue("ParaWidows"));
133
		assertEquals("assert paragraph break",(byte)2,xCursorProps_Assert_odt.getPropertyValue("ParaWidows"));
134
	}
134
	}
135
	@Test@Ignore //bug 120719_the page_after break change to page_before break when save to doc.
135
	@Test@Ignore("Bug #120719 - [testUNO patch]the page_after break change to page_before break when save to doc.")
136
	public void InsertPage_AfterBreak() throws Exception {
136
	public void InsertPage_AfterBreak() throws Exception {
137
137
138
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
138
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 178-184 Link Here
178
		//verify paragraph break
178
		//verify paragraph break
179
		assertEquals("assert paragraph break",com.sun.star.style.BreakType.PAGE_AFTER,xCursorProps_Assert_doc.getPropertyValue("BreakType"));
179
		assertEquals("assert paragraph break",com.sun.star.style.BreakType.PAGE_AFTER,xCursorProps_Assert_doc.getPropertyValue("BreakType"));
180
	}
180
	}
181
	@Test@Ignore //bug 120719_the page_after/column_before break change to page_before break when save to doc.
181
	@Test@Ignore("Bug #120719 - [testUNO patch]the page_after break change to page_before break when save to doc.")
182
	public void InsertColumn_BeforeBreak() throws Exception {
182
	public void InsertColumn_BeforeBreak() throws Exception {
183
183
184
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
184
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 224-230 Link Here
224
		//verify paragraph break
224
		//verify paragraph break
225
		assertEquals("assert paragraph break",com.sun.star.style.BreakType.COLUMN_BEFORE,xCursorProps_Assert_doc.getPropertyValue("BreakType"));
225
		assertEquals("assert paragraph break",com.sun.star.style.BreakType.COLUMN_BEFORE,xCursorProps_Assert_doc.getPropertyValue("BreakType"));
226
	}
226
	}
227
	@Test@Ignore //bug 120719_the page_after/column_before/column_after break change to page_before break when save to doc.
227
	@Test@Ignore("Bug #120719 - [testUNO patch]the page_after break change to page_before break when save to doc.")
228
	public void InsertColumn_AfterBreak() throws Exception {
228
	public void InsertColumn_AfterBreak() throws Exception {
229
229
230
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
230
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 270-276 Link Here
270
		//verify paragraph break
270
		//verify paragraph break
271
		assertEquals("assert paragraph break",com.sun.star.style.BreakType.COLUMN_AFTER,xCursorProps_Assert_doc.getPropertyValue("BreakType"));
271
		assertEquals("assert paragraph break",com.sun.star.style.BreakType.COLUMN_AFTER,xCursorProps_Assert_doc.getPropertyValue("BreakType"));
272
	}
272
	}
273
	@Test@Ignore //bug120721_the endnote page break change to page default break when save to doc.
273
	@Test@Ignore("Bug #120721 - [testUNO patch]the endnote page break change to page default break when save to doc.")
274
	public void InsertPage_Endnote_BeforeBreak() throws Exception {
274
	public void InsertPage_Endnote_BeforeBreak() throws Exception {
275
275
276
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
276
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 322-328 Link Here
322
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
322
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
323
	}
323
	}
324
	
324
	
325
	@Test@Ignore //bug120721_the envelope page break change to page default break when save to doc.
325
	@Test@Ignore("Bug #120721 - [testUNO patch]the endnote page break change to page default break when save to doc.")
326
	public void InsertPage_Envelop_BeforeBreak() throws Exception {
326
	public void InsertPage_Envelop_BeforeBreak() throws Exception {
327
327
328
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
328
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 425-431 Link Here
425
		assertEquals("assert paragraph break","First Page",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
425
		assertEquals("assert paragraph break","First Page",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
426
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
426
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
427
	}
427
	}
428
	@Test@Ignore //bug120721_the footnote page break change to page default break when save to doc.
428
	@Test@Ignore("Bug #120721 - [testUNO patch]the endnote page break change to page default break when save to doc.")
429
	public void InsertPage_Footnote_BeforeBreak() throws Exception {
429
	public void InsertPage_Footnote_BeforeBreak() throws Exception {
430
430
431
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
431
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 476-482 Link Here
476
		assertEquals("assert paragraph break","Footnote",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
476
		assertEquals("assert paragraph break","Footnote",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
477
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
477
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
478
	}
478
	}
479
	@Test@Ignore //bug120721_the footnote page break change to page default break when save to doc.
479
	@Test@Ignore("Bug #120721 - [testUNO patch]the endnote page break change to page default break when save to doc.")
480
	public void InsertPage_HTML_BeforeBreak() throws Exception {
480
	public void InsertPage_HTML_BeforeBreak() throws Exception {
481
481
482
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
482
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 527-533 Link Here
527
		assertEquals("assert paragraph break","HTML",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
527
		assertEquals("assert paragraph break","HTML",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
528
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
528
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
529
	}
529
	}
530
	@Test@Ignore //bug120721_the index page break change to page default break when save to doc.
530
	@Test@Ignore("Bug #120721 - [testUNO patch]the endnote page break change to page default break when save to doc.")
531
	public void InsertPage_Index_BeforeBreak() throws Exception {
531
	public void InsertPage_Index_BeforeBreak() throws Exception {
532
532
533
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
533
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 578-584 Link Here
578
		assertEquals("assert paragraph break","Index",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
578
		assertEquals("assert paragraph break","Index",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
579
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
579
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
580
	}
580
	}
581
	@Test@Ignore //bug120721_the landscape page break change to page default break when save to doc.
581
	@Test@Ignore("Bug #120721 - [testUNO patch]the endnote page break change to page default break when save to doc.")
582
	public void InsertPage_Landscape_BeforeBreak() throws Exception {
582
	public void InsertPage_Landscape_BeforeBreak() throws Exception {
583
583
584
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
584
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 629-635 Link Here
629
		assertEquals("assert paragraph break","Landscape",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
629
		assertEquals("assert paragraph break","Landscape",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
630
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
630
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
631
	}
631
	}
632
	@Test@Ignore //bug120721_the leftpage break change to page default break when save to doc.
632
	@Test@Ignore("Bug #120721 - [testUNO patch]the endnote page break change to page default break when save to doc.")
633
	public void InsertPage_LeftPage_BeforeBreak() throws Exception {
633
	public void InsertPage_LeftPage_BeforeBreak() throws Exception {
634
634
635
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
635
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 680-686 Link Here
680
		assertEquals("assert paragraph break","Left Page",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
680
		assertEquals("assert paragraph break","Left Page",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
681
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
681
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
682
	}
682
	}
683
	@Test@Ignore //bug120721_the right page break change to page default break when save to doc.
683
	@Test@Ignore("Bug #120721 - [testUNO patch]the endnote page break change to page default break when save to doc.")
684
	public void InsertPage_RightPage_BeforeBreak() throws Exception {
684
	public void InsertPage_RightPage_BeforeBreak() throws Exception {
685
685
686
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
686
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
(-)testuno/source/testcase/uno/sw/paragraph/ParagraphLineSpacing.java (-2 / +2 lines)
Lines 97-103 Link Here
97
	 * 4.save and close the document
97
	 * 4.save and close the document
98
	 * 5.reload the saved document and check the paragraph line spacing
98
	 * 5.reload the saved document and check the paragraph line spacing
99
	 */
99
	 */
100
	@Test@Ignore //bug 120647_line spacing leading setting change to at least when save to doc
100
	@Test@Ignore("Bug #120647 - [testUNO patch]line spacing leading setting change to at least when save to doc")
101
	public void testParagraphLineSpacingLeading() throws Exception {
101
	public void testParagraphLineSpacingLeading() throws Exception {
102
102
103
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
103
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 280-286 Link Here
280
	 * 4.save and close the document
280
	 * 4.save and close the document
281
	 * 5.reload the saved document and check the paragraph line spacing
281
	 * 5.reload the saved document and check the paragraph line spacing
282
	 */
282
	 */
283
	@Test@Ignore //bug 120649_single line spacing change to "at least" of "0.07" when save to doc
283
	@Test@Ignore("Bug #120649 - [testUNO patch]single line spacing change to at least of 0.07 when save to doc")
284
	public void testParagraphLineSpacingSingle() throws Exception {
284
	public void testParagraphLineSpacingSingle() throws Exception {
285
285
286
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
286
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
(-)testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_CharacterBullet.java (+182 lines)
Line 0 Link Here
1
package testcase.uno.sw.paragraph;
2
3
import static org.junit.Assert.*;
4
5
import org.junit.After;
6
import org.junit.Before;
7
import org.junit.Ignore;
8
import org.junit.Test;
9
import org.openoffice.test.common.FileUtil;
10
import org.openoffice.test.common.Testspace;
11
import org.openoffice.test.uno.UnoApp;
12
13
import com.sun.star.style.NumberingType;
14
import com.sun.star.text.*;
15
import com.sun.star.beans.*;
16
import com.sun.star.container.XIndexAccess;
17
import com.sun.star.container.XIndexReplace;
18
import com.sun.star.frame.XStorable;
19
import com.sun.star.lang.XMultiServiceFactory;
20
import com.sun.star.uno.UnoRuntime;
21
22
public class ParagraphNumberingAndBullet_CharacterBullet {
23
	private static final UnoApp app = new UnoApp();
24
	XText xText = null;
25
26
	@Before
27
	public void setUp() throws Exception {
28
		app.start();
29
30
	}
31
32
	@After
33
	public void tearDown() throws Exception {
34
		//app.close();
35
	}
36
	/*
37
	 * test paragraph background color
38
	 * 1.new a text document
39
	 * 2.insert some text
40
	 * 3.set paragraph bullet
41
	 * 4.save and close the document
42
	 * 5.reload the saved document and check the paragraph bullet
43
	 */	
44
	@Test @Ignore("Bug #120963 - [testUNO patch]the bullet character font style change to other font style character when save to doc.")
45
	public void testNumberingAndBullet_CharacterBullet1() throws Exception {
46
47
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
48
		xText = xTextDocument.getText();
49
		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!" +
50
				"Hello,world!Hello,world!");
51
		//create cursor to select paragraph and formating paragraph
52
		XTextCursor xTextCursor = xText.createTextCursor();    
53
		//create paragraph property set
54
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
55
		//create document service factory
56
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
57
		//set numbering character
58
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
59
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
60
		propsRule[0].Name = "NumberingType";
61
		propsRule[0].Value = NumberingType.CHAR_SPECIAL;
62
		propsRule[1].Name = "BulletId";
63
		propsRule[1].Value = (short)8226;		
64
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
65
		xReplaceRule.replaceByIndex(0, propsRule);  
66
		//set paragraph numbering and bullet character
67
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
68
		//save to odt 
69
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
70
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
71
		aStoreProperties_odt[0] = new PropertyValue();
72
		aStoreProperties_odt[1] = new PropertyValue();
73
		aStoreProperties_odt[0].Name = "Override";
74
		aStoreProperties_odt[0].Value = true;
75
		aStoreProperties_odt[1].Name = "FilterName";
76
		aStoreProperties_odt[1].Value = "writer8";
77
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
78
		//save to doc 
79
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
80
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
81
		aStoreProperties_doc[0] = new PropertyValue();
82
		aStoreProperties_doc[1] = new PropertyValue();
83
		aStoreProperties_doc[0].Name = "Override";
84
		aStoreProperties_doc[0].Value = true;
85
		aStoreProperties_doc[1].Name = "FilterName";
86
		aStoreProperties_doc[1].Value = "MS Word 97";
87
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
88
		app.closeDocument(xTextDocument);
89
90
		//reopen the document 
91
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
92
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
93
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
94
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
95
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
96
		//verify paragraph numbering and bullet alignment
97
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
98
		assertEquals("assert numbering and bullet",NumberingType.CHAR_SPECIAL,propsRule_assert_odt[11].Value);
99
		assertEquals("assert numbering and bullet","BulletId",propsRule_assert_odt[12].Name);
100
		assertEquals("assert numbering and bullet",(short)8226,propsRule_assert_odt[12].Value);
101
102
		//reopen the document 
103
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
104
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
105
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
106
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
107
		//verify paragraph numbering and bullet alignment
108
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
109
		assertEquals("assert numbering and bullet",NumberingType.CHAR_SPECIAL,propsRule_assert_doc[11].Value);
110
		assertEquals("assert numbering and bullet","BulletId",propsRule_assert_doc[12].Name);
111
		assertEquals("assert numbering and bullet",(short)8226,propsRule_assert_doc[12].Value);
112
	}
113
	@Test @Ignore("Bug #120963 - [testUNO patch]the bullet character font style change to other font style character when save to doc.")
114
	public void testNumberingAndBullet_CharacterBullet2() throws Exception {
115
116
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
117
		xText = xTextDocument.getText();
118
		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!" +
119
				"Hello,world!Hello,world!");
120
		//create cursor to select paragraph and formating paragraph
121
		XTextCursor xTextCursor = xText.createTextCursor();    
122
		//create paragraph property set
123
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
124
		//create document service factory
125
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
126
		//set numbering character
127
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
128
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
129
		propsRule[0].Name = "NumberingType";
130
		propsRule[0].Value = NumberingType.CHAR_SPECIAL;
131
		propsRule[1].Name = "BulletId";
132
		propsRule[1].Value = (short)9679;		
133
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
134
		xReplaceRule.replaceByIndex(0, propsRule);  
135
		//set paragraph numbering and bullet character
136
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
137
		//save to odt 
138
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
139
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
140
		aStoreProperties_odt[0] = new PropertyValue();
141
		aStoreProperties_odt[1] = new PropertyValue();
142
		aStoreProperties_odt[0].Name = "Override";
143
		aStoreProperties_odt[0].Value = true;
144
		aStoreProperties_odt[1].Name = "FilterName";
145
		aStoreProperties_odt[1].Value = "writer8";
146
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
147
		//save to doc 
148
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
149
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
150
		aStoreProperties_doc[0] = new PropertyValue();
151
		aStoreProperties_doc[1] = new PropertyValue();
152
		aStoreProperties_doc[0].Name = "Override";
153
		aStoreProperties_doc[0].Value = true;
154
		aStoreProperties_doc[1].Name = "FilterName";
155
		aStoreProperties_doc[1].Value = "MS Word 97";
156
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
157
		app.closeDocument(xTextDocument);
158
159
		//reopen the document 
160
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
161
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
162
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
163
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
164
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
165
		//verify paragraph numbering and bullet alignment
166
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
167
		assertEquals("assert numbering and bullet",NumberingType.CHAR_SPECIAL,propsRule_assert_odt[11].Value);
168
		assertEquals("assert numbering and bullet","BulletId",propsRule_assert_odt[12].Name);
169
		assertEquals("assert numbering and bullet",(short)9679,propsRule_assert_odt[12].Value);
170
171
		//reopen the document 
172
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
173
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
174
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
175
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
176
		//verify paragraph numbering and bullet alignment
177
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
178
		assertEquals("assert numbering and bullet",NumberingType.CHAR_SPECIAL,propsRule_assert_doc[11].Value);
179
		assertEquals("assert numbering and bullet","BulletId",propsRule_assert_doc[12].Name);
180
		assertEquals("assert numbering and bullet",(short)9679,propsRule_assert_doc[12].Value);
181
	}
182
}
(-)testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Graphic.java (-1 / +1 lines)
Lines 41-47 Link Here
41
	 * 4.save and close the document
41
	 * 4.save and close the document
42
	 * 5.reload the saved document and check the paragraph graphic bullet
42
	 * 5.reload the saved document and check the paragraph graphic bullet
43
	 */	
43
	 */	
44
	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
44
	@Test@Ignore("Bug #120833 - [testUNO patch]graphic bullet will change to character bullet when save to doc.")
45
	public void testNumberingBullet_Graphic() throws Exception {
45
	public void testNumberingBullet_Graphic() throws Exception {
46
46
47
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
47
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
(-)testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Graphic_Alignment.java (-9 / +9 lines)
Lines 41-47 Link Here
41
	 * 4.save and close the document
41
	 * 4.save and close the document
42
	 * 5.reload the saved document and check the paragraph graphic bullet align
42
	 * 5.reload the saved document and check the paragraph graphic bullet align
43
	 */	
43
	 */	
44
	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
44
	@Test@Ignore("Bug #120833 - [testUNO patch]graphic bullet will change to character bullet when save to doc.")
45
	public void testNumberingBullet_Graphic_Align_BottomofBaseline() throws Exception {
45
	public void testNumberingBullet_Graphic_Align_BottomofBaseline() throws Exception {
46
46
47
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
47
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 116-122 Link Here
116
		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
116
		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
117
		assertEquals("assert numbering and bullet",VertOrientation.BOTTOM,propsRule_assert_doc[15].Value);
117
		assertEquals("assert numbering and bullet",VertOrientation.BOTTOM,propsRule_assert_doc[15].Value);
118
	}
118
	}
119
	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
119
	@Test@Ignore("Bug #120833 - [testUNO patch]graphic bullet will change to character bullet when save to doc.")
120
	public void testNumberingBullet_Graphic_Align_CenterofBaseline() throws Exception {
120
	public void testNumberingBullet_Graphic_Align_CenterofBaseline() throws Exception {
121
121
122
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
122
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 191-197 Link Here
191
		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
191
		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
192
		assertEquals("assert numbering and bullet",VertOrientation.CENTER,propsRule_assert_doc[15].Value);
192
		assertEquals("assert numbering and bullet",VertOrientation.CENTER,propsRule_assert_doc[15].Value);
193
	}
193
	}
194
	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
194
	@Test@Ignore("Bug #120833 - [testUNO patch]graphic bullet will change to character bullet when save to doc.")
195
	public void testNumberingBullet_Graphic_Align_TopofBaseline() throws Exception {
195
	public void testNumberingBullet_Graphic_Align_TopofBaseline() throws Exception {
196
196
197
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
197
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 266-272 Link Here
266
		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
266
		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
267
		assertEquals("assert numbering and bullet",VertOrientation.TOP,propsRule_assert_doc[15].Value);
267
		assertEquals("assert numbering and bullet",VertOrientation.TOP,propsRule_assert_doc[15].Value);
268
	}
268
	}
269
	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
269
	@Test@Ignore("Bug #120833 - [testUNO patch]graphic bullet will change to character bullet when save to doc.")
270
	public void testNumberingBullet_Graphic_Align_BottomofCharacter() throws Exception {
270
	public void testNumberingBullet_Graphic_Align_BottomofCharacter() throws Exception {
271
271
272
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
272
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 341-347 Link Here
341
		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
341
		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
342
		assertEquals("assert numbering and bullet",VertOrientation.CHAR_BOTTOM,propsRule_assert_doc[15].Value);
342
		assertEquals("assert numbering and bullet",VertOrientation.CHAR_BOTTOM,propsRule_assert_doc[15].Value);
343
	}
343
	}
344
	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
344
	@Test@Ignore("Bug #120833 - [testUNO patch]graphic bullet will change to character bullet when save to doc.")
345
	public void testNumberingBullet_Graphic_Align_CenterofCharacter() throws Exception {
345
	public void testNumberingBullet_Graphic_Align_CenterofCharacter() throws Exception {
346
346
347
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
347
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 416-422 Link Here
416
		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
416
		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
417
		assertEquals("assert numbering and bullet",VertOrientation.CHAR_CENTER,propsRule_assert_doc[15].Value);
417
		assertEquals("assert numbering and bullet",VertOrientation.CHAR_CENTER,propsRule_assert_doc[15].Value);
418
	}
418
	}
419
	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
419
	@Test@Ignore("Bug #120833 - [testUNO patch]graphic bullet will change to character bullet when save to doc.")
420
	public void testNumberingBullet_Graphic_Align_TopofCharacter() throws Exception {
420
	public void testNumberingBullet_Graphic_Align_TopofCharacter() throws Exception {
421
421
422
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
422
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 491-497 Link Here
491
		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
491
		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
492
		assertEquals("assert numbering and bullet",VertOrientation.CHAR_TOP,propsRule_assert_doc[15].Value);
492
		assertEquals("assert numbering and bullet",VertOrientation.CHAR_TOP,propsRule_assert_doc[15].Value);
493
	}	
493
	}	
494
	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
494
	@Test@Ignore("Bug #120833 - [testUNO patch]graphic bullet will change to character bullet when save to doc.")
495
	public void testNumberingBullet_Graphic_Align_BottomofLine() throws Exception {
495
	public void testNumberingBullet_Graphic_Align_BottomofLine() throws Exception {
496
496
497
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
497
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 566-572 Link Here
566
		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
566
		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
567
		assertEquals("assert numbering and bullet",VertOrientation.LINE_BOTTOM,propsRule_assert_doc[15].Value);
567
		assertEquals("assert numbering and bullet",VertOrientation.LINE_BOTTOM,propsRule_assert_doc[15].Value);
568
	}
568
	}
569
	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
569
	@Test@Ignore("Bug #120833 - [testUNO patch]graphic bullet will change to character bullet when save to doc.")
570
	public void testNumberingBullet_Graphic_Align_CenterofLine() throws Exception {
570
	public void testNumberingBullet_Graphic_Align_CenterofLine() throws Exception {
571
571
572
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
572
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 641-647 Link Here
641
		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
641
		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
642
		assertEquals("assert numbering and bullet",VertOrientation.LINE_CENTER,propsRule_assert_doc[15].Value);
642
		assertEquals("assert numbering and bullet",VertOrientation.LINE_CENTER,propsRule_assert_doc[15].Value);
643
	}
643
	}
644
	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
644
	@Test@Ignore("Bug #120833 - [testUNO patch]graphic bullet will change to character bullet when save to doc.")
645
	public void testNumberingBullet_Graphic_Align_TopofLine() throws Exception {
645
	public void testNumberingBullet_Graphic_Align_TopofLine() throws Exception {
646
646
647
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
647
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
(-)testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Graphic_WidthAndHeight.java (-1 / +1 lines)
Lines 42-48 Link Here
42
	 * 4.save and close the document
42
	 * 4.save and close the document
43
	 * 5.reload the saved document and check the paragraph graphic bullet
43
	 * 5.reload the saved document and check the paragraph graphic bullet
44
	 */	
44
	 */	
45
	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
45
	@Test@Ignore("Bug #120833 - [testUNO patch]graphic bullet will change to character bullet when save to doc.")
46
	public void testNumberingBullet_Graphic() throws Exception {
46
	public void testNumberingBullet_Graphic() throws Exception {
47
47
48
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
48
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
(-)testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Numbering.java (-4 / +4 lines)
Lines 31-37 Link Here
31
31
32
	@After
32
	@After
33
	public void tearDown() throws Exception {
33
	public void tearDown() throws Exception {
34
		//app.close();
34
		app.close();
35
	}
35
	}
36
	/*
36
	/*
37
	 * test paragraph background color
37
	 * test paragraph background color
Lines 374-380 Link Here
374
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
374
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
375
		assertEquals("assert numbering and bullet",NumberingType.ROMAN_UPPER,propsRule_assert_doc[11].Value);
375
		assertEquals("assert numbering and bullet",NumberingType.ROMAN_UPPER,propsRule_assert_doc[11].Value);
376
	}
376
	}
377
	@Test@Ignore("#Bug 120826 - A,B,C numbering bullet will change to A,AA,AAA when save to doc.")
377
	@Test@Ignore("Bug #120826 - [testUNO patch]A,B,C numbering bullet will change to A,AA,AAA when save to doc.")
378
	public void testNumberingBullet_CHARS_UPPER_LETTER() throws Exception {
378
	public void testNumberingBullet_CHARS_UPPER_LETTER() throws Exception {
379
379
380
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
380
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 443-449 Link Here
443
		assertEquals("assert numbering and bullet","Suffix",propsRule_assert_doc[3].Name);
443
		assertEquals("assert numbering and bullet","Suffix",propsRule_assert_doc[3].Name);
444
		assertEquals("assert numbering and bullet",")",propsRule_assert_doc[3].Value);
444
		assertEquals("assert numbering and bullet",")",propsRule_assert_doc[3].Value);
445
	}
445
	}
446
	@Test@Ignore("#Bug 120826 - A,B,C numbering bullet will change to A,AA,AAA when save to doc.")
446
	@Test@Ignore("Bug #120826 - [testUNO patch]A,B,C numbering bullet will change to A,AA,AAA when save to doc.")
447
	public void testNumberingBullet_CHARS_LOWER_LETTER_Suffix() throws Exception {
447
	public void testNumberingBullet_CHARS_LOWER_LETTER_Suffix() throws Exception {
448
448
449
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
449
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 512-518 Link Here
512
		assertEquals("assert numbering and bullet","Suffix",propsRule_assert_doc[3].Name);
512
		assertEquals("assert numbering and bullet","Suffix",propsRule_assert_doc[3].Name);
513
		assertEquals("assert numbering and bullet",")",propsRule_assert_doc[3].Value);
513
		assertEquals("assert numbering and bullet",")",propsRule_assert_doc[3].Value);
514
	}
514
	}
515
	@Test@Ignore("#Bug 120826 - A,B,C numbering bullet will change to A,AA,AAA when save to doc.")
515
	@Test@Ignore("Bug #120826 - [testUNO patch]A,B,C numbering bullet will change to A,AA,AAA when save to doc.")
516
	public void testNumberingBullet_CHARS_LOWER_LETTER_Suffix_Prefix() throws Exception {
516
	public void testNumberingBullet_CHARS_LOWER_LETTER_Suffix_Prefix() throws Exception {
517
517
518
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
518
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
(-)testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBulletCharacterStyle.java (+1836 lines)
Line 0 Link Here
1
package testcase.uno.sw.paragraph;
2
3
import static org.junit.Assert.*;
4
5
import org.junit.After;
6
import org.junit.Before;
7
import org.junit.Test;
8
import org.openoffice.test.common.FileUtil;
9
import org.openoffice.test.common.Testspace;
10
import org.openoffice.test.uno.UnoApp;
11
12
import com.sun.star.style.NumberingType;
13
import com.sun.star.text.*;
14
import com.sun.star.beans.*;
15
import com.sun.star.container.XIndexAccess;
16
import com.sun.star.container.XIndexReplace;
17
import com.sun.star.frame.XStorable;
18
import com.sun.star.lang.XMultiServiceFactory;
19
import com.sun.star.uno.UnoRuntime;
20
21
public class ParagraphNumberingAndBulletCharacterStyle {
22
	private static final UnoApp app = new UnoApp();
23
	XText xText = null;
24
25
	@Before
26
	public void setUp() throws Exception {
27
		app.start();
28
29
	}
30
31
	@After
32
	public void tearDown() throws Exception {
33
		app.close();
34
	}
35
	/*
36
	 * test paragraph background color
37
	 * 1.new a text document
38
	 * 2.insert some text
39
	 * 3.set paragraph numbering bullet character style
40
	 * 4.save and close the document
41
	 * 5.reload the saved document and check the paragraph numbering bullet character style
42
	 */	
43
	@Test
44
	public void testNumberingBulletCharacterStyle_Rubies() throws Exception {
45
46
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
47
		xText = xTextDocument.getText();
48
		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!" +
49
				"Hello,world!Hello,world!");
50
		//create cursor to select paragraph and formating paragraph
51
		XTextCursor xTextCursor = xText.createTextCursor();    
52
		//create paragraph property set
53
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
54
		//create document service factory
55
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
56
		//set numbering character
57
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
58
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
59
		propsRule[0].Name = "NumberingType";
60
		propsRule[0].Value = NumberingType.ARABIC;
61
		propsRule[1].Name = "CharStyleName";
62
		propsRule[1].Value = "Rubies";	
63
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
64
		xReplaceRule.replaceByIndex(0, propsRule);  
65
		//set paragraph numbering and bullet character
66
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
67
		//save to odt 
68
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
69
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
70
		aStoreProperties_odt[0] = new PropertyValue();
71
		aStoreProperties_odt[1] = new PropertyValue();
72
		aStoreProperties_odt[0].Name = "Override";
73
		aStoreProperties_odt[0].Value = true;
74
		aStoreProperties_odt[1].Name = "FilterName";
75
		aStoreProperties_odt[1].Value = "writer8";
76
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
77
		//save to doc 
78
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
79
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
80
		aStoreProperties_doc[0] = new PropertyValue();
81
		aStoreProperties_doc[1] = new PropertyValue();
82
		aStoreProperties_doc[0].Name = "Override";
83
		aStoreProperties_doc[0].Value = true;
84
		aStoreProperties_doc[1].Name = "FilterName";
85
		aStoreProperties_doc[1].Value = "MS Word 97";
86
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
87
		app.closeDocument(xTextDocument);
88
89
		//reopen the document 
90
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
91
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
92
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
93
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
94
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
95
		//verify paragraph numbering and bullet alignment
96
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
97
		assertEquals("assert numbering and bullet","Rubies",propsRule_assert_odt[4].Value);
98
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
99
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
100
101
		//reopen the document 
102
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
103
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
104
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
105
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
106
		//verify paragraph numbering and bullet alignment
107
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
108
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
109
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
110
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
111
	}
112
	@Test
113
	public void testNumberingBulletCharacterStyle_Emphasis() throws Exception {
114
115
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
116
		xText = xTextDocument.getText();
117
		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!" +
118
				"Hello,world!Hello,world!");
119
		//create cursor to select paragraph and formating paragraph
120
		XTextCursor xTextCursor = xText.createTextCursor();    
121
		//create paragraph property set
122
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
123
		//create document service factory
124
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
125
		//set numbering character
126
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
127
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
128
		propsRule[0].Name = "NumberingType";
129
		propsRule[0].Value = NumberingType.ARABIC;
130
		propsRule[1].Name = "CharStyleName";
131
		propsRule[1].Value = "Emphasis";	
132
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
133
		xReplaceRule.replaceByIndex(0, propsRule);  
134
		//set paragraph numbering and bullet character
135
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
136
		//save to odt 
137
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
138
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
139
		aStoreProperties_odt[0] = new PropertyValue();
140
		aStoreProperties_odt[1] = new PropertyValue();
141
		aStoreProperties_odt[0].Name = "Override";
142
		aStoreProperties_odt[0].Value = true;
143
		aStoreProperties_odt[1].Name = "FilterName";
144
		aStoreProperties_odt[1].Value = "writer8";
145
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
146
		//save to doc 
147
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
148
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
149
		aStoreProperties_doc[0] = new PropertyValue();
150
		aStoreProperties_doc[1] = new PropertyValue();
151
		aStoreProperties_doc[0].Name = "Override";
152
		aStoreProperties_doc[0].Value = true;
153
		aStoreProperties_doc[1].Name = "FilterName";
154
		aStoreProperties_doc[1].Value = "MS Word 97";
155
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
156
		app.closeDocument(xTextDocument);
157
158
		//reopen the document 
159
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
160
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
161
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
162
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
163
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
164
		//verify paragraph numbering and bullet alignment
165
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
166
		assertEquals("assert numbering and bullet","Emphasis",propsRule_assert_odt[4].Value);
167
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
168
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
169
170
		//reopen the document 
171
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
172
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
173
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
174
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
175
		//verify paragraph numbering and bullet alignment
176
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
177
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
178
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
179
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
180
	}
181
	@Test
182
	public void testNumberingBulletCharacterStyle_FootnoteCharacters() throws Exception {
183
184
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
185
		xText = xTextDocument.getText();
186
		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!" +
187
				"Hello,world!Hello,world!");
188
		//create cursor to select paragraph and formating paragraph
189
		XTextCursor xTextCursor = xText.createTextCursor();    
190
		//create paragraph property set
191
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
192
		//create document service factory
193
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
194
		//set numbering character
195
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
196
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
197
		propsRule[0].Name = "NumberingType";
198
		propsRule[0].Value = NumberingType.ARABIC;
199
		propsRule[1].Name = "CharStyleName";
200
		propsRule[1].Value = "Footnote Characters";	
201
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
202
		xReplaceRule.replaceByIndex(0, propsRule);  
203
		//set paragraph numbering and bullet character
204
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
205
		//save to odt 
206
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
207
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
208
		aStoreProperties_odt[0] = new PropertyValue();
209
		aStoreProperties_odt[1] = new PropertyValue();
210
		aStoreProperties_odt[0].Name = "Override";
211
		aStoreProperties_odt[0].Value = true;
212
		aStoreProperties_odt[1].Name = "FilterName";
213
		aStoreProperties_odt[1].Value = "writer8";
214
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
215
		//save to doc 
216
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
217
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
218
		aStoreProperties_doc[0] = new PropertyValue();
219
		aStoreProperties_doc[1] = new PropertyValue();
220
		aStoreProperties_doc[0].Name = "Override";
221
		aStoreProperties_doc[0].Value = true;
222
		aStoreProperties_doc[1].Name = "FilterName";
223
		aStoreProperties_doc[1].Value = "MS Word 97";
224
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
225
		app.closeDocument(xTextDocument);
226
227
		//reopen the document 
228
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
229
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
230
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
231
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
232
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
233
		//verify paragraph numbering and bullet alignment
234
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
235
		assertEquals("assert numbering and bullet","Footnote Symbol",propsRule_assert_odt[4].Value);
236
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
237
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
238
239
		//reopen the document 
240
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
241
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
242
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
243
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
244
		//verify paragraph numbering and bullet alignment
245
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
246
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
247
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
248
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
249
	}
250
	@Test
251
	public void testNumberingBulletCharacterStyle_PageNumber() throws Exception {
252
253
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
254
		xText = xTextDocument.getText();
255
		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!" +
256
				"Hello,world!Hello,world!");
257
		//create cursor to select paragraph and formating paragraph
258
		XTextCursor xTextCursor = xText.createTextCursor();    
259
		//create paragraph property set
260
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
261
		//create document service factory
262
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
263
		//set numbering character
264
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
265
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
266
		propsRule[0].Name = "NumberingType";
267
		propsRule[0].Value = NumberingType.ARABIC;
268
		propsRule[1].Name = "CharStyleName";
269
		propsRule[1].Value = "Page Number";	
270
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
271
		xReplaceRule.replaceByIndex(0, propsRule);  
272
		//set paragraph numbering and bullet character
273
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
274
		//save to odt 
275
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
276
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
277
		aStoreProperties_odt[0] = new PropertyValue();
278
		aStoreProperties_odt[1] = new PropertyValue();
279
		aStoreProperties_odt[0].Name = "Override";
280
		aStoreProperties_odt[0].Value = true;
281
		aStoreProperties_odt[1].Name = "FilterName";
282
		aStoreProperties_odt[1].Value = "writer8";
283
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
284
		//save to doc 
285
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
286
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
287
		aStoreProperties_doc[0] = new PropertyValue();
288
		aStoreProperties_doc[1] = new PropertyValue();
289
		aStoreProperties_doc[0].Name = "Override";
290
		aStoreProperties_doc[0].Value = true;
291
		aStoreProperties_doc[1].Name = "FilterName";
292
		aStoreProperties_doc[1].Value = "MS Word 97";
293
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
294
		app.closeDocument(xTextDocument);
295
296
		//reopen the document 
297
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
298
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
299
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
300
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
301
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
302
		//verify paragraph numbering and bullet alignment
303
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
304
		assertEquals("assert numbering and bullet","Page Number",propsRule_assert_odt[4].Value);
305
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
306
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
307
308
		//reopen the document 
309
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
310
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
311
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
312
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
313
		//verify paragraph numbering and bullet alignment
314
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
315
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
316
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
317
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
318
	}
319
	@Test
320
	public void testNumberingBulletCharacterStyle_CaptionCharacters() throws Exception {
321
322
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
323
		xText = xTextDocument.getText();
324
		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!" +
325
				"Hello,world!Hello,world!");
326
		//create cursor to select paragraph and formating paragraph
327
		XTextCursor xTextCursor = xText.createTextCursor();    
328
		//create paragraph property set
329
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
330
		//create document service factory
331
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
332
		//set numbering character
333
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
334
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
335
		propsRule[0].Name = "NumberingType";
336
		propsRule[0].Value = NumberingType.ARABIC;
337
		propsRule[1].Name = "CharStyleName";
338
		propsRule[1].Value = "Caption Characters";	
339
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
340
		xReplaceRule.replaceByIndex(0, propsRule);  
341
		//set paragraph numbering and bullet character
342
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
343
		//save to odt 
344
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
345
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
346
		aStoreProperties_odt[0] = new PropertyValue();
347
		aStoreProperties_odt[1] = new PropertyValue();
348
		aStoreProperties_odt[0].Name = "Override";
349
		aStoreProperties_odt[0].Value = true;
350
		aStoreProperties_odt[1].Name = "FilterName";
351
		aStoreProperties_odt[1].Value = "writer8";
352
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
353
		//save to doc 
354
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
355
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
356
		aStoreProperties_doc[0] = new PropertyValue();
357
		aStoreProperties_doc[1] = new PropertyValue();
358
		aStoreProperties_doc[0].Name = "Override";
359
		aStoreProperties_doc[0].Value = true;
360
		aStoreProperties_doc[1].Name = "FilterName";
361
		aStoreProperties_doc[1].Value = "MS Word 97";
362
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
363
		app.closeDocument(xTextDocument);
364
365
		//reopen the document 
366
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
367
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
368
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
369
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
370
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
371
		//verify paragraph numbering and bullet alignment
372
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
373
		assertEquals("assert numbering and bullet","Caption characters",propsRule_assert_odt[4].Value);
374
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
375
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
376
377
		//reopen the document 
378
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
379
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
380
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
381
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
382
		//verify paragraph numbering and bullet alignment
383
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
384
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
385
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
386
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
387
	}
388
	@Test
389
	public void testNumberingBulletCharacterStyle_DropCaps() throws Exception {
390
391
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
392
		xText = xTextDocument.getText();
393
		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!" +
394
				"Hello,world!Hello,world!");
395
		//create cursor to select paragraph and formating paragraph
396
		XTextCursor xTextCursor = xText.createTextCursor();    
397
		//create paragraph property set
398
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
399
		//create document service factory
400
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
401
		//set numbering character
402
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
403
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
404
		propsRule[0].Name = "NumberingType";
405
		propsRule[0].Value = NumberingType.ARABIC;
406
		propsRule[1].Name = "CharStyleName";
407
		propsRule[1].Value = "Drop Caps";	
408
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
409
		xReplaceRule.replaceByIndex(0, propsRule);  
410
		//set paragraph numbering and bullet character
411
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
412
		//save to odt 
413
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
414
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
415
		aStoreProperties_odt[0] = new PropertyValue();
416
		aStoreProperties_odt[1] = new PropertyValue();
417
		aStoreProperties_odt[0].Name = "Override";
418
		aStoreProperties_odt[0].Value = true;
419
		aStoreProperties_odt[1].Name = "FilterName";
420
		aStoreProperties_odt[1].Value = "writer8";
421
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
422
		//save to doc 
423
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
424
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
425
		aStoreProperties_doc[0] = new PropertyValue();
426
		aStoreProperties_doc[1] = new PropertyValue();
427
		aStoreProperties_doc[0].Name = "Override";
428
		aStoreProperties_doc[0].Value = true;
429
		aStoreProperties_doc[1].Name = "FilterName";
430
		aStoreProperties_doc[1].Value = "MS Word 97";
431
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
432
		app.closeDocument(xTextDocument);
433
434
		//reopen the document 
435
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
436
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
437
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
438
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
439
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
440
		//verify paragraph numbering and bullet alignment
441
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
442
		assertEquals("assert numbering and bullet","Drop Caps",propsRule_assert_odt[4].Value);
443
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
444
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
445
446
		//reopen the document 
447
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
448
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
449
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
450
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
451
		//verify paragraph numbering and bullet alignment
452
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
453
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
454
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
455
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
456
	}
457
	@Test
458
	public void testNumberingBulletCharacterStyle_NumberingSymbols() throws Exception {
459
460
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
461
		xText = xTextDocument.getText();
462
		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!" +
463
				"Hello,world!Hello,world!");
464
		//create cursor to select paragraph and formating paragraph
465
		XTextCursor xTextCursor = xText.createTextCursor();    
466
		//create paragraph property set
467
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
468
		//create document service factory
469
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
470
		//set numbering character
471
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
472
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
473
		propsRule[0].Name = "NumberingType";
474
		propsRule[0].Value = NumberingType.ARABIC;
475
		propsRule[1].Name = "CharStyleName";
476
		propsRule[1].Value = "Numbering Symbols";	
477
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
478
		xReplaceRule.replaceByIndex(0, propsRule);  
479
		//set paragraph numbering and bullet character
480
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
481
		//save to odt 
482
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
483
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
484
		aStoreProperties_odt[0] = new PropertyValue();
485
		aStoreProperties_odt[1] = new PropertyValue();
486
		aStoreProperties_odt[0].Name = "Override";
487
		aStoreProperties_odt[0].Value = true;
488
		aStoreProperties_odt[1].Name = "FilterName";
489
		aStoreProperties_odt[1].Value = "writer8";
490
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
491
		//save to doc 
492
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
493
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
494
		aStoreProperties_doc[0] = new PropertyValue();
495
		aStoreProperties_doc[1] = new PropertyValue();
496
		aStoreProperties_doc[0].Name = "Override";
497
		aStoreProperties_doc[0].Value = true;
498
		aStoreProperties_doc[1].Name = "FilterName";
499
		aStoreProperties_doc[1].Value = "MS Word 97";
500
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
501
		app.closeDocument(xTextDocument);
502
503
		//reopen the document 
504
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
505
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
506
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
507
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
508
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
509
		//verify paragraph numbering and bullet alignment
510
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
511
		assertEquals("assert numbering and bullet","Numbering Symbols",propsRule_assert_odt[4].Value);
512
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
513
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
514
515
		//reopen the document 
516
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
517
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
518
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
519
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
520
		//verify paragraph numbering and bullet alignment
521
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
522
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
523
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
524
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
525
	}
526
	@Test
527
	public void testNumberingBulletCharacterStyle_Bullets() throws Exception {
528
529
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
530
		xText = xTextDocument.getText();
531
		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!" +
532
				"Hello,world!Hello,world!");
533
		//create cursor to select paragraph and formating paragraph
534
		XTextCursor xTextCursor = xText.createTextCursor();    
535
		//create paragraph property set
536
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
537
		//create document service factory
538
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
539
		//set numbering character
540
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
541
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
542
		propsRule[0].Name = "NumberingType";
543
		propsRule[0].Value = NumberingType.ARABIC;
544
		propsRule[1].Name = "CharStyleName";
545
		propsRule[1].Value = "Bullets";	
546
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
547
		xReplaceRule.replaceByIndex(0, propsRule);  
548
		//set paragraph numbering and bullet character
549
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
550
		//save to odt 
551
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
552
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
553
		aStoreProperties_odt[0] = new PropertyValue();
554
		aStoreProperties_odt[1] = new PropertyValue();
555
		aStoreProperties_odt[0].Name = "Override";
556
		aStoreProperties_odt[0].Value = true;
557
		aStoreProperties_odt[1].Name = "FilterName";
558
		aStoreProperties_odt[1].Value = "writer8";
559
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
560
		//save to doc 
561
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
562
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
563
		aStoreProperties_doc[0] = new PropertyValue();
564
		aStoreProperties_doc[1] = new PropertyValue();
565
		aStoreProperties_doc[0].Name = "Override";
566
		aStoreProperties_doc[0].Value = true;
567
		aStoreProperties_doc[1].Name = "FilterName";
568
		aStoreProperties_doc[1].Value = "MS Word 97";
569
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
570
		app.closeDocument(xTextDocument);
571
572
		//reopen the document 
573
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
574
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
575
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
576
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
577
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
578
		//verify paragraph numbering and bullet alignment
579
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
580
		assertEquals("assert numbering and bullet","Bullet Symbols",propsRule_assert_odt[4].Value);
581
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
582
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
583
584
		//reopen the document 
585
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
586
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
587
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
588
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
589
		//verify paragraph numbering and bullet alignment
590
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
591
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
592
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
593
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
594
	}
595
	@Test
596
	public void testNumberingBulletCharacterStyle_InternetLink() throws Exception {
597
598
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
599
		xText = xTextDocument.getText();
600
		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!" +
601
				"Hello,world!Hello,world!");
602
		//create cursor to select paragraph and formating paragraph
603
		XTextCursor xTextCursor = xText.createTextCursor();    
604
		//create paragraph property set
605
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
606
		//create document service factory
607
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
608
		//set numbering character
609
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
610
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
611
		propsRule[0].Name = "NumberingType";
612
		propsRule[0].Value = NumberingType.ARABIC;
613
		propsRule[1].Name = "CharStyleName";
614
		propsRule[1].Value = "Internet Link";	
615
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
616
		xReplaceRule.replaceByIndex(0, propsRule);  
617
		//set paragraph numbering and bullet character
618
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
619
		//save to odt 
620
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
621
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
622
		aStoreProperties_odt[0] = new PropertyValue();
623
		aStoreProperties_odt[1] = new PropertyValue();
624
		aStoreProperties_odt[0].Name = "Override";
625
		aStoreProperties_odt[0].Value = true;
626
		aStoreProperties_odt[1].Name = "FilterName";
627
		aStoreProperties_odt[1].Value = "writer8";
628
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
629
		//save to doc 
630
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
631
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
632
		aStoreProperties_doc[0] = new PropertyValue();
633
		aStoreProperties_doc[1] = new PropertyValue();
634
		aStoreProperties_doc[0].Name = "Override";
635
		aStoreProperties_doc[0].Value = true;
636
		aStoreProperties_doc[1].Name = "FilterName";
637
		aStoreProperties_doc[1].Value = "MS Word 97";
638
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
639
		app.closeDocument(xTextDocument);
640
641
		//reopen the document 
642
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
643
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
644
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
645
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
646
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
647
		//verify paragraph numbering and bullet alignment
648
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
649
		assertEquals("assert numbering and bullet","Internet link",propsRule_assert_odt[4].Value);
650
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
651
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
652
653
		//reopen the document 
654
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
655
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
656
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
657
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
658
		//verify paragraph numbering and bullet alignment
659
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
660
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
661
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
662
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
663
	}
664
	@Test
665
	public void testNumberingBulletCharacterStyle_VisitedInternetLink() throws Exception {
666
667
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
668
		xText = xTextDocument.getText();
669
		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!" +
670
				"Hello,world!Hello,world!");
671
		//create cursor to select paragraph and formating paragraph
672
		XTextCursor xTextCursor = xText.createTextCursor();    
673
		//create paragraph property set
674
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
675
		//create document service factory
676
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
677
		//set numbering character
678
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
679
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
680
		propsRule[0].Name = "NumberingType";
681
		propsRule[0].Value = NumberingType.ARABIC;
682
		propsRule[1].Name = "CharStyleName";
683
		propsRule[1].Value = "Visited Internet Link";	
684
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
685
		xReplaceRule.replaceByIndex(0, propsRule);  
686
		//set paragraph numbering and bullet character
687
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
688
		//save to odt 
689
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
690
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
691
		aStoreProperties_odt[0] = new PropertyValue();
692
		aStoreProperties_odt[1] = new PropertyValue();
693
		aStoreProperties_odt[0].Name = "Override";
694
		aStoreProperties_odt[0].Value = true;
695
		aStoreProperties_odt[1].Name = "FilterName";
696
		aStoreProperties_odt[1].Value = "writer8";
697
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
698
		//save to doc 
699
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
700
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
701
		aStoreProperties_doc[0] = new PropertyValue();
702
		aStoreProperties_doc[1] = new PropertyValue();
703
		aStoreProperties_doc[0].Name = "Override";
704
		aStoreProperties_doc[0].Value = true;
705
		aStoreProperties_doc[1].Name = "FilterName";
706
		aStoreProperties_doc[1].Value = "MS Word 97";
707
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
708
		app.closeDocument(xTextDocument);
709
710
		//reopen the document 
711
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
712
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
713
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
714
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
715
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
716
		//verify paragraph numbering and bullet alignment
717
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
718
		assertEquals("assert numbering and bullet","Visited Internet Link",propsRule_assert_odt[4].Value);
719
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
720
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
721
722
		//reopen the document 
723
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
724
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
725
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
726
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
727
		//verify paragraph numbering and bullet alignment
728
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
729
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
730
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
731
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
732
	}
733
	@Test
734
	public void testNumberingBulletCharacterStyle_Placeholder() throws Exception {
735
736
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
737
		xText = xTextDocument.getText();
738
		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!" +
739
				"Hello,world!Hello,world!");
740
		//create cursor to select paragraph and formating paragraph
741
		XTextCursor xTextCursor = xText.createTextCursor();    
742
		//create paragraph property set
743
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
744
		//create document service factory
745
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
746
		//set numbering character
747
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
748
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
749
		propsRule[0].Name = "NumberingType";
750
		propsRule[0].Value = NumberingType.ARABIC;
751
		propsRule[1].Name = "CharStyleName";
752
		propsRule[1].Value = "Placeholder";	
753
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
754
		xReplaceRule.replaceByIndex(0, propsRule);  
755
		//set paragraph numbering and bullet character
756
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
757
		//save to odt 
758
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
759
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
760
		aStoreProperties_odt[0] = new PropertyValue();
761
		aStoreProperties_odt[1] = new PropertyValue();
762
		aStoreProperties_odt[0].Name = "Override";
763
		aStoreProperties_odt[0].Value = true;
764
		aStoreProperties_odt[1].Name = "FilterName";
765
		aStoreProperties_odt[1].Value = "writer8";
766
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
767
		//save to doc 
768
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
769
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
770
		aStoreProperties_doc[0] = new PropertyValue();
771
		aStoreProperties_doc[1] = new PropertyValue();
772
		aStoreProperties_doc[0].Name = "Override";
773
		aStoreProperties_doc[0].Value = true;
774
		aStoreProperties_doc[1].Name = "FilterName";
775
		aStoreProperties_doc[1].Value = "MS Word 97";
776
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
777
		app.closeDocument(xTextDocument);
778
779
		//reopen the document 
780
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
781
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
782
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
783
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
784
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
785
		//verify paragraph numbering and bullet alignment
786
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
787
		assertEquals("assert numbering and bullet","Placeholder",propsRule_assert_odt[4].Value);
788
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
789
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
790
791
		//reopen the document 
792
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
793
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
794
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
795
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
796
		//verify paragraph numbering and bullet alignment
797
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
798
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
799
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
800
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
801
	}
802
	@Test
803
	public void testNumberingBulletCharacterStyle_Indexlink() throws Exception {
804
805
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
806
		xText = xTextDocument.getText();
807
		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!" +
808
				"Hello,world!Hello,world!");
809
		//create cursor to select paragraph and formating paragraph
810
		XTextCursor xTextCursor = xText.createTextCursor();    
811
		//create paragraph property set
812
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
813
		//create document service factory
814
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
815
		//set numbering character
816
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
817
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
818
		propsRule[0].Name = "NumberingType";
819
		propsRule[0].Value = NumberingType.ARABIC;
820
		propsRule[1].Name = "CharStyleName";
821
		propsRule[1].Value = "Index Link";	
822
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
823
		xReplaceRule.replaceByIndex(0, propsRule);  
824
		//set paragraph numbering and bullet character
825
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
826
		//save to odt 
827
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
828
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
829
		aStoreProperties_odt[0] = new PropertyValue();
830
		aStoreProperties_odt[1] = new PropertyValue();
831
		aStoreProperties_odt[0].Name = "Override";
832
		aStoreProperties_odt[0].Value = true;
833
		aStoreProperties_odt[1].Name = "FilterName";
834
		aStoreProperties_odt[1].Value = "writer8";
835
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
836
		//save to doc 
837
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
838
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
839
		aStoreProperties_doc[0] = new PropertyValue();
840
		aStoreProperties_doc[1] = new PropertyValue();
841
		aStoreProperties_doc[0].Name = "Override";
842
		aStoreProperties_doc[0].Value = true;
843
		aStoreProperties_doc[1].Name = "FilterName";
844
		aStoreProperties_doc[1].Value = "MS Word 97";
845
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
846
		app.closeDocument(xTextDocument);
847
848
		//reopen the document 
849
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
850
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
851
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
852
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
853
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
854
		//verify paragraph numbering and bullet alignment
855
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
856
		assertEquals("assert numbering and bullet","Index Link",propsRule_assert_odt[4].Value);
857
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
858
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
859
860
		//reopen the document 
861
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
862
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
863
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
864
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
865
		//verify paragraph numbering and bullet alignment
866
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
867
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
868
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
869
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
870
	}
871
	@Test
872
	public void testNumberingBulletCharacterStyle_EndnoteCharacters() throws Exception {
873
874
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
875
		xText = xTextDocument.getText();
876
		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!" +
877
				"Hello,world!Hello,world!");
878
		//create cursor to select paragraph and formating paragraph
879
		XTextCursor xTextCursor = xText.createTextCursor();    
880
		//create paragraph property set
881
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
882
		//create document service factory
883
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
884
		//set numbering character
885
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
886
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
887
		propsRule[0].Name = "NumberingType";
888
		propsRule[0].Value = NumberingType.ARABIC;
889
		propsRule[1].Name = "CharStyleName";
890
		propsRule[1].Value = "Endnote Characters";	
891
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
892
		xReplaceRule.replaceByIndex(0, propsRule);  
893
		//set paragraph numbering and bullet character
894
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
895
		//save to odt 
896
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
897
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
898
		aStoreProperties_odt[0] = new PropertyValue();
899
		aStoreProperties_odt[1] = new PropertyValue();
900
		aStoreProperties_odt[0].Name = "Override";
901
		aStoreProperties_odt[0].Value = true;
902
		aStoreProperties_odt[1].Name = "FilterName";
903
		aStoreProperties_odt[1].Value = "writer8";
904
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
905
		//save to doc 
906
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
907
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
908
		aStoreProperties_doc[0] = new PropertyValue();
909
		aStoreProperties_doc[1] = new PropertyValue();
910
		aStoreProperties_doc[0].Name = "Override";
911
		aStoreProperties_doc[0].Value = true;
912
		aStoreProperties_doc[1].Name = "FilterName";
913
		aStoreProperties_doc[1].Value = "MS Word 97";
914
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
915
		app.closeDocument(xTextDocument);
916
917
		//reopen the document 
918
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
919
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
920
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
921
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
922
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
923
		//verify paragraph numbering and bullet alignment
924
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
925
		assertEquals("assert numbering and bullet","Endnote Symbol",propsRule_assert_odt[4].Value);
926
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
927
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
928
929
		//reopen the document 
930
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
931
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
932
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
933
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
934
		//verify paragraph numbering and bullet alignment
935
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
936
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
937
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
938
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
939
	}
940
	@Test
941
	public void testNumberingBulletCharacterStyle_LineNumbering() throws Exception {
942
943
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
944
		xText = xTextDocument.getText();
945
		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!" +
946
				"Hello,world!Hello,world!");
947
		//create cursor to select paragraph and formating paragraph
948
		XTextCursor xTextCursor = xText.createTextCursor();    
949
		//create paragraph property set
950
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
951
		//create document service factory
952
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
953
		//set numbering character
954
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
955
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
956
		propsRule[0].Name = "NumberingType";
957
		propsRule[0].Value = NumberingType.ARABIC;
958
		propsRule[1].Name = "CharStyleName";
959
		propsRule[1].Value = "Line numbering";	
960
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
961
		xReplaceRule.replaceByIndex(0, propsRule);  
962
		//set paragraph numbering and bullet character
963
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
964
		//save to odt 
965
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
966
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
967
		aStoreProperties_odt[0] = new PropertyValue();
968
		aStoreProperties_odt[1] = new PropertyValue();
969
		aStoreProperties_odt[0].Name = "Override";
970
		aStoreProperties_odt[0].Value = true;
971
		aStoreProperties_odt[1].Name = "FilterName";
972
		aStoreProperties_odt[1].Value = "writer8";
973
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
974
		//save to doc 
975
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
976
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
977
		aStoreProperties_doc[0] = new PropertyValue();
978
		aStoreProperties_doc[1] = new PropertyValue();
979
		aStoreProperties_doc[0].Name = "Override";
980
		aStoreProperties_doc[0].Value = true;
981
		aStoreProperties_doc[1].Name = "FilterName";
982
		aStoreProperties_doc[1].Value = "MS Word 97";
983
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
984
		app.closeDocument(xTextDocument);
985
986
		//reopen the document 
987
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
988
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
989
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
990
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
991
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
992
		//verify paragraph numbering and bullet alignment
993
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
994
		assertEquals("assert numbering and bullet","Line numbering",propsRule_assert_odt[4].Value);
995
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
996
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
997
998
		//reopen the document 
999
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
1000
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
1001
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
1002
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
1003
		//verify paragraph numbering and bullet alignment
1004
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
1005
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
1006
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
1007
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
1008
	}
1009
	@Test
1010
	public void testNumberingBulletCharacterStyle_MainIndexEntery() throws Exception {
1011
1012
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
1013
		xText = xTextDocument.getText();
1014
		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!" +
1015
				"Hello,world!Hello,world!");
1016
		//create cursor to select paragraph and formating paragraph
1017
		XTextCursor xTextCursor = xText.createTextCursor();    
1018
		//create paragraph property set
1019
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
1020
		//create document service factory
1021
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
1022
		//set numbering character
1023
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
1024
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
1025
		propsRule[0].Name = "NumberingType";
1026
		propsRule[0].Value = NumberingType.ARABIC;
1027
		propsRule[1].Name = "CharStyleName";
1028
		propsRule[1].Value = "Main index entery";	
1029
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
1030
		xReplaceRule.replaceByIndex(0, propsRule);  
1031
		//set paragraph numbering and bullet character
1032
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
1033
		//save to odt 
1034
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1035
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
1036
		aStoreProperties_odt[0] = new PropertyValue();
1037
		aStoreProperties_odt[1] = new PropertyValue();
1038
		aStoreProperties_odt[0].Name = "Override";
1039
		aStoreProperties_odt[0].Value = true;
1040
		aStoreProperties_odt[1].Name = "FilterName";
1041
		aStoreProperties_odt[1].Value = "writer8";
1042
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
1043
		//save to doc 
1044
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1045
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
1046
		aStoreProperties_doc[0] = new PropertyValue();
1047
		aStoreProperties_doc[1] = new PropertyValue();
1048
		aStoreProperties_doc[0].Name = "Override";
1049
		aStoreProperties_doc[0].Value = true;
1050
		aStoreProperties_doc[1].Name = "FilterName";
1051
		aStoreProperties_doc[1].Value = "MS Word 97";
1052
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
1053
		app.closeDocument(xTextDocument);
1054
1055
		//reopen the document 
1056
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
1057
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
1058
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
1059
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
1060
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
1061
		//verify paragraph numbering and bullet alignment
1062
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
1063
		assertEquals("assert numbering and bullet","Main index entery",propsRule_assert_odt[4].Value);
1064
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
1065
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
1066
1067
		//reopen the document 
1068
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
1069
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
1070
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
1071
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
1072
		//verify paragraph numbering and bullet alignment
1073
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
1074
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
1075
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
1076
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
1077
	}
1078
	@Test
1079
	public void testNumberingBulletCharacterStyle_FootnoteAnchor() throws Exception {
1080
1081
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
1082
		xText = xTextDocument.getText();
1083
		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!" +
1084
				"Hello,world!Hello,world!");
1085
		//create cursor to select paragraph and formating paragraph
1086
		XTextCursor xTextCursor = xText.createTextCursor();    
1087
		//create paragraph property set
1088
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
1089
		//create document service factory
1090
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
1091
		//set numbering character
1092
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
1093
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
1094
		propsRule[0].Name = "NumberingType";
1095
		propsRule[0].Value = NumberingType.ARABIC;
1096
		propsRule[1].Name = "CharStyleName";
1097
		propsRule[1].Value = "Footnote anchor";	
1098
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
1099
		xReplaceRule.replaceByIndex(0, propsRule);  
1100
		//set paragraph numbering and bullet character
1101
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
1102
		//save to odt 
1103
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1104
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
1105
		aStoreProperties_odt[0] = new PropertyValue();
1106
		aStoreProperties_odt[1] = new PropertyValue();
1107
		aStoreProperties_odt[0].Name = "Override";
1108
		aStoreProperties_odt[0].Value = true;
1109
		aStoreProperties_odt[1].Name = "FilterName";
1110
		aStoreProperties_odt[1].Value = "writer8";
1111
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
1112
		//save to doc 
1113
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1114
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
1115
		aStoreProperties_doc[0] = new PropertyValue();
1116
		aStoreProperties_doc[1] = new PropertyValue();
1117
		aStoreProperties_doc[0].Name = "Override";
1118
		aStoreProperties_doc[0].Value = true;
1119
		aStoreProperties_doc[1].Name = "FilterName";
1120
		aStoreProperties_doc[1].Value = "MS Word 97";
1121
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
1122
		app.closeDocument(xTextDocument);
1123
1124
		//reopen the document 
1125
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
1126
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
1127
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
1128
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
1129
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
1130
		//verify paragraph numbering and bullet alignment
1131
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
1132
		assertEquals("assert numbering and bullet","Footnote anchor",propsRule_assert_odt[4].Value);
1133
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
1134
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
1135
1136
		//reopen the document 
1137
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
1138
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
1139
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
1140
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
1141
		//verify paragraph numbering and bullet alignment
1142
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
1143
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
1144
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
1145
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
1146
	}
1147
	@Test
1148
	public void testNumberingBulletCharacterStyle_EndnoteAnchor() throws Exception {
1149
1150
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
1151
		xText = xTextDocument.getText();
1152
		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!" +
1153
				"Hello,world!Hello,world!");
1154
		//create cursor to select paragraph and formating paragraph
1155
		XTextCursor xTextCursor = xText.createTextCursor();    
1156
		//create paragraph property set
1157
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
1158
		//create document service factory
1159
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
1160
		//set numbering character
1161
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
1162
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
1163
		propsRule[0].Name = "NumberingType";
1164
		propsRule[0].Value = NumberingType.ARABIC;
1165
		propsRule[1].Name = "CharStyleName";
1166
		propsRule[1].Value = "Endnote anchor";	
1167
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
1168
		xReplaceRule.replaceByIndex(0, propsRule);  
1169
		//set paragraph numbering and bullet character
1170
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
1171
		//save to odt 
1172
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1173
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
1174
		aStoreProperties_odt[0] = new PropertyValue();
1175
		aStoreProperties_odt[1] = new PropertyValue();
1176
		aStoreProperties_odt[0].Name = "Override";
1177
		aStoreProperties_odt[0].Value = true;
1178
		aStoreProperties_odt[1].Name = "FilterName";
1179
		aStoreProperties_odt[1].Value = "writer8";
1180
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
1181
		//save to doc 
1182
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1183
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
1184
		aStoreProperties_doc[0] = new PropertyValue();
1185
		aStoreProperties_doc[1] = new PropertyValue();
1186
		aStoreProperties_doc[0].Name = "Override";
1187
		aStoreProperties_doc[0].Value = true;
1188
		aStoreProperties_doc[1].Name = "FilterName";
1189
		aStoreProperties_doc[1].Value = "MS Word 97";
1190
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
1191
		app.closeDocument(xTextDocument);
1192
1193
		//reopen the document 
1194
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
1195
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
1196
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
1197
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
1198
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
1199
		//verify paragraph numbering and bullet alignment
1200
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
1201
		assertEquals("assert numbering and bullet","Endnote anchor",propsRule_assert_odt[4].Value);
1202
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
1203
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
1204
1205
		//reopen the document 
1206
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
1207
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
1208
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
1209
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
1210
		//verify paragraph numbering and bullet alignment
1211
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
1212
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
1213
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
1214
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
1215
	}
1216
	@Test
1217
	public void testNumberingBulletCharacterStyle_VerticalNumberingSymbols() throws Exception {
1218
1219
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
1220
		xText = xTextDocument.getText();
1221
		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!" +
1222
				"Hello,world!Hello,world!");
1223
		//create cursor to select paragraph and formating paragraph
1224
		XTextCursor xTextCursor = xText.createTextCursor();    
1225
		//create paragraph property set
1226
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
1227
		//create document service factory
1228
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
1229
		//set numbering character
1230
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
1231
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
1232
		propsRule[0].Name = "NumberingType";
1233
		propsRule[0].Value = NumberingType.ARABIC;
1234
		propsRule[1].Name = "CharStyleName";
1235
		propsRule[1].Value = "Vertical Numbering Symbols";	
1236
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
1237
		xReplaceRule.replaceByIndex(0, propsRule);  
1238
		//set paragraph numbering and bullet character
1239
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
1240
		//save to odt 
1241
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1242
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
1243
		aStoreProperties_odt[0] = new PropertyValue();
1244
		aStoreProperties_odt[1] = new PropertyValue();
1245
		aStoreProperties_odt[0].Name = "Override";
1246
		aStoreProperties_odt[0].Value = true;
1247
		aStoreProperties_odt[1].Name = "FilterName";
1248
		aStoreProperties_odt[1].Value = "writer8";
1249
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
1250
		//save to doc 
1251
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1252
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
1253
		aStoreProperties_doc[0] = new PropertyValue();
1254
		aStoreProperties_doc[1] = new PropertyValue();
1255
		aStoreProperties_doc[0].Name = "Override";
1256
		aStoreProperties_doc[0].Value = true;
1257
		aStoreProperties_doc[1].Name = "FilterName";
1258
		aStoreProperties_doc[1].Value = "MS Word 97";
1259
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
1260
		app.closeDocument(xTextDocument);
1261
1262
		//reopen the document 
1263
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
1264
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
1265
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
1266
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
1267
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
1268
		//verify paragraph numbering and bullet alignment
1269
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
1270
		assertEquals("assert numbering and bullet","Vertical Numbering Symbols",propsRule_assert_odt[4].Value);
1271
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
1272
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
1273
1274
		//reopen the document 
1275
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
1276
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
1277
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
1278
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
1279
		//verify paragraph numbering and bullet alignment
1280
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
1281
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
1282
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
1283
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
1284
	}
1285
	@Test
1286
	public void testNumberingBulletCharacterStyle_Quotation() throws Exception {
1287
1288
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
1289
		xText = xTextDocument.getText();
1290
		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!" +
1291
				"Hello,world!Hello,world!");
1292
		//create cursor to select paragraph and formating paragraph
1293
		XTextCursor xTextCursor = xText.createTextCursor();    
1294
		//create paragraph property set
1295
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
1296
		//create document service factory
1297
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
1298
		//set numbering character
1299
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
1300
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
1301
		propsRule[0].Name = "NumberingType";
1302
		propsRule[0].Value = NumberingType.ARABIC;
1303
		propsRule[1].Name = "CharStyleName";
1304
		propsRule[1].Value = "Quotation";	
1305
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
1306
		xReplaceRule.replaceByIndex(0, propsRule);  
1307
		//set paragraph numbering and bullet character
1308
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
1309
		//save to odt 
1310
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1311
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
1312
		aStoreProperties_odt[0] = new PropertyValue();
1313
		aStoreProperties_odt[1] = new PropertyValue();
1314
		aStoreProperties_odt[0].Name = "Override";
1315
		aStoreProperties_odt[0].Value = true;
1316
		aStoreProperties_odt[1].Name = "FilterName";
1317
		aStoreProperties_odt[1].Value = "writer8";
1318
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
1319
		//save to doc 
1320
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1321
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
1322
		aStoreProperties_doc[0] = new PropertyValue();
1323
		aStoreProperties_doc[1] = new PropertyValue();
1324
		aStoreProperties_doc[0].Name = "Override";
1325
		aStoreProperties_doc[0].Value = true;
1326
		aStoreProperties_doc[1].Name = "FilterName";
1327
		aStoreProperties_doc[1].Value = "MS Word 97";
1328
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
1329
		app.closeDocument(xTextDocument);
1330
1331
		//reopen the document 
1332
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
1333
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
1334
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
1335
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
1336
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
1337
		//verify paragraph numbering and bullet alignment
1338
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
1339
		assertEquals("assert numbering and bullet","Citation",propsRule_assert_odt[4].Value);
1340
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
1341
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
1342
1343
		//reopen the document 
1344
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
1345
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
1346
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
1347
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
1348
		//verify paragraph numbering and bullet alignment
1349
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
1350
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
1351
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
1352
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
1353
	}
1354
	@Test
1355
	public void testNumberingBulletCharacterStyle_StrongEmphasis() throws Exception {
1356
1357
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
1358
		xText = xTextDocument.getText();
1359
		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!" +
1360
				"Hello,world!Hello,world!");
1361
		//create cursor to select paragraph and formating paragraph
1362
		XTextCursor xTextCursor = xText.createTextCursor();    
1363
		//create paragraph property set
1364
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
1365
		//create document service factory
1366
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
1367
		//set numbering character
1368
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
1369
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
1370
		propsRule[0].Name = "NumberingType";
1371
		propsRule[0].Value = NumberingType.ARABIC;
1372
		propsRule[1].Name = "CharStyleName";
1373
		propsRule[1].Value = "Strong Emphasis";	
1374
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
1375
		xReplaceRule.replaceByIndex(0, propsRule);  
1376
		//set paragraph numbering and bullet character
1377
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
1378
		//save to odt 
1379
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1380
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
1381
		aStoreProperties_odt[0] = new PropertyValue();
1382
		aStoreProperties_odt[1] = new PropertyValue();
1383
		aStoreProperties_odt[0].Name = "Override";
1384
		aStoreProperties_odt[0].Value = true;
1385
		aStoreProperties_odt[1].Name = "FilterName";
1386
		aStoreProperties_odt[1].Value = "writer8";
1387
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
1388
		//save to doc 
1389
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1390
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
1391
		aStoreProperties_doc[0] = new PropertyValue();
1392
		aStoreProperties_doc[1] = new PropertyValue();
1393
		aStoreProperties_doc[0].Name = "Override";
1394
		aStoreProperties_doc[0].Value = true;
1395
		aStoreProperties_doc[1].Name = "FilterName";
1396
		aStoreProperties_doc[1].Value = "MS Word 97";
1397
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
1398
		app.closeDocument(xTextDocument);
1399
1400
		//reopen the document 
1401
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
1402
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
1403
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
1404
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
1405
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
1406
		//verify paragraph numbering and bullet alignment
1407
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
1408
		assertEquals("assert numbering and bullet","Strong Emphasis",propsRule_assert_odt[4].Value);
1409
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
1410
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
1411
1412
		//reopen the document 
1413
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
1414
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
1415
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
1416
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
1417
		//verify paragraph numbering and bullet alignment
1418
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
1419
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
1420
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
1421
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
1422
	}
1423
	@Test
1424
	public void testNumberingBulletCharacterStyle_Variable() throws Exception {
1425
1426
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
1427
		xText = xTextDocument.getText();
1428
		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!" +
1429
				"Hello,world!Hello,world!");
1430
		//create cursor to select paragraph and formating paragraph
1431
		XTextCursor xTextCursor = xText.createTextCursor();    
1432
		//create paragraph property set
1433
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
1434
		//create document service factory
1435
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
1436
		//set numbering character
1437
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
1438
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
1439
		propsRule[0].Name = "NumberingType";
1440
		propsRule[0].Value = NumberingType.ARABIC;
1441
		propsRule[1].Name = "CharStyleName";
1442
		propsRule[1].Value = "Variable";	
1443
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
1444
		xReplaceRule.replaceByIndex(0, propsRule);  
1445
		//set paragraph numbering and bullet character
1446
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
1447
		//save to odt 
1448
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1449
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
1450
		aStoreProperties_odt[0] = new PropertyValue();
1451
		aStoreProperties_odt[1] = new PropertyValue();
1452
		aStoreProperties_odt[0].Name = "Override";
1453
		aStoreProperties_odt[0].Value = true;
1454
		aStoreProperties_odt[1].Name = "FilterName";
1455
		aStoreProperties_odt[1].Value = "writer8";
1456
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
1457
		//save to doc 
1458
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1459
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
1460
		aStoreProperties_doc[0] = new PropertyValue();
1461
		aStoreProperties_doc[1] = new PropertyValue();
1462
		aStoreProperties_doc[0].Name = "Override";
1463
		aStoreProperties_doc[0].Value = true;
1464
		aStoreProperties_doc[1].Name = "FilterName";
1465
		aStoreProperties_doc[1].Value = "MS Word 97";
1466
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
1467
		app.closeDocument(xTextDocument);
1468
1469
		//reopen the document 
1470
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
1471
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
1472
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
1473
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
1474
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
1475
		//verify paragraph numbering and bullet alignment
1476
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
1477
		assertEquals("assert numbering and bullet","Variable",propsRule_assert_odt[4].Value);
1478
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
1479
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
1480
1481
		//reopen the document 
1482
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
1483
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
1484
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
1485
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
1486
		//verify paragraph numbering and bullet alignment
1487
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
1488
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
1489
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
1490
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
1491
	}
1492
	@Test
1493
	public void testNumberingBulletCharacterStyle_Example() throws Exception {
1494
1495
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
1496
		xText = xTextDocument.getText();
1497
		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!" +
1498
				"Hello,world!Hello,world!");
1499
		//create cursor to select paragraph and formating paragraph
1500
		XTextCursor xTextCursor = xText.createTextCursor();    
1501
		//create paragraph property set
1502
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
1503
		//create document service factory
1504
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
1505
		//set numbering character
1506
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
1507
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
1508
		propsRule[0].Name = "NumberingType";
1509
		propsRule[0].Value = NumberingType.ARABIC;
1510
		propsRule[1].Name = "CharStyleName";
1511
		propsRule[1].Value = "Example";	
1512
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
1513
		xReplaceRule.replaceByIndex(0, propsRule);  
1514
		//set paragraph numbering and bullet character
1515
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
1516
		//save to odt 
1517
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1518
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
1519
		aStoreProperties_odt[0] = new PropertyValue();
1520
		aStoreProperties_odt[1] = new PropertyValue();
1521
		aStoreProperties_odt[0].Name = "Override";
1522
		aStoreProperties_odt[0].Value = true;
1523
		aStoreProperties_odt[1].Name = "FilterName";
1524
		aStoreProperties_odt[1].Value = "writer8";
1525
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
1526
		//save to doc 
1527
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1528
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
1529
		aStoreProperties_doc[0] = new PropertyValue();
1530
		aStoreProperties_doc[1] = new PropertyValue();
1531
		aStoreProperties_doc[0].Name = "Override";
1532
		aStoreProperties_doc[0].Value = true;
1533
		aStoreProperties_doc[1].Name = "FilterName";
1534
		aStoreProperties_doc[1].Value = "MS Word 97";
1535
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
1536
		app.closeDocument(xTextDocument);
1537
1538
		//reopen the document 
1539
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
1540
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
1541
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
1542
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
1543
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
1544
		//verify paragraph numbering and bullet alignment
1545
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
1546
		assertEquals("assert numbering and bullet","Example",propsRule_assert_odt[4].Value);
1547
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
1548
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
1549
1550
		//reopen the document 
1551
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
1552
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
1553
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
1554
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
1555
		//verify paragraph numbering and bullet alignment
1556
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
1557
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
1558
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
1559
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
1560
	}	@Test
1561
	public void testNumberingBulletCharacterStyle_UserEntery() throws Exception {
1562
1563
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
1564
		xText = xTextDocument.getText();
1565
		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!" +
1566
				"Hello,world!Hello,world!");
1567
		//create cursor to select paragraph and formating paragraph
1568
		XTextCursor xTextCursor = xText.createTextCursor();    
1569
		//create paragraph property set
1570
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
1571
		//create document service factory
1572
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
1573
		//set numbering character
1574
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
1575
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
1576
		propsRule[0].Name = "NumberingType";
1577
		propsRule[0].Value = NumberingType.ARABIC;
1578
		propsRule[1].Name = "CharStyleName";
1579
		propsRule[1].Value = "User Entery";	
1580
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
1581
		xReplaceRule.replaceByIndex(0, propsRule);  
1582
		//set paragraph numbering and bullet character
1583
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
1584
		//save to odt 
1585
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1586
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
1587
		aStoreProperties_odt[0] = new PropertyValue();
1588
		aStoreProperties_odt[1] = new PropertyValue();
1589
		aStoreProperties_odt[0].Name = "Override";
1590
		aStoreProperties_odt[0].Value = true;
1591
		aStoreProperties_odt[1].Name = "FilterName";
1592
		aStoreProperties_odt[1].Value = "writer8";
1593
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
1594
		//save to doc 
1595
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1596
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
1597
		aStoreProperties_doc[0] = new PropertyValue();
1598
		aStoreProperties_doc[1] = new PropertyValue();
1599
		aStoreProperties_doc[0].Name = "Override";
1600
		aStoreProperties_doc[0].Value = true;
1601
		aStoreProperties_doc[1].Name = "FilterName";
1602
		aStoreProperties_doc[1].Value = "MS Word 97";
1603
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
1604
		app.closeDocument(xTextDocument);
1605
1606
		//reopen the document 
1607
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
1608
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
1609
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
1610
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
1611
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
1612
		//verify paragraph numbering and bullet alignment
1613
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
1614
		assertEquals("assert numbering and bullet","User Entery",propsRule_assert_odt[4].Value);
1615
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
1616
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
1617
1618
		//reopen the document 
1619
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
1620
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
1621
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
1622
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
1623
		//verify paragraph numbering and bullet alignment
1624
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
1625
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
1626
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
1627
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
1628
	}
1629
	@Test
1630
	public void testNumberingBulletCharacterStyle_Sourcetext() throws Exception {
1631
1632
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
1633
		xText = xTextDocument.getText();
1634
		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!" +
1635
				"Hello,world!Hello,world!");
1636
		//create cursor to select paragraph and formating paragraph
1637
		XTextCursor xTextCursor = xText.createTextCursor();    
1638
		//create paragraph property set
1639
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
1640
		//create document service factory
1641
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
1642
		//set numbering character
1643
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
1644
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
1645
		propsRule[0].Name = "NumberingType";
1646
		propsRule[0].Value = NumberingType.ARABIC;
1647
		propsRule[1].Name = "CharStyleName";
1648
		propsRule[1].Value = "Source Text";	
1649
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
1650
		xReplaceRule.replaceByIndex(0, propsRule);  
1651
		//set paragraph numbering and bullet character
1652
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
1653
		//save to odt 
1654
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1655
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
1656
		aStoreProperties_odt[0] = new PropertyValue();
1657
		aStoreProperties_odt[1] = new PropertyValue();
1658
		aStoreProperties_odt[0].Name = "Override";
1659
		aStoreProperties_odt[0].Value = true;
1660
		aStoreProperties_odt[1].Name = "FilterName";
1661
		aStoreProperties_odt[1].Value = "writer8";
1662
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
1663
		//save to doc 
1664
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1665
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
1666
		aStoreProperties_doc[0] = new PropertyValue();
1667
		aStoreProperties_doc[1] = new PropertyValue();
1668
		aStoreProperties_doc[0].Name = "Override";
1669
		aStoreProperties_doc[0].Value = true;
1670
		aStoreProperties_doc[1].Name = "FilterName";
1671
		aStoreProperties_doc[1].Value = "MS Word 97";
1672
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
1673
		app.closeDocument(xTextDocument);
1674
1675
		//reopen the document 
1676
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
1677
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
1678
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
1679
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
1680
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
1681
		//verify paragraph numbering and bullet alignment
1682
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
1683
		assertEquals("assert numbering and bullet","Source Text",propsRule_assert_odt[4].Value);
1684
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
1685
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
1686
1687
		//reopen the document 
1688
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
1689
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
1690
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
1691
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
1692
		//verify paragraph numbering and bullet alignment
1693
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
1694
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
1695
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
1696
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
1697
	}
1698
	@Test
1699
	public void testNumberingBulletCharacterStyle_Definition() throws Exception {
1700
1701
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
1702
		xText = xTextDocument.getText();
1703
		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!" +
1704
				"Hello,world!Hello,world!");
1705
		//create cursor to select paragraph and formating paragraph
1706
		XTextCursor xTextCursor = xText.createTextCursor();    
1707
		//create paragraph property set
1708
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
1709
		//create document service factory
1710
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
1711
		//set numbering character
1712
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
1713
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
1714
		propsRule[0].Name = "NumberingType";
1715
		propsRule[0].Value = NumberingType.ARABIC;
1716
		propsRule[1].Name = "CharStyleName";
1717
		propsRule[1].Value = "Definition";	
1718
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
1719
		xReplaceRule.replaceByIndex(0, propsRule);  
1720
		//set paragraph numbering and bullet character
1721
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
1722
		//save to odt 
1723
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1724
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
1725
		aStoreProperties_odt[0] = new PropertyValue();
1726
		aStoreProperties_odt[1] = new PropertyValue();
1727
		aStoreProperties_odt[0].Name = "Override";
1728
		aStoreProperties_odt[0].Value = true;
1729
		aStoreProperties_odt[1].Name = "FilterName";
1730
		aStoreProperties_odt[1].Value = "writer8";
1731
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
1732
		//save to doc 
1733
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1734
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
1735
		aStoreProperties_doc[0] = new PropertyValue();
1736
		aStoreProperties_doc[1] = new PropertyValue();
1737
		aStoreProperties_doc[0].Name = "Override";
1738
		aStoreProperties_doc[0].Value = true;
1739
		aStoreProperties_doc[1].Name = "FilterName";
1740
		aStoreProperties_doc[1].Value = "MS Word 97";
1741
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
1742
		app.closeDocument(xTextDocument);
1743
1744
		//reopen the document 
1745
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
1746
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
1747
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
1748
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
1749
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
1750
		//verify paragraph numbering and bullet alignment
1751
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
1752
		assertEquals("assert numbering and bullet","Definition",propsRule_assert_odt[4].Value);
1753
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
1754
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
1755
1756
		//reopen the document 
1757
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
1758
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
1759
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
1760
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
1761
		//verify paragraph numbering and bullet alignment
1762
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
1763
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
1764
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
1765
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
1766
	}
1767
	@Test
1768
	public void testNumberingBulletCharacterStyle_Teletype() throws Exception {
1769
1770
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
1771
		xText = xTextDocument.getText();
1772
		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!" +
1773
				"Hello,world!Hello,world!");
1774
		//create cursor to select paragraph and formating paragraph
1775
		XTextCursor xTextCursor = xText.createTextCursor();    
1776
		//create paragraph property set
1777
		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
1778
		//create document service factory
1779
		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
1780
		//set numbering character
1781
		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
1782
		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
1783
		propsRule[0].Name = "NumberingType";
1784
		propsRule[0].Value = NumberingType.ARABIC;
1785
		propsRule[1].Name = "CharStyleName";
1786
		propsRule[1].Value = "Teletype";	
1787
		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
1788
		xReplaceRule.replaceByIndex(0, propsRule);  
1789
		//set paragraph numbering and bullet character
1790
		xTextProps.setPropertyValue("NumberingRules", xNumRule);
1791
		//save to odt 
1792
		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1793
		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
1794
		aStoreProperties_odt[0] = new PropertyValue();
1795
		aStoreProperties_odt[1] = new PropertyValue();
1796
		aStoreProperties_odt[0].Name = "Override";
1797
		aStoreProperties_odt[0].Value = true;
1798
		aStoreProperties_odt[1].Name = "FilterName";
1799
		aStoreProperties_odt[1].Value = "writer8";
1800
		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
1801
		//save to doc 
1802
		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
1803
		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
1804
		aStoreProperties_doc[0] = new PropertyValue();
1805
		aStoreProperties_doc[1] = new PropertyValue();
1806
		aStoreProperties_doc[0].Name = "Override";
1807
		aStoreProperties_doc[0].Value = true;
1808
		aStoreProperties_doc[1].Name = "FilterName";
1809
		aStoreProperties_doc[1].Value = "MS Word 97";
1810
		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
1811
		app.closeDocument(xTextDocument);
1812
1813
		//reopen the document 
1814
		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
1815
		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
1816
		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
1817
		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
1818
		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
1819
		//verify paragraph numbering and bullet alignment
1820
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_odt[4].Name);
1821
		assertEquals("assert numbering and bullet","Teletype",propsRule_assert_odt[4].Value);
1822
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
1823
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_odt[11].Value);
1824
1825
		//reopen the document 
1826
		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
1827
		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
1828
		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
1829
		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
1830
		//verify paragraph numbering and bullet alignment
1831
		assertEquals("assert numbering and bullet","CharStyleName",propsRule_assert_doc[4].Name);
1832
		assertEquals("assert numbering and bullet","WW8Num1z0",propsRule_assert_doc[4].Value);
1833
		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
1834
		assertEquals("assert numbering and bullet",NumberingType.ARABIC,propsRule_assert_doc[11].Value);
1835
	}
1836
}
(-)testuno/source/testcase/uno/sw/paragraph/ParagraphOutlineAndNumbering.java (-2 / +2 lines)
Lines 36-42 Link Here
36
	 * 4.save and close the document
36
	 * 4.save and close the document
37
	 * 5.reload the saved document and check the paragraph outline and numbering
37
	 * 5.reload the saved document and check the paragraph outline and numbering
38
	 */	
38
	 */	
39
	@Test@Ignore//Bug 120753 - paragraph outline level and numbering style change when save to doc
39
	@Test@Ignore("Bug #120753 - [testUNO patch]paragraph outline level and numbering style change when save to doc")
40
	public void testOutlineAndNumbering_NumberStyle() throws Exception {
40
	public void testOutlineAndNumbering_NumberStyle() throws Exception {
41
41
42
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
42
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 96-102 Link Here
96
		assertEquals("assert paragraph outline and numbering",(long)4,xCursorProps_Assert_doc.getPropertyValue("ParaLineNumberStartValue"));
96
		assertEquals("assert paragraph outline and numbering",(long)4,xCursorProps_Assert_doc.getPropertyValue("ParaLineNumberStartValue"));
97
		
97
		
98
	}
98
	}
99
	@Test@Ignore//Bug 120753 - paragraph outline level and numbering style change when save to doc
99
	@Test@Ignore("Bug #120753 - [testUNO patch]paragraph outline level and numbering style change when save to doc")
100
	public void testOutlineAndNumbering_ListStyle() throws Exception {
100
	public void testOutlineAndNumbering_ListStyle() throws Exception {
101
101
102
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
102
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
(-)testuno/source/testcase/uno/sw/paragraph/ParagraphShadow.java (-4 / +4 lines)
Lines 39-45 Link Here
39
	 * 4.save and close the document
39
	 * 4.save and close the document
40
	 * 5.reload the saved document and check the paragraph shadow
40
	 * 5.reload the saved document and check the paragraph shadow
41
	 */	
41
	 */	
42
	@Test@Ignore //bug120697_paragraph shadow effect lost when save to doc.
42
	@Test@Ignore("Bug #120697 - [testUNO patch]paragraph shadow effect lost when save to doc.")
43
	public void testParagraphShadow_BottomRight() throws Exception {
43
	public void testParagraphShadow_BottomRight() throws Exception {
44
44
45
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
45
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 95-101 Link Here
95
		assertEquals("assert shadow width",100,shadowFormat_Assert2.ShadowWidth);
95
		assertEquals("assert shadow width",100,shadowFormat_Assert2.ShadowWidth);
96
		assertEquals("assert shadow color",0x00FF00FF,shadowFormat_Assert2.Color);
96
		assertEquals("assert shadow color",0x00FF00FF,shadowFormat_Assert2.Color);
97
	}
97
	}
98
	@Test@Ignore //bug120697_paragraph shadow effect lost when save to doc.
98
	@Test@Ignore("Bug #120697 - [testUNO patch]paragraph shadow effect lost when save to doc.")
99
	public void testParagraphShadow_BottomLeft() throws Exception {
99
	public void testParagraphShadow_BottomLeft() throws Exception {
100
100
101
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
101
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 151-157 Link Here
151
		assertEquals("assert shadow width",100,shadowFormat_Assert2.ShadowWidth);
151
		assertEquals("assert shadow width",100,shadowFormat_Assert2.ShadowWidth);
152
		assertEquals("assert shadow color",0x00FF00FF,shadowFormat_Assert2.Color);
152
		assertEquals("assert shadow color",0x00FF00FF,shadowFormat_Assert2.Color);
153
	}
153
	}
154
	@Test@Ignore //bug120697_paragraph shadow effect lost when save to doc.
154
	@Test@Ignore("Bug #120697 - [testUNO patch]paragraph shadow effect lost when save to doc.")
155
	public void testParagraphShadow_TopLeft() throws Exception {
155
	public void testParagraphShadow_TopLeft() throws Exception {
156
156
157
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
157
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
Lines 207-213 Link Here
207
		assertEquals("assert shadow width",100,shadowFormat_Assert2.ShadowWidth);
207
		assertEquals("assert shadow width",100,shadowFormat_Assert2.ShadowWidth);
208
		assertEquals("assert shadow color",0x00FF00FF,shadowFormat_Assert2.Color);
208
		assertEquals("assert shadow color",0x00FF00FF,shadowFormat_Assert2.Color);
209
	}
209
	}
210
	@Test@Ignore //bug120697_paragraph shadow effect lost when save to doc.
210
	@Test@Ignore("Bug #120697 - [testUNO patch]paragraph shadow effect lost when save to doc.")
211
	public void testParagraphShadow_TopRight() throws Exception {
211
	public void testParagraphShadow_TopRight() throws Exception {
212
212
213
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
213
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
(-)testuno/source/testcase/uno/sw/paragraph/ParagraphTabs.java (-1 / +1 lines)
Lines 266-272 Link Here
266
		assertEquals("assert paragraph tab setting",5001,paraTabs_assert_doc[0].Position);
266
		assertEquals("assert paragraph tab setting",5001,paraTabs_assert_doc[0].Position);
267
		assertEquals("assert paragraph tab setting",'.',paraTabs_assert_doc[0].DecimalChar);
267
		assertEquals("assert paragraph tab setting",'.',paraTabs_assert_doc[0].DecimalChar);
268
	}
268
	}
269
	@Test@Ignore //bug120748_the tabstops character of paragraph change to default when save to doc.
269
	@Test@Ignore("Bug #120748 - [testUNO patch]the tabstops character of paragraph change to default when save to doc.")
270
	public void ParagraphTabs_Decimal_UserDefineCharacter() throws Exception {
270
	public void ParagraphTabs_Decimal_UserDefineCharacter() throws Exception {
271
271
272
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
272
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
(-)testuno/source/testcase/uno/sw/puretext/CharacterEmphasis.java (-1 / +1 lines)
Lines 29-35 Link Here
29
	public void tearDown() throws Exception {
29
	public void tearDown() throws Exception {
30
		app.close();
30
		app.close();
31
	}
31
	}
32
	@Test@Ignore //bug120657_charmode change to disable from enable when save to doc.
32
	@Test@Ignore("Bug #120657 - [testUNO patch]charmode change to disable from enable when save to doc.")
33
	public void testCharacterEmphasisSetting() throws Exception {
33
	public void testCharacterEmphasisSetting() throws Exception {
34
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
34
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
35
		xText = xTextDocument.getText();
35
		xText = xTextDocument.getText();
(-)testuno/source/testcase/uno/sw/puretext/CharacterPosition.java (-1 / +1 lines)
Lines 78-84 Link Here
78
		assertEquals("assert character position",(short)29,xCursorProps_assert_doc.getPropertyValue("CharEscapement"));
78
		assertEquals("assert character position",(short)29,xCursorProps_assert_doc.getPropertyValue("CharEscapement"));
79
		assertEquals("assert character position",(byte)50,xCursorProps_assert_odt.getPropertyValue("CharEscapementHeight"));
79
		assertEquals("assert character position",(byte)50,xCursorProps_assert_odt.getPropertyValue("CharEscapementHeight"));
80
	}
80
	}
81
	@Test@Ignore //bug120674_the lower and relative font size value of subscript change when save to doc.
81
	@Test@Ignore("Bug #120674 - [testUNO patch]the lower and relative font size value of subscript change when save to doc.")
82
	public void testCharacterSubscriptSetting() throws Exception {
82
	public void testCharacterSubscriptSetting() throws Exception {
83
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
83
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
84
		xText = xTextDocument.getText();
84
		xText = xTextDocument.getText();
(-)testuno/source/testcase/uno/sw/puretext/CharacterStrikeThrough.java (-1 / +1 lines)
Lines 30-36 Link Here
30
		app.close();
30
		app.close();
31
	}
31
	}
32
32
33
	@Test@Ignore //bug 120656_bold,"/","X" strike through change to single when save to doc
33
	@Test@Ignore("Bug #120656 - [testUNO patch]bold,/,X strike through change to single when save to doc")
34
	public void testCharacterStrikeThroughSetting() throws Exception {
34
	public void testCharacterStrikeThroughSetting() throws Exception {
35
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
35
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
36
		xText = xTextDocument.getText();
36
		xText = xTextDocument.getText();
(-)testuno/source/testcase/uno/sw/puretext/CharacterUnderline.java (-1 / +1 lines)
Lines 29-35 Link Here
29
	public void tearDown() throws Exception {
29
	public void tearDown() throws Exception {
30
		app.close();
30
		app.close();
31
	}
31
	}
32
	@Test@Ignore //bug120657_underline color lost and individual words option disable when save to doc
32
	@Test@Ignore("Bug #120657 - [testUNO patch]underline color lost and individual words option disable when save to doc")
33
	public void testCharacterUnderlineSetting() throws Exception {
33
	public void testCharacterUnderlineSetting() throws Exception {
34
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
34
		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
35
		xText = xTextDocument.getText();
35
		xText = xTextDocument.getText();
(-)testuno/source/testcase/uno/sw/table/TableCellProtect.java (-1 / +1 lines)
Lines 41-47 Link Here
41
	 * 3.save to odt/doc,close it and reopen new saved document
41
	 * 3.save to odt/doc,close it and reopen new saved document
42
	 * 4.check the table cell protect setting
42
	 * 4.check the table cell protect setting
43
	 */
43
	 */
44
	@Test@Ignore //bug120745_table cell protect effect lost when save to doc.
44
	@Test@Ignore("Bug #120745 - [testUNO patch]table cell protect effect lost when save to doc.")
45
	public void testtableBorderSpacingtoContent() throws Exception {
45
	public void testtableBorderSpacingtoContent() throws Exception {
46
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
46
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
47
		xText=xTextDocument.getText();
47
		xText=xTextDocument.getText();
(-)testuno/source/testcase/uno/sw/table/TableInsertBreak.java (-12 / +12 lines)
Lines 32-38 Link Here
32
	public void tearDown() throws Exception {
32
	public void tearDown() throws Exception {
33
		app.close();
33
		app.close();
34
	}
34
	}
35
	@Test@Ignore //bug120719
35
	@Test@Ignore("Bug #120719 - [testUNO patch]the page_after break change to page_before break when save to doc.")
36
	public void InsertPage_BeforeBreak_Split_KeepTogether() throws Exception {
36
	public void InsertPage_BeforeBreak_Split_KeepTogether() throws Exception {
37
37
38
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
38
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
Lines 96-102 Link Here
96
		assertEquals("assert table split",false,xCursorProps_Assert_doc.getPropertyValue("Split"));
96
		assertEquals("assert table split",false,xCursorProps_Assert_doc.getPropertyValue("Split"));
97
		assertEquals("assert table keep_together",true,xCursorProps_Assert_doc.getPropertyValue("KeepTogether"));
97
		assertEquals("assert table keep_together",true,xCursorProps_Assert_doc.getPropertyValue("KeepTogether"));
98
	}
98
	}
99
	@Test@Ignore //bug 120719
99
	@Test@Ignore("Bug #120719 - [testUNO patch]the page_after break change to page_before break when save to doc.")
100
	public void InsertPage_AfterBreak() throws Exception {
100
	public void InsertPage_AfterBreak() throws Exception {
101
101
102
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
102
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
Lines 152-158 Link Here
152
		//verify paragraph break
152
		//verify paragraph break
153
		assertEquals("assert paragraph break",com.sun.star.style.BreakType.PAGE_AFTER,xCursorProps_Assert_doc.getPropertyValue("BreakType"));
153
		assertEquals("assert paragraph break",com.sun.star.style.BreakType.PAGE_AFTER,xCursorProps_Assert_doc.getPropertyValue("BreakType"));
154
	}
154
	}
155
	@Test@Ignore //bug 120719
155
	@Test@Ignore("Bug #120719 - [testUNO patch]the page_after break change to page_before break when save to doc.")
156
	public void InsertColumn_BeforeBreak() throws Exception {
156
	public void InsertColumn_BeforeBreak() throws Exception {
157
157
158
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
158
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
Lines 207-213 Link Here
207
		//verify paragraph break
207
		//verify paragraph break
208
		assertEquals("assert paragraph break",com.sun.star.style.BreakType.COLUMN_BEFORE,xCursorProps_Assert_doc.getPropertyValue("BreakType"));
208
		assertEquals("assert paragraph break",com.sun.star.style.BreakType.COLUMN_BEFORE,xCursorProps_Assert_doc.getPropertyValue("BreakType"));
209
	}
209
	}
210
	@Test@Ignore //bug 120719
210
	@Test@Ignore("Bug #120719 - [testUNO patch]the page_after break change to page_before break when save to doc.")
211
	public void InsertColumn_AfterBreak() throws Exception {
211
	public void InsertColumn_AfterBreak() throws Exception {
212
212
213
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
213
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
Lines 262-268 Link Here
262
		//verify table break
262
		//verify table break
263
		assertEquals("assert table break",com.sun.star.style.BreakType.COLUMN_AFTER,xCursorProps_Assert_doc.getPropertyValue("BreakType"));
263
		assertEquals("assert table break",com.sun.star.style.BreakType.COLUMN_AFTER,xCursorProps_Assert_doc.getPropertyValue("BreakType"));
264
	}
264
	}
265
	@Test@Ignore //bug120721
265
	@Test@Ignore("Bug #120719 - [testUNO patch]the page_after break change to page_before break when save to doc.")
266
	public void InsertPage_Endnote_BeforeBreak() throws Exception {
266
	public void InsertPage_Endnote_BeforeBreak() throws Exception {
267
267
268
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
268
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
Lines 323-329 Link Here
323
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
323
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
324
	}
324
	}
325
325
326
	@Test@Ignore //bug120721
326
	@Test@Ignore("Bug #120721 - [testUNO patch]the page_endnote_break type change to page_default_break when save to doc.")
327
	public void InsertPage_Envelop_BeforeBreak() throws Exception {
327
	public void InsertPage_Envelop_BeforeBreak() throws Exception {
328
328
329
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
329
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
Lines 444-450 Link Here
444
		assertEquals("assert paragraph break","First Page",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
444
		assertEquals("assert paragraph break","First Page",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
445
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
445
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
446
	}
446
	}
447
	@Test@Ignore //bug120721
447
	@Test@Ignore("Bug #120721 - [testUNO patch]the page_endnote_break type change to page_default_break when save to doc.")
448
	public void InsertPage_Footnote_BeforeBreak() throws Exception {
448
	public void InsertPage_Footnote_BeforeBreak() throws Exception {
449
449
450
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
450
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
Lines 504-510 Link Here
504
		assertEquals("assert paragraph break","Footnote",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
504
		assertEquals("assert paragraph break","Footnote",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
505
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
505
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
506
	}
506
	}
507
	@Test@Ignore //bug120721
507
	@Test@Ignore("Bug #120721 - [testUNO patch]the page_endnote_break type change to page_default_break when save to doc.")
508
	public void InsertPage_HTML_BeforeBreak() throws Exception {
508
	public void InsertPage_HTML_BeforeBreak() throws Exception {
509
509
510
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
510
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
Lines 564-570 Link Here
564
		assertEquals("assert paragraph break","HTML",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
564
		assertEquals("assert paragraph break","HTML",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
565
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
565
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
566
	}
566
	}
567
	@Test@Ignore //bug120721
567
	@Test@Ignore("Bug #120721 - [testUNO patch]the page_endnote_break type change to page_default_break when save to doc.")
568
	public void InsertPage_Index_BeforeBreak() throws Exception {
568
	public void InsertPage_Index_BeforeBreak() throws Exception {
569
569
570
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
570
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
Lines 624-630 Link Here
624
		assertEquals("assert paragraph break","Index",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
624
		assertEquals("assert paragraph break","Index",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
625
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
625
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
626
	}
626
	}
627
	@Test@Ignore //bug120721
627
	@Test@Ignore("Bug #120721 - [testUNO patch]the page_endnote_break type change to page_default_break when save to doc.")
628
	public void InsertPage_Landscape_BeforeBreak() throws Exception {
628
	public void InsertPage_Landscape_BeforeBreak() throws Exception {
629
629
630
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
630
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
Lines 684-690 Link Here
684
		assertEquals("assert paragraph break","Landscape",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
684
		assertEquals("assert paragraph break","Landscape",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
685
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
685
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
686
	}
686
	}
687
	@Test@Ignore //bug120721
687
	@Test@Ignore("Bug #120721 - [testUNO patch]the page_endnote_break type change to page_default_break when save to doc.")
688
	public void InsertPage_LeftPage_BeforeBreak() throws Exception {
688
	public void InsertPage_LeftPage_BeforeBreak() throws Exception {
689
689
690
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
690
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
Lines 744-750 Link Here
744
		assertEquals("assert paragraph break","Left Page",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
744
		assertEquals("assert paragraph break","Left Page",xCursorProps_Assert_doc.getPropertyValue("PageDescName"));
745
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
745
		assertEquals("assert paragraph break",(short)3,xCursorProps_Assert_doc.getPropertyValue("PageNumberOffset"));
746
	}
746
	}
747
	@Test@Ignore //bug120721
747
	@Test@Ignore("Bug #120721 - [testUNO patch]the page_endnote_break type change to page_default_break when save to doc.")
748
	public void InsertPage_RightPage_BeforeBreak() throws Exception {
748
	public void InsertPage_RightPage_BeforeBreak() throws Exception {
749
749
750
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
750
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
(-)testuno/source/testcase/uno/sw/table/TableName.java (-1 / +1 lines)
Lines 41-47 Link Here
41
	 * 3.save to odt/doc,close it and reopen new saved document
41
	 * 3.save to odt/doc,close it and reopen new saved document
42
	 * 4.check the table name
42
	 * 4.check the table name
43
	 */
43
	 */
44
	@Test@Ignore //bug120739_the table name change to default name when save to doc.
44
	@Test@Ignore("Bug #120739 - [testUNO patch]the table name change to default name when save to doc.")
45
	public void testtableName() throws Exception {
45
	public void testtableName() throws Exception {
46
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
46
		xTextDocument =(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));
47
		xText=xTextDocument.getText();
47
		xText=xTextDocument.getText();

Return to issue 120965