Bug 137690 - Cannot apply custom style to body text
Summary: Cannot apply custom style to body text
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-22 21:37 UTC by medmedin2014
Modified: 2023-10-04 13:57 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Cannot apply style to body text (980.51 KB, application/vnd.oasis.opendocument.text)
2020-10-22 21:37 UTC, medmedin2014
Details

Note You need to log in before you can comment on or make changes to this bug.
Description medmedin2014 2020-10-22 21:37:17 UTC
Created attachment 166645 [details]
Cannot apply  style to body text

I created a style for body text with crimson pro font but when I tried to apply it to first paragraph of the file it fails. See attached file.
Comment 1 medmedin2014 2020-10-22 21:37:55 UTC
Version: 7.0.2.2
Build ID: 8349ace3c3162073abd90d81fd06dcfb6b36b994
CPU threads: 2; OS: Linux 5.4; UI render: default; VCL: kf5
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Operating System: Manjaro Linux
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1
Kernel Version: 5.4.72-1-MANJARO
OS Type: 64-bit
Comment 2 medmedin2014 2020-10-22 21:39:23 UTC
The custom body text style is called myBody.
Comment 3 m_a_riosv 2020-10-23 09:50:47 UTC
I have not such font, but looks there is direct format applied, which has precedence, cleaning it with [Ctrl+M] I think shows the style fine.

You can see it with Style inspector on the sidebar.

For me not a bug. Please if you are not agreed reopen it.
Comment 4 medmedin2014 2020-10-23 10:08:29 UTC
(In reply to m.a.riosv from comment #3)
> I have not such font, but looks there is direct format applied, which has
> precedence, cleaning it with [Ctrl+M] I think shows the style fine.
> 
> You can see it with Style inspector on the sidebar.
> 
> For me not a bug. Please if you are not agreed reopen it.

But even if I select the whole paragraph then double on "myBody" style in the style sidebar, that direct formatting is not replaced by "myBody" style.
Or is direct formatting always has priority over the applied style even if the style is recently applied ?
Shouldn't double clicking on any style remove the current applied formatting and force the formatting of the selected style ?
Comment 5 m_a_riosv 2020-10-23 11:11:22 UTC
I think yes direct formatting has always priority, and it needs to be remove.
Comment 6 Xisco Faulí 2020-11-30 12:55:40 UTC
(In reply to m.a.riosv from comment #5)
> I think yes direct formatting has always priority, and it needs to be remove.

Closing as RESOLVED NOTABUG
Comment 7 medmedin2014 2020-11-30 20:40:46 UTC
Why not a bug ? it's annoying bug and direct formatting should not persists when a style is applied.
Comment 8 m_a_riosv 2020-11-30 22:00:05 UTC
There is a simple way to do it. It was explained in comment#4. To have a precedence it's unavoidable. And every one wants the program working in the way they like, that's no possible.

So sure it is not a bug.
Comment 9 medmedin2014 2020-12-01 10:11:17 UTC
For someone who works a lot with styles in Writer, this is the most annoying bug in Writer, much worse than crash. Because how do I know that I applied direct formatting to any part of text ? and what is its range of application inside text ? there is no GUI thing that indicates it, and the worst is that Writer indicates in style combobox that the style is applied while it's the direct formatting that is applied.
Sorry, I'm long term Writer user and I love it, but I'm not convinced that recalling some weird shortcut to remove direct formatting before applying the custom style is the solution.
Comment 10 BogdanB 2023-10-03 19:20:43 UTC
For medmedin2014:
In 7.6 you have 2 options to see direct formatting:
1. Open Sidebar - Styles and check down there "Spotlight".
2. Go to Format - Spotlight Character Direct Formatting.

This way you can see what style is applied and also if there is any direct formatting.

Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 16; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 11 medmedin2014 2023-10-04 09:27:00 UTC
(In reply to BogdanB from comment #10)
> For medmedin2014:
> In 7.6 you have 2 options to see direct formatting:
> 1. Open Sidebar - Styles and check down there "Spotlight".
> 2. Go to Format - Spotlight Character Direct Formatting.
> 
> This way you can see what style is applied and also if there is any direct
> formatting.
> 
> Version: 7.6.2.1 (X86_64) / LibreOffice Community
> Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
> CPU threads: 16; OS: Linux 6.2; UI render: default; VCL: gtk3
> Locale: ro-RO (ro_RO.UTF-8); UI: en-US
> Calc: threaded

I swear this is the most frustrating bug in LO, logically speaking the most recent applied style should replace any previous changes including direct formatting, why is LO making it difficult for us ?
Comment 12 m_a_riosv 2023-10-04 10:36:03 UTC
No, could be frustrating for you, maybe because, you want your way for everyone.
Clean the direct format with [Crtl+M] and it should work as you like.

And no, it is not a bug.
Comment 13 medmedin2014 2023-10-04 12:23:16 UTC
(In reply to m.a.riosv from comment #12)

> Clean the direct format with [Crtl+M] and it should work as you like.

Just to be sure why such broken behavior is treated as normal, why doesn't applying a new style to a paragraph erase the previous direct modifications ?
Comment 14 BogdanB 2023-10-04 12:39:03 UTC
We can debate here for hours. Everybody is working different.
Imagine another case: I have a contract with all paragraph with a paragraph style, but I want to bold some elements of the contract. Now I changed my mind, and I want a total different style. With your proposal, I lose everything. I have to take every word from a previous version of the document, in order to bold, italic them. 

There are different method of working. This is how LibreOffice is working.
Comment 15 medmedin2014 2023-10-04 13:57:48 UTC
(In reply to BogdanB from comment #14)
> Imagine another case: I have a contract with all paragraph with a paragraph
> style, but I want to bold some elements of the contract. Now I changed my
> mind, and I want a total different style. With your proposal, I lose
> everything. I have to take every word from a previous version of the
> document, in order to bold, italic them. 
> 

Prioritizing latest direct formattings should be done only when editing already existing styles, and not when the user applies a new style on top of old direct formattings.