Issue 124995 - Styles not completely formatting
Summary: Styles not completely formatting
Status: UNCONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: formatting (show other issues)
Version: 4.1.0
Hardware: PC Windows 7
: P3 Minor (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-27 20:25 UTC by Joe Rohner
Modified: 2018-08-03 15:42 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Tests completed using version 4.0.1 (13.17 KB, application/vnd.oasis.opendocument.text)
2014-06-07 15:08 UTC, EMcGraw
no flags Details
Tests completed using 4.1.0 (17.86 KB, application/vnd.oasis.opendocument.text)
2014-06-07 15:08 UTC, EMcGraw
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Joe Rohner 2014-05-27 20:25:40 UTC
When I apply a style not all style attributes are applied.  I had Heading 1 defined as Arial, 14 pt.,Bold, Small Capitals and Centered.

When I go to the style drop down and apply Heading 1, the text is centered but none of the font related attributes were applied.

I have tried re-starting my PC, re-starting OpenOffice, and clearing the existing formatting on the line in question.  Nothing seems to correct the problem
Comment 1 EMcGraw 2014-06-07 15:08:19 UTC
Created attachment 83515 [details]
Tests completed using version 4.0.1
Comment 2 EMcGraw 2014-06-07 15:08:53 UTC
Created attachment 83516 [details]
Tests completed using 4.1.0
Comment 3 EMcGraw 2014-06-07 15:17:21 UTC
A series of tests were completed on two different HP machines and both machines were running Windows 7. The HP HDX16 machine ran tests utilizing OpenOffice version 4.1.0 and the EliteBook 8440p was used to complete tests using OpenOffice version 4.0.1. 

The following steps were used to add and save the text attributes to a style (Header) in both versions:

	0) Select the Format -> Styles and Formatting menu options (or F11)
	1) Selected the style to be modified 
	2) Right click and select Modify 
	3) Select the applicable tab and the attributes to be modified under those tabs
	4) Click OK button
	
Each time I followed the above noted steps, I was unable to reproduce this bug.

To apply the reported text attributes not working, the following selections were made:	
	0) Alignments tab: selected Center 
	1) Font tab: confirmed Arial, Bold and 14 pt were selected
	2) Font Effects tab: selected Small capitals from the Effects drop-down

I was able to recreate not saving the text attributes when the window was closed via the X in the top right corner. It should be noted, I had not clicked the OK button but rather closed the window.  

Attached are two documents created denoting test sentences in versions 4.0.1 and 4.1.0. They include:
	• The reported Header with selected text attributes
	• Additional modified and applied styles
	• A modified sentence after saving, closing and reopening the document
	• Sentences written where the style was applied prior to writing 
	• Sentences written where the style was applied after written

Please let me know if there were different steps you took, or maybe some additional settings on your computer, we may wish to look at to recreate this bug.
Comment 4 Walt 2018-07-25 01:20:46 UTC
I'm having a similar problem using OO 4.1.5 in Windows 10.

When I change to a different paragraph style, it sometimes (not always) fails to change to the correct typeface (Bold, Italic, or Bold Italic).
Comment 5 Peter 2018-07-25 06:14:09 UTC
Can you please try to research some more steps to provoke this behaviour? Do you follow the steps mentioned in the previous comment?

Thanks.
Comment 6 Walt 2018-07-26 10:56:46 UTC
(In reply to Peter from comment #5)
> Can you please try to research some more steps to provoke this behaviour? Do
> you follow the steps mentioned in the previous comment?
> 
> Thanks.


In a document, I'm using the following two default paragraph styles:

1) Default -- Font: Times New Roman, Typeface: Regular, Size 12 pt

2) Heading 2 -- modified to Font: Times New Roman, Typeface: Bold Italic, Size 12 pt.

Just now I did the following:

With the cursor at the end of a "Default"-style paragraph, I hit Enter.  The cursor dropped to the next line and indented per the Default style.
In the Styles and Formatting (F11) box, I double-clicked on paragraph style "Heading 2."  The cursor moved to the appropriate position, the Formatting toolbar showed Bold active, but Italic inactive.  When I started typing, I got the correct font, the correct font size, with Bold, but not Italic.  I clicked on the Italic icon and that had me typing in Bold Italic.  I finished typing the heading, hit Enter, and I was back in the Default paragraph style, except Italic was still active.  (Note that the correct typeface for Default is Regular, as I showed above.)

To summarize, it appears everything changed properly for the new paragraph style Heading 2, except Italic.  Everything changed back to Default properly, except Italic.  It appears to me that the problem is in the area of changing the Typeface from Regular to Bold Italic.  Presumably "Bold Italic" is supposed to be a single typeface, not two separate typefaces that are set in tandem.  Maybe certain fonts have a separate "Bold Italic" set, but Times New Roman doesn't.

Occasionally, this problem does not occur -- it works properly.  But right now, I can get it to goof reliably every time.
Comment 7 Walt 2018-08-03 15:42:00 UTC
(In reply to Peter from comment #5)
> Can you please try to research some more steps to provoke this behaviour? Do
> you follow the steps mentioned in the previous comment?
> 
> Thanks.

I discovered the cause of the problem: Changing the paragraph style doesn't override existing direct formatting.  So, if I set direct formatting to <No Italic> in a paragraph, then start typing a new paragraph after it, the new paragraph will inherit that <No Italic> direct formatting, even if I change its paragraph style to one that specifies Typeface: Bold Italic.

I'm transcribing a handwritten document by keeping my eyes on the handwriting, and typing without looking at the keyboard or screen.  When I encounter a word or phrase that's italicized, I type Ctrl+I, then the word or phrase, then Ctrl+I again.  Without realizing it, I've set direct formatting to <No Italic> for all subsequent text.  Changing to a different paragraph style whose default typeface is Italic or Bold Italic will not override the direct formatting previously set; it won't switch italics on.

That's also true for Bold, and probably true for other direct formatting attributes that I didn't test.

Proposed solution: When switching to a new paragraph style, any formatting explicitly set for the new style, such as Typeface, should override inherited direct formatting.  I think most users would prefer that.  For those that don't, there could also be a check box somewhere in the paragraph style dialog for "keep all prior direct formatting."

Workaraound:  At the end of the italicized word or phrase, instead of pressing Ctrl+I (or clicking on the Italics icon in the toolbar), press Ctrl+M to restore the default formatting for that paragraph.  The Help for Resetting Font Attributes suggests pressing the right arrow key after the italicized word or phrase, but on my system that has no effect.  Ctrl+M does the job.