Bug 101664 - ODF import: drop-cap attribute on paragraph lost
Summary: ODF import: drop-cap attribute on paragraph lost
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.0.4 release
Hardware: All All
: medium critical
Assignee: Caolán McNamara
URL:
Whiteboard: odf target:5.4.0 target:5.2.6 target:...
Keywords: bibisected, bisected, dataLoss, regression
: 102251 104073 105877 105953 105987 106313 (view as bug list)
Depends on:
Blocks: Paragraph-Drop-Caps
  Show dependency treegraph
 
Reported: 2016-08-22 14:12 UTC by Ysabeau
Modified: 2017-07-24 17:01 UTC (History)
22 users (show)

See Also:
Crash report or crash signature:


Attachments
Hybrid pdf when you can see the document (pdf) and the forgotten initials (odt) (1.20 MB, application/pdf)
2016-08-22 14:12 UTC, Ysabeau
Details
odt opened from hybrid PDF, changed and saved as odt (630.38 KB, application/vnd.oasis.opendocument.text)
2016-08-22 22:00 UTC, Cor Nouws
Details
Simple and short doc made with OpenOffice (10.75 KB, application/vnd.oasis.opendocument.text)
2016-08-25 07:56 UTC, Ysabeau
Details
Screenshot of Paragraph Style dialog: Pointing out tricky bug behavior. Some settings are lost, some are correctly retained. (320.65 KB, image/jpeg)
2017-01-06 03:46 UTC, Damian Hofmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ysabeau 2016-08-22 14:12:15 UTC
Created attachment 126963 [details]
Hybrid pdf when you can see the document (pdf) and the forgotten initials (odt)

When you have paragraphs with parametrized initials (lettrines in French), even if it is in the style of the paragraph. When you close the document and you reopen it, the initials disappeared. You have to parametrize them again.

