Bug 75817 - Automatic styles are too persistent
Summary: Automatic styles are too persistent
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version: 4.3.0.0.alpha0+ Master
Hardware: Other All
: medium minor
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-06 01:39 UTC by Urmas
Modified: 2014-09-25 21:44 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Example (7.19 KB, application/x-zip)
2014-03-06 01:39 UTC, Urmas
Details

Description Urmas 2014-03-06 01:39:07 UTC
Created attachment 95202 [details]
Example

Open and save the attached document.
It will have about 200 unused automatic styles.
Unused automatic styles must be cleaned automatically.
Comment 1 Joel Madero 2014-03-07 03:03:50 UTC
So you want the styles to just disappear for individual documents? The default styles that come with LibreOffice. If so I disagree with the request and will seek additional input from devs
Comment 2 Urmas 2014-06-10 03:30:40 UTC
Automatic styles are not default. Don't write nonsensical comments, please.
Comment 3 Joel Madero 2014-06-10 03:31:21 UTC
Urmas - don't be rude please. Again, warned.
Comment 4 Urmas 2014-07-12 02:14:06 UTC
That is not 'enhancement'. That is a bug.
Comment 5 João Paulo 2014-09-08 20:46:58 UTC
I can confirm this on LibreOffice 4.2.6.3 build id 3fd416d4c6db7d3204c17ce57a1d70f6e531ee21 running on Windows Vista 64 bits.

I suspected this long ago, LibreOffice just keeps adding automatic styles to the document, so if we create a new one from an older document, it will inherit the automatic styles and the document will be bigger and slower to parse.

It is a bug, not a enhancement, as there are people (myself included) which don't use official templates for creating documents - the template is the last document of the same type used. Lawyers do that when writing petitions of the same kind (the facts are changed, but the law it's based remains the same), judges also do that (the suit report and the judgement is changed, but the law it's based remains the same). It also happens because, in Brazil, the petitions don't have a defined form factor, one can use different fonts to make a better emphasis, many times just a word or two of the sentence (which already had emphasis) gets another emphasis by changing the body font (bold, italics, both - I do that), the size (from 12pt to 16pt - I see others doing that), another font entirely or even the color (from black to red, or orange - God forbid people from using blinking letters! On a petition! LOL).

It happens a lot when doing evictions, when the consumer doesn't receive what s/he bought etc. Also people who do write reports do that when changing a little bit of the style to make the document feel nicer etc, sometimes it's not the style.

Yes, I know we may change the default styles or even create new ones, but it's just not possible to always do that because it's a slow process and we need to be fast when writing, so we just use the formatting tools when is a little bit change that won't be used again on the document.

At my office, we use the Flat OpenDocument format (.fodt) (better for backing up, it is much more compressible than the zipped .odt type), but now I see documents with almost 300Kb that, opened using Notepad++, when the contents of the "<office:automatic-styles>" node is erased (not the node itself) and saved as another name, the size gets back to less than 90Kb and the document is still normally editable without errors.

So the only conclusion is LibreOffice isn't cleaning up its automatic styles, which is a kind of memory leak. Worse still, a persistent one.

PS: May I change this bug status as confirmed? I am doing that right after saving this comment.
Comment 6 João Paulo 2014-09-08 20:53:57 UTC
Just to clarify to Joel Madero:

* Default Styles are those which already comes with LibreOffice;
* Automatic Styles are those created by LibreOffice automatically every time the user changes the formatting without using styles. LO does that because the OpenDocument Format specs don't allow to use direct formatting, the software has to create the illusion of direct formatting creating automatically (and hidden) styles every time the user apply direct formatting on the document content.
Comment 8 Robinson Tryon (qubit) 2014-09-25 21:44:56 UTC
Bug is confirmed and status is NEW -> Removing needAdvice tag.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.