OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

header footer in python

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Code Snippets
View previous topic :: View next topic  
Author Message
phani
General User
General User


Joined: 30 Jun 2008
Posts: 8

PostPosted: Wed Jul 09, 2008 7:11 am    Post subject: header footer in python Reply with quote

hi guys

can any of u guys show a small code snippet on how to add a header and footer to a writer and impress document. I want to add an image file and a string to the header and footer section in these documents. i am doing this in python and i am unable to find any examples for doing this.
Back to top
View user's profile Send private message
kaushalc
General User
General User


Joined: 12 Jul 2009
Posts: 31

PostPosted: Tue Aug 10, 2010 4:35 am    Post subject: Reply with quote

xPageCursor.jumpToStartOfPage();
xTextCursor =(XTextCursor) UnoRuntime.queryInterface(XTextCursor.class,xPageCursor);
xTextCursorProps = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,xTextCursor);
pageStyleName= xTextCursorProps.getPropertyValue("PageStyleName").toString();
System.out.println("PAGE STYLE NAME::"+pageStyleName);
xStyle= (XStyle) UnoRuntime.queryInterface(XStyle.class,xFamily.getByName(pageStyleName));
xStyleProps = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,xStyle);
HeaderText = (com.sun.star.text.XText) UnoRuntime.queryInterface(com.sun.star.text.XText.class, xStyleProps.getPropertyValue("HeaderTextLeft"));
System.out.println("HEADER TEXT IS "+HeaderText.getString());

xHeaderTextCursor = HeaderText.createTextCursor();
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Code Snippets All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group