Bug 87889

Summary: FILEOPEN: Vertical alignment settings of table content not possible for docx/doc files created with MSO
Product: LibreOffice Reporter: Kevin Suo <suokunlong>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW --- QA Contact:
Severity: normal    
Priority: medium CC: cno, vstuart.foote, yanjingtao
Version: 4.4.0.1 rc   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: test DOCX file, created with MSO 2010
screenshot
test DOC file, created with MSO 2013
Default template in mso 2013 pro plus zh_CN 64bit

Description Kevin Suo 2014-12-31 02:52:02 UTC
LibreOffice is not able to set the table content vertical alignments for DOCX/DOC files created with Microsoft Word.

Steps to reproduce:
1. Insert a 2x2 table in Microsoft Word 2010, and set a bigger row heigt for the rows.
2. Type in some text in each of the table cells, then save as the default DOCX format. (Or you can use my attached test docx file)
3. Open with LibreOffice, try to change the vertical alignment settings. (Select table text, right-click -> Table -> Text Flow -> Vertical Alignment)

Current Behaviour:
Not possible to set Vertical Alignment in step 3.

Expected Behaviour:
Vertical alignment of table cell contents changes when you change the settings.

Note:
* Vertical Alignment works OK with ODT files.
* The workaround is to set the "Format - Page - Text Grid" to "No Grid".

My version: 4.4.0.1
Build ID: 1ba9640ddd424f1f535c75bf2b86703770b8cf6f
Locale: zh_CN
Win 7 X86

This issue was first reported in the LibreOffice Chinese community forum:
http://www.libreofficechina.org/thread-804-1-1.html
and was confirmed to be reproducible in:

4.2.7.2
Build ID: 420m0(Build:2)
Linux Mint 17 X64

MacOS X 10.10.1
LibreOffice Version: 4.4.0.1
Comment 1 Kevin Suo 2014-12-31 02:53:36 UTC
Created attachment 111550 [details]
test DOCX file, created with MSO 2010

This file was created by MSO 2010, using the default blank template.
Comment 2 Cor Nouws 2014-12-31 10:48:04 UTC
He Kevin,

Thanks for the clear report and testfile.

However, I can't reproduce it in 4.2.7.2 and 4.3.5.2 on Ubuntu..

If I select text, or not, or the whole table, in all cases I can do the job via the dialog table (as you mention) ad directly via context menu > Cell ..

Cor
Comment 3 yanjingtao 2015-01-01 17:36:08 UTC
Created attachment 111618 [details]
screenshot
Comment 4 yanjingtao 2015-01-01 17:38:41 UTC
Hi Cor,
   I have reproduce in 4.4.0.1(windows 8.1),look at the attachment 111618 [details], I have set the grid to Vertical Alignment.

PS:
   I found when I save as this file to an odt format, it cannot set vertical alignment either.
Comment 5 Cor Nouws 2015-01-01 22:27:27 UTC
Hi yanjingtao,

interesting that you can confirm this :)
I can't.
I guess in your situations it is for al documents?
Maybe language dependent ??
Comment 6 yanjingtao 2015-01-02 08:43:53 UTC
Hi Cor,
   I have changed my language to en(US),but I can reproduce it too.
Comment 7 V Stuart Foote 2015-01-02 14:48:44 UTC
On Windows 7 sp1, 64-bit en-US
with
Version: 4.4.0.0.beta2
Build ID: be92f32b8f21603a6b7a75dd645f7475bdee519d
Locale: en_US

only reproducible when opening the attached DOCX file-- https://bugs.freedesktop.org/attachment.cgi?id=111550

Vertical paragraph alignment within the existing 4 cell (2x2) table can not be set. Horizontal alignment does work. Also, if a new 2x2 table is inserted when editing in LO Writer, vertical alignment of paragraphs in those cells can *not* be set.

However, it is not reproducible with a new LO Writer document. Paragraphs in the cells of a new 2x2 table respond correctly to any of the 3 vertical alignment buttons.

Nor is it reproducible with a new Word 2007created DOCX. Paragraphs in cells in a newly created table respond correctly to to both horizontal and vertical alignment.
 
Nor is it reproducible with Office365 Word newly created DOCX. Paragraphs in cells in newly created table respond correctly to alignment there as well.

@Kevin, could there be anything special about the MS Word nomal.dot you are using that could be suppressing vertical alignment within tables?
Comment 8 yanjingtao 2015-01-03 15:37:40 UTC
Created attachment 111688 [details]
test DOC file, created with MSO 2013
Comment 9 V Stuart Foote 2015-01-03 17:42:13 UTC
@Kevin, @yanjingtao, *,

Confirmed the same issue with the MS Office 97-2003 formatted .DOC document of attachment 111688 [details]

Of note though, in the TableAlignment.docx\word\settings.xml OOXML settings for the document, I found this value:

<w:compatSetting w:name="overrideTableStyleFontSizeAndJustification" w:uri="http://schemas.microsoft.com/office/word" w:val="1"/>

http://msdn.microsoft.com/en-us/library/dd944611%28v=office.12%29.aspx

When I revert the "1" true, to "0" false; table cell paragraphs honor alignment settings in LibreOffice.  I am not sure, but I suppose this could be a value set for CJK versions of Microsoft Office, and a part of the normal.dot used?

Anyone up to speed on what MS does for localizing the Word products?
Comment 10 Cor Nouws 2015-01-03 20:02:09 UTC
(In reply to V Stuart Foote from comment #7)
> 
> only reproducible when opening the attached DOCX file--
> https://bugs.freedesktop.org/attachment.cgi?id=111550

I used this file too, of course. The description was clear.
But I can't reproduce. 
I see only confirmation on Windows?
Comment 11 yanjingtao 2015-01-05 01:51:37 UTC
Created attachment 111742 [details]
Default template in mso 2013 pro plus zh_CN 64bit
Comment 12 yanjingtao 2015-01-05 01:53:20 UTC
@ V Stuart Foote
I can find Normal.dotm only in my computer, the key "overrideTableStyleFontSizeAndJustification" in this file is 1 by default.
Comment 13 yanjingtao 2015-01-05 01:56:38 UTC
@Cor
How about attachment 111688 [details] ?

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.