Bug 147769 - No ability to select all content with a specific style
Summary: No ability to select all content with a specific style
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Styles
  Show dependency treegraph
 
Reported: 2022-03-04 17:57 UTC by Eyal Rozenberg
Modified: 2024-04-22 09:41 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2022-03-04 17:57:51 UTC
Microsoft Word allows one to select all content (or all paragraphs? all text?) with a specific style, or even a specific combination of styles and manual formatting. LO Writer does not seem to offer this capability, even in a limited form. It should. 

It seems this should mostly be a matter of setting up the UI for this, since LO Writer already offers non-contiguous selection and the ability to find paragraphs with a specified style (even though the latter ability is not sufficiently articulated, see issue 141439).
Comment 1 Eyal Rozenberg 2022-03-04 17:59:04 UTC
Naturally I would like to see this for character styles, list styles, table styles and page styles as well, but even just for paragraph styles this would be quite the improvement.
Comment 2 LeroyG 2022-03-04 21:10:00 UTC
What is your LibreOffice version?

Have you tested Find & Replace, Paragraph Styles / Including Styles? (https://help.libreoffice.org/latest/en-US/text/shared/01/02100000.html)
Comment 3 Eyal Rozenberg 2022-03-04 21:30:18 UTC
(In reply to LeroyG from comment #2)
> What is your LibreOffice version?

Well, it doesn't matter, since it's not been implemented recently, but -

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: fb9270b238cba4f36e595c5d7f4d85f6f3f18e1c
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: en-IL (en_IL); UI: en-US

> Have you tested Find & Replace, Paragraph Styles / Including Styles?

I specifically mentioned this ability as something which would facilitate implementing the feature I asked for. But it is certainly no replacement for it.
Comment 4 Heiko Tietze 2022-03-07 12:22:57 UTC
Why do you need to select all occurrences with a particular style? If you plan to change it the supposed workflow is via find & replace. If it's about feedback I'd make this a duplicate of bug 38194.
Comment 5 Eyal Rozenberg 2022-03-07 14:19:08 UTC
(In reply to Heiko Tietze from comment #4)
> Why do you need to select all occurrences with a particular style?

Because... 
1. MS Word lets me do that!
2. I want to copy or cut that content and paste it elsewhere
3. I want to type over it. That will place the new content instead of the last stretch of selected content and delete all the rest.
4. I want to browse the document and have the content with that style highlighted.
5. I want to change its style to something else.
6. I want to create a new style based on that content.

> If it's about feedback I'd make this a duplicate of bug 38194.

That is a bit like option 4, except this will be only for a single style. So if I only asked for (4.), you might have argued that my motivation was not strong enough
Comment 6 Heiko Tietze 2022-03-07 15:15:53 UTC
(In reply to Eyal Rozenberg from comment #5)
> 1. MS Word lets me do that!
Worst argument possible :-)
> 2. I want to copy or cut that content and paste it elsewhere
From different passages spread across the whole document? What exactly is the use case?
> 3. I want to type over it. That will place the new content instead of the
> last stretch of selected content and delete all the rest.
Likely not. You select multiple paragraphs/headings/etc.
> 4. I want to browse the document and have the content with that style
> highlighted.
This makes sense.
> 5. I want to change its style to something else.
Find and Replace
> 6. I want to create a new style based on that content.
Doesn't require to select all occurences.
Comment 7 Eyal Rozenberg 2022-03-07 19:15:03 UTC
(In reply to Heiko Tietze from comment #6)
> > 2. I want to copy or cut that content and paste it elsewhere
> From different passages spread across the whole document? 

Nobody said it's across the whole document. Maybe they're spread across some section of the document. Or even - different cells of a large table all on the same page.

> What exactly is the use case?

I want the raw text in a text editor. Or - I want to consolidate that content and restyle it together.

> > 3. I want to type over it. That will place the new content instead of the
> > last stretch of selected content and delete all the rest.
> Likely not. You select multiple paragraphs/headings/etc.

Actually Yes. That's what typing does.

> > 4. I want to browse the document and have the content with that style
> > highlighted.
> This makes sense.


> > 5. I want to change its style to something else.
> Find and Replace

Yeah, you're right on this one.

> > 6. I want to create a new style based on that content.
> Doesn't require to select all occurences.

I meant, create and apply at once. You could tell me I should create, then find-and-replace. But that's less convenient.
Comment 8 QA Administrators 2022-03-08 03:45:40 UTC Comment hidden (obsolete)
Comment 9 jan d 2022-03-08 21:38:42 UTC
This request makes sense to me. 

> 5. I want to change its style to something else.

While we suggest using "search and replace" to change, this function is not particularly intuitive[1]. Selecting and changing with the usual commandsthat just affect what is selected builds upon existing knowledge instead.  

>>  1. MS Word lets me do that!
> Worst argument possible :-)

Most people will have used Word before, so they might be familiar with its functions[2]. And I guess MS has more resources than we do for usability tests and getting design ideas implementated, so I would not say that "it’s in MS word" is a bad take (except for our pride).


[1] Search/Replace: For example, Search/replace for styles does require understanding the barely signaled modes of the format selection-dialog.
[2] https://www.asktog.com/papers/raskinintuit.html
Comment 10 Heiko Tietze 2022-03-11 07:57:09 UTC
We discussed this topic in the design meeting. 

First of all, LibreOffice is not a Microsoft clone. We have different users and many "inventions" by MS are driven by marketing. Some classic workflows are just better.

The supposed workflow is using Find & Replace, which is inconvenient/unfamiliar for some. However, to select paragraphs in order to modify the formatting is also really not straight-forward and dangerous since the selection could be overwritten (and this is not a use case).

So the recommendation is to not implement a function to select multiple paragraphs by their style. However, I'd like to get more input, adding some experts on this matter.
Comment 11 Eyal Rozenberg 2022-03-21 21:31:53 UTC
(In reply to Heiko Tietze from comment #10)
> We discussed this topic in the design meeting. 
> 
> First of all, LibreOffice is not a Microsoft clone. We have different users
> and many "inventions" by MS are driven by marketing.

That's true. However, selecting all items with a given style is not a "sexy feature", and it is inconceivable that it was thought up by marketing. So that's a straw man.

> Some classic workflows are just better.

You're sort of contradicting yourself. Selecting all content with a given style _is_ a classic workflow. It has existed for... at least 25 years and probably earlier in Microsoft Word. And I would not be surprised if other apps with content in different styles or categories have allowed selecting all items from the same category. If you're thinking about text editors - those operate under the basic conception of "all text being equal" - a text file has text, not inherently structured data.

> The supposed workflow is using Find & Replace, which is
> inconvenient/unfamiliar for some.

That is a workflow only for some of what one might wish to do, as we have already established.

> However, to select paragraphs in order to
> modify the formatting is also really not straight-forward

On the contrary, it is very straightforward. You see some combination of formattings in the Styles side bar, you select all of that content (e.g. via a right-click on the styles side bar entry), and you change it: You create a new style with it, you apply some manual but uniform formatting to it etc.

This is straightforward and convenient in that you don't have to switch focus to another dialog, nor use any special UI.


> and dangerous
> since the selection could be overwritten (and this is not a use case).

Come on, that's not a serious argument, and you know it. Is Ctrl+A dangerous since it selects all of the text and lets you overwrite it? Or even holding down Shift and pressing Ctrl+End? Obviously not. We have Undo in case one accidentally deletes something.


> So the recommendation is to not implement a function to select multiple
> paragraphs by their style. However, I'd like to get more input, adding some
> experts on this matter.

I'm not sure I can help with that...
Comment 12 Dieter 2023-12-02 21:29:53 UTC
Cor, Mikros, Stuart, I think you're the experts Heiko mentioned in comment 10. So any inputs from you?
Comment 13 V Stuart Foote 2023-12-03 00:50:19 UTC
(In reply to Dieter from comment #12)
> Cor, Mikros, Stuart, I think you're the experts Heiko mentioned in comment
> 10. So any inputs from you?

I think in general, the Find & Replace dialog is sufficient. But as noted it only supports PS.

However, we now have a visual representation in the Style Indicator "Spotlight" (the SB Styles Deck) as for bug 38194 and enabling that shows current limitation with just PS support in Find & Replace dialog. And where Character Style is exposed in the Spotlight UI but we have no means to Find/Find All for CS.  

So, could extend Find & Replace to include CS handling to start

But seems like some visual representation of Find/Select or Find All/Select All could be handled via the SB Styles Deck content panels--implement context menu & shortcuts for find and select of PS and CS from the SB.  

And possibly handle the other style types as well.
Comment 14 Eyal Rozenberg 2023-12-03 15:18:41 UTC
So, first of all, I have to walk back some 

(In reply to V Stuart Foote from comment #13)
> I think in general, the Find & Replace dialog is sufficient. But as noted it
> only supports PS.

I don't think the F&R dialog is sufficient UI for this, but - if it were made capable of searching for a named CS, that would be a significant improvement. And would technically resolve this bug.

> However, we now have a visual representation in the Style Indicator
> "Spotlight" (the SB Styles Deck) as for bug 38194 and enabling that shows
> current limitation with just PS support in Find & Replace dialog. And where
> Character Style is exposed in the Spotlight UI but we have no means to
> Find/Find All for CS.  
>
> So, could extend Find & Replace to include CS handling to start

Ok, that is ask #1 for this bug.

> But seems like some visual representation of Find/Select or Find All/Select
> All could be handled via the SB Styles Deck content panels--implement
> context menu & shortcuts for find and select of PS and CS from the SB.  

Yes, a-la-MS Word. This is ask #2.

> And possibly handle the other style types as well.

Agreed that that would be useful as well. If it's not too difficult to support selecting all content of a specific list style, or page style etc. - I'm all for it, but if it's difficult, let's start with #1 and #2.

Also - if you believe I should split #1 and  #2 into separate bugs - I could do that too.