Bug 105868 - FILESAVE DOC: TNR with style 12 and direct format font size 11 saved as font size 12 (also 12 in Word)
Summary: FILESAVE DOC: TNR with style 12 and direct format font size 11 saved as font ...
Status: RESOLVED DUPLICATE of bug 132726
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
4.1 all versions
Hardware: All All
: low minor
Assignee: Not Assigned
Keywords: bibisected, bisected, filter:doc, regression
Depends on:
Reported: 2017-02-08 22:22 UTC by Kim Mongan
Modified: 2021-08-11 08:49 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:

Corrupted Doc File (329.00 KB, application/msword)
2017-02-08 22:22 UTC, Kim Mongan
Uncorrupted odt file (325.42 KB, application/vnd.oasis.opendocument.text)
2017-02-08 22:24 UTC, Kim Mongan
ODT saved as DOC in LO 7.3+ and compared (335.48 KB, image/png)
2021-08-11 08:05 UTC, Timur
ODT saved as DOC in LO 7.3+ and then resaved in MSO (475.00 KB, application/msword)
2021-08-11 08:15 UTC, Timur

Note You need to log in before you can comment on or make changes to this bug.
Description Kim Mongan 2017-02-08 22:22:48 UTC
Created attachment 131022 [details]
Corrupted Doc File

Document is corrupted when storing in Microsoft Word (DOC) Format.  This is critical because this is often used to exchange documents.  Error happens in and in 5.2.5.  Attaching document in odt and doc format.  Hmm, can only add 1 attachment.
Comment 1 Kim Mongan 2017-02-08 22:24:32 UTC
Created attachment 131023 [details]
Uncorrupted odt file
Comment 2 Xisco Faulí 2017-02-08 22:57:05 UTC
Confirmed in

Build ID: 36afb355ac37122d32d624db079def123ef548a2
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

Regression introduced in range https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=5bdba378d6fc9f18f618967ec37d07efed2afee4..f47c3906ee0fc35f4b219fb24a0e270956821369
Comment 3 Aron Budea 2017-02-09 02:16:37 UTC
Bibisected the smaller range using repo bibisect-41max.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=0efd28738af121097dcc186dab85dd65c88a0b7b﷒0﷓ is the first bad commit
commit 51d1ba137b79e791cce103640589bbcfd16904e3
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Fri Sep 18 11:00:09 2015 +0800

    commit 0efd28738af121097dcc186dab85dd65c88a0b7b
    Author:     Jian Hong Cheng <chengjh@apache.org>
    AuthorDate: Mon Jul 9 07:32:12 2012 +0000
    Commit:     Xisco Fauli <anistenis@gmail.com>
    CommitDate: Sun Apr 14 17:52:35 2013 +0200
        Fix issue #i120140: After doc file saved by AOO, one more section is created
        * sw/source/filter/ww8/wrtww8.cxx
        * sw/source/filter/ww8/ww8atr.cxx
        MS Word Binary Interoperability
        Patch by: Lin Yuan,<yuanlin.ibm@gmail.com>
        Found by: Yan Ji,<yanji.yj@gmail.com>
        Review by: Jian Hong Cheng,<chengjh@apache.org>
        Change-Id: If32bcced32b671f026ec8c32dd21684eb9e7b1fe

# bad: [600e741dade66a57d8b723c5ffae70c8467c5533] source-hash-f99df8b7ac4cba88ba5f6aa5439605fcff2d1e3e
# good: [89f260798746a0ba3211ccd49fbb1e5d2a3e1170] source-hash-ce0f4825730a0f96ca5369a7d07982ea073901fb
git bisect start '600e741dade66a57d8b723c5ffae70c8467c5533' '89f260798746a0ba3211ccd49fbb1e5d2a3e1170'
# bad: [eb041b01dfad81a861421083656c101ec7f70018] source-hash-cc1c050390ee68105f2f67edf3b6005880861c9b
git bisect bad eb041b01dfad81a861421083656c101ec7f70018
# bad: [94e19a6c67371cda5dd114321f1617d114b20ac0] source-hash-869b3a614c889a75c87e30afd180df7417cb47a8
git bisect bad 94e19a6c67371cda5dd114321f1617d114b20ac0
# bad: [51d1ba137b79e791cce103640589bbcfd16904e3] source-hash-0efd28738af121097dcc186dab85dd65c88a0b7b
git bisect bad 51d1ba137b79e791cce103640589bbcfd16904e3
# first bad commit: [51d1ba137b79e791cce103640589bbcfd16904e3] source-hash-0efd28738af121097dcc186dab85dd65c88a0b7b
Comment 4 QA Administrators 2018-02-10 03:33:21 UTC Comment hidden (obsolete)
Comment 5 Timur 2019-04-30 14:24:10 UTC
Doesn't look good in LO 6.3+. But this "document based" is not a proper bug. 
Default style with fonts TNR 11 opens as 12
Images position wrong.
Comment 6 Timur 2019-04-30 14:38:00 UTC
I'll change this bug to font size. 
But this is not likely to be resolved because the whole document was saved from MS format as ODT and than again as DOC. Not a clean document.
Comment 7 Kim Mongan 2019-05-16 20:09:30 UTC
The document was stored in different formats, first as ODT, then DOC.  Storing it in DOC format with store fonts in document option does not make a difference, the document is still corrupted.
Comment 8 QA Administrators 2021-05-16 03:45:12 UTC Comment hidden (obsolete, spam)
Comment 9 Justin L 2021-08-11 05:18:16 UTC
Font size 12 instead of 11 fixed in 7.1 with
commit 6457d46967f8dbb41199b750d59edde839f24b5d
Author: Justin Luth on Wed Aug 5 14:15:14 2020 +0300
    tdf#132726 tdf#134948 doc/rtf export: don't PostponeWritingText

*** This bug has been marked as a duplicate of bug 132726 ***
Comment 10 Timur 2021-08-11 08:05:49 UTC
Created attachment 174201 [details]
ODT saved as DOC in LO 7.3+ and compared

Thanks Justin for fixing and marking this one.

As an additional check, if ODT attachment 131023 [details] is saved as DOC, screenshot shows how it opens in LO and MSO.
Reopen in LO has wrong images positions while MSO is good. So RT issue for another bug, to check first if already exists.
Comment 11 Timur 2021-08-11 08:15:41 UTC
Created attachment 174202 [details]
ODT saved as DOC in LO 7.3+ and then resaved in MSO

RT is round-trip, indicating fileopen problem.
If LO saved DOC is saved again in MSO, it still opens OK in MSO and wrong in LO.
So I'd say this is a separate fileopen problem.
Comment 12 Timur 2021-08-11 08:49:22 UTC
This bug was saving to DOC but check with DOCX is desirable. 
If ODT is saved to DOCX, it has issues with images in MSO, which may be different bug from saving to DOC.
But that DOCX hangs LO, which is a regression in 7.1. 
I opened bug 143822 for this and when it's resolved, fileopen of DOCX may be checked for yet another bug. 

Feel free to open separate bug for RT of DOC.