Issue 126237 - Creating Style From Numbered Selection Breaks Original Formatting
Summary: Creating Style From Numbered Selection Breaks Original Formatting
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: formatting (show other issues)
Version: 4.1.0
Hardware: All All
: P5 (lowest) Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-13 00:02 UTC by David Rankin
Modified: 2016-04-27 20:53 UTC (History)
3 users (show)

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


Attachments
Response to Special Appearance (13.97 KB, application/vnd.oasis.opendocument.text)
2015-04-13 00:02 UTC, David Rankin
no flags Details
File used for replicating bug, also contains the instructions used to replicate (17.85 KB, application/vnd.oasis.opendocument.text)
2015-09-23 00:00 UTC, Alyssa Marcoux
no flags Details
Overridden indentation values when creating new style (676.42 KB, image/png)
2016-04-16 13:01 UTC, Vladimir
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description David Rankin 2015-04-13 00:02:28 UTC
Created attachment 84646 [details]
Response to Special Appearance

All, When creating a new paragraph style from selection of a numbered paragraph, the style from the paragraph is lost and any first line indent or number spacing is reset to some strange default. This defeats the purpose of creating a style from selection.

When creating a style from selection, the new style should actully take the formating and number style/formatting from the selection. This does not occur.

Instead, attempting to create a style from selection loses the firstline indent spacing, number spacing, and sets the original paragraph, as well as the new style formatting to some default.

This is illustranted in the attached document. Try to create a new selection from the paragraph numbered (1). It will break the existing style and the new style is worthless.

-- side note --

Also, there needs to be an option to copy without grabbing the paragraph number. Even pasting special unformatted text includes the paragraph number -- which is annoying as heck.. It should be configurable. A check box:

 [ ] - copy paragraph number with selection?

Would suffice.
Comment 1 Alyssa Marcoux 2015-09-23 00:00:46 UTC
Created attachment 84948 [details]
File used for replicating bug, also contains the instructions used to replicate

The attached document contains the following content, and is what was used to replicate the error.

Configuration:
OS: Windows 7, 64-bit
Open Office 3.2.1, 4.1.1, and 4.2.0
I consistently replicated the bug described using this text file following the steps I have listed below, using an older version of Open Office, 3.2.1, the one used by the original reporter, 4.1.1, and the latest version, 4.2.0. All exhibit the same behavior.

1. Created new document
2. Created a numbered list of 12 items (this list of replication steps)
3. To the third number in the list I added a line with some writing with long text to reach a new line for experimental purposes
4. Added indentation using Paragraph in Format Menu to step 3, changed First line from -0.25 to +0.5
5. Highlighted the text in line 3
6. Selected Styles and Formatting from Format Menu
7. Clicked the New Style from Selection button in upper right hand corner of Styles and Formatting page
8. Named it Test1 and clicked OK
9. Indentation formatting was removed from the paragraph as noted in error report

	I applied the same formatting across several numbers then highlighted those and repeated steps 6-8(naming it test2) same error occurred across all changed numbers.
	I applied italics and bold formatting to the lines being used for selection and that formatting remained saved in the newly created Style even when the indentation was removed.
Comment 2 Alyssa Marcoux 2015-09-23 00:12:14 UTC
*Used Open Office 4.1.0 not 4.1.1
Comment 3 Vladimir 2016-04-16 13:00:09 UTC
I have successfully replicated the initial bug report (about lost paragraph indentation for numbered and bullet-point list items) by using attached file from the author of the bug. The formatting settings for numbered-list items are still lost after adding new style.

Configuration:

1. OS X 10.11.3 - OO Version 4.1.2 AOO412m3(Build:9782) and 4.1.1 AOO411m6(Build:9775)  -  Rev. 1617669
2. Windows 10 - OOVersion 4.2.0 AOO42m1(Build:9800) - Rev. 1692551.


I've also performed some follow-up tests concerning several variations from initial test.

Observations:
    - ‘Styles and Formatting’ window becomes unclickable after opening it with already opened ‘Paragraph’ windows for default unformatted paragraph (OSX only);
    - All changed Style’s indentations settings for bullet point/numbered list items are not updated in Paragraph settings for exactly the same paragraph (Format -> Paragraph). Other settings from this tab (Spacing, Line Spacing, register-true) are updated correctly between those two sections, meaning that only Indent formatting settings are inconsistent between different sections of OO Writer;
    - Indentation paragraph settings are not updated in the document and in the Paragraph section after both creating/modifying or updating to the newly created style;
    - All follow-up tests (except the first one) produced similar behaviour on both Windows and OSX platforms;
    - The behaviour of indentation settings being reset to weird default values after adding new style doesn’t happen in Microsoft Word, meaning that behaviour is inconsistent between competing products.

