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

Set defaultfont

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
PatrickUlmer
Guest





PostPosted: Tue Oct 14, 2003 5:58 am    Post subject: Set defaultfont Reply with quote

Hi,

how can I set the default fontname to Arial using the API?

[ DeveloperGuide ]

Creating Default Settings
The com.sun.star.lang.XMultiServiceFactory implemented at the model provides the service
com.sun.star.text.Defaults. Use this service to find out default values to set paragraph and
character properties of the document to default.

[ End ]

I don't now how. Can somebody help me?

Tanks...Patrick
Back to top
PatrickUlmer
Guest





PostPosted: Wed Oct 15, 2003 2:12 am    Post subject: Set defaultfont - SOLVED Reply with quote

Ok, I have solved the problem. It's so easy:

oMyStyle := doc.createInstance('com.sun.star.text.Defaults');
oMyStyle.CharFontName := 'Arial';

Ciao...Patrick
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API 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