Bug 47471 - Clear Direct Formatting damages the document's styles
Summary: Clear Direct Formatting damages the document's styles
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version: 3.5.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
QA Contact: QA Administrators
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-18 01:33 UTC by jmkopy
Modified: 2014-09-26 10:55 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
File with distorted styles (20.08 KB, application/vnd.oasis.opendocument.text)
2012-03-18 01:33 UTC, jmkopy
Details
File before distorting styles (20.23 KB, application/vnd.oasis.opendocument.text)
2012-03-18 01:35 UTC, jmkopy
Details
Another file before styles are distorted (63.67 KB, application/vnd.oasis.opendocument.text)
2012-03-25 12:05 UTC, jmkopy
Details
Another file after styles are distorted (63.17 KB, application/vnd.oasis.opendocument.text)
2012-03-25 12:07 UTC, jmkopy
Details
Another file after style is distorted for one paragraph (63.65 KB, application/vnd.oasis.opendocument.text)
2012-03-25 12:12 UTC, jmkopy
Details

Description jmkopy 2012-03-18 01:33:53 UTC
Created attachment 58634 [details]
File with distorted styles

I assign a style to a paragraph, mark the paragraph and apply "Ctrl + M" (thus clearing direct formatting) and save the file. After opening the file all styles have been substituted by the "Default" style.
See the attached files.
Comment 1 jmkopy 2012-03-18 01:35:50 UTC
Created attachment 58635 [details]
File before distorting styles
Comment 2 Rainer Bielefeld Retired 2012-03-18 22:47:43 UTC
I can't reproduce the problem, but the report is much to rare.

@jmkopy@gmx.net
Please contribute a precise step by step instruction containing every mouse click and every key press.
Comment 3 m.a.riosv 2012-03-19 16:28:53 UTC
ONLY with this file I can reproduce on LibreOffice 3.5.1 and OOo-dev 3.4.

Two confident folks from OOo.org forum have tried with equals results. Only with this file have found the problem.
Comment 4 Christopher Yeleighton 2012-03-24 11:24:46 UTC
Does the bug occur when your document has only one paragraph?
Comment 5 jmkopy 2012-03-25 12:03:58 UTC
I have to describe exactly how it happens:
I mark the whole document:
Ctrl + A (one paragraph marked)
Ctrl + A (all paragraphs marked, or the whole document for that matter)
Ctrl + M (clearing direct formatting)
Saving the document
Closing the document
Opening the document --> All assigned styles are removed.

When I do mark only one paragraph and apply the steps mentioned above then the same happens only for the tackled paragraph.
See the new attached files.
Comment 6 jmkopy 2012-03-25 12:05:50 UTC
Created attachment 59015 [details]
Another file before styles are distorted
Comment 7 jmkopy 2012-03-25 12:07:17 UTC
Created attachment 59016 [details]
Another file after styles are distorted
Comment 8 jmkopy 2012-03-25 12:12:13 UTC
Created attachment 59017 [details]
Another file after style is distorted for one paragraph
Comment 9 jmkopy 2012-03-25 12:31:26 UTC
(In reply to comment #4)
> Does the bug occur when your document has only one paragraph?

I tried it, the bug does occur once. When I assign a style again and repeat the steps mentioned above the styles are retained. The same is true for many paragraphs document. 
Actually it is true also for the attached documents above. Well, it looks that after a second "round" of assigning the styles the problem is almost gone. 
Having a long document it is a "nice" job to reassign the styles again. Having many documents it is even "nicer" so.
I tried it again, with one of the above files. And some styles are persistently being removed and some remain. Hmmm? Even after reassigning the the styles many times.
Comment 10 sasha.libreoffice 2012-08-20 09:14:13 UTC
I saved 3-th attachment as fodt and viewed as text. 
And found there this line:
<style:style style:name="_5f_Heading_5f_00" style:display-name="_Heading_00"
It means that style's internal name is different from name we see. I can not produce such style by my own. IMHO LibreOffice can not deal with such styles correctly.
How to produced this document? May be from template that already has such corruption. Or by opening file, created by another program? Or copy-pasting.
Comment 11 Joel Madero 2013-05-28 15:37:52 UTC
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INVALID due to lack of needed information.

For more information about our NEEDINFO policy please read the wiki located here: 
https://wiki.documentfoundation.org/QA/FDO/NEEDINFO

If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed.


Thank you for helping us make LibreOffice even better for everyone!


Warm Regards,
QA Team
Comment 12 sasha.libreoffice 2013-05-29 11:12:05 UTC
reproduced in 4.0.3 on Fedora (RFR) 64 bit 
using 3-th attachment (Another_file_before_distorting_styles.odt) and steps from comment 5
Comment 13 robert 2014-01-09 16:56:31 UTC
Could it be this bug is the same as https://bugs.freedesktop.org/show_bug.cgi?id=73411 ?
Haven't found this bug before, but the loosing of styles has something to do with numbering and bullet, so I searched for bullets and found nothing.
Comment 14 sasha.libreoffice 2014-01-10 07:41:33 UTC
IMHO bug is the same
I just tried my idea from comment 10 on attachment from Bug 73411. I saved it as fodt format and manually removed style:display-name . But it not helps. Bug still reproducible. Therefore style:display-name is not a source of problem.
Comment 15 Fiable.biz 2014-09-26 10:55:22 UTC
See also bug #61956, which might be a duplicate of this one.


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.