Hi Bernhard,

thanks for your reply. With this example it works. But I need
additionally the part of the example that stands in the comment at the
end with the note, that it "doesn't work". It is the grouping of shapes.
After a try with this code, I recognised, that the ellipse isn't visible
in the text document. Only after moving the group of shapes in the
document, the ellipse becomes visible. In addition the positions of both
shapes aren't correct. The rectangle is at (0,0) and the ellipse is at
(0,+something). The third thing is, that the last method invocation
[xShapeGrouper.group(xGrouper)] raises an com.sun.star.uno.RuntimeException.
Is there a way to fix this three problems?

regards
Sebastian


>Hi Sebastian,
>
>>Message de Sebastian Patschorke date 2009-03-26 16:50 :
>>
>> Hello!
>>
>> I asked my question at [email protected]. But Christian isn't
>> sure about the support of the API. So I ask here again :-)
>> See http://graphics.openoffice.org/servlets/ReadMsg?list=dev&msgNo=1516
>>
>>
>>
>> How can I group some shapes and add them to a text document with Java?
>> I have a XTextDocument and a XTextRange.
>>
>> In the example at
>>
http://api.openoffice.org/docs/DevelopersGuide/Drawing/Drawing.xhtml#1_3_2_2_5_Grouping_2C_Combining_and_Binding
>> there is xDrawPage used to create a GroupeShape. How can I handle the
>> creation with the XTextDocument?
>>
>
>A Writer document has a DrawPage for the whole document. You get it with
>getDrawPage() from xDrawPageSupplier.
>See example in the Developer's Guide, Writer section
><http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Text/Drawing_Shapes>
>
>Regards
> Bernard


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

Reply via email to