Bug 50188 - FILEOPEN MSO2007 .docx with wrong FORMATTING, title is incorrectly bold
Summary: FILEOPEN MSO2007 .docx with wrong FORMATTING, title is incorrectly bold
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.2 release
Hardware: x86 (IA32) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: (target:4.0.0)
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-21 14:17 UTC by junk_2010
Modified: 2013-02-18 19:58 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description junk_2010 2012-05-21 14:17:06 UTC
This bug is split out from bug 49046.

In LibreOffice 3.5.2, for a docx file on Ubuntu 12.04, the title in the document is now on two lines rather the one it was in Word 2007 on Windows 7.

The docx file example is attachment 60429 [details] 
Attachment 60431 [details] shows a pdf of how the docx file looked in Word 2007
Attachment 60866 [details] shows a pdf of how the docx file looks in LibreOffice on Ubuntu
Comment 1 Roman Eisele 2012-05-22 09:23:38 UTC
I think that this is not a bug, but a font issue, which has the same causes as notet by Rainer Bielefeld on bug 50189. The original .doc file and
the PDF file exported from Word 2007 use 'Cambria' for the title, but the
PDF exported from LibreOffice on Ubuntu uses 'DejaVu Sans' instead, probably
because 'Cambria' is a Microsoft font which comes with newer Windows and Office
versions but is not available on Ubuntu (correct me if I am wrong).

If I open the .doc file with LibreOffice on MacOS X, it looks fine as long as
'Cambria' is installed. If I change the font of the title manully to 'DejaVu
Sans', it looks exactly like in the PDF exported on Ubuntu -- two lines, with a
break before '26pt'.

@junk_2010:
Could you please try if changing the font face manually solves the issue for you, too? Then this would really be NOTABUG, but just a font issue. Thank you very much.

I am sorry for the work reporting this bug separately has caused for you! I did not test this issue as part of bug 49046 because it was not in the list of three main issues in your original description of that bug which I have tested and commented on in the report for bug 49046 ...
Comment 2 junk_2010 2012-05-24 15:04:36 UTC
In comment #1 you said:

> I think that this is not a bug, but a font issue

I am not sure about this. The reason for this is I have two documents with identical contents, except one is a doc and the other a docx.

The doc file example is attachment 60428 [details]
The docx file example is attachment 60429 [details]

It is only the docx file that shows this title on two lines issue in Ubuntu. The pdf that shows this is attachment 60866 [details].

The pdf that shows the doc file in Ubuntu is attachment 60865 [details]. In this the title is on one line. It is centered rather than left justified. This has been reported as a separate bug 50190.

If this bug were due to a font issue, would I not expect the same font to be used for both the doc and docx files on import, and hence get the same result? Even if this is not a bug, I believe there is a bug that the doc and docx documents display the titles differently.

I have re-opened the docx file in LibreOffice 3.5.3.2 in Ubuntu. When I place my cursor in the title line the font in the menu font box is shown as "Cambria", as it was in Word 2007. I had therefore assumed that the Cambria font is installed. The same is true if I place my cursor in a part of the text that should be "Calibri" font.

The same is true for the fonts in LibreOffice when I open the doc file.

Looking in more detail. The title in the docx document is bold. If I "unbold" it it fits on 1 line.
Similarly in the doc document the title is "unbold". If i "bold" it it splits onto two lines.

Checking back in Word 2007 for both the doc and docx documents, the title is "unbold". So it looks that the error is the LibreOffice import in Ubuntu for the docx document incorrectly "bolds" the title.
Comment 3 junk_2010 2012-05-28 12:44:00 UTC
Now at least part of the issue appears to be an incorrect use of "bold" in the title of a docx document, I have re-checked in Max OSX 10.6, LibreOffice 3.5.2.2 on an Intel architecture machine.

Even though for both the doc and docx documents the title is on one line, the title in the docx document is incorrectly "bold", which is the same issue as is occuring in Ubuntu.

