Hello Fernand, Serguei On Friday 24 April 2009, 10:15, Fernand Vanrie wrote: > Ariel learned me resntly about some undocumented stuff > > hav a look at > > http://www.openoffice.org/issues/show_bug.cgi?id=101310 > > hope it helps > > fernand > > > I'm using a VisibleArea property to convert external points in screen > > coordinates to OpenOffice document ones when I create shapes in an OOo > > app. It works in all OpenOffice applications but Writer. > > > > Does it exist in it? If not, what can I do to accomplish my task?
@ Fernand: I guess Serguei is talking about a different subject, it may be one of VisibleArea - property in service ::com::sun::star::presentation::SlidesView VisibleArea - property in service ::com::sun::star::presentation::OutlineView VisibleArea - property in service ::com::sun::star::drawing::.GenericDrawingDocument VisibleArea - property in service ::com::sun::star::presentation::PresentationView VisibleArea - property in service ::com::sun::star::presentation::PreviewView VisibleArea - property in service ::com::sun::star::drawing::DrawingDocumentDrawView @Serguei: as you can see from the module names, this is something specific for drawing/presentation documents. Inserting shapes in Writer is better done not by adding them to the one and only DrawPage but inserting them as css.text.XTextContent. Here the position is relative to the "insertion point" (the XTextRange where you insert the shape via insertTextContent(css.text.XTextRange WHERE, css.text.XTextContent WHAT, boolean HOW) ). So, for position the shape, you must take into account different things, like the anchor type, the page margins, the paragraph style border distance, ... See http://api.openoffice.org/servlets/ReadMsg?list=dev&msgNo=21038 where only page margins are taken into account. Besides, if you want something like getting the screen coordinates and insert then the shape according to them in the text document (something like insertion in drag&drop ), AFAIK there is no API for that. Regards -- Ariel Constenla-Haile La Plata, Argentina --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
