[Solved] AltSearch search and replace list

The Application Programming Interface and the OASIS Open Document Format

[Solved] AltSearch search and replace list

Postby kocj » Mon Aug 27, 2018 5:47 pm

I am trying to rewrite bullet and numbering list with AltSearch. Using the pick properties button I am able to identify the NumberingLevel. It is also possible to rewrite a whole list to an specific Numbering level or to apply a default or custom list setting to a given list. However I am not able to search and select a specific NumberingLevel.

My goal for a bullet list would be to rewrite it to an ordinary paragraph whit the following markers in front of it.
NumberingLevel=0 to *
NumberingLevel=1 to **
NumberingLevel=2 to ***

For a numbered list the same whit the right numbers should apply.

Any help or directions would be appreciated.

kocj
Last edited by kocj on Thu Aug 30, 2018 6:07 pm, edited 1 time in total.
Libreoffice 5.3 and 6.1 on Debian Stretch 9.5
kocj
 
Posts: 13
Joined: Mon Aug 20, 2018 8:19 am

Re: AltSearch search and replace list

Postby Zizi64 » Wed Aug 29, 2018 6:49 am

Please upload your ODF type sample file here.
Tibor Kovacs, Hungary; LO4.4.7, LO6.1.5 on Win7-10 x64Prof.
PortableApps, winPenPack: LO3.3.0-6.2.2; AOO4.1.5
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 7908
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: AltSearch search and replace list

Postby kocj » Wed Aug 29, 2018 6:30 pm

@ Zizi64 Thank you

The only thing I am able to do with AltSearch is like that.

[Find][:::NumberingStyleName=::]
[Replace]*\0\A{NumberingStyleName=}

Witch marks every list, and adds one * in front of it. The bad thing is that hierarchies are getting lost in translation.

Kocj
Attachments
Sample file.odt
(11.15 KiB) Downloaded 35 times
Libreoffice 5.3 and 6.1 on Debian Stretch 9.5
kocj
 
Posts: 13
Joined: Mon Aug 20, 2018 8:19 am

Re: AltSearch search and replace list

Postby Zizi64 » Wed Aug 29, 2018 7:09 pm

Your sample document contains only one applied paragraph style: the default one. Therefore you can not change a specific paragraph style to an another one by the usage og the F&R function. And you can not modify the applied styles, because all of the applied paragraph styles are same - with some manually adjusted properties.

Use different styles for the different levels.
Tibor Kovacs, Hungary; LO4.4.7, LO6.1.5 on Win7-10 x64Prof.
PortableApps, winPenPack: LO3.3.0-6.2.2; AOO4.1.5
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 7908
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: AltSearch search and replace list

Postby kocj » Thu Aug 30, 2018 9:42 am

Ok, that seems to work. Using a different par-style for every level allow me to search and rewrite it as i want.

Still, I probably do not get the whole picture at the moment.
Lets assume that I have created a list style, lets call it Bullet-List that has three levels. Then I created a paragraph styles for each level.

Bullet-List-1
Bullet-List-2
Bullet-List-3

Then in Outline and Numbering link par-style Bullet-List-1 to list-style Bullet-List and assign Outline level 1. For par-style Bullet-List-2 and 3 consecutively Outline level 2 and 3.

If I move an item a from level one to level two the paragraph style is not changing. That brings a lot of work should i once decide to move something around.

I have been trough this tutorial https://wiki.documentfoundation.org/images/8/80/WG4007-WorkingWithStyles.pdf#page=34 that did not give me the needed insight either.

Some how it does not seem to be supposed to be like that. And a bit overkill if just a view lists are needed.

Kocj
Libreoffice 5.3 and 6.1 on Debian Stretch 9.5
kocj
 
Posts: 13
Joined: Mon Aug 20, 2018 8:19 am

Re: AltSearch search and replace list

Postby kocj » Thu Aug 30, 2018 6:07 pm

Found the solution i needed. I had to setup conditional paragraph styles. Now depending on the outline level a different paragraph stile is applied and i am able to mark that style with AltSearch.

https://ask.libreoffice.org/en/question/23214/how-to-set-up-different-styles-for-each-level-of-an-outline/

Thank you for your help.

Kocj
Libreoffice 5.3 and 6.1 on Debian Stretch 9.5
kocj
 
Posts: 13
Joined: Mon Aug 20, 2018 8:19 am


Return to UNO API and ODF

Who is online

Users browsing this forum: No registered users and 1 guest