Listing some additional tests that I've performed (both on OS X and Windows):

I. Test checking whether changing indentation settings is reset to default values when  either creating or modifying new style along with checking consistency between same settings in ‘Paragraph’ and ‘Paragraph Style’ windows.

        1) Open initially attached document (‘Response_Special-Appearance.odt’);
	2) Scroll down to ‘Facts&Background’ section;
	3) Place cursor on any numbered paragraph (in my case, on ‘(2)’ one);
	4) Select Format -> Paragraph;
	5) Change some values of Indent section (e.g. ‘Before text, After text, First  line’). Remember those settings (write them down or make a screenshot);
	6) Click OK button;
	7) Select Format -> Styles and Formatting;
	8) In the upper right corner of the opened window select New Style from Selection option;
	9) Input style name (e.g. ‘test’) and click ok;
	10) Notice that indentation of selected paragraph has been lost;
	11) Repeat step 4;
	12) Observe that values in the Indent section were reset to some weird default ones;
	13) In ‘Styles and Formatting window’ right click on recently added test and select ‘Modify’;
	14) Compare values in ‘Paragraph Style’ window with values in ‘Paragraph’ window;

Actual result: 
Values for the same paragraph are different (it seems that the valid value was overridden after creating new style), which brings inconsistency within product. Interesting that changed values in ‘Paragraph Style’ window were correctly passed to the new style (they are displayed correctly), but the value for ‘Paragraph’ window has been reset to weird ‘default’ values. See attached screenshot for clarity. 


II. Test checking whether other settings of ‘Paragraph’ window are reset after creating new style.

        1) Open initially attached document (‘Response_Special-Appearance.odt’);
	2) Scroll down to ‘Facts&Background’ section;
	3) Place cursor on any numbered paragraph (in my case, on ‘(2)’ one);
	4) Select Format -> Paragraph;
	5) Change some values of any section within any section of Paragraph window, other than ‘Indent’  (e.g. ‘Spacing, Alignment, etc)). Remember those settings (write them down or make a screenshot);
	6) Click OK button;
	7) Select Format -> Styles and Formatting;
	8) In the upper right corner of the opened window select New Style from Selection option;
	9) Input style name (e.g. ‘test’) and click ok;
	10) Notice that indentation of selected paragraph has been lost;
	11) Repeat step 4;
	12) Observe values in ‘Paragraph’ window;
	13) Compare values to previously obtained on step 5.

Actual result:
Values for ‘Indent’ section were lost and reset to default value;
Other values (e.g. Spacing and Alignment) were preserved.


III. Test checking whether indentation settings are lost for plain text and for bullet point list items

        1) Create new document in OO Writer;
	2) Add some text to the paragraph;
	3) Click Format -> Paragraph;
	4) Change some values of Indent section (e.g. set ‘First Line’ to 0.5);
	5) Click “OK” button;
	6) Select Format -> Styles and Formatting;
	8) In the upper right corner of the opened window select New Style from Selection option;
	9) Input style name (e.g. ‘test’) and click ok;
	10) Repeat step 3;
	11) Observe values in ‘Paragraph’ window and text formatting;
	12) Notice that values are the same and formatting has not been lost for plain text.
	13) Change text to either bullet pointed or to numbered list;
	14) Repeat steps 3-11.

Actual result:
Indentation formatting is lost for numbered/bullet point items;
 Values for the same paragraph are different between ‘Paragraph’ and ‘Paragraph Style’ window.



IV. Testing an ability to open both ‘Paragraph’ and ‘Paragraph Style’ window on OS X:

        1) Open initially attached document in OSX (‘Response_Special-Appearance.odt’);
	2) Scroll down to ‘Facts&Background’ section;
	3) Place cursor on any numbered paragraph (in my case, on ‘(2)’ one);
	4) Select Format -> Paragraph;
	5) Select Format -> Styles and Formatting;
	6) Click on any button within opened ‘Styles and Formatting’ window.

Actual result: 
‘Styles and Formatting’ window becomes unclickable (buttons are not active) and the window itself could not be closed.


After some follow-up investigations it is clear that initial bug brings several new inconsistencies within the product (for data incorrectly interpreted in different formatting sections of OO) and with competitive product (initial steps don't lead to the failure on Microsoft Word), which may cause lots of user pain, especially when user wants to create new style for frequently used numbered or bullet point lists and loses all his formatting at once.
Comment 4 Vladimir 2016-04-16 13:01:55 UTC
Created attachment 85441 [details]
Overridden indentation values when creating new style
Comment 5 Theodore Matula 2016-04-27 20:52:52 UTC
I performed the same tests as comment #3 in AOO 4.2.0 in windows 10 x64 and got the same results.