Bug 139272 - Clear formatting in table causes switch from Table Content style to Default formatting
Summary: Clear formatting in table causes switch from Table Content style to Default f...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-28 10:04 UTC by Telesto
Modified: 2020-12-31 05:13 UTC (History)
4 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 Telesto 2020-12-28 10:04:19 UTC
Description:
Clear formatting in table causes switch from Table of contents formatting to Default formatting

Steps to Reproduce:
1. Open Writer
2. Insert a table (with drop down picker or insert table, default style)
3. Clear direct formatting

Actual Results:
Table content becomes default formatting

Expected Results:
Table of content formatting


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.0.0.alpha0+ (x64)
Build ID: 315c7570c4a72f4c834086082825533b1e50d1bf
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2020-12-28 10:05:11 UTC
I'm assume I'm right, but to be sure
Comment 2 S.Zosgornik 2020-12-30 00:37:38 UTC
Still worked in LO 7.0.3
Comment 3 Telesto 2020-12-30 07:31:48 UTC
STR wrong
1. Open Writer
2. Insert a table (with drop down picker or insert table, default style)
3. Clear formatting: dropdown paragraph formatting in toolbar
Comment 4 Daveo 2020-12-30 10:11:19 UTC
This has been by design since OpenOffice.org 1.0.

The content of a table cell in Writer is made up of one or more paragraphs. When a user chooses to clear the style formatting of one or more paragraphs, those paragraphs are switched to the root (Default) paragraph style formatting. This applies to _ALL_ paragraph styles in Writer.

NOT A BUG.
Comment 5 Telesto 2020-12-30 12:34:08 UTC
(In reply to Dave Barton from comment #4)
> This has been by design since OpenOffice.org 1.0.
> 
> The content of a table cell in Writer is made up of one or more paragraphs.
> When a user chooses to clear the style formatting of one or more paragraphs,
> those paragraphs are switched to the root (Default) paragraph style
> formatting. This applies to _ALL_ paragraph styles in Writer.
> 
> NOT A BUG.

Kind of objecting. Workflow example: Enter some text in table cells.. Select the text  and apply a different paragraph style..
Now I want to 'revert' to initial/default state (similar to Clear Direct formatting).


And it's also untrue that the behaviour being consistent over the years. 4.4.7.2 switched to textbody previously And being this way ever since.. doesn't automatically mean it's great, IMHO. It was more problematic with the 'old' behaviour because tables expanded. This is not the case anymore. 

And the principle of tables having a own PS style, likely done with a reason, else it could/would be Default Paragraph Style anyhow, I think

So I kind of assuming 'Clear Formatting' should revert to Default Table Contents PS, instead of reverting to Default PS. The Default PS feels to me as an omission. As Tables having different style (not default PS) being exceptional and missed at implementation.

Notes of discussion about this in the OoO days or even StarOffice days are welcome of course. If this more an accident or intended
Comment 6 Daveo 2020-12-30 13:32:28 UTC
It needs no UX evaluation, because it was evaluated and changed in bug 70759.
Comment 7 Telesto 2020-12-30 18:28:57 UTC
(In reply to Dave Barton from comment #6)
> It needs no UX evaluation, because it was evaluated and changed in bug 70759.

Thanks for the pointer. It doesn't address the tables specifically :-(

Bug 70759 comment 28: V Stuart Foote
"Correct action should be to apply Default Style to restore paragraph to match default format when creating paragraphs as from standard template. "

I could replace "creating paragraphs" with "creating tables". Which in my reading would result in 'revert to table content style'.

However prefer asking the author himself.

@Stuart
What is clear formatting supposed to do inside a table in your opinion.

Revert from Table Content (Paragraph) Style (the default at table insertion) or any other applied style "default paragraph style" or back to "Table of Content Style"
Comment 8 V Stuart Foote 2020-12-30 18:54:38 UTC
Hey, I can not confirm STR of OP.

An inserted table with 'Standard' template receives 'Table Contents' paragraph style assignments.

Selecting the entire table, and clearing Direct Formatting does not clear the 'Table Contents' styles from the Table cells.

Otherwise in response to comment 7, if the Table's cells are styled--Clear Direct Formatting should do nothing.

If they had been directly formatted--then I would expect they would revert to the 'Table Contents' of the 'standard' template. That seems to happen.
Comment 9 Daveo 2020-12-30 19:40:08 UTC
(In reply to V Stuart Foote from comment #8)

This is not about clearing "Direct Manual Formatting eg. Ctrl+M", it is about "Clear Formatting" of styles for one or more selected paragraphs, using the paragraph styles drop down list in the formatting toolbar. See point 3 of comment 3.

The point being that a paragraph within a cell is exactly the same as a paragraph in any other element of of a Writer document.

What is being asked for is to change a function of the software that has existed (with a minor refinement bug 70759) for over 20 years.
Comment 10 V Stuart Foote 2020-12-30 20:58:57 UTC
(In reply to Dave Barton from comment #9)
> (In reply to V Stuart Foote from comment #8)
> 
> This is not about clearing "Direct Manual Formatting eg. Ctrl+M", it is
> about "Clear Formatting" of styles for one or more selected paragraphs,
> using the paragraph styles drop down list in the formatting toolbar. See
> point 3 of comment 3.
> 
> The point being that a paragraph within a cell is exactly the same as a
> paragraph in any other element of of a Writer document.
> 
> What is being asked for is to change a function of the software that has
> existed (with a minor refinement bug 70759) for over 20 years.

Oh, sorry. From the 'Set Paragraph Style' listbox, we are not 'Clear Formatting' we are actually applying a default paragraph style.

In that case, taking each of the Paragraph objects held in cells back to 'Default paragraph style' is reasonable as it is the only way to assure consistency--and effectively apply a new style. As described resolving the see also bug 70759.

It would be much harder to reliably parse the current source template and divine what default style should be applied.

Use case here to get back to 'Table Contents', would be no different than what was fixed for bug 70759 where 'Text body' was being applied.

So for consistent results, work flows should include a "clear" that reverts to 'Default Paragraph style', and a second style action to apply the final style to selected paragraphs. 

Agree with the NAB and no change.
Comment 11 S.Zosgornik 2020-12-30 22:34:43 UTC
Just out of curiosity:
Why does LibO not use default paragraph style inside table cells on creation time?
Comment 12 V Stuart Foote 2020-12-30 23:05:21 UTC
(In reply to Sascha Z from comment #11)
> Just out of curiosity:
> Why does LibO not use default paragraph style inside table cells on creation
> time?

It comes from what is defined in the 'standard' template, and there is actually some thought (bug 47295) to rework the templates so very little would end up with 'Default' PS. Which of course would require additional dev effort to better manage style defaults for fall back when styles by object type are 'cleared'.

Styled 'Table contents' are necessary bcz we now also have Table styles.