Issue 126575 - Changing font info in outline causes entire section to change
Summary: Changing font info in outline causes entire section to change
Status: UNCONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: formatting (show other issues)
Version: 4.1.1
Hardware: PC Windows, all
: P5 (lowest) Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-07 15:44 UTC by Mark Manning
Modified: 2017-05-03 17:35 UTC (History)
3 users (show)

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


Attachments
Outlined text (12.89 KB, text/plain)
2015-10-24 11:38 UTC, Gennady Melnik
no flags Details
ebiz document originally worked on in OpenOffice. (40.00 KB, application/msword)
2015-10-25 21:22 UTC, Mark Manning
no flags Details
Screenshot showing unexpected change of outline number font from Times to Courier (80.21 KB, image/png)
2016-10-22 09:48 UTC, Antti-Pekka Tuovinen
no flags Details
Copy of Gennady's file after applying the sequence of steps in Comment #7 (12.96 KB, application/vnd.oasis.opendocument.text)
2016-10-22 09:51 UTC, Antti-Pekka Tuovinen
no flags Details
Pdf export of Gennady's original file after applying the sequence of steps in Comment #7 (41.76 KB, application/pdf)
2016-10-22 09:53 UTC, Antti-Pekka Tuovinen
no flags Details
Font Issue (55.64 KB, application/vnd.oasis.opendocument.text)
2017-05-03 17:29 UTC, Kevin
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Mark Manning 2015-10-07 15:44:19 UTC
I was making a document in outline format.  The body of the outline is in Times Roman.  I wanted to include a line of code in the section I was working on.  When I selected the code and applied Courier New as the font - the entire paragraph changed to Courier New.  When I then selected the rest of the paragraph to set it back to Times Roman - everything turned to Times Roman.  Example of the section:

1.	__construct()
This function is called when the class is instantiated (which is just a big word for created). When you do the following:

$ebiz = new class_ebiz();

I could not get just the $ebiz... part to change to Courier New without everything from the 1. __construct() also changing.  Went back to using Word 2003 to do this.  I really wanted it in Open Office format.  Trying to get away from using Word.  :-)

A bit more information.  The above paragraph is three levels deep in the outline.  I.E.: It would really be 1.1.1. __construct().  Don't know if this is a mitigating factor or not but thought I'd supply it just in case this doesn't happen at the first or second level.
Comment 1 Gennady Melnik 2015-10-24 11:34:54 UTC
I could not reproduce the bug.

System:
1. Windows 7 x64 running on virtual machine
2. Mac OS 10.10.3

Open Office versions:
1. Windows – Open Office 4.2.0 AOO420m1(Build:9800)  -  Rev. 1692551
2. Mac OS -  Open Office 4.1.1 AOO411m6(Build:9775)   - Rev. 1617669


Steps I tried for reproducing:
1. Create new Text Document
2. Add text from the description:

       __construct()
This function is called when the class is instantiated (which is just a big word for created). When you do the following:

$ebiz = new class_ebiz();
3. Format text (if copied with font styles, skip this step if text is copied without formatting) – select all, set “Times New Roman” font, 12 font size
4. Go to the beginning of the text
5. Select Format|Bullets and Numbering...|Outline tab|Numeric
6. Select “$ebiz = new class_ebiz();” in the text
7. Set “Courier New” font

Actual behavior:
Font is changed only for selected text, rest of the text in the outline remains “Times New Roman” font style.

Other scenarios I tried:

- Different levels of outline (up to 10)
- Different outline styles (all 8)
- Different text (including Java code)
- Different Fonts/Fonts sizes

