Bug Hunting Session
Bug 85496 - Duplicate style:font-weight attributes (reproduction steps in comments 6-7)
Summary: Duplicate style:font-weight attributes (reproduction steps in comments 6-7)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version:
(earliest affected)
4.4.1.2 release
Hardware: All All
: high blocker
Assignee: Michael Stahl (CIB)
URL:
Whiteboard: odf odf_validation target:4.4.0.0.bet...
Keywords: bibisected, regression
: 74708 86897 89570 94123 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-10-27 04:48 UTC by SriJanani
Modified: 2015-12-17 08:38 UTC (History)
13 users (show)

See Also:
Crash report or crash signature:


Attachments
Error-Format document- File corrupted (49.70 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-10-27 04:48 UTC, SriJanani
Details
Example spreadsheet to reproduce xml error (11.21 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-11-24 19:19 UTC, tmacalp
Details
content.xml : LibreOffice/4.4.1.2$MacOSX_X86_64 duplicate style:font-name="Cambria" (110.76 KB, image/jpeg)
2015-03-22 22:05 UTC, Alexis-Emmanuel Haeringer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SriJanani 2014-10-27 04:48:11 UTC
Created attachment 108488 [details]
Error-Format document- File corrupted

Hi,

We started getting the below mentioned error very frequently with all the files wherein file contents are not recoverable. We have to redo all the work and loosing productivity.

Error: Read-error.Format error discovered in the file sub-document content.xml 
at 2,217379.

Version: 4.3.2.2
OS: windows 7

Attaching the files for your response

Regards,
SriJanani
Comment 1 SriJanani 2014-10-27 05:02:43 UTC
I have tried with different version of LO and PC. Also with profile recreation its not working. Any suggestions are welcome.


Awaiting your response.

Regards,
SriJanani
Comment 2 Maxim Monastirsky 2014-10-27 08:43:08 UTC
Hi,

(In reply to SriJanani from comment #0)
> wherein file contents are not recoverable. We have to redo all the
> work and loosing productivity.
Fortunately that's not the case. It's just a duplicate "style:font-name" attribute inside content.xml. You can unzip the file, fix content.xml by removing one of the duplicates (doable also with automated tools), and zip again.

(In reply to SriJanani from comment #1)
> I have tried with different version of LO and PC. Also with profile
> recreation its not working.
This won't help, because the bug is in the saving procedure, so the file is already corrupted and won't open as-is by any version. Instead we need to identify whether it is possible to *create* such broken files with the latest version. Now, looking at the attached file I see that you're created this file using 4.3.1.1, which is not the latest one (and BTW it's a pre-release version - and it's a bad idea to use pre-release in a production environment, exactly because such bugs that maybe there), so it's not clear if this bug is still there.

So for now let's put this bug to NEEDINFO status, and if you'll have this bug again with files that are *saved* with the latest version, then add here a comment about it.
Comment 3 SriJanani 2014-10-27 12:27:24 UTC
Hi Maxim,

Thanks for the reply. Can you please provide me the steps to remove the duplicate values. 

I would also like to know why duplicate values are getting created since the file was created with the previous version of LO, if this is the case we are afraid that we may lose information created in Libre office suite. 

Awaiting your response.

Thank You,

Regards,
SriJanani
Comment 4 Maxim Monastirsky 2014-10-27 14:46:46 UTC
(In reply to SriJanani from comment #3)
> Thanks for the reply. Can you please provide me the steps to remove the
> duplicate values. 

ods file is just a ZIP file with a different extension, and it contains several files/folders. One of these files is content.xml, and that one you should extract (with your favorite ZIP utility) and modify. To make things easier you could get tidy (http://tidy.sourceforge.net/#binaries), and run "tidy.exe -xml -modify -utf8 content.xml", this will modify the file. Now all you need is to add the modified content.xml back to the ods file, overwriting the original one. (But anyway I suggest to make a backup copy of the original file, in case something goes wrong.)

> I would also like to know why duplicate values are getting created since the
> file was created with the previous version of LO, if this is the case we are
> afraid that we may lose information created in Libre office suite. 
That's a bug. Any software has bugs, despite any developers efforts. But as a general rule it's not recomended to use pre-release software in a production environment. This won't guard you completely from bugs, but it's the most you can do. For production - always use the latest release that is advertised on libreoffice.org. And again - if you'll discover that the latest release still corrupting your file - please report it here, so that developres would be aware of it and fix it.
Comment 5 SriJanani 2014-10-28 13:00:42 UTC
Hi Maxim,

Thanks for the info,finally I was able to recover the files by using notepad++. 

Now we are have upgraded our users with new version 4.3.2.2. We will keep you posted for any further issues.


Thank You,

Regards,
SriJanani
Comment 6 tmacalp 2014-11-24 19:16:45 UTC
I believe that I'm running into the same issue.  It seems to relate to a glitch where you try to remove text in a cell that contained two different font style attributes, in my case, font-weight.

I have attached an example document that should show how to reproduce this corruption.  The example document was originally created using an older version of OpenOffice.  I've simplified the document as much as possible.

Steps to reproduce:
1. Open my example document
2. Double-click into A1 to modify contents
3. Select all text in cell
4. Backspace to clear
5. Save the file
6. File -> Reload

Note that you have to follow the above instructions to clear the cell.  If you simply select the cell and press delete, the document will not have the same issue.  Also, after the reload fails, you need to re-open the example document from scratch.  Somehow, performing the undo to restore the original state "fixes" it in the process.

Expected:
File should reload as expected.

Actual:
I get the following message on file load.
Read-Error.
Format error discovered in the file in sub-document content.xml at 2,4706(row,col).

Notes:
I unzipped the corrupted ods and used xmllint on it:

$ xmllint --format content.xml 
content.xml:2: parser error : Attribute fo:font-weight redefined
nt-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"
                                                                               ^
content.xml:2: parser error : Attribute style:font-weight-asian redefined
nt-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"
                                                                               ^
content.xml:2: parser error : Attribute style:font-weight-complex redefined
nt-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"
                                                                               ^
I then edited content.xml and confirmed that it does define each of those attributes twice in those 3 styles.


I can confirm that this is reproducible under the following tested versions:
LO 4.2.0.4 running on 32bit Fedora 17
LO 4.2.6.2 running on 64bit RHEL6
LO 4.3.3.2 running on 32bit Fedora 17

and that it does NOT affect the following versions:
LO 4.1.3.2 running on 32bit Fedora 17
LO 4.0.6.2 running on 32bit Fedora 17

So, this appears to have started with 4.2.x.  If I get some time, I'll bibisect too.

Because I can confirm in a reproducible manner, I'm setting the status to "NEW" and changing the version to the first version I can confirm it in, "4.2.0.4".  Also, since I'm running Linux, I've changed the OS from Windows to All.
Comment 7 tmacalp 2014-11-24 19:19:44 UTC
Created attachment 109959 [details]
Example spreadsheet to reproduce xml error
Comment 8 raal 2014-11-24 20:06:45 UTC
Tmacalp,
thanks for the repro steps. I can reproduce with version Version: 4.4.0.0.alpha2+
Build ID: d273a60bfdbf9bb7623bed38667ec0647753157c
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-11-20_03:05:21

Settings importance to highest because after this steps is file unreadable in LO.

Error message:
Read-Error.
Format error discovered in the file in sub-document content.xml at 2,4704(row,col).
Comment 9 tmacalp 2014-11-24 20:13:33 UTC
I went ahead and bibisected:


82a46d1a3899ace0bd7f114add38bbac080d7f21 is the first bad commit
commit 82a46d1a3899ace0bd7f114add38bbac080d7f21
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Fri Oct 18 03:41:50 2013 +0000

    source-hash-9ef052368842f9e5b56b9d47329a81da8e8e2da1
    
    commit 9ef052368842f9e5b56b9d47329a81da8e8e2da1
    Author:     Kohei Yoshida <kohei.yoshida@gmail.com>
    AuthorDate: Tue Aug 27 11:43:23 2013 -0400
    Commit:     Kohei Yoshida <kohei.yoshida@gmail.com>
    CommitDate: Wed Aug 28 08:56:58 2013 -0400
    
        bClearRange is always true. Remove it.
    
        Change-Id: I1df4bdaa5f13ede9e04972a02948eb072dca2bec

:100644 100644 15df7f2ce983ade1d48007e9fca8b449481a4f00 d52c43c0bc2275949f9a2e435f8af083e9071887 M      ccache.log
:100644 100644 ba6308a5188c4926aa27dc9513aedd5892659a8a fffcc7303889e8f67b1518a4f0ba8a2f42d980c1 M      commitmsg
:100644 100644 27834218587a9d633457dfd29ddfd57673ad9c48 0974a9c3975e9c679992b858e654b4fb2f61c4e0 M      dev-install.log
:040000 040000 cf7fed03cf5d2ccc674979f5c5fe2d96ea898455 1cab386d1ef582b911fdae3787cd2b9c63e5cc14 M      opt


$ git bisect log
# bad: [423a84c4f7068853974887d98442bc2a2d0cc91b] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# good: [e02439a3d6297a1f5334fa558ddec5ef4212c574] source-hash-6b8393474974d2af7a2cb3c47b3d5c081b550bdb
git bisect good e02439a3d6297a1f5334fa558ddec5ef4212c574
# bad: [4850941efe43ae800be5c76e1102ab80ac2c085d] source-hash-980a6e552502f02f12c15bfb1c9f8e6269499f4b
git bisect bad 4850941efe43ae800be5c76e1102ab80ac2c085d
# skip: [a043626b542eb8314218d7439534dce2fc325304] source-hash-9379a922c07df3cdb7d567cc88dfaaa39ead3681
git bisect skip a043626b542eb8314218d7439534dce2fc325304
# skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
# skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
# skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
# bad: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect bad c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# bad: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect bad c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# bad: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect bad c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# bad: [1d4980621741d3050a5fe61b247c157d769988f2] source-hash-89d01a7d8028ddb765e02c116d202a2435894217
git bisect bad 1d4980621741d3050a5fe61b247c157d769988f2
# good: [ba096f438393091574da98fe7b8e6b05182a8971] source-hash-8499e78ca03c792f4fa2650e02b519094ba0baa8
git bisect good ba096f438393091574da98fe7b8e6b05182a8971
# good: [e75547cbd2d9d480ba13e119a8df8098c9d3a0a3] source-hash-69f686774cfeb803fdd63ed1ef07ff70550930de
git bisect good e75547cbd2d9d480ba13e119a8df8098c9d3a0a3
# good: [bac2489ff3b644bd046102e379bff5a6c6c469d9] source-hash-621c1e491e56db5416da1c763aaff862e8ede67a
git bisect good bac2489ff3b644bd046102e379bff5a6c6c469d9
# bad: [0b24b35122b1aec8721035679954b10f82a23540] source-hash-cdab3d619ca0389d4c14e3b50fb66bbadcf5c52f
git bisect bad 0b24b35122b1aec8721035679954b10f82a23540
# good: [9d35a6ff414080dfb75df54ce3a5cc589507d7f1] source-hash-c89d6bcdb44cb06f7bbd907d191dfbe18cfb0cc5
git bisect good 9d35a6ff414080dfb75df54ce3a5cc589507d7f1
# bad: [82a46d1a3899ace0bd7f114add38bbac080d7f21] source-hash-9ef052368842f9e5b56b9d47329a81da8e8e2da1
git bisect bad 82a46d1a3899ace0bd7f114add38bbac080d7f21
# first bad commit: [82a46d1a3899ace0bd7f114add38bbac080d7f21] source-hash-9ef052368842f9e5b56b9d47329a81da8e8e2da1
Comment 10 raal 2014-11-24 20:27:10 UTC
git bisect log
# bad: [423a84c4f7068853974887d98442bc2a2d0cc91b] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# good: [e02439a3d6297a1f5334fa558ddec5ef4212c574] source-hash-6b8393474974d2af7a2cb3c47b3d5c081b550bdb
git bisect good e02439a3d6297a1f5334fa558ddec5ef4212c574
# bad: [4850941efe43ae800be5c76e1102ab80ac2c085d] source-hash-980a6e552502f02f12c15bfb1c9f8e6269499f4b
git bisect bad 4850941efe43ae800be5c76e1102ab80ac2c085d
# skip: [a043626b542eb8314218d7439534dce2fc325304] source-hash-9379a922c07df3cdb7d567cc88dfaaa39ead3681
git bisect skip a043626b542eb8314218d7439534dce2fc325304
# skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
# skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
# bad: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect bad c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# bad: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect bad c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# bad: [1d4980621741d3050a5fe61b247c157d769988f2] source-hash-89d01a7d8028ddb765e02c116d202a2435894217
git bisect bad 1d4980621741d3050a5fe61b247c157d769988f2
# good: [ba096f438393091574da98fe7b8e6b05182a8971] source-hash-8499e78ca03c792f4fa2650e02b519094ba0baa8
git bisect good ba096f438393091574da98fe7b8e6b05182a8971
# good: [e75547cbd2d9d480ba13e119a8df8098c9d3a0a3] source-hash-69f686774cfeb803fdd63ed1ef07ff70550930de
git bisect good e75547cbd2d9d480ba13e119a8df8098c9d3a0a3
# good: [bac2489ff3b644bd046102e379bff5a6c6c469d9] source-hash-621c1e491e56db5416da1c763aaff862e8ede67a
git bisect good bac2489ff3b644bd046102e379bff5a6c6c469d9
# bad: [0b24b35122b1aec8721035679954b10f82a23540] source-hash-cdab3d619ca0389d4c14e3b50fb66bbadcf5c52f
git bisect bad 0b24b35122b1aec8721035679954b10f82a23540
# good: [9d35a6ff414080dfb75df54ce3a5cc589507d7f1] source-hash-c89d6bcdb44cb06f7bbd907d191dfbe18cfb0cc5
git bisect good 9d35a6ff414080dfb75df54ce3a5cc589507d7f1
# bad: [82a46d1a3899ace0bd7f114add38bbac080d7f21] source-hash-9ef052368842f9e5b56b9d47329a81da8e8e2da1
git bisect bad 82a46d1a3899ace0bd7f114add38bbac080d7f21
# first bad commit: [82a46d1a3899ace0bd7f114add38bbac080d7f21] source-hash-9ef052368842f9e5b56b9d47329a81da8e8e2da1


http://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=c89d6bcdb44cb06f7bbd907d191dfbe18cfb0cc5..9ef052368842f9e5b56b9d47329a81da8e8e2da1
Comment 11 Michael Stahl (CIB) 2014-12-01 21:00:22 UTC
*** Bug 86897 has been marked as a duplicate of this bug. ***
Comment 12 Maxim Monastirsky 2014-12-01 21:05:47 UTC
BTW Kohei fixed similar bug with style:font-name in http://cgit.freedesktop.org/libreoffice/core/commit/?id=1b35c7ea4f7fe1473dbe08ab93b7259403b290ff
Comment 13 Michael Stahl (CIB) 2014-12-01 22:19:57 UTC
thanks tmacalp for finding a reproducer for this!

the problem was introduced by switching Calc away from using the UNO API to export editengine text:

commit d81b56c7f679477fed471f8150e1b95e6902e249
Author:     Kohei Yoshida <kohei.yoshida@gmail.com>
AuthorDate: Sun Aug 25 00:07:45 2013 -0400

    fdo#60740: Handle empty paragraphs correctly.
    

... but the underlying editengine code has always been buggy when merging
multiple paragraphs, multiple 0-length formatting attributes could
be created at the same position and apparently the API implementation
happened to work around that problem by accident.

fixed on master.
Comment 14 Commit Notification 2014-12-01 22:20:28 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

fdo#85496: editeng: do not add multiple 0-length attributes...

It will be available in 4.5.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 15 Commit Notification 2014-12-01 22:20:32 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

fdo#85496: add some asserts to detect this sort of problem

It will be available in 4.5.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 16 Commit Notification 2014-12-01 22:34:51 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8fccff42616ac434c3d641a76c37f3a135cec97e&h=libreoffice-4-4

fdo#85496: editeng: do not add multiple 0-length attributes...

It will be available in 4.4.0.0.beta2.

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 17 Commit Notification 2014-12-01 22:34:55 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=91892803ebb5c99a972fd5ef37b77634a9138062&h=libreoffice-4-4

fdo#85496: add some asserts to detect this sort of problem

It will be available in 4.4.0.0.beta2.

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 18 Commit Notification 2014-12-02 14:01:37 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=90e3a4ba5154a451153ae9431236864f81b5bb60&h=libreoffice-4-2

fdo#85496: editeng: avoid exporting duplicate attributes

It will be available in 4.2.9.

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 19 Commit Notification 2014-12-02 14:01:44 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

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

fdo#85496: editeng: avoid exporting duplicate attributes

It will be available in 4.3.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 20 Commit Notification 2014-12-02 20:22:55 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-3-5":

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

fdo#85496: editeng: avoid exporting duplicate attributes

It will be available in 4.3.5.

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 21 Commit Notification 2014-12-02 20:23:10 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-2-8":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=54ec8671a9073cd5e03d4b56e22895eca2f8d630&h=libreoffice-4-2-8

fdo#85496: editeng: avoid exporting duplicate attributes

It will be available in 4.2.8.

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 22 Michael Stahl (CIB) 2014-12-04 22:35:44 UTC
*** Bug 74708 has been marked as a duplicate of this bug. ***
Comment 23 Daniel Naegeli 2014-12-05 09:01:51 UTC
Thank you Michael, tmacalp and all involved for the very fast fixing of this tedious bug!
Comment 24 raal 2015-02-22 20:18:19 UTC
*** Bug 89570 has been marked as a duplicate of this bug. ***
Comment 25 Alexis-Emmanuel Haeringer 2015-03-03 19:07:03 UTC
Hello,

Unfortunately, the problem yet appears on 4.4.1.2$MacOSX_X86_64.
I have to remove the following string in content.xml : 
fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold" 


*FYI :* 
The ods file came probably from a copy/paste from an excel file. The file is using a lot of carriage return in cells (sometimes erroneously imported from excel)
(I do not really like using direct formatting style references (Txx, Pxx office:automatic-styles) in content.xml file (styles.xml is once and for all a better place))

_meta.xml_
[..] office:version="1.2">
	<office:meta>
		<meta:creation-date>2015-02-26T13:38:02.017278000</meta:creation-date>
		<dc:date>2015-02-27T14:36:22.777725000</dc:date>
		<meta:editing-duration>PT3H16M45S</meta:editing-duration>
		<meta:editing-cycles>40</meta:editing-cycles>
		<meta:generator>LibreOffice/4.4.1.2$MacOSX_X86_64 LibreOffice_project/45e2de17089c24a1fa810c8f975a7171ba4cd432</meta:generator>
		<meta:document-statistic meta:table-count="18" meta:cell-count="391" meta:object-count="10"/>
	</office:meta>
</office:document-meta>


_content-bug.xml_
<style:style style:name="T22" style:family="text">
	<style:text-properties style:letter-kerning="true" style:country-complex="none" fo:country="US" style:country-asian="CN" fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color"/>

_content-ok.xml_
<style:style style:name="T22" style:family="text">
	<style:text-properties style:letter-kerning="true" style:country-complex="none" fo:country="US" style:country-asian="CN"  style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color"/>


_content.xml_T22_section_
<table:table-row table:style-name="ro24">
<table:table-cell table:style-name="ce87" office:value-type="string" calcext:value-type="string" table:number-columns-spanned="8" table:number-rows-spanned="1">
	<text:p>
		<text:span text:style-name="T4">XXXXXXXXXX</text:span>
		<text:span text:style-name="T5">:</text:span>
		<text:span text:style-name="T21"> XX XXXXXXXXXXavec XXXXXXXX</text:span>
		<text:span text:style-name="T22"> dans 80% du XX  des XX mesurés sur 3 XX XX. </text:span>
	</text:p>
</table:table-cell>
<table:covered-table-cell table:number-columns-repeated="2" table:style-name="Default"/>
<table:covered-table-cell table:number-columns-repeated="5"/>
<table:table-cell table:number-columns-repeated="1016"/>
</table:table-row>



Best regards
Comment 26 Eike Rathke 2015-03-04 11:08:10 UTC
(In reply to Alexis-Emmanuel Haeringer from comment #25)
> Unfortunately, the problem yet appears on 4.4.1.2$MacOSX_X86_64.
> I have to remove the following string in content.xml : 
> fo:font-weight="bold" style:font-weight-asian="bold"
> style:font-weight-complex="bold" 

Could you please attach the original problematic file as saved by 4.4.1 so we can investigate?

> _content-bug.xml_
> <style:style style:name="T22" style:family="text">
> 	<style:text-properties style:letter-kerning="true"
> style:country-complex="none" fo:country="US" style:country-asian="CN"
> fo:font-weight="bold" style:font-weight-asian="bold"
> style:font-weight-complex="bold" style:text-underline-style="solid"
> style:text-underline-width="auto" style:text-underline-color="font-color"/>

I fail to see where there would be any duplicated attribute.
Comment 27 Robinson Tryon (qubit) 2015-03-05 20:12:56 UTC
(This is an automated message.)

LibreOffice development currently prioritizes bugs with the so
called MAB (most annoying bugs). As this bug has not run
through that process (including writing a short rationale for
this bug being a candidate and other who are watching the
tracker bug silently approving that rationale etc), its priority
is set to high. Note this is effectively no change in the
urgency assigned to this bug, as we are currently not making a
difference between high and highest and severity is untouched.

You can find out more about MABs and how the process works by
contacting the QA Team on IRC:

http://webchat.freenode.net/?channels=libreoffice-qa

The QA wiki page also gives you hints on how to get in contact
with the team (if IRC fails you, your next best choice is the
mailing list):

https://wiki.documentfoundation.org/QA
Comment 28 Alexis-Emmanuel Haeringer 2015-03-22 22:05:18 UTC
Created attachment 114256 [details]
content.xml : LibreOffice/4.4.1.2$MacOSX_X86_64 duplicate style:font-name="Cambria"

Hello,
Thanks for your help.
Unfortunately, the document is considered by the user as confidential.
Furthermore the bug reappeared, you will find as an attachment screenshot of content.xml

Best regards


<?xml version="1.0" encoding="UTF-8"?>
<office:document-meta xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:grddl="http://www.w3.org/2003/g/data-view#" office:version="1.2"><office:meta><meta:creation-date>2015-02-26T13:38:02.017278000</meta:creation-date><dc:date>2015-03-19T12:30:44.466021000</dc:date><meta:editing-duration>PT11H25M43S</meta:editing-duration><meta:editing-cycles>114</meta:editing-cycles><meta:generator>LibreOffice/4.4.1.2$MacOSX_X86_64 LibreOffice_project/45e2de17089c24a1fa810c8f975a7171ba4cd432</meta:generator>
Comment 29 Commit Notification 2015-04-02 10:55:12 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#85496: editeng: suppress all duplicate attributes during export

It will be available in 4.5.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 30 Michael Stahl (CIB) 2015-04-02 11:02:20 UTC
ok in the 3rd attachment style "T119" has a duplicate attribute
  style:font-name="Cambria"

since we don't know how to reproduce the issue let's fix it
by checking all attributes on export, which is going to
be a bit slower but should prevent the bug.
Comment 31 Commit Notification 2015-04-03 07:27:11 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

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

tdf#85496: editeng: suppress all duplicate attributes during export

It will be available in 4.4.3.

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 32 bureautiquelibre 2015-09-11 09:52:05 UTC
*** Bug 94123 has been marked as a duplicate of this bug. ***
Comment 33 Robinson Tryon (qubit) 2015-12-17 08:38:01 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]