Ask Your Question
0

each paragraph to its own string marker(name) [closed]

asked 2014-06-14 17:46:24 +0100

altair gravatar image

updated 2014-06-15 13:40:15 +0100

Hello! I have this code, which writes out in msgbox all the paragraphs in the text we put in writer, one after another:

Sub k 

     oParEnum = ThisComponent.getText.createEnumeration 
     Do While oParEnum.hasMoreElements() 

            oPar = oParEnum.nextElement()  
            print oPar.getString

Loop 
End Sub

Please, I am trying to put each paragraph into ints own line
SO THAT I PUT AECH PARTICULAR PARAGRAPH TO A PARTICULARY NAMED STRING.

It means, if text in writer had 3 paragraphs,
I would put first paragraph to string a1
second paragraph to string a2
and third paragraph to string a3

I am trying hardy to understand the syntax, cause I am meeting this for the first time and that is the first example of this I ever did.
Please, if anyone can help with any advice, I would appreciate!

Many thanks!!!

global x as integer
global a(x) as string

Sub k 
   x=0


   oParEnum = ThisComponent.getText.createEnumeration 
   Do While oParEnum.hasMoreElements() 

       oPar = oParEnum.nextElement()  
       x=x+1
       a(x)=oPar
       print oPar.getString

    Loop 
End Sub

Sub k2
    msgbox(a3)
End Sub
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by manj_k
close date 2014-08-03 20:21:15.247865

Comments

Could you possibly give an example of what you want to do in which LibO application?

ROSt52 gravatar imageROSt52 ( 2014-06-15 03:23:13 +0100 )edit

1 Answer

Sort by » oldest newest most voted
-1

answered 2014-06-16 10:56:18 +0100

altair gravatar image

updated 2014-06-16 10:56:40 +0100

Hello! Want each paragraph to put to another particular string, which I can use later for other things.

edit flag offensive delete link more

Comments

Solved!!!!

altair gravatar imagealtair ( 2014-06-16 18:50:01 +0100 )edit

This is not an answer. Please edit your question with additional information or use comments to respond to comments. Also, if you managed to solve your question, please answer it so that others can learn too.

bencomp gravatar imagebencomp ( 2014-06-23 20:13:40 +0100 )edit

Question Tools

1 follower

Stats

Asked: 2014-06-14 17:46:24 +0100

Seen: 53 times

Last updated: Jun 16 '14