Ask Your Question
0

get the current paragraph in basic (solved) [closed]

asked 2017-03-29 22:37:07 +0100

Pansmanser gravatar image

updated 2017-05-09 11:17:08 +0100

Creating a writer document in basic, I output a line at a time with insertString, or take a new paragraph with an append_paragraph character.

When I want to take a new page, I have to set the pageDescName for the current paragraph.

How do I get hold of the current paragraph? All the examples I see find the last paragraph by enumeration and working through all the paragraphs. This is cumbersome when I know that my cursor is already located in the last paragraph. Is there a cursor.paragraph property, or textrange.paragraph property or something like that?

Probably obvious, but I've missed it. Help appreciated.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-10-03 16:21:28.364490

1 Answer

Sort by » oldest newest most voted
1

answered 2017-03-30 01:26:40 +0100

librebel gravatar image

Hello Pansmanser, you might need to get the ViewCursor:

oViewCursor = ThisComponent.CurrentController.getViewCursor()

i think it has the pageDescName property

edit flag offensive delete link more

Comments

Thank you librebel, that appears to work fine. In fact the text cursor also seems to have the pageStyleName property and accepts the pageDescName property

Pansmanser gravatar imagePansmanser ( 2017-03-30 11:43:50 +0100 )edit

Question Tools

1 follower

Stats

Asked: 2017-03-29 22:37:07 +0100

Seen: 473 times

Last updated: May 09 '17