| View previous topic :: View next topic |
| Author |
Message |
anne General User

Joined: 06 Feb 2006 Posts: 12
|
Posted: Sun Feb 19, 2006 9:40 am Post subject: Service background |
|
|
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.  |
|
| Back to top |
|
 |
pitonyak Administrator


Joined: 09 Mar 2004 Posts: 3622 Location: Columbus, Ohio, USA
|
Posted: Mon Feb 20, 2006 9:50 am Post subject: |
|
|
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 |
|
 |
|