[Libreoffice-bugs] [Bug 58744] EDITING: Cannot search with paragraph breaks or replace with line breaks; inconsistencies in search expressions

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu May 21 06:33:57 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=58744

--- Comment #14 from Luke Kendall <luke.kendall at gmail.com> ---
Example Use Case

Just a note to show some of the problems and contortions this causes.  In other
words it's a use case for an author of a book. In my case, using Writer
6.4.2.2.

I wanted to adjust certain paragraphs to have zero indent (i.e. apply my new
ChapterBdy1st paragraph style), as per normal book typesetting conventions. So
this applies as follows within my book to:

A. 1st para of chapter
B. 1st para after an empty line ‘scene break’
C. 1st para after an otherwise-empty solo ‘-’ line indicating a change of scene

Because some ereaders delete blank lines, I use non-breaking spaces to ensure
my 'scene breaks' don't get removed.  The following recipe is what I needed to
achieve the desired results (took about an hour for a 450pp book):

You need to make sure the document is clean: no blank lines at the ends of
chapters (otherwise the following chapter header will be found and accidentally
converted to ChapterBdy1st). Also check there are no other special cases (like
blank lines before quotation indents or poems or lyrics). So a manual scan
first is worthwhile.

B. For the non-breaking space 'empty' lines:

    1. replace all ^<nbsp>$ with an empty line
    2. select whole document from starting chapter to end, but omitting early
empty paragraphs
    3. Find All in Selection of ^$
    4. change paragraph style to ChapterBdy1st
    5. select whole document from starting chapter to end, but omitting early
empty paragraphs
    6. change all ^$ to <nbsp>\n

C. Then do a similar replace of solo ‘-’ lines by empty lines, do the above
substitutions, except the final one would change all ^$ to -\n, then find all
^-$ lines and apply Centered style and even Chapter Body style:

    1. Replace all ^-$ with an empty line
    2. select whole document from starting chapter to end, but omitting early
empty paragraphs
    3. Find All in Selection of ^$
    4. change paragraph style to ChapterBdy1st
    5. select whole document from starting chapter to end, but omitting early
empty paragraphs
    6. change all ^$ to -\n
    7. Find All ^-$
    8. Apply Centered style
    9. Apply Chapter Body style

A. Unfortunately I can’t think of a way to change the 1st para of each chapter
via a single F&R. So the final step was to manually find each Chapter Title one
by one with F&R, and then select the following paragraph and change it to
ChapterBdy1st.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200521/55a3c7a8/attachment.htm>


More information about the Libreoffice-bugs mailing list