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

[Java] Getting/setting variables of document

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
Singaja
Newbie
Newbie


Joined: 21 Nov 2006
Posts: 1

PostPosted: Wed Nov 22, 2006 1:51 am    Post subject: [Java] Getting/setting variables of document Reply with quote

Hello

I've encountered a problem in Java while trying to access Variables(created by Insert->Field->Others->Variables) in openoffice document. I have no problem getting and setting values of User Fields. Here is a snippet of my code
Code:

//I access particular userField / Variable
Object fieldMaster = xNamedFieldMasters.getByName(xNamedFieldMastersNames[i]);

XPropertySet xPropertySet = (XPropertySet)UnoRuntime.queryInterface(
 XPropertySet.class, fieldMaster);

//Variable has no content property(and nothing similar actually) It works for UserFields
xPropertySet.setProperty("content", "some new value");



Is there another way of accessing variables to get/set their values , any ideas?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer 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