Attached is a file with my output (please note - “$ebiz = new class_ebiz();” font style is “Courier New”, while all other text's font is “Times New Roman” )
Comment 2 Gennady Melnik 2015-10-24 11:38:11 UTC
Created attachment 85066 [details]
Outlined text
Comment 3 Gennady Melnik 2015-10-24 11:38:33 UTC
(In reply to Gennady Melnik from comment #1)
> I could not reproduce the bug.
> 
> System:
> 1. Windows 7 x64 running on virtual machine
> 2. Mac OS 10.10.3
> 
> Open Office versions:
> 1. Windows – Open Office 4.2.0 AOO420m1(Build:9800)  -  Rev. 1692551
> 2. Mac OS -  Open Office 4.1.1 AOO411m6(Build:9775)   - Rev. 1617669
> 
> 
> Steps I tried for reproducing:
> 1. Create new Text Document
> 2. Add text from the description:
> 
>        __construct()
> This function is called when the class is instantiated (which is just a big
> word for created). When you do the following:
> 
> $ebiz = new class_ebiz();
> 3. Format text (if copied with font styles, skip this step if text is copied
> without formatting) – select all, set “Times New Roman” font, 12 font size
> 4. Go to the beginning of the text
> 5. Select Format|Bullets and Numbering...|Outline tab|Numeric
> 6. Select “$ebiz = new class_ebiz();” in the text
> 7. Set “Courier New” font
> 
> Actual behavior:
> Font is changed only for selected text, rest of the text in the outline
> remains “Times New Roman” font style.
> 
> Other scenarios I tried:
> 
> - Different levels of outline (up to 10)
> - Different outline styles (all 8)
> - Different text (including Java code)
> - Different Fonts/Fonts sizes
> 
> Attached is a file with my output (please note - “$ebiz = new class_ebiz();”
> font style is “Courier New”, while all other text's font is “Times New
> Roman” )
Comment 4 Gennady Melnik 2015-10-24 11:40:16 UTC
Mark, could you please attach your file (that contains the described issue)?
Thank you!
Comment 5 Mark Manning 2015-10-25 21:19:44 UTC
Sure.  But it will have to wait until Tuesday.  I work from home on M-W-F.
Comment 6 Mark Manning 2015-10-25 21:22:40 UTC
Created attachment 85078 [details]
ebiz document originally worked on in OpenOffice.
Comment 7 Antti-Pekka Tuovinen 2016-10-22 09:46:21 UTC
OO Writer version info: 
Apache OpenOffice 4.1.2 
AOO412m3(Build:9782)  -  Rev. 1709696
2015-10-21 09:53:29 (Mi, 21 Okt 2015)

OS version info:
Windows 10 Home
Version 1607
64 bit 

I have consistently but only partially reproduced the font change behavior described by Mark but using Gennady's file.

Steps:

1. Open the file in Writer
2. Click the beginning of the outline text "__construct()" on the third line so that you see the cursor at the beginning of the text 
3. Click the "Numbering On/Off" button in the toolbar and see the text move to the left margin
4. Click the "Numbering On/Off" button again
5. You will now see that the text is on the first outline level at (2.) and that the number is in the Courier font which is the same font as in the text on the sixth line (i.e. "$ebiz = ..."), but the size appears to be a couple of points smaller.
6. Hit the Tab key two times and you will see the same view as when opening the document, except that the font of the third level outline number is Courier (the same as in the text on the sixth line) and smaller in size than the other outline numbers

If after step 5, I select by double clicking the number 2, Writer shows all the outline numbers at the same level highlighted on a gray background, and the "Font Name" shown in the toolbar is "Times New Roman" and the "Font Size" is 12. 

I have included a screenshot of the Writer window after the 6. step. I have the "Nonprinting characters" and "Hidden paragraphs" selected in the View menu. I have also tested with "Nonprinting characters" and "Hidden paragraphs" not selected with the same results

However, if I save the file and then close it and reopen it, the font of the number "1.1.1" on the third line is back to Times. But if I repeat the steps described above, the font of the number changes again to Courier.

As an additional test, I exported the document directly to pdf by clicking the corresponding toolbar button, and I noticed that the number is in Courier in the pdf.

I attach the screenshot and the pdf here. I attach also a copy of Gennady's file where I have executed the steps explained above and then saved it. I am not sure if it matters to have the changed file but just in case.   
 
As a final remark, I think that this issue is related to (maybe duplicate of) the confirmed but unfixed (P4 Trivial) Issue 24648 " Numbering: layout can be fooled into using formatting for numbering which is not used in a paragraph".

Because the issue has come up a again and it is causing a user to switch to use another product, I propose to reconsider the priority of Issue 24648 and fix it.
Comment 8 Antti-Pekka Tuovinen 2016-10-22 09:48:44 UTC
Created attachment 85745 [details]
Screenshot showing unexpected change of outline number font from Times to Courier
Comment 9 Antti-Pekka Tuovinen 2016-10-22 09:51:25 UTC
Created attachment 85746 [details]
Copy of Gennady's file after applying the sequence of steps in Comment #7
Comment 10 Antti-Pekka Tuovinen 2016-10-22 09:53:40 UTC
Created attachment 85747 [details]
Pdf export of Gennady's original file after applying the sequence of steps in Comment #7
Comment 11 Kevin 2017-05-03 17:29:32 UTC
Created attachment 86056 [details]
Font Issue
Comment 12 Kevin 2017-05-03 17:35:04 UTC
System: Windows 7

Open Office Version:4.1.1

Steps To Recreate:

1) Open Open Office Writer
2) Start outline with three rows.
3) Indent the third row.
4) Turn off numbering
5) Hit the enter button 5 times.
6) Turn numbering back on and past in text from the document.
7) Issue appears

See attachment