Ubuntu LibreOffice also has the possibility of the additional issue with not having the correct font installed, but I believe the title in a docx document being "bold" when it should not be is an issue with more than one platform. So I shall update the "Platform" field from "Linux(All)" to "All". I trust this is the correct thing to do.
Comment 4 Roman Eisele 2012-05-29 08:56:21 UTC
(In reply to comment #3)
> Now at least part of the issue appears to be an incorrect use of "bold" in the
> title of a docx document, I have re-checked in Max OSX 10.6, LibreOffice
> 3.5.2.2 on an Intel architecture machine.
> 
> Even though for both the doc and docx documents the title is on one line, the
> title in the docx document is incorrectly "bold", which is the same issue as
> is occuring in Ubuntu.

Well, after some additional testing, I have to agree with you about the "part of the issue":

[REPRODUCIBLE] I can confirm that the title of the .docx file appears in bold in LibreOffice, while it is NOT bold when I open the .docx file with MS Office 2010. This happens independently from the question if the typeface originally used for the title ('Cambria') is installed or not. Also, if I open the .doc file version of our test file (attachment 60428 [details]) with LibreOffice, the title correctly appears without the bold attribute.

So there is really a bug especially in the .docx import of LibreOffice: the title becomes bold, while it is not bold in the .docx file.

My tests have been done with LibreOffice 3.5.4.2 (Build-ID: 165a79a-7059095-e13bb37-fef39a4-9503d1) on MacOS X, so you are right to change the Platform to "All".


But I still think that the *other* part of the original problem ("title now on two lines rather than one") is caused by a missing font ('Cambria'), as stated in my comment #1. Even if LibreOffice says that the font was 'Cambria' when you click inside the title, this does not mean that the font actually used for *display* is really 'Cambria' (I have tried!), it just means that the *document* wants to use 'Cambria' for the title. This is verified by your PDF file created on Ubuntu -- the font actually used for the title in the PDF file is 'DejaVu Sans Bold' (sic! I have verified this using Adobe Acrobat). 

So, thank you very much for insisting on the fact that there is a bug! There is one, of course, namely the erroneously bold import of the title. (I'm sorry that I did not see it earlier; the reason for this may be the fact that, if I have 'Cambria' installed, 'Cambria Bold' is used, but this typeface does not look very 'bold' to me -- so, when 'Cambria' is installed, it is easy to oversee the erroneously bold style, and when 'Cambria' is not installed, a completely different typeface is used ['DejaVu Sans Bold'], and therefore I did again not pay attention to the bold/not bold attribute first.)


Could you agree to a change of the Summary field? Instead of "Formatting - Error with LibreOffice Ubuntu docx import, title now on two lines rather than one", I would propose to write

"FILEOPEN: Error in MSO2007 .docx import: title appears errorneously in bold"

Given this Summary, we have a well-defined, easily reproducible bug. This should make it far easier for the developers to fix the issue ...

(And once that the bold style issue is fixed, we can test again if there is still another issue with the title style, or if the other problem really was just a font issue.)
Comment 5 Roman Eisele 2012-05-29 09:05:22 UTC
The problem that the title erroneously appears in bold is

still REPRODUCIBLE with LOdev version 3.6.0alpha0+ (Build ID: b5f066e; installation file: master~2012-05-28_04.23.03_LibO-Dev_3.6.0alpha0_MacOS_x86_install_en-US.dmg), US English langpack installed, on MacOS X 10.6.8 German.
Comment 6 junk_2010 2012-05-29 11:20:07 UTC
I have changed the title of this bug report from the original of:

Formatting - Error with LibreOffice Ubuntu docx import, title now on two lines rather than one

to

Formatting - Error with LibreOffice docx import, title is incorrectly bold

As this appears to be the genuine error and now makes sense as a title. Trust this is the correct thing to do.
Comment 7 Roman Eisele 2012-05-30 03:05:09 UTC
@Cédric Bosdonnat,
@Michael Stahl:
This Writer issue looks minor, but it is important, because the sample .docx file used for testing (attachment 60429 [details]) just contains the default styles from MS Office/Word 2007. Therefore, the fact that the title of this sample file appears with wrong formatting means that many many other documents created with MS Office 2007/2010 will suffer from the same problem ...

Cf. bug 50190, which reports yet another problem with the formatting of the same title from the same sample file (alignment: centered instead of left aligned).

Thank you very much for taking a look at this issue! Please assign this bug to yourself if you take it ...


@junk_2010:
Thank you very much for your answer! I have changed the Summary field again to include some subcomponents/keywords which we now use for all bug reports, in order to make it easier to find similar reports ... (cf. bug 50190, where Rainer Bielefeld has inserted the same tags).
Comment 8 Jorendc 2013-02-17 17:18:52 UTC
I can't reproduce this behavior anymore using LibreOffice 4.0.0 with Linux Mint 14 x64. Therefore I mark this bug as RESOLVED WORKSFORME (not FIXED because we don't know which commit fixed this issue).

If this issue re-appears or isn't fixed in LibreOffice 4.0.0, please feel free to REOPEN.

Kind regards,
Joren
Comment 9 junk_2010 2013-02-18 19:58:15 UTC
I can also confirm that using LibreOffice 4.0.0.3, on a Mac running OSX 10.6 on an Intel architecture machine, the problem is fixed.
The title in the .docx document is now correctly "not-bold".

Thank-you for fixing this.