It works (if we can use such a word for that...) for old and news files.
Comment 1 Rpnpif 2016-08-22 14:39:04 UTC
(In reply to Ysabeau from comment #0)
> parametrized initials (lettrines in French),

In Libreoffice, these "lettrines" are named "drop caps" in english language.

Regards.
Comment 2 sophie 2016-08-22 15:10:38 UTC
It has been confirmed by several testers on the FR QA list, so I put it on New. It has been reported to work under:
Avec la Version: 5.1.4.2
Build ID: f99d75f39f1c57ebdd7ffc5f42867c12031db97a
Threads CPU : 8; Version de l'OS :Windows 6.2; UI Render : par défaut;
Locale : fr-FR (fr_FR)
Win 10 
so it appears only on 5.2.x branch - Sophie
Comment 3 Cor Nouws 2016-08-22 15:27:51 UTC
Do I understand correct that the problem only occurs when you open a odt embedded in PDF?
In 5.2.1.1 on Linux 64 bits and nl_NL as locale, I cannot reproduce the issue.
Ciao - Cor
Comment 4 cornosier 2016-08-22 15:33:00 UTC
I confirm on a linux system, in any document, old or new
Version: 5.2.0.4
Build ID: 066b007f5ebcc236395c7d282ba488bca6720265
Threads CPU : 4; Version de l'OS :Linux 4.6; UI Render : par défaut; 
Locale : fr-FR (fr_FR.UTF-8)
Comment 5 Ysabeau 2016-08-22 15:58:44 UTC
(In reply to Cor Nouws from comment #3)
> Do I understand correct that the problem only occurs when you open a odt
> embedded in PDF?
> In 5.2.1.1 on Linux 64 bits and nl_NL as locale, I cannot reproduce the
> issue.
> Ciao - Cor

Not I just give the the odf to you to verify.
Comment 6 Cor Nouws 2016-08-22 22:00:04 UTC
(In reply to Ysabeau from comment #5)
> 
> Not I just give the the odf to you to verify.

OK thanks. 
I cannot reproduce it in 5.0.4.2 too .. Linux 64 bits nl_NL
I will attach your file in which I set the drop caps in the first frame at the bottom of the first column.
Comment 7 Cor Nouws 2016-08-22 22:00:55 UTC
Created attachment 126979 [details]
odt opened from hybrid PDF, changed and saved as odt
Comment 8 Jean-Baptiste Faure 2016-08-23 04:55:31 UTC
Reproducible for me with Version: 5.2.2.0.0+
Build ID: fb37ba7df28ee9eb81c1dc21c55baabe56c474b3
Threads CPU : 4; Version de l'OS :Linux 4.4; UI Render : par défaut; 
Ubuntu_16.04_x86-64
Locale : fr-FR (fr_FR.UTF-8); Calc: single

built at home.

Best regards. JBF
Comment 9 Ysabeau 2016-08-23 06:41:14 UTC
(In reply to Cor Nouws from comment #6)
> (In reply to Ysabeau from comment #5)
> > 
> > Not I just give the the odf to you to verify.
> 
> OK thanks. 
> I cannot reproduce it in 5.0.4.2 too .. Linux 64 bits nl_NL
> I will attach your file in which I set the drop caps in the first frame at
> the bottom of the first column.

It is 5.2. not 5.0 ! and the problem is not with pdf but with odt!
Comment 10 Cor Nouws 2016-08-23 09:56:00 UTC
(In reply to Ysabeau from comment #9)

> It is 5.2. not 5.0 ! and the problem is not with pdf but with odt!

Sorry, I should have written 5.2.0.4 ...
Version: 5.2.0.4
Build ID: 066b007f5ebcc236395c7d282ba488bca6720265
CPU Threads: 4; OS Version: Linux 4.4; UI Render: default; 
Locale: nl-NL (nl_NL.UTF-8)

Of course I believe that you all have the problem. I just can't reproduce it.
Comment 11 Ysabeau 2016-08-25 07:56:53 UTC
Created attachment 127021 [details]
Simple and short doc made with OpenOffice
Comment 12 Ysabeau 2016-08-25 07:57:58 UTC
We tried with OpenOffice: it opens the files with the drop caps. LibreOffice no.

We made a document with OpenOffice and drop caps. Close, open with OpenOffice, the drop caps are there. Open with LibreOffice: no drop caps. Then open with OpenOffice without changing anything: we have the drop caps.

It seems that a file made in 2009 with OpenOffice can be opened in LibreOffice and still having the drop caps. But not after.

Oh and I also open this files in Word 2010 and 2016 and the drop caps disappear (just to see), but it is normal in this case (it has a strange way to put drop caps).
Comment 13 Jean-Baptiste Faure 2016-09-18 05:44:07 UTC
*** Bug 102251 has been marked as a duplicate of this bug. ***
Comment 14 Riccardo Giuliani 2016-10-06 17:58:33 UTC
A similar problem here.
Windows 10 Home x64,
LibreOffice 5.2.2.2

I have a template with a paragraph style with drop caps: anytime I create a new file with that template, and use a drop caps paragraph styles, the drop caps does not show (I have to edit the style again).
Comment 15 Leandro Martín Drudi 2016-11-04 01:16:40 UTC
LO 5.2.3 and the problem continues!?
It is a shame. This problem causes that you can not diagram a document to print because it will not be the same as I see it on the screen.
Comment 16 Ysabeau 2016-11-04 08:17:03 UTC
I too can't understand why it has not been assigned yet.
Comment 17 Cor Nouws 2016-11-04 10:05:06 UTC
(In reply to Leandro Martín Drudi from comment #15)

> It is a shame.

You can make a considerable contribution to resolve this issue.
It is very important to know where the problem started. To find that out, you can do bibisecting. All info here.
https://wiki.documentfoundation.org/QA/HowToBibisect
It looks maybe hard at a fist glance, but I can tell you: it is not.

If you need any help, ask on irc #libreoffice-qa or the list libreoffice-qa@lists.freedesktop.org.

Ciao - Cor
Comment 18 Leandro Martín Drudi 2016-11-04 11:42:56 UTC
(In reply to Cor Nouws from comment #17)
> (In reply to Leandro Martín Drudi from comment #15)
> 
> > It is a shame.
> 
> You can make a considerable contribution to resolve this issue.
> It is very important to know where the problem started. To find that out,
> you can do bibisecting. All info here.
> https://wiki.documentfoundation.org/QA/HowToBibisect
> It looks maybe hard at a fist glance, but I can tell you: it is not.
> 
> If you need any help, ask on irc #libreoffice-qa or the list
> libreoffice-qa@lists.freedesktop.org.
> 
> Ciao - Cor

Sorry but:
1) I do not speak English and Google does not do a good translation job.
2) I am a simple user who reports errors that he has detected and that he expects 3 versions to resolve.
I do not think it's too easy for me to do. I do not know how to plan or plan to learn how to do it.
Comment 19 Cor Nouws 2016-11-04 22:37:40 UTC
(In reply to Leandro Martín Drudi from comment #18)

> Sorry but:

No need to say sorry - thanks for explaining your view.

> 1) I do not speak English and Google does not do a good translation job.

I'm glad that you understand what I write.

> 2) I am a simple user who reports errors that he has detected and that he
> expects 3 versions to resolve.

We need 'simple' users that expect issues to be fixed, especially when they understand that they can do just one step more.
But of course you're free to chose.

Maybe someone else from the people that can reproduce the issue can lend a helping hand for our project?
Comment 20 Buovjaga 2016-11-28 19:51:08 UTC
Repro:
1. New paragraph style
2. Turn on Drop caps
3. Save and reload
4. Check the style - the Drop caps checkbox is unchecked

Arch Linux 64-bit, KDE Plasma 5
Version: 5.4.0.0.alpha0+
Build ID: 368de904974b18dc5a8d237e046c0ed005f7c85d
CPU Threads: 8; OS Version: Linux 4.8; UI Render: default; VCL: kde4; Layout Engine: new; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on November 26th 2016
Comment 21 Buovjaga 2016-11-28 19:51:22 UTC
*** Bug 104073 has been marked as a duplicate of this bug. ***
Comment 22 Ysabeau 2016-11-28 19:54:20 UTC
Bug still in the alpha 5.3
Comment 23 raal 2016-12-02 20:23:10 UTC
This seems to have begun at the below commit.
Adding Cc: to Chris Sherlock ; Could you possibly take a look at this one?
Thanks

author    Chris Sherlock <chris.sherlock79@gmail.com>    2016-01-19 23:50:49 (GMT)
committer    Chris Sherlock <chris.sherlock79@gmail.com>    2016-01-20 06:33:15 (GMT)
commit    c116aafe38f264be29f415b74a968f6efa59a56a (patch)
tree    0d857ed822f414765991f2e2bcd9ea0b3a910e30
parent    b4f60e1c7c68a6e2a8b295aeffb85573b61ad045 (diff)
sw: (mea culpa) fix unostyle.cxx
 4ac9c9ef61506aa00bb5f3a46d5d09f266e7d114 is the first bad commit
commit 4ac9c9ef61506aa00bb5f3a46d5d09f266e7d114
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Thu Jan 21 23:21:26 2016 -0800

    source c116aafe38f264be29f415b74a968f6efa59a56a
git bisect log
# bad: [6380ca07b05f68dedcaa379302cfe1fa478571c4] source 60b74fe1775e647545d2da1fcc58a4c63ec18aa5
# good: [1f670510f08cb800cbae2a1dd6ea70d3542e4721] source 49c2b9808df8a6b197dec666dfc0cda6321a4306
git bisect start 'origin/master' 'oldest'
# bad: [38f37b8ec1a2d199bb957cfd2581df7d1b273b74] source c0da1080b61a1d51654fc34fdaeba373226065ff
git bisect bad 38f37b8ec1a2d199bb957cfd2581df7d1b273b74
# good: [6998931a34ad75eb555f882fbed223e585548721] source 1fbd073828ef52f5206aed4643226bae9fb85f4f
git bisect good 6998931a34ad75eb555f882fbed223e585548721
# bad: [b283fbadb387862ea0f09058430317906e1a78b5] source 1fc4cb57755cdfb9ab65c112435997874fb057cd
git bisect bad b283fbadb387862ea0f09058430317906e1a78b5
# bad: [46053f8f06492a2c806ebd473883548d4a1115d8] source 3de2c3952b9757c40615194811142fd19a9b72eb
git bisect bad 46053f8f06492a2c806ebd473883548d4a1115d8
# good: [a00d80e7a5378b9fcb8b2dd9ebfc2d96b73e9c6d] source af6a39120f590a49088d58c14d46f206abe3e4c2
git bisect good a00d80e7a5378b9fcb8b2dd9ebfc2d96b73e9c6d
# bad: [2e9e7cd95591bbf20af052c1c08f7e06a6738348] source a5372932f787534d15d4e36ee8c297f3c6ac0888
git bisect bad 2e9e7cd95591bbf20af052c1c08f7e06a6738348
# good: [addb2d7239fd91c24d0f86e1ad299f9bf13a4d05] source 8b8b5e21b03387d482ead79afe250cc7fe6e78f7
git bisect good addb2d7239fd91c24d0f86e1ad299f9bf13a4d05
# bad: [a8837205c962cdedacab93c12bad09c305e5f953] source 24bfa15bd3d169022dafba177da29e49241892e8
git bisect bad a8837205c962cdedacab93c12bad09c305e5f953
# bad: [38cb260f733cbc643af0b1de5f83c5ecc4b74a25] source 23c2c7c9cb86db4a36f8a798e63402a053816ef2
git bisect bad 38cb260f733cbc643af0b1de5f83c5ecc4b74a25
# good: [9fde686822a61cb7213ba2fbfd5ec3d83e8f045b] source 10c9f31ad7d0696327b67b6d2a4e3f244473d877
git bisect good 9fde686822a61cb7213ba2fbfd5ec3d83e8f045b
# good: [f05d6b65fa82f627b93ff82112eccf80d4ad02a4] source 00c523c0daac1934e300775ea370003e84da1971
git bisect good f05d6b65fa82f627b93ff82112eccf80d4ad02a4
# good: [f4e7f5bbf35ab57951589c99c274b920d023ee8d] source b4f60e1c7c68a6e2a8b295aeffb85573b61ad045
git bisect good f4e7f5bbf35ab57951589c99c274b920d023ee8d
# bad: [4ac9c9ef61506aa00bb5f3a46d5d09f266e7d114] source c116aafe38f264be29f415b74a968f6efa59a56a
git bisect bad 4ac9c9ef61506aa00bb5f3a46d5d09f266e7d114
# first bad commit: [4ac9c9ef61506aa00bb5f3a46d5d09f266e7d114] source c116aafe38f264be29f415b74a968f6efa59a56a
Comment 24 Leandro Martín Drudi 2017-01-02 23:47:58 UTC
Is anyone working on this? Because it sincerely causes headaches when printing because it does not print as it has been diagrammed, it does not look like it has been diagrammed.
From this moment I stop supporting LibreOffice and remove from my personal page the information regarding LibreOffice until the problem is fixed.
Comment 25 Damian Hofmann 2017-01-06 03:46:18 UTC
Created attachment 130192 [details]
Screenshot of Paragraph Style dialog: Pointing out tricky bug behavior. Some settings are lost, some are correctly retained.

I am seeing this bug on LibreOffice v5.2.4.2. It seems like there are more Drop Caps related settings beeing lost, than just the "Display Drop Caps" checkbox.

E.g. the "Lines" setting is reset to the default value after reopening the document. Other settings, like "Character style" work properly.


Behaviour:
1. Create a new ODT document in LibreOffice Writer.
2. Paste some paragraphs (plain text)
3. Create a new Paragraph Style based on the "Default Style"
4. Go to register "Drop Caps" and check "Display Drop Caps"
5. Change value for "Lines" to 2 (default is 3) and "Character style" to something different.
6. Confirm dialog with pressing OK
7. Apply the Paragraph Style "Default Style" to the entire text.
8. Check -> Document should now look as expected: Paragraphs have drop caps.
9. Check -> It is possible to export the document to PDF. PDF has drop caps.
10. Save the document
11. Close the document
12. Reopen the document
13. Check -> Drop Caps are gone
14. Check -> The Paragraph Style is still applied to the text
15. Edit the Paragraph Style and go to Register "Drop Caps"
16. Check -> Settings "Display Drop Caps" and "Lines" are gone
17. Check -> Setting "Character style" is still correct

Screenshot with comments added!
Comment 26 Daveo 2017-01-29 12:01:35 UTC
This bug appears to have been introduced in one of the first 5.2 releases and has been carried forward all the way to the 5.4 developer code. In a few months 5.2 will become our "Still" release and LO Writer will have the dubious honor of being the only word processor under active development that cannot display drop caps. This will preclude the use of LO by a sizable part of our user base (eg. authors). If Chris Sherlock is unable to take a look at this bug, could another dev please take this on.
Comment 27 richard_g 2017-01-29 13:04:11 UTC
Hello. 

I discovered this bug with the 5.2 releases. We have now the 5.2.5 release and the next one will be considered as the stable one, so could anyone work on this annoying bug ?

If this may help, I noticed that first display of the editing style window is very long (10 to 15 seconds with constant disk activity !), even when the PC is not connected to internet. I am not sure, but I think that this problem also came with 5.2 releases.
Comment 28 Ysabeau 2017-01-29 14:20:35 UTC
(In reply to richard_g from comment #27)

It still is in the pre-release of the 5.3.
Comment 29 ThierryT 2017-01-29 20:33:35 UTC
I download the test file "test-de-lettrine.odt" on my computer.
I opened it and found no drop caps in the file.
I put a drop caps on the second paragraph. Save the file on my computer.
Close it and reopen it.
The drop caps still exist in the file.

I use:
Version: 5.3.0.2 (x64)
Build ID: 5ad7b2889021c491af62f7930a4b1cb631392f16
Threads CPU : 4; Version de l'OS :Windows 6.29; UI Render : par défaut; Moteur de mise en page : nouveau; 
Locale : fr-FR (fr_FR); Calc: group
Comment 30 richard_g 2017-01-29 22:44:13 UTC
In response to comment 25.

To be verified: is the problem solved also in the 5.3.0.2 x86 ?
Comment 31 richard_g 2017-01-29 23:16:32 UTC
Tested on 5.3.0.3 x86 version : 

Version: 5.3.0.3 (x86)
Build ID: 7074905676c47b82bbcfbea1aeefc84afe1c50e1
Threads CPU : 2; Version de l'OS :Windows 6.0; UI Render : par défaut; Moteur de mise en page : nouveau; 
Locale : fr-FR (fr_FR); Calc: group


The problem is still here ! Drop caps are unchecked when Opening a document saved with Drop Caps checked !

It seems that x86 and x64 versions have not the same behavior !
Comment 32 Leandro Martín Drudi 2017-01-30 02:09:23 UTC
(In reply to ThierryT from comment #29)
> I download the test file "test-de-lettrine.odt" on my computer.
> I opened it and found no drop caps in the file.
> I put a drop caps on the second paragraph. Save the file on my computer.
> Close it and reopen it.
> The drop caps still exist in the file.
> 
> I use:
> Version: 5.3.0.2 (x64)
> Build ID: 5ad7b2889021c491af62f7930a4b1cb631392f16
> Threads CPU : 4; Version de l'OS :Windows 6.29; UI Render : par défaut;
> Moteur de mise en page : nouveau; 
> Locale : fr-FR (fr_FR); Calc: group

That's true! Then the problem is presented in the styles. The manual format is saved.
Comment 33 Caolán McNamara 2017-01-30 11:20:00 UTC
I think chris is innocent here and the problem is earlier
Comment 34 Commit Notification 2017-01-30 11:43:37 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d27aba549cdbcad6825ac6c955ee7d603aba1989

Resolves: tdf#101664 dropcaps not set in styles on load

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 35 Caolán McNamara 2017-01-30 11:49:23 UTC
backports for 5-3 and 5-2 in gerrit, fixed in master
Comment 36 sophie 2017-01-30 12:39:10 UTC
(In reply to Caolán McNamara from comment #35)
> backports for 5-3 and 5-2 in gerrit, fixed in master

Thanks a lot Caolán :)
Comment 37 Jean-Baptiste Faure 2017-01-30 13:09:05 UTC
Thank you very much. Verified fixed in master
Version: 5.4.0.0.alpha0+
Build ID: d27aba549cdbcad6825ac6c955ee7d603aba1989
Threads CPU : 4; Version de l'OS :Linux 4.4; UI Render : par défaut; VCL : gtk3; 
Ubuntu_16.04_x86-64
Locale : fr-FR (fr_FR.UTF-8); Calc: group

Best regards. JBF
Comment 38 Michael Stahl (allotropia) 2017-01-30 13:37:16 UTC
Comment on attachment 126979 [details]
odt opened from hybrid PDF, changed and saved as odt

this document has the style:drop-cap on an automatic style "P19", apparently the bug only affects real styles, not automatic ones.
Comment 39 Commit Notification 2017-01-30 13:48:59 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b88b1b07e657716aa9975fee2dfc5a091c66a346&h=libreoffice-5-2

Resolves: tdf#101664 dropcaps not set in styles on load

It will be available in 5.2.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 40 Commit Notification 2017-01-30 13:49:18 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b51be29b8c24294d26706cb2d0fd52c1878768bb&h=libreoffice-5-3

Resolves: tdf#101664 dropcaps not set in styles on load

It will be available in 5.3.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 41 Daveo 2017-01-30 13:56:51 UTC
(In reply to Caolán McNamara from comment #35)
> backports for 5-3 and 5-2 in gerrit, fixed in master

Many thanks for the patch and the backports Caolán.:)
Comment 42 Jean-Baptiste Faure 2017-01-30 15:02:06 UTC
Verified in LO 5.3.1.0.0+ and 5.2.6.0.0+

Version: 5.3.1.0.0+
Build ID: b51be29b8c24294d26706cb2d0fd52c1878768bb
Threads CPU : 4; Version de l'OS :Linux 4.4; UI Render : par défaut; VCL : gtk3; Moteur de mise en page : nouveau; 
Ubuntu_16.04_x86-64
Locale : fr-FR (fr_FR.UTF-8); Calc: group

Version: 5.2.6.0.0+
Build ID: b88b1b07e657716aa9975fee2dfc5a091c66a346
Threads CPU : 4; Version de l'OS :Linux 4.4; UI Render : par défaut; VCL : gtk3; 
Ubuntu_16.04_x86-64
Locale : fr-FR (fr_FR.UTF-8); Calc: single

Best regards. JBF
Comment 43 richard_g 2017-02-03 15:53:35 UTC Comment hidden (obsolete)
Comment 44 richard_g 2017-02-03 16:00:23 UTC Comment hidden (obsolete)
Comment 45 Buovjaga 2017-02-11 20:46:59 UTC
*** Bug 105877 has been marked as a duplicate of this bug. ***
Comment 46 Jean-Baptiste Faure 2017-02-12 16:13:38 UTC
*** Bug 105953 has been marked as a duplicate of this bug. ***
Comment 47 Alex Thurgood 2017-02-16 16:14:22 UTC
*** Bug 105987 has been marked as a duplicate of this bug. ***
Comment 48 Buovjaga 2017-03-04 17:39:51 UTC
*** Bug 106313 has been marked as a duplicate of this bug. ***