Issue 123143 - Updating styles does not properly update the bundled styles
Summary: Updating styles does not properly update the bundled styles
Status: CONFIRMED
Alias: None
Product: Draw
Classification: Application
Component: formatting (show other issues)
Version: 3.4.1
Hardware: PC Windows, all
: P3 Normal with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-29 15:47 UTC by eric.edwards.msb
Modified: 2013-09-04 14:49 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description eric.edwards.msb 2013-08-29 15:47:21 UTC
The style "default" does not update properly when updating styles from a modified template.  Instead of updating to the template's "default" style, it reverts to the "default" style you would see if you were working from the basic template included with Draw.

You can reproduce this error by doing the following:

-First create a drawing and modify the style labeled "default".
-Create at least one object and give it the "default" style.
-Save this drawing as a template, say testdefault.
-Create a new drawing based on that template.
-Save the new drawing, say testdefault1.
-Create a new drawing based on that template (testdefault).
-Modify anything about that drawing.  You do not have to modify any styles for this error to happen.
-Save this drawing over the template (testdefault).
-Open your previously saved drawing (testdefault1).
-You will be prompted with "The template 'testdefault' on which this document is based, has been modified. Do you want to update style based formattings according to the modified template?" with three options: "Update Styles" "Keep Old Styles" and "Help".
-Select "Update Styles".

This also applies to the other basic styles that come with a new drawing, such as "heading".  However this does work properly if you created a new style completely.

I have had it reported to me that this bug is also present in 4.0.
Comment 1 Edwin Sharp 2013-09-01 06:10:47 UTC
Followed description - no prompt after open testdefault1.

Rev. 1516794 Win 7
Comment 2 Rainer Bielefeld 2013-09-02 05:21:31 UTC
@eric.edwards
Please attach a zipped test kit with what we can reproduce your observations.
Comment 3 eric.edwards.msb 2013-09-03 20:33:25 UTC
I see where I was a little ambiguous in my earlier steps.  What follows is a detailed way of recreating the error.  In other bug reports I have included files, but since this process requires a template, a child document, and then saving over the template again, I think a zip file of the documents would require a bunch of steps anyway.  If you are unable to reproduce using the following steps, I'd be happy to upload a series of screenshots of me going through them.

Anyway, here we go, in 28 simple steps:

1. Select File->New->Drawing
2. Select the rectangle button and draw a rectangle in the upper-left corner.
3. While the rectangle is selected, double-click Default in the Styles and Formatting box to set that as the style.
4. Right click on the Default style in the Styles and Formatting box and select modify.
5. In the Area tab change the fill color to Orange 1.
6. Select the rectangle button and draw a rectangle under the first one.
7. With the second rectangle selected, select the New Style from Selection button in the Styles and Formatting box.
8. Name the style Custom and select OK.
9. Right click on the Custom style in the Styles and Formatting box and select modify.
10. In the Area tab change the fill color to Green 1.
11. Select the rectangle button and draw a rectangle under the second one.
12. With the third rectangle selected, double-click Dimension Line in the Styles and Formatting box to set that as the style.
13. Select File->Templates->Save and save it as Test Style.
14. Close the drawing, discarding it.
15. Select File->New->Templates and Documents.
16. Select the Test Style template and press okay.
17. Select the rectangle button and draw a rectangle under the third one.
18. With the fourth rectangle selected, double-click on Text body in the Styles and Formatting box.
19. Save the drawing as Test Style Drawing.odg
20. Close the drawing.
21. Select File->New->Templates and Documents.
22. Select the Test Style template and press okay.
23. Select the third box and delete it.
24. Select File->Templates->Save and save it as Test Style.
25. Confirm that yes you do want to overwrite the old template.
26. Close the drawing.
27. Select File->Open and open Test Style Drawing.odg
28. You should now be prompted to update styles.  Select Update Styles.

There are other ways to recreate this error as well, I just wanted it to be clear that the custom style did not change, only the bundled style.
Comment 4 Rainer Bielefeld 2013-09-04 04:20:02 UTC
I followed the steps. The menu item mentioned in step 13 did not exist for me with 3.4.1, I added an Item to the menu what leads me to 'Templates -> New Template' dialog (With 4.0.0 the mentioned menu item does exist).

All observations reproducible with server installation of  "AOO 3.4.1 – German UI / German locale [AOO341m1(Build:9593) - Rev.1372282]" on German WIN7 Home Premium (64bit)", own separate user profile.

But:

What the heck is the problem? Nothing unexpected for me.

@eric.edwards.msb
Please contribute a more precise summary due to <http://wiki.openoffice.org/wiki/QA/HowToFileIssue#Reporting%20a%20New%20Bug#Principles>
Additionally to your step by step instruction please describe precisely what you expect, why you expect that (cite help or similar) and why you think what you observe is a a bug.
Comment 5 eric.edwards.msb 2013-09-04 14:10:31 UTC
My original comment included my expectations.

After performing all the steps, look at box 1.  You'll find it isn't orange any more, but is now light-blue like it was before you ever changed the style.  All bundled styles will revert like that.  Custom styles (like the second box) work just fine though.
Comment 6 Rainer Bielefeld 2013-09-04 14:49:33 UTC
> After performing all the steps, look at box 1.  
Ah, yes, indeed, that's really nothing what can be expected.