Hello Ariel,

with the attached source the grouping now works. Thanks.
But there is still a problem with the position of the ellipse and the
rectangle. They always have the position (0,0). What is the reason for
this and how can I fix this?

regards
Sebastian


Ariel Constenla-Haile schrieb:
> Hello Christian, Sebastian, *
>
> On Thursday 26 March 2009, 06:12, Christian Lippka - Sun Microsystems GmbH - 
> Hamburg wrote:
>   
>> Hi Sebastian,
>>
>> to my knowledge the writer does not support a group shape API. 
>>     
>
> yes it does.
>
>   
>> In Draw or Impress you would use the XShapeGrouper interface 
>> from the draw page. Maybe the draw page in writer
>> also supports this interface. But I don't even know where to get the
>> draw page in writer :-)
>>     
>
> Writer's document model implenents com.sun.star.drawing.XDrawPageSupplier
> http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Text/Shape_Objects_in_Text#Drawing_Shapes
>
> It seems someone deprecated 
> http://api.openoffice.org/docs/common/ref/com/sun/star/drawing/XDrawPageSupplier.html
> but that's wrong, this is the only way in Writer to access the DrawPage (the 
> reason seems to be that there was a time when in Calc one accessed a single 
> sheet's DrawPage via this interface - this seems to tell the fact that the 
> only service supporting this interface is 
> ::com::sun::star::sheet::Spreadsheet 
> http://api.openoffice.org/docs/common/ref/com/sun/star/drawing/XDrawPageSupplier-
> xref.html#SupportingServices)
>
>   
>>> 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 
>>>       
>
> @Sebastian: 
> this is the "old" Develper's Guide. You must read the "new" version on the 
> Wiki 
> http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Drawings/Grouping%2C_Combining_and_Binding
>
>   
>>> there is xDrawPage used to create
>>> a GroupeShape. How can I handle the creation with the XTextDocument?
>>>       
>
> both method for grouping shapes described there work in Writer... well, only 
> the first one does the job as expected. The code attached [CC you, as I'm not 
> sure it will pass this list, in the API list it usually does] shows them both 
> parallel in Writer and Draw.
>
> Regards
>   


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

Reply via email to