Issue 55018 - enhance character style formatting behaviour
Summary: enhance character style formatting behaviour
Alias: None
Product: Writer
Classification: Application
Component: formatting (show other issues)
Version: OOo 2.0 Beta
Hardware: All All
: P3 Trivial with 1 vote (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2005-09-24 00:48 UTC by erikanderson3
Modified: 2013-02-07 22:35 UTC (History)
1 user (show)

See Also:
Latest Confirmation in: ---
Developer Difficulty: ---

Sample of how character styles can be broken by manual formatting (8.53 KB, application/vnd.sun.xml.writer)
2005-09-24 00:49 UTC, erikanderson3
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description erikanderson3 2005-09-24 00:48:33 UTC
Create a simple character style using underlining, bolding, or other text
effects.  Selecting new text and setting the character style to this new style
should properly change the text.  However, if the same type of manual formatting
(underlining, bolding, etc) has *ever* been used on the selected text (either
added or removed), such attributes in character styles are ever after ignored
for that selection.  Setting either the character or paragraph style back to
Default does not help, nor does closing and re-opening the document.

(Furthermore, setting the character style back to Default does not remove any
manual text color, underlining, bolding, etc, which is unexpected... another
bug?  Setting the character style to Default should do just that, set it to
Default and remove all styling, manual or otherwise...?)

Attaching sample case.  Includes custom character styles MTIndex,
MTIndexUnderlined, and MTIndexUnderlined2.  The first "Created" on line 3 has
had underlining and bold manually set, and now setting the style to either
underlined character styles fails to set any underline, and all three fail to
make the text bold.  

Incidentally, this might be related to what I observed for Issue 55016.
Comment 1 erikanderson3 2005-09-24 00:49:16 UTC
Created attachment 29853 [details]
Sample of how character styles can be broken by manual formatting
Comment 2 michael.ruess 2006-01-11 09:52:22 UTC
Cannor rpeoduce this with OO 2.0.1.
Comment 3 michael.ruess 2006-01-11 09:59:56 UTC
Comment 4 erikanderson3 2006-01-11 16:29:56 UTC
Just tried with a fresh new Writer doc in 2.01, still seeing this behavior but
realized I need to clarify.  

The root issue seems to be that manual formatting overrides styles, but with
non-intuitive behaviour.  Try this:

1. Ceate a character style NoUnderlining, with Font Effects -> Underlining set
to (Without)
2. Manually set underlining for a chunk of text
3. Select that text and set the character style to NoUnderlining
4. Text is still underlined...?

Or the reverse:

1. Create a character style Underlined, with Font Effects -> Underlining set to
2. Select some text and set the character style to Underlined
3. Manually set no underlining for that same chunk of text
4. Character style for that text is shown as Underlined, but it is not
underlined, and setting to Default and back to Underlined still shows no underlining

I've also just discovered some otherwise strange character style behaviour:

1. Select three words within a single line of text, and set the character style
to Underlined
2. Select the whole line, and manually set no underlining -- underlining should
disappear, including from the three words with the character style of Underlined
3. Select one of the character-styled words, and set the character style to
Default -- the selected word will remain non-underlined, as expected, but the
two remaining styled words will suddenly be underlined again ... ?

Please have a look at this again.  Thank you, -- Erik
Comment 5 michael.ruess 2006-03-23 14:40:25 UTC
I now understand. Reopened issue; it is a good enhancement.
Comment 6 michael.ruess 2006-03-23 14:42:44 UTC
As describe, character styles do not always work as expected (they work
logically in a way, but not really user friendly).
In MS Word e.g. there is a tri-state option for those thing, which means the
third state is kind of "do not change" option, so a character style could
override a hard format or not.