Re: [api-dev] Number of line of a paragraph

2005-03-10 Thread Michael Hoennig
Hi Laurent, I retreive a paragraph containing text. Is there a way to know how many lines it represents displayed in the document ? (so, depending on the formats, font, font size aso) I know i can count characters with num = Len(myParagraph.string) but need know that this number is

Re: [api-dev] Number of line of a paragraph

2005-03-10 Thread Michael Hoennig
while thiscomponent.getText.compareRegionEnds(textCursor,viewCursor)0 viewCursor.goDown(1,false) counter = counter +1 I should have read everything before I answered.. (for my excuse, the thread was somehow broken into two parts) Michael

Re: [api-dev] Number of line of a paragraph

2005-03-10 Thread Laurent Godard
Hi Michael, while thiscomponent.getText.compareRegionEnds(textCursor,viewCursor)0 viewCursor.goDown(1,false) counter = counter +1 I should have read everything before I answered.. (for my excuse, the thread was somehow broken into two parts) No problem for me :) Thanks anyway

Re: [api-dev] Number of line of a paragraph

2005-03-07 Thread Stephan Wunderlich
Hi Laurent, using macros (but any language welcomed) I retreive a paragraph containing text. Is there a way to know how many lines it represents displayed in the document ? (so, depending on the formats, font, font size aso) I know i can count characters with num = Len(myParagraph.string) but

Re: [api-dev] Number of line of a paragraph

2005-03-07 Thread Stephan Wunderlich
Hi Laurent, The trick with a view cursor will work I didn't try this as i was searching for Non-view methods No View no lines I'd say :-) The XTextRange doesn't know in how many lines it will be displayed and so can't tell you how many lines it contains. Nevertheless, i'll save the current

Re: [api-dev] Number of line of a paragraph

2005-03-07 Thread Laurent Godard
Hi No View no lines I'd say :-) The XTextRange doesn't know in how many lines it will be displayed and so can't tell you how many lines it contains. humm, not so sure it is an intermediate information between the XTextRange and the effective displayed text Nevertheless, i'll save the current