Hi everybody
I am a new member of this community, and as the
principles... I have some problems with the
programming of soffice.
I have to create a index of a sxw document, this index
consist in a list of 2 styles in 2 levels.

Example:

Style1             Pag number
   Style2          Pag number
   Style2          Pag number
   Style2          pag number
Style1             pag number
   Style2          pag number
   Style2          pag number

I have done a function that searches a determinated
style and returns the text that has this style.
I can do 2 searches into the SXW,in this way I get two
indexes:

Style1       pag number
Style1       pag number
Style1       pag number 

and the same for the style2

I thought that if I cross these indexes, I will get
the index that I am looking for.
But the problem comes when I cannot know when a style2
is in a previous style1 or in a next style1.
I have thouhgt too that I do a 2 searches, one for the
style1 and the second for the style2, I will have 2
texts, and I could know if style2 is before or after
style1.
This comparison will be with the absolute position of
the text of each search.

while ( !eof( SXW ) )
  txtstyle1 = get_next_text_style (style1)
  txtstyle2 = get_next_text_style (style2)

If position_of(style2) < position_of(txtstyle1) then
  // style2 is before of style1
else
  // style2 is after style1
end if
wend

How can I get the absolute position of a text in a SXW
?

Sorry for my english.

Thanks.


                
______________________________________________ 
Renovamos el Correo Yahoo! 
Nuevos servicios, m�s seguridad 
http://correo.yahoo.es

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to