incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liu...@apache.org
Subject svn commit: r1383831 [1/2] - /incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/
Date Wed, 12 Sep 2012 08:02:18 GMT
Author: liuzhe
Date: Wed Sep 12 08:02:17 2012
New Revision: 1383831

URL: http://svn.apache.org/viewvc?rev=1383831&view=rev
Log:
#120851 - [testuno] paragraph numbering bullet,graphic bullet,tabstop,before and after character,graphic width and height,graphic bullet alignment
Patch By: Du Jing <bjdujing@gmail.com>
Review By: Liu Zhe <aliuzhe@gmail.com>

Added:
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBulletTabStop.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Graphic.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Graphic_Alignment.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Graphic_WidthAndHeight.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Number_BeforeAndAfterCharacter.java
    incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Numbering.java

Added: incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBulletTabStop.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBulletTabStop.java?rev=1383831&view=auto
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBulletTabStop.java (added)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBulletTabStop.java Wed Sep 12 08:02:17 2012
@@ -0,0 +1,105 @@
+package testcase.uno.sw.paragraph;
+
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.openoffice.test.common.FileUtil;
+import org.openoffice.test.common.Testspace;
+import org.openoffice.test.uno.UnoApp;
+
+import com.sun.star.text.*;
+import com.sun.star.beans.*;
+import com.sun.star.container.XIndexAccess;
+import com.sun.star.container.XIndexReplace;
+import com.sun.star.frame.XStorable;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+
+public class ParagraphNumberingAndBulletTabStop {
+	private static final UnoApp app = new UnoApp();
+	XText xText = null;
+
+	@Before
+	public void setUp() throws Exception {
+		app.start();
+
+	}
+
+	@After
+	public void tearDown() throws Exception {
+		app.close();
+	}
+	/*
+	 * test paragraph background color
+	 * 1.new a text document
+	 * 2.insert some text
+	 * 3.set paragraph numbering tab stop position
+	 * 4.save and close the document
+	 * 5.reload the saved document and check the paragraph numbering tab stop position
+	 */	
+	@Test
+	public void testNumberingBulletTabStop() throws Exception {
+
+		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
+		xText = xTextDocument.getText();
+		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!" +
+				"Hello,world!Hello,world!");
+		//create cursor to select paragraph and formating paragraph
+		XTextCursor xTextCursor = xText.createTextCursor();    
+		//create paragraph property set
+		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
+		//create document service factory
+		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
+		//set numbering character
+		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
+		PropertyValue[] propsRule = {new PropertyValue()};
+		propsRule[0].Name = "ListtabStopPosition";
+		propsRule[0].Value = 5001;	
+		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
+		xReplaceRule.replaceByIndex(0, propsRule);  
+		//set paragraph numbering and bullet character
+		xTextProps.setPropertyValue("NumberingRules", xNumRule);
+		//save to odt 
+		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
+		aStoreProperties_odt[0] = new PropertyValue();
+		aStoreProperties_odt[1] = new PropertyValue();
+		aStoreProperties_odt[0].Name = "Override";
+		aStoreProperties_odt[0].Value = true;
+		aStoreProperties_odt[1].Name = "FilterName";
+		aStoreProperties_odt[1].Value = "writer8";
+		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
+		//save to doc 
+		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
+		aStoreProperties_doc[0] = new PropertyValue();
+		aStoreProperties_doc[1] = new PropertyValue();
+		aStoreProperties_doc[0].Name = "Override";
+		aStoreProperties_doc[0].Value = true;
+		aStoreProperties_doc[1].Name = "FilterName";
+		aStoreProperties_doc[1].Value = "MS Word 97";
+		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
+		app.closeDocument(xTextDocument);
+
+		//reopen the document 
+		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
+		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
+		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
+		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","ListtabStopPosition",propsRule_assert_odt[8].Name);
+		assertEquals("assert numbering and bullet",5001,propsRule_assert_odt[8].Value);
+
+		//reopen the document 
+		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
+		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
+		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","ListtabStopPosition",propsRule_assert_doc[8].Name);
+		assertEquals("assert numbering and bullet",5001,propsRule_assert_doc[8].Value);
+	}
+}

Added: incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Graphic.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Graphic.java?rev=1383831&view=auto
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Graphic.java (added)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Graphic.java Wed Sep 12 08:02:17 2012
@@ -0,0 +1,114 @@
+package testcase.uno.sw.paragraph;
+
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.openoffice.test.common.FileUtil;
+import org.openoffice.test.common.Testspace;
+import org.openoffice.test.uno.UnoApp;
+
+import com.sun.star.style.NumberingType;
+import com.sun.star.text.*;
+import com.sun.star.beans.*;
+import com.sun.star.container.XIndexAccess;
+import com.sun.star.container.XIndexReplace;
+import com.sun.star.frame.XStorable;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+
+public class ParagraphNumberingAndBullet_Graphic {
+	private static final UnoApp app = new UnoApp();
+	XText xText = null;
+
+	@Before
+	public void setUp() throws Exception {
+		app.start();
+
+	}
+
+	@After
+	public void tearDown() throws Exception {
+		app.close();
+	}
+	/*
+	 * test paragraph background color
+	 * 1.new a text document
+	 * 2.insert some text
+	 * 3.set paragraph numbering bullet with graphic
+	 * 4.save and close the document
+	 * 5.reload the saved document and check the paragraph graphic bullet
+	 */	
+	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
+	public void testNumberingBullet_Graphic() throws Exception {
+
+		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
+		xText = xTextDocument.getText();
+		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!" +
+				"Hello,world!Hello,world!");
+		//create cursor to select paragraph and formating paragraph
+		XTextCursor xTextCursor = xText.createTextCursor();    
+		//create paragraph property set
+		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
+		//create document service factory
+		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
+		//set numbering character
+		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
+		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
+		propsRule[0].Name = "NumberingType";
+		propsRule[0].Value = NumberingType.BITMAP;
+		propsRule[1].Name = "GraphicURL";
+		propsRule[1].Value = FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif"));		
+		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
+		xReplaceRule.replaceByIndex(0, propsRule);  
+		//set paragraph numbering and bullet character
+		xTextProps.setPropertyValue("NumberingRules", xNumRule);	
+		
+		//save to odt 
+		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
+		aStoreProperties_odt[0] = new PropertyValue();
+		aStoreProperties_odt[1] = new PropertyValue();
+		aStoreProperties_odt[0].Name = "Override";
+		aStoreProperties_odt[0].Value = true;
+		aStoreProperties_odt[1].Name = "FilterName";
+		aStoreProperties_odt[1].Value = "writer8";
+		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
+		//save to doc 
+		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
+		aStoreProperties_doc[0] = new PropertyValue();
+		aStoreProperties_doc[1] = new PropertyValue();
+		aStoreProperties_doc[0].Name = "Override";
+		aStoreProperties_doc[0].Value = true;
+		aStoreProperties_doc[1].Name = "FilterName";
+		aStoreProperties_doc[1].Value = "MS Word 97";
+		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
+		app.closeDocument(xTextDocument);
+
+		//reopen the document 
+		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
+		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
+		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
+		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.BITMAP,propsRule_assert_odt[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_odt[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_odt[12].Value);
+		
+		//reopen the document 
+		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
+		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
+		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.CHAR_SPECIAL,propsRule_assert_doc[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_doc[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_doc[12].Value);
+	}
+}

Added: incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Graphic_Alignment.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Graphic_Alignment.java?rev=1383831&view=auto
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Graphic_Alignment.java (added)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Graphic_Alignment.java Wed Sep 12 08:02:17 2012
@@ -0,0 +1,719 @@
+package testcase.uno.sw.paragraph;
+
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.openoffice.test.common.FileUtil;
+import org.openoffice.test.common.Testspace;
+import org.openoffice.test.uno.UnoApp;
+
+import com.sun.star.style.NumberingType;
+import com.sun.star.text.*;
+import com.sun.star.beans.*;
+import com.sun.star.container.XIndexAccess;
+import com.sun.star.container.XIndexReplace;
+import com.sun.star.frame.XStorable;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+
+public class ParagraphNumberingAndBullet_Graphic_Alignment {
+	private static final UnoApp app = new UnoApp();
+	XText xText = null;
+
+	@Before
+	public void setUp() throws Exception {
+		app.start();
+
+	}
+
+	@After
+	public void tearDown() throws Exception {
+		app.close();
+	}
+	/*
+	 * test paragraph background color
+	 * 1.new a text document
+	 * 2.insert some text
+	 * 3.set paragraph graphic bullet align
+	 * 4.save and close the document
+	 * 5.reload the saved document and check the paragraph graphic bullet align
+	 */	
+	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
+	public void testNumberingBullet_Graphic_Align_BottomofBaseline() throws Exception {
+
+		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
+		xText = xTextDocument.getText();
+		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!" +
+				"Hello,world!Hello,world!");
+		//create cursor to select paragraph and formating paragraph
+		XTextCursor xTextCursor = xText.createTextCursor();    
+		//create paragraph property set
+		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
+		//create document service factory
+		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
+		//set numbering character
+		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
+		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue(),new PropertyValue()};
+		propsRule[0].Name = "NumberingType";
+		propsRule[0].Value = NumberingType.BITMAP;
+		propsRule[1].Name = "GraphicURL";
+		propsRule[1].Value = FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif"));	
+		propsRule[2].Name = "VertOrient";
+		propsRule[2].Value = VertOrientation.BOTTOM;	
+		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
+		xReplaceRule.replaceByIndex(0, propsRule);  
+		//set paragraph numbering and bullet character
+		xTextProps.setPropertyValue("NumberingRules", xNumRule);	
+		
+		//save to odt 
+		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
+		aStoreProperties_odt[0] = new PropertyValue();
+		aStoreProperties_odt[1] = new PropertyValue();
+		aStoreProperties_odt[0].Name = "Override";
+		aStoreProperties_odt[0].Value = true;
+		aStoreProperties_odt[1].Name = "FilterName";
+		aStoreProperties_odt[1].Value = "writer8";
+		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
+		//save to doc 
+		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
+		aStoreProperties_doc[0] = new PropertyValue();
+		aStoreProperties_doc[1] = new PropertyValue();
+		aStoreProperties_doc[0].Name = "Override";
+		aStoreProperties_doc[0].Value = true;
+		aStoreProperties_doc[1].Name = "FilterName";
+		aStoreProperties_doc[1].Value = "MS Word 97";
+		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
+		app.closeDocument(xTextDocument);
+
+		//reopen the document 
+		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
+		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
+		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
+		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.BITMAP,propsRule_assert_odt[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_odt[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_odt[12].Value);
+		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_odt[15].Name);
+		assertEquals("assert numbering and bullet",VertOrientation.BOTTOM,propsRule_assert_odt[15].Value);	
+		//reopen the document 
+		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
+		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
+		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.CHAR_SPECIAL,propsRule_assert_doc[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_doc[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_doc[12].Value);
+		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
+		assertEquals("assert numbering and bullet",VertOrientation.BOTTOM,propsRule_assert_doc[15].Value);
+	}
+	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
+	public void testNumberingBullet_Graphic_Align_CenterofBaseline() throws Exception {
+
+		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
+		xText = xTextDocument.getText();
+		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!" +
+				"Hello,world!Hello,world!");
+		//create cursor to select paragraph and formating paragraph
+		XTextCursor xTextCursor = xText.createTextCursor();    
+		//create paragraph property set
+		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
+		//create document service factory
+		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
+		//set numbering character
+		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
+		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue(),new PropertyValue()};
+		propsRule[0].Name = "NumberingType";
+		propsRule[0].Value = NumberingType.BITMAP;
+		propsRule[1].Name = "GraphicURL";
+		propsRule[1].Value = FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif"));	
+		propsRule[2].Name = "VertOrient";
+		propsRule[2].Value = VertOrientation.CENTER;	
+		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
+		xReplaceRule.replaceByIndex(0, propsRule);  
+		//set paragraph numbering and bullet character
+		xTextProps.setPropertyValue("NumberingRules", xNumRule);	
+		
+		//save to odt 
+		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
+		aStoreProperties_odt[0] = new PropertyValue();
+		aStoreProperties_odt[1] = new PropertyValue();
+		aStoreProperties_odt[0].Name = "Override";
+		aStoreProperties_odt[0].Value = true;
+		aStoreProperties_odt[1].Name = "FilterName";
+		aStoreProperties_odt[1].Value = "writer8";
+		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
+		//save to doc 
+		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
+		aStoreProperties_doc[0] = new PropertyValue();
+		aStoreProperties_doc[1] = new PropertyValue();
+		aStoreProperties_doc[0].Name = "Override";
+		aStoreProperties_doc[0].Value = true;
+		aStoreProperties_doc[1].Name = "FilterName";
+		aStoreProperties_doc[1].Value = "MS Word 97";
+		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
+		app.closeDocument(xTextDocument);
+
+		//reopen the document 
+		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
+		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
+		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
+		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.BITMAP,propsRule_assert_odt[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_odt[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_odt[12].Value);
+		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_odt[15].Name);
+		assertEquals("assert numbering and bullet",VertOrientation.CENTER,propsRule_assert_odt[15].Value);	
+		//reopen the document 
+		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
+		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
+		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.CHAR_SPECIAL,propsRule_assert_doc[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_doc[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_doc[12].Value);
+		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
+		assertEquals("assert numbering and bullet",VertOrientation.CENTER,propsRule_assert_doc[15].Value);
+	}
+	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
+	public void testNumberingBullet_Graphic_Align_TopofBaseline() throws Exception {
+
+		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
+		xText = xTextDocument.getText();
+		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!" +
+				"Hello,world!Hello,world!");
+		//create cursor to select paragraph and formating paragraph
+		XTextCursor xTextCursor = xText.createTextCursor();    
+		//create paragraph property set
+		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
+		//create document service factory
+		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
+		//set numbering character
+		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
+		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue(),new PropertyValue()};
+		propsRule[0].Name = "NumberingType";
+		propsRule[0].Value = NumberingType.BITMAP;
+		propsRule[1].Name = "GraphicURL";
+		propsRule[1].Value = FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif"));	
+		propsRule[2].Name = "VertOrient";
+		propsRule[2].Value = VertOrientation.TOP;	
+		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
+		xReplaceRule.replaceByIndex(0, propsRule);  
+		//set paragraph numbering and bullet character
+		xTextProps.setPropertyValue("NumberingRules", xNumRule);	
+		
+		//save to odt 
+		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
+		aStoreProperties_odt[0] = new PropertyValue();
+		aStoreProperties_odt[1] = new PropertyValue();
+		aStoreProperties_odt[0].Name = "Override";
+		aStoreProperties_odt[0].Value = true;
+		aStoreProperties_odt[1].Name = "FilterName";
+		aStoreProperties_odt[1].Value = "writer8";
+		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
+		//save to doc 
+		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
+		aStoreProperties_doc[0] = new PropertyValue();
+		aStoreProperties_doc[1] = new PropertyValue();
+		aStoreProperties_doc[0].Name = "Override";
+		aStoreProperties_doc[0].Value = true;
+		aStoreProperties_doc[1].Name = "FilterName";
+		aStoreProperties_doc[1].Value = "MS Word 97";
+		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
+		app.closeDocument(xTextDocument);
+
+		//reopen the document 
+		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
+		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
+		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
+		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.BITMAP,propsRule_assert_odt[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_odt[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_odt[12].Value);
+		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_odt[15].Name);
+		assertEquals("assert numbering and bullet",VertOrientation.TOP,propsRule_assert_odt[15].Value);	
+		//reopen the document 
+		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
+		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
+		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.CHAR_SPECIAL,propsRule_assert_doc[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_doc[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_doc[12].Value);
+		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
+		assertEquals("assert numbering and bullet",VertOrientation.TOP,propsRule_assert_doc[15].Value);
+	}
+	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
+	public void testNumberingBullet_Graphic_Align_BottomofCharacter() throws Exception {
+
+		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
+		xText = xTextDocument.getText();
+		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!" +
+				"Hello,world!Hello,world!");
+		//create cursor to select paragraph and formating paragraph
+		XTextCursor xTextCursor = xText.createTextCursor();    
+		//create paragraph property set
+		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
+		//create document service factory
+		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
+		//set numbering character
+		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
+		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue(),new PropertyValue()};
+		propsRule[0].Name = "NumberingType";
+		propsRule[0].Value = NumberingType.BITMAP;
+		propsRule[1].Name = "GraphicURL";
+		propsRule[1].Value = FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif"));	
+		propsRule[2].Name = "VertOrient";
+		propsRule[2].Value = VertOrientation.CHAR_BOTTOM;	
+		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
+		xReplaceRule.replaceByIndex(0, propsRule);  
+		//set paragraph numbering and bullet character
+		xTextProps.setPropertyValue("NumberingRules", xNumRule);	
+		
+		//save to odt 
+		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
+		aStoreProperties_odt[0] = new PropertyValue();
+		aStoreProperties_odt[1] = new PropertyValue();
+		aStoreProperties_odt[0].Name = "Override";
+		aStoreProperties_odt[0].Value = true;
+		aStoreProperties_odt[1].Name = "FilterName";
+		aStoreProperties_odt[1].Value = "writer8";
+		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
+		//save to doc 
+		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
+		aStoreProperties_doc[0] = new PropertyValue();
+		aStoreProperties_doc[1] = new PropertyValue();
+		aStoreProperties_doc[0].Name = "Override";
+		aStoreProperties_doc[0].Value = true;
+		aStoreProperties_doc[1].Name = "FilterName";
+		aStoreProperties_doc[1].Value = "MS Word 97";
+		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
+		app.closeDocument(xTextDocument);
+
+		//reopen the document 
+		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
+		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
+		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
+		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.BITMAP,propsRule_assert_odt[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_odt[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_odt[12].Value);
+		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_odt[15].Name);
+		assertEquals("assert numbering and bullet",VertOrientation.CHAR_BOTTOM,propsRule_assert_odt[15].Value);	
+		//reopen the document 
+		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
+		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
+		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.CHAR_SPECIAL,propsRule_assert_doc[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_doc[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_doc[12].Value);
+		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
+		assertEquals("assert numbering and bullet",VertOrientation.CHAR_BOTTOM,propsRule_assert_doc[15].Value);
+	}
+	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
+	public void testNumberingBullet_Graphic_Align_CenterofCharacter() throws Exception {
+
+		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
+		xText = xTextDocument.getText();
+		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!" +
+				"Hello,world!Hello,world!");
+		//create cursor to select paragraph and formating paragraph
+		XTextCursor xTextCursor = xText.createTextCursor();    
+		//create paragraph property set
+		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
+		//create document service factory
+		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
+		//set numbering character
+		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
+		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue(),new PropertyValue()};
+		propsRule[0].Name = "NumberingType";
+		propsRule[0].Value = NumberingType.BITMAP;
+		propsRule[1].Name = "GraphicURL";
+		propsRule[1].Value = FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif"));	
+		propsRule[2].Name = "VertOrient";
+		propsRule[2].Value = VertOrientation.CHAR_CENTER;	
+		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
+		xReplaceRule.replaceByIndex(0, propsRule);  
+		//set paragraph numbering and bullet character
+		xTextProps.setPropertyValue("NumberingRules", xNumRule);	
+		
+		//save to odt 
+		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
+		aStoreProperties_odt[0] = new PropertyValue();
+		aStoreProperties_odt[1] = new PropertyValue();
+		aStoreProperties_odt[0].Name = "Override";
+		aStoreProperties_odt[0].Value = true;
+		aStoreProperties_odt[1].Name = "FilterName";
+		aStoreProperties_odt[1].Value = "writer8";
+		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
+		//save to doc 
+		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
+		aStoreProperties_doc[0] = new PropertyValue();
+		aStoreProperties_doc[1] = new PropertyValue();
+		aStoreProperties_doc[0].Name = "Override";
+		aStoreProperties_doc[0].Value = true;
+		aStoreProperties_doc[1].Name = "FilterName";
+		aStoreProperties_doc[1].Value = "MS Word 97";
+		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
+		app.closeDocument(xTextDocument);
+
+		//reopen the document 
+		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
+		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
+		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
+		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.BITMAP,propsRule_assert_odt[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_odt[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_odt[12].Value);
+		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_odt[15].Name);
+		assertEquals("assert numbering and bullet",VertOrientation.CHAR_CENTER,propsRule_assert_odt[15].Value);	
+		//reopen the document 
+		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
+		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
+		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.CHAR_SPECIAL,propsRule_assert_doc[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_doc[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_doc[12].Value);
+		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
+		assertEquals("assert numbering and bullet",VertOrientation.CHAR_CENTER,propsRule_assert_doc[15].Value);
+	}
+	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
+	public void testNumberingBullet_Graphic_Align_TopofCharacter() throws Exception {
+
+		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
+		xText = xTextDocument.getText();
+		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!" +
+				"Hello,world!Hello,world!");
+		//create cursor to select paragraph and formating paragraph
+		XTextCursor xTextCursor = xText.createTextCursor();    
+		//create paragraph property set
+		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
+		//create document service factory
+		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
+		//set numbering character
+		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
+		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue(),new PropertyValue()};
+		propsRule[0].Name = "NumberingType";
+		propsRule[0].Value = NumberingType.BITMAP;
+		propsRule[1].Name = "GraphicURL";
+		propsRule[1].Value = FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif"));	
+		propsRule[2].Name = "VertOrient";
+		propsRule[2].Value = VertOrientation.CHAR_TOP;	
+		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
+		xReplaceRule.replaceByIndex(0, propsRule);  
+		//set paragraph numbering and bullet character
+		xTextProps.setPropertyValue("NumberingRules", xNumRule);	
+		
+		//save to odt 
+		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
+		aStoreProperties_odt[0] = new PropertyValue();
+		aStoreProperties_odt[1] = new PropertyValue();
+		aStoreProperties_odt[0].Name = "Override";
+		aStoreProperties_odt[0].Value = true;
+		aStoreProperties_odt[1].Name = "FilterName";
+		aStoreProperties_odt[1].Value = "writer8";
+		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
+		//save to doc 
+		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
+		aStoreProperties_doc[0] = new PropertyValue();
+		aStoreProperties_doc[1] = new PropertyValue();
+		aStoreProperties_doc[0].Name = "Override";
+		aStoreProperties_doc[0].Value = true;
+		aStoreProperties_doc[1].Name = "FilterName";
+		aStoreProperties_doc[1].Value = "MS Word 97";
+		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
+		app.closeDocument(xTextDocument);
+
+		//reopen the document 
+		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
+		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
+		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
+		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.BITMAP,propsRule_assert_odt[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_odt[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_odt[12].Value);
+		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_odt[15].Name);
+		assertEquals("assert numbering and bullet",VertOrientation.CHAR_TOP,propsRule_assert_odt[15].Value);	
+		//reopen the document 
+		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
+		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
+		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.CHAR_SPECIAL,propsRule_assert_doc[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_doc[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_doc[12].Value);
+		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
+		assertEquals("assert numbering and bullet",VertOrientation.CHAR_TOP,propsRule_assert_doc[15].Value);
+	}	
+	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
+	public void testNumberingBullet_Graphic_Align_BottomofLine() throws Exception {
+
+		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
+		xText = xTextDocument.getText();
+		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!" +
+				"Hello,world!Hello,world!");
+		//create cursor to select paragraph and formating paragraph
+		XTextCursor xTextCursor = xText.createTextCursor();    
+		//create paragraph property set
+		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
+		//create document service factory
+		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
+		//set numbering character
+		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
+		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue(),new PropertyValue()};
+		propsRule[0].Name = "NumberingType";
+		propsRule[0].Value = NumberingType.BITMAP;
+		propsRule[1].Name = "GraphicURL";
+		propsRule[1].Value = FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif"));	
+		propsRule[2].Name = "VertOrient";
+		propsRule[2].Value = VertOrientation.LINE_BOTTOM;	
+		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
+		xReplaceRule.replaceByIndex(0, propsRule);  
+		//set paragraph numbering and bullet character
+		xTextProps.setPropertyValue("NumberingRules", xNumRule);	
+		
+		//save to odt 
+		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
+		aStoreProperties_odt[0] = new PropertyValue();
+		aStoreProperties_odt[1] = new PropertyValue();
+		aStoreProperties_odt[0].Name = "Override";
+		aStoreProperties_odt[0].Value = true;
+		aStoreProperties_odt[1].Name = "FilterName";
+		aStoreProperties_odt[1].Value = "writer8";
+		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
+		//save to doc 
+		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
+		aStoreProperties_doc[0] = new PropertyValue();
+		aStoreProperties_doc[1] = new PropertyValue();
+		aStoreProperties_doc[0].Name = "Override";
+		aStoreProperties_doc[0].Value = true;
+		aStoreProperties_doc[1].Name = "FilterName";
+		aStoreProperties_doc[1].Value = "MS Word 97";
+		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
+		app.closeDocument(xTextDocument);
+
+		//reopen the document 
+		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
+		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
+		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
+		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.BITMAP,propsRule_assert_odt[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_odt[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_odt[12].Value);
+		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_odt[15].Name);
+		assertEquals("assert numbering and bullet",VertOrientation.LINE_BOTTOM,propsRule_assert_odt[15].Value);	
+		//reopen the document 
+		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
+		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
+		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.CHAR_SPECIAL,propsRule_assert_doc[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_doc[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_doc[12].Value);
+		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
+		assertEquals("assert numbering and bullet",VertOrientation.LINE_BOTTOM,propsRule_assert_doc[15].Value);
+	}
+	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
+	public void testNumberingBullet_Graphic_Align_CenterofLine() throws Exception {
+
+		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
+		xText = xTextDocument.getText();
+		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!" +
+				"Hello,world!Hello,world!");
+		//create cursor to select paragraph and formating paragraph
+		XTextCursor xTextCursor = xText.createTextCursor();    
+		//create paragraph property set
+		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
+		//create document service factory
+		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
+		//set numbering character
+		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
+		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue(),new PropertyValue()};
+		propsRule[0].Name = "NumberingType";
+		propsRule[0].Value = NumberingType.BITMAP;
+		propsRule[1].Name = "GraphicURL";
+		propsRule[1].Value = FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif"));	
+		propsRule[2].Name = "VertOrient";
+		propsRule[2].Value = VertOrientation.LINE_CENTER;	
+		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
+		xReplaceRule.replaceByIndex(0, propsRule);  
+		//set paragraph numbering and bullet character
+		xTextProps.setPropertyValue("NumberingRules", xNumRule);	
+		
+		//save to odt 
+		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
+		aStoreProperties_odt[0] = new PropertyValue();
+		aStoreProperties_odt[1] = new PropertyValue();
+		aStoreProperties_odt[0].Name = "Override";
+		aStoreProperties_odt[0].Value = true;
+		aStoreProperties_odt[1].Name = "FilterName";
+		aStoreProperties_odt[1].Value = "writer8";
+		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
+		//save to doc 
+		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
+		aStoreProperties_doc[0] = new PropertyValue();
+		aStoreProperties_doc[1] = new PropertyValue();
+		aStoreProperties_doc[0].Name = "Override";
+		aStoreProperties_doc[0].Value = true;
+		aStoreProperties_doc[1].Name = "FilterName";
+		aStoreProperties_doc[1].Value = "MS Word 97";
+		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
+		app.closeDocument(xTextDocument);
+
+		//reopen the document 
+		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
+		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
+		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
+		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.BITMAP,propsRule_assert_odt[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_odt[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_odt[12].Value);
+		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_odt[15].Name);
+		assertEquals("assert numbering and bullet",VertOrientation.LINE_CENTER,propsRule_assert_odt[15].Value);	
+		//reopen the document 
+		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
+		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
+		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.CHAR_SPECIAL,propsRule_assert_doc[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_doc[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_doc[12].Value);
+		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
+		assertEquals("assert numbering and bullet",VertOrientation.LINE_CENTER,propsRule_assert_doc[15].Value);
+	}
+	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
+	public void testNumberingBullet_Graphic_Align_TopofLine() throws Exception {
+
+		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
+		xText = xTextDocument.getText();
+		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!" +
+				"Hello,world!Hello,world!");
+		//create cursor to select paragraph and formating paragraph
+		XTextCursor xTextCursor = xText.createTextCursor();    
+		//create paragraph property set
+		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
+		//create document service factory
+		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
+		//set numbering character
+		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
+		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue(),new PropertyValue()};
+		propsRule[0].Name = "NumberingType";
+		propsRule[0].Value = NumberingType.BITMAP;
+		propsRule[1].Name = "GraphicURL";
+		propsRule[1].Value = FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif"));	
+		propsRule[2].Name = "VertOrient";
+		propsRule[2].Value = VertOrientation.LINE_TOP;	
+		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
+		xReplaceRule.replaceByIndex(0, propsRule);  
+		//set paragraph numbering and bullet character
+		xTextProps.setPropertyValue("NumberingRules", xNumRule);	
+		
+		//save to odt 
+		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
+		aStoreProperties_odt[0] = new PropertyValue();
+		aStoreProperties_odt[1] = new PropertyValue();
+		aStoreProperties_odt[0].Name = "Override";
+		aStoreProperties_odt[0].Value = true;
+		aStoreProperties_odt[1].Name = "FilterName";
+		aStoreProperties_odt[1].Value = "writer8";
+		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
+		//save to doc 
+		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
+		aStoreProperties_doc[0] = new PropertyValue();
+		aStoreProperties_doc[1] = new PropertyValue();
+		aStoreProperties_doc[0].Name = "Override";
+		aStoreProperties_doc[0].Value = true;
+		aStoreProperties_doc[1].Name = "FilterName";
+		aStoreProperties_doc[1].Value = "MS Word 97";
+		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
+		app.closeDocument(xTextDocument);
+
+		//reopen the document 
+		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
+		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
+		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
+		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.BITMAP,propsRule_assert_odt[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_odt[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_odt[12].Value);
+		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_odt[15].Name);
+		assertEquals("assert numbering and bullet",VertOrientation.LINE_TOP,propsRule_assert_odt[15].Value);	
+		//reopen the document 
+		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
+		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
+		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.CHAR_SPECIAL,propsRule_assert_doc[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_doc[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_doc[12].Value);
+		assertEquals("assert numbering and bullet","VertOrient",propsRule_assert_doc[15].Name);
+		assertEquals("assert numbering and bullet",VertOrientation.LINE_TOP,propsRule_assert_doc[15].Value);
+	}
+}

Added: incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Graphic_WidthAndHeight.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Graphic_WidthAndHeight.java?rev=1383831&view=auto
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Graphic_WidthAndHeight.java (added)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Graphic_WidthAndHeight.java Wed Sep 12 08:02:17 2012
@@ -0,0 +1,128 @@
+package testcase.uno.sw.paragraph;
+
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.openoffice.test.common.FileUtil;
+import org.openoffice.test.common.Testspace;
+import org.openoffice.test.uno.UnoApp;
+
+import com.sun.star.style.NumberingType;
+import com.sun.star.text.*;
+import com.sun.star.awt.Size;
+import com.sun.star.beans.*;
+import com.sun.star.container.XIndexAccess;
+import com.sun.star.container.XIndexReplace;
+import com.sun.star.frame.XStorable;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+
+public class ParagraphNumberingAndBullet_Graphic_WidthAndHeight {
+	private static final UnoApp app = new UnoApp();
+	XText xText = null;
+
+	@Before
+	public void setUp() throws Exception {
+		app.start();
+
+	}
+
+	@After
+	public void tearDown() throws Exception {
+		app.close();
+	}
+	/*
+	 * test paragraph background color
+	 * 1.new a text document
+	 * 2.insert some text
+	 * 3.set paragraph numbering bullet with graphic
+	 * 4.save and close the document
+	 * 5.reload the saved document and check the paragraph graphic bullet
+	 */	
+	@Test@Ignore("#Bug 120833 - graphic bullet will change to character bullet when save to doc.")
+	public void testNumberingBullet_Graphic() throws Exception {
+
+		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
+		xText = xTextDocument.getText();
+		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!" +
+				"Hello,world!Hello,world!");
+		//create cursor to select paragraph and formating paragraph
+		XTextCursor xTextCursor = xText.createTextCursor();    
+		//create paragraph property set
+		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
+		//create document service factory
+		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
+		//set numbering character
+		Size size=new Size();
+		size.Height=1000;
+		size.Width=1000;
+		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
+		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue(),new PropertyValue()};
+		propsRule[0].Name = "NumberingType";
+		propsRule[0].Value = NumberingType.BITMAP;
+		propsRule[1].Name = "GraphicURL";
+		propsRule[1].Value = FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif"));
+		propsRule[2].Name = "GraphicSize";
+		propsRule[2].Value = size;	
+		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
+		xReplaceRule.replaceByIndex(0, propsRule);  
+		//set paragraph numbering and bullet character
+		xTextProps.setPropertyValue("NumberingRules", xNumRule);	
+		
+		//save to odt 
+		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
+		aStoreProperties_odt[0] = new PropertyValue();
+		aStoreProperties_odt[1] = new PropertyValue();
+		aStoreProperties_odt[0].Name = "Override";
+		aStoreProperties_odt[0].Value = true;
+		aStoreProperties_odt[1].Name = "FilterName";
+		aStoreProperties_odt[1].Value = "writer8";
+		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
+		//save to doc 
+		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
+		aStoreProperties_doc[0] = new PropertyValue();
+		aStoreProperties_doc[1] = new PropertyValue();
+		aStoreProperties_doc[0].Name = "Override";
+		aStoreProperties_doc[0].Value = true;
+		aStoreProperties_doc[1].Name = "FilterName";
+		aStoreProperties_doc[1].Value = "MS Word 97";
+		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
+		app.closeDocument(xTextDocument);
+
+		//reopen the document 
+		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
+		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
+		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
+		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_odt[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.BITMAP,propsRule_assert_odt[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_odt[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_odt[12].Value);
+		assertEquals("assert numbering and bullet","GraphicSize",propsRule_assert_odt[14].Name);
+		Size size_assert_odt=(Size)propsRule_assert_odt[14].Value;
+		assertEquals("assert numbering and bullet",1000,size_assert_odt.Height);
+		assertEquals("assert numbering and bullet",1000,size_assert_odt.Width);
+		
+		//reopen the document 
+		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
+		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
+		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","NumberingType",propsRule_assert_doc[11].Name);
+		assertEquals("assert numbering and bullet",NumberingType.CHAR_SPECIAL,propsRule_assert_doc[11].Value);
+		assertEquals("assert numbering and bullet","GraphicURL",propsRule_assert_odt[12].Name);
+		assertEquals("assert numbering and bullet",FileUtil.getUrl(Testspace.prepareData("uno/coffee_1.gif")),propsRule_assert_doc[12].Value);
+		assertEquals("assert numbering and bullet","GraphicSize",propsRule_assert_doc[14].Name);
+		Size size_assert_doc=(Size)propsRule_assert_odt[14].Value;
+		assertEquals("assert numbering and bullet",1000,size_assert_doc.Height);
+		assertEquals("assert numbering and bullet",1000,size_assert_doc.Width);
+	}
+}

Added: incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Number_BeforeAndAfterCharacter.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Number_BeforeAndAfterCharacter.java?rev=1383831&view=auto
==============================================================================
--- incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Number_BeforeAndAfterCharacter.java (added)
+++ incubator/ooo/trunk/test/testuno/source/testcase/uno/sw/paragraph/ParagraphNumberingAndBullet_Number_BeforeAndAfterCharacter.java Wed Sep 12 08:02:17 2012
@@ -0,0 +1,111 @@
+package testcase.uno.sw.paragraph;
+
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.openoffice.test.common.FileUtil;
+import org.openoffice.test.common.Testspace;
+import org.openoffice.test.uno.UnoApp;
+
+import com.sun.star.text.*;
+import com.sun.star.beans.*;
+import com.sun.star.container.XIndexAccess;
+import com.sun.star.container.XIndexReplace;
+import com.sun.star.frame.XStorable;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+
+public class ParagraphNumberingAndBullet_Number_BeforeAndAfterCharacter {
+	private static final UnoApp app = new UnoApp();
+	XText xText = null;
+
+	@Before
+	public void setUp() throws Exception {
+		app.start();
+
+	}
+
+	@After
+	public void tearDown() throws Exception {
+		app.close();
+	}
+	/*
+	 * test paragraph background color
+	 * 1.new a text document
+	 * 2.insert some text
+	 * 3.set paragraph numbering before and after character
+	 * 4.save and close the document
+	 * 5.reload the saved document and check the paragraph numbering before and after character
+	 */	
+	@Test
+	public void testNumberingBulletBeforeAndAfterCharacter() throws Exception {
+
+		XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, app.newDocument("swriter"));// new a text document
+		xText = xTextDocument.getText();
+		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!" +
+				"Hello,world!Hello,world!");
+		//create cursor to select paragraph and formating paragraph
+		XTextCursor xTextCursor = xText.createTextCursor();    
+		//create paragraph property set
+		XPropertySet xTextProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
+		//create document service factory
+		XMultiServiceFactory  xWriterFactory= (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);		
+		//set numbering character
+		XIndexAccess xNumRule = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class,xWriterFactory.createInstance("com.sun.star.text.NumberingRules"));
+		PropertyValue[] propsRule = {new PropertyValue(),new PropertyValue()};
+		propsRule[1].Name = "Prefix";
+		propsRule[1].Value = "#$%&";
+		propsRule[0].Name = "Suffix";
+		propsRule[0].Value = "abcd";	
+		XIndexReplace xReplaceRule = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule);
+		xReplaceRule.replaceByIndex(0, propsRule);  
+		//set paragraph numbering and bullet character
+		xTextProps.setPropertyValue("NumberingRules", xNumRule);
+		//save to odt 
+		XStorable xStorable_odt = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_odt = new PropertyValue[2];
+		aStoreProperties_odt[0] = new PropertyValue();
+		aStoreProperties_odt[1] = new PropertyValue();
+		aStoreProperties_odt[0].Name = "Override";
+		aStoreProperties_odt[0].Value = true;
+		aStoreProperties_odt[1].Name = "FilterName";
+		aStoreProperties_odt[1].Value = "writer8";
+		xStorable_odt.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.odt")), aStoreProperties_odt);
+		//save to doc 
+		XStorable xStorable_doc = (XStorable) UnoRuntime.queryInterface(XStorable.class, xTextDocument);
+		PropertyValue[] aStoreProperties_doc = new PropertyValue[2];
+		aStoreProperties_doc[0] = new PropertyValue();
+		aStoreProperties_doc[1] = new PropertyValue();
+		aStoreProperties_doc[0].Name = "Override";
+		aStoreProperties_doc[0].Value = true;
+		aStoreProperties_doc[1].Name = "FilterName";
+		aStoreProperties_doc[1].Value = "MS Word 97";
+		xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc);	
+		app.closeDocument(xTextDocument);
+
+		//reopen the document 
+		XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt")));
+		XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_odt = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_odt.getPropertyValue("NumberingRules"));
+		XIndexReplace xReplaceRule_assert_odt = (XIndexReplace) UnoRuntime.queryInterface(XIndexReplace.class, xNumRule_assert_odt);
+		PropertyValue[] propsRule_assert_odt=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xReplaceRule_assert_odt.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","Prefix",propsRule_assert_odt[2].Name);
+		assertEquals("assert numbering and bullet","#$%&",propsRule_assert_odt[2].Value);
+		assertEquals("assert numbering and bullet","Suffix",propsRule_assert_odt[3].Name);
+		assertEquals("assert numbering and bullet","abcd",propsRule_assert_odt[3].Value);
+
+		//reopen the document 
+		XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc")));
+		XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor());
+		XIndexAccess xNumRule_assert_doc = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, xCursorProps_Assert_doc.getPropertyValue("NumberingRules"));
+		PropertyValue[] propsRule_assert_doc=(PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class,xNumRule_assert_doc.getByIndex(0));
+		//verify paragraph numbering and bullet alignment
+		assertEquals("assert numbering and bullet","Prefix",propsRule_assert_doc[2].Name);
+		assertEquals("assert numbering and bullet","#$%&",propsRule_assert_doc[2].Value);
+		assertEquals("assert numbering and bullet","Suffix",propsRule_assert_doc[3].Name);
+		assertEquals("assert numbering and bullet","abcd",propsRule_assert_doc[3].Value);
+	}
+}



Mime
View raw message