On Fri, May 10, 2013 at 02:24:56PM +0300, k.misha wrote:
> Hi!
>
> How I need to initialize XShapes and XShape interfaces?
>
> Reference< XShapes > xShapes(?);
The draw page implements this interface. If we had more code
contributors, we could implement multiple inheritance; but that's not
the case, you have to live querying interfaces.
> Reference< XShape > xShape(?);
You have to create a shape at the document model's factory:
- the document model implements css.lang.XMultiServiceFactory to
instantiate different objects, specified by their service name.
file:///opt/openoffice.org/basis3.4/sdk/docs/common/ref/com/sun/star/lang/XMultiServiceFactory.html
Use the service name com.sun.star.drawing.GraphicObjectShape to create
an instance of a shape that holds an image
file:///opt/openoffice.org/basis3.4/sdk/docs/common/ref/com/sun/star/drawing/GraphicObjectShape.html
- XMultiServiceFactory::createInstance wil return a reference to
a generic css.uno.XInterface; query that reference for the
css.drawing.XShape interface. Usually you will also need the
css.beans.XPropertySet interface, to set the shapes properties.
Regards
--
Ariel Constenla-Haile
La Plata, Argentina
pgp7xEABQTBEg.pgp
Description: PGP signature