Assigning text to another style for all occurrences in document at once

I can’t find a way to change automatically all occurrences of texts assigned to a specific style to another specific style at once for the whole document. It is needed when the global size of letters must be downsized for example, while the document is already quite long.

If not already possible, wouldn’t it be an interesting new feature to add to Writer ?

Right-click the paragraph style in the Sidebar/Styles/Paragraph styles and choose Modify.
In the dialog, go to the “Font” tab and change the font size. Click OK.


Possibly, this can also help further:

Professional text composition with Writer

1 Like

If that’s a paragraph style, you might use Find & Replace dialog to search for styles, Find All, and then apply another style to the multiple selection.

3 Likes

@Hrbrgr I don’t want to modify a style, I want to apply another style to the text assigned to a specific style.

@mikekaganski Helpful, that is a good solution, I didn’t know this Find & Replace feature could be applied to styles…

You should have described your intent. Promoting or demoting heading levels is very easy to do.

  • Display the Navigator in the side pane (click of compass icon or F5 if not already visible).
  • Expand the Headings section
  • Click on one of the headings to highlight it
  • Use arrows < & > to respectively decrease or increase heading level. When doing so, all sub-chapters are also simultaneously shifted to keep the relative nesting with regard to the heading you promoted or demoted.

This automatically reassigns the correct Heading n.

General advice to readers and new users: don’t ask for a fix on a procedure you designed to solve your problem; you may have gone in the wrong direction. It is much much better to describe what you want to achieve in author point of view and words instead of trying to explain your technical process (and often with inappropriate or ambiguous terms). Many of use have already faced these issues and we have a very large experience on Writer and what can be done, even in very complex situations.

@ajlittoz Ok that is an interesting feature too, I didn’t know about either, thanks.
Could have used it to demote the “heading 1” in order to get “heading 2” sub-chapters demoted as a result, which was my real aim at first, and lastly reassigning the first heading to its “heading 1” initial status, which I didn’t intend to shift at all.
To me the Find & Replace procedure remains the most effective for my specific use case, but they might be complementary depending on the context, since we may not want to keep the relative nesting but on the contrary shift some blocks to increased or decreased levels independently from the levels of other elements.

To promote/demote only the highlighted heading, press Ctrl before clicking on the arrows. This disconnects the heading from the nested sub-chapters.

Simply modify the style, as @Hrbrgr suggested. The whole point of using styles is that you don’t have to select all text formatted with that style to change the formatting. You just modify the formatting details in the style, and the text reformats automatically. You only have to remember that if you apply formatting using the toolbar or key bindings, the direct formatting will override the style. So, make any changes to your formatting in the style, and you won get any problems.

2 Likes

@floris_v yes but I don’t want to change the formatting of this specifc style, since I may want to keep it for another purpose. I just want to reassign some text to another style, which was previously assigned to these text occurrences…

@Lei12: you may have a wrong conception about style usage. According to what you say, your styles describe the appearance of your text (font face and size, colour, line spacing, indents, …) which means they may be used for semantically different things.

You should consider style names (paragraph, character, frame, page, list all the like) as a mark up to convey supplementary information (helping you as an author). With this approach, styles denote the “value” or significance of paragraphs or sequences. You assert that such paragraph is plain text (Text Body), such one is a heading (Heading n), such one is a comment (custom style to be created as Comment), such clause is “important”. Words may need an emphasis (Emphasis) or be written in a foreign language (custom style Foreign), or is an acronym (create also a dedicated style to disable spell-checking on it), … Note that I never describe a style as “red” or “bigger”, …

Then your styles have a single semantic usage, meaning that sequences so styled should always be presented the same way. Usages don’t overlap. Then you can safely modify/update any style to get the expected layout. And you can dramatically change the look of your document without reassigning style names because you are semantically consistent.

A tip: styles can be organised hierarchically where attributes not explicitly overridden are inherited from the ancestor. And when font size is at stake, you can specify it in %-units. You only change the font size in the “master style” (the ancestor of the hierarchy) and all dependent styles are automatically adjusted to follow the percentage constraint. A single parameter to change and the whole document is updated.

1 Like

@ ajlittoz Ok I get your point, and that really makes sense when using a wide variety of styles such as those from your example. In my use case though, using mostly heading styles and a text body, I usually need to insert after a while new levels of headings above the existing, as the text structure evolves and new divisions or grouping of content need to be made to get a clearer hierarchy among different newly constituted sections of the document. In that case, I will want to downgrade “heading 2” level to “heading 3” or 4 in order to make room for a new “heading 2” level better suited to the new headings.
I guess my question targets mainly the reassigning process of heading levels when the initial hierarchic choice does not suit the author’s need anymore, as the levels structure is enriched and complexified…