Hi Pedro
Pedro schrieb:
Hi, i'm trying to get the positios of an image inserted into a writer document but I don't know how do it. I was trying this during a whole week, but i can't find how to do it. In the PropertySet i haven't got any property for get the position of a image.
I'm using java, my imcomplete code it's:
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...


           XNameAccess as = os.getGraphicObjects();
           String[] s = as.getElementNames();
                     //Get the first image of the document
           Object o = (Object) as.getByName(s[0]);
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...

Here I have the first image, now i want to get the position in the document for this image, how I can get it? XPropertySet doesn't have any attribute for this.

The graphic object object supports the service com.sun.star.text.BaseFrame which exports the interface com.sun.star.drawing.XShape.
So query for it and you will get the method .getPosition()

Regards

Peter


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

  • [dev] how to... Pedro
    • Re: [de... Peter Eberlein
      • Re:... Pedro
        • ... Pedro
          • ... Oliver-Rainer Wittmann - Software Engineer - Sun Microsystems
            • ... Peter Eberlein
              • ... Pedro
                • ... Pedro
                • ... Andrew Douglas Pitonyak

Reply via email to