Bug 153537 - FIELD DIALOG: Add possibility to assign character style to the field
Summary: FIELD DIALOG: Add possibility to assign character style to the field
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.0.3 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks: Fields-Dialog
  Show dependency treegraph
 
Reported: 2023-02-10 21:27 UTC by TorrAB
Modified: 2023-04-11 11:09 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
line with 2 fields (16.09 KB, application/vnd.oasis.opendocument.text)
2023-02-10 21:31 UTC, TorrAB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description TorrAB 2023-02-10 21:27:54 UTC
Description:
A field uses the same character style as the host paragraph —docField.odt, 1st line.
If one wants another style for a particular field, one must change "by hand" —2nd line, where the pNom is italic. But, it should be possible to avoid this directFormatting by assigning this format to all such fields, with EditFields(^f2)>DocInfo>Custom, Format dialog active. (Currently, it isn't.) If no special character format were assigned (as is currently the case), the character style of the host paragraph would apply.

Steps to Reproduce:
1.Open docField.odt
2.
3.

Actual Results:
fields have the same character style as the host paragraph, unless changed by directFormatting.

Expected Results:
A field should have its own, pre-defined, character style


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.5.0.3 (X86_64) / LibreOffice Community
Build ID: c21113d003cd3efa8c53188764377a8272d9d6de
CPU threads: 4; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-CA (en_CA); UI: en-US
Calc: CL threaded
Comment 1 TorrAB 2023-02-10 21:31:24 UTC
Created attachment 185304 [details]
line with 2 fields
Comment 2 Dieter 2023-02-26 18:01:07 UTC
Just to make sure, that I understand you correct: It's already possible to add a character style to a certain field (by choosing a character style from character styles list in sidebar).

Your idea is to assign a certain character style to a field while creating it, correct?
=> NEEDINFO
Comment 3 TorrAB 2023-03-06 00:39:45 UTC
(In reply to Dieter from comment #2)
> It's already possible to
> add a character style to a certain field (by choosing a character style from
> character styles list in sidebar).
** From the EditFields window, the character styles list in sidebar is not available.

> Your idea is to assign a certain character style to a field while creating
> it, correct?
**Yes.
In the EditFields window, the Format column is active only with Modified_Date/Time. It is inactive if Type is text: Custom, Keywords or Modified/Author; if the Format column is inwere active with text fields, each text field could have its own style —font, fontEffect.
Comment 4 QA Administrators 2023-03-06 04:23:37 UTC Comment hidden (obsolete)
Comment 5 Dieter 2023-03-07 20:14:51 UTC
(In reply to TorrAB from comment #3)
> ** From the EditFields window, the character styles list in sidebar is not
> available.

So a character style dropdown list should be part of the fields dialog?
=> NEEDINFO
Comment 6 TorrAB 2023-03-07 23:40:24 UTC
(In reply to Dieter from comment #5)
> 
> So a character style dropdown list should be part of the fields dialog?

**Yes, with a special choice "paragraph style" to specify the same character style as the host paragraph (as is currently the case)
Comment 7 QA Administrators 2023-03-08 03:26:24 UTC Comment hidden (obsolete)
Comment 8 Dieter 2023-03-08 05:55:35 UTC
(In reply to TorrAB from comment #6)
> **Yes, with a special choice "paragraph style" to specify the same character
> style as the host paragraph (as is currently the case)

This is character style "Default"
Comment 9 TorrAB 2023-03-08 15:11:48 UTC
(In reply to Dieter from comment #8)
> (In reply to TorrAB from comment #6)
> > **Yes, with a special choice "paragraph style" to specify the same character
> > style as the host paragraph (as is currently the case)
> 
> This is character style "Default"

**No. I found default_paragraph_font and No_Character_Style, but the host paragraph character style is usually different.
Comment 10 Dieter 2023-03-10 16:38:38 UTC
(In reply to TorrAB from comment #9)
> **No. I found default_paragraph_font and No_Character_Style, but the host
> paragraph character style is usually different.

Sorry, you're right. "No Character Style" is equal to character setting from paragraph style.

So request is clear. Let's ask design team
Comment 11 Heiko Tietze 2023-03-13 15:11:09 UTC
(In reply to TorrAB from comment #0)
> Expected Results:
> A field should have its own, pre-defined, character style

What is your use case that makes such an enhancement necessary? I mean applying the CS after inserting a field sounds okay to me.
Comment 12 TorrAB 2023-04-03 19:28:46 UTC
(In reply to Heiko Tietze from comment #11)
> (In reply to TorrAB from comment #0)
> > Expected Results:
> > A field should have its own, pre-defined, character style
> 
> What is your use case that makes such an enhancement necessary? I mean
> applying the CS after inserting a field sounds okay to me.

Well, I often read the direct formatting was bad practice. With the same predefined character style, a field would have the same consistent look within the document (main text, header, …), and between documents.
Comment 13 QA Administrators 2023-04-04 03:23:30 UTC Comment hidden (obsolete)
Comment 14 Eyal Rozenberg 2023-04-04 18:29:44 UTC
A field is just a piece of content which, instead of being specified explicitly, is specified implicitly/programmatically. Once rendered - there's nothing special about it. So, other than field shading, I fail to see why field-generated content should be styled in any way.

> Well, I often read the direct formatting was bad practice. 

Yes, but - you should not format field-generate content at all - neither with with DF nor with a style.

However - it seems from your example that you may be filling a sort of a form. Or maybe creating a form to be filled by others. If that is the case, please read about Form Controls:

https://help.libreoffice.org/6.2/en-US/text/shared/02/01170000.html?DbPAR=SHARED

and consider adding things like textbox controls to your document.

> field would have the same consistent look within the document (main text, header, …), and between documents.

That should not happen. Or... perhaps what you really want to distinguish field-generated content differently than using the gray field shading?
Comment 15 TorrAB 2023-04-06 15:58:21 UTC
OK, case for this improvement is not strong.
Let's work on serious bugs.
Comment 16 QA Administrators 2023-04-07 03:27:51 UTC Comment hidden (obsolete)