Hi, I didn't found this subject in the faq, so I ask it. I create a writer document and I'd like to have the page numbering. It works except for the first page. If I use PageNumberOffset to a value > 1, it works correctly. If I set this to one or I don't set it, I have a blank number on the first page. Do I forget something ? Here is my sample :
# access the current writer document model = desktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, ()) # access the document's text property text = model.Text # create a cursor cursor = text.createTextCursor() print "page syle : ", cursor.PageStyleName cursor.setPropertyValue("PageNumberOffset", 1) PageStyles = model.StyleFamilies.getByName("PageStyles") StdPage = PageStyles.getByName("Standard") StdPage.FooterIsOn = True PageCount = model.createInstance("com.sun.star.text.textfield.PageCount") PageCount.NumberingType = ARABIC PageNumber = model.createInstance("com.sun.star.text.textfield.PageNumber") PageNumber.NumberingType = ARABIC FooterCursor = StdPage.FooterTextLeft.Text.createTextCursor() StdPage.FooterTextLeft.Text.insertString(FooterCursor, "Page : ", False) StdPage.FooterTextLeft.Text.insertTextContent(FooterCursor, PageNumber, False) StdPage.FooterTextLeft.Text.insertString(FooterCursor, "/", False) StdPage.FooterTextLeft.Text.insertTextContent(FooterCursor, PageCount, False) FooterCursor.setPropertyValue("ParaAdjust", RIGHT); I tried it on ubuntu karmic ( openoffice 3.1.1 ), ubuntu maverick ( 3.2.1 ) I always get the same problem. -- Serge Noiraud Linux, c'est mieux. Firefox, c'est mieux. LibreOffice, c'est mieux. Développeur projet : http://www.gramps-project.org/ --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@udk.openoffice.org For additional commands, e-mail: dev-h...@udk.openoffice.org