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

Service background

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


Joined: 06 Feb 2006
Posts: 12

PostPosted: Sun Feb 19, 2006 9:40 am    Post subject: Service background Reply with quote

Dear all

i have a problem with adding a slide background filling bitmap. I have already post before that i can fill all slides with the same background
http://www.oooforum.org/forum/viewtopic.phtml?t=31797&highlight=background

but my aim is to change only one slide background. in api , i found
http://api.openoffice.org/docs/common/ref/com/sun/star/drawing/Background.html
so i try to write
Code:
com.sun.star.drawing.XShape xShape = null;
           com.sun.star.lang.XMultiServiceFactory xDocMSF =
              (com.sun.star.lang.XMultiServiceFactory) UnoRuntime.queryInterface(
                com.sun.star.lang.XMultiServiceFactory.class, xDrawDoc );
                try {
                        Object oInt = xDocMSF.createInstance("com.sun.star.drawing.background");
                         xShape = (com.sun.star.drawing.XShape)UnoRuntime.queryInterface(
                                         com.sun.star.drawing.XShape.class, oInt);       
                } catch ( Exception e ) {
                         System.err.println( "Couldn't create instance "+ e );
                         e.printStackTrace(System.err);
               }

but exception occur. i can't createInstance with com.sun.star.drawing.background.

Can anyone help and guide me how to use that background service.
Thanks a lot for u help. I have been stucked with this problem and not know how to slove. Embarassed
Back to top
View user's profile Send private message
pitonyak
Administrator
Administrator


Joined: 09 Mar 2004
Posts: 3655
Location: Columbus, Ohio, USA

PostPosted: Mon Feb 20, 2006 9:50 am    Post subject: Reply with quote

The B must be capital...
Code:
 oBack = ThisComponent.createInstance("com.sun.star.drawing.Background")

_________________
--
Andrew Pitonyak
http://www.pitonyak.org/oo.php
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
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