[Libreoffice-bugs] [Bug 116339] New: FILESAVE DOCX SharePoint Server 2010 web editor is unable to edit DOCX files saved in LibreOffice

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Mar 10 15:41:55 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=116339

            Bug ID: 116339
           Summary: FILESAVE DOCX SharePoint Server 2010 web editor is
                    unable to edit DOCX files saved in LibreOffice
           Product: LibreOffice
           Version: Inherited From OOo
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: kelemeng at ubuntu.com

Created attachment 140546
  --> https://bugs.documentfoundation.org/attachment.cgi?id=140546&action=edit
Original file created in Microsoft Word 2013.

Tested with the 14.0.7006 version of Microsoft SharePoint 2010 Server web
editor.

Microsoft's SharePoint Server 2010 offers a web editor to edit DOCX files. This
function doesn't work with DOCX files saved with LibreOffice. The cause for
this issue is that there are small differences in the word/fontTable.xml and
word/settings.xml files saved by Microsoft Office and LibreOffice.

I was able to repair the file based on the DOCX saved with Microsoft Office
2013. I made the following changes in the word/fontTable.xml file:

Original word/fontTable.xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:fonts xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><w:font
w:name="Times New Roman"><w:charset w:val="00"/><w:family
w:val="roman"/><w:pitch w:val="variable"/></w:font><w:font
w:name="Symbol"><w:charset w:val="02"/><w:family w:val="roman"/><w:pitch
w:val="variable"/></w:font><w:font w:name="Arial"><w:charset
w:val="00"/><w:family w:val="swiss"/><w:pitch
w:val="variable"/></w:font><w:font w:name="Liberation Serif"><w:altName
w:val="Times New Roman"/><w:charset w:val="ee"/><w:family
w:val="roman"/><w:pitch w:val="variable"/></w:font><w:font w:name="Times New
Roman"><w:charset w:val="01"/><w:family w:val="swiss"/><w:pitch
w:val="default"/></w:font><w:font w:name="Tahoma"><w:charset
w:val="01"/><w:family w:val="swiss"/><w:pitch w:val="default"/></w:font><w:font
w:name="Carlito"><w:altName w:val="Calibri"/><w:charset w:val="01"/><w:family
w:val="swiss"/><w:pitch w:val="default"/></w:font><w:font w:name="Trajan
Pro"><w:charset w:val="01"/><w:family w:val="swiss"/><w:pitch
w:val="default"/></w:font><w:font w:name="H-Helvetica Thin"><w:charset
w:val="01"/><w:family w:val="swiss"/><w:pitch
w:val="default"/></w:font></w:fonts>

Modified word/fontTable.xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:fonts xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><w:font
w:name="Times New Roman"><w:charset w:val="00"/><w:family
w:val="roman"/><w:pitch w:val="variable"/></w:font><w:font
w:name="Symbol"><w:charset w:val="02"/><w:family w:val="roman"/><w:pitch
w:val="variable"/></w:font><w:font w:name="Arial"><w:charset
w:val="00"/><w:family w:val="swiss"/><w:pitch
w:val="variable"/></w:font><w:font w:name="Liberation Serif"><w:altName
w:val="Times New Roman"/><w:charset w:val="ee"/><w:family
w:val="roman"/><w:pitch w:val="variable"/></w:font><w:font
w:name="Tahoma"><w:charset w:val="01"/><w:family w:val="swiss"/><w:pitch
w:val="default"/></w:font><w:font w:name="Carlito"><w:altName
w:val="Calibri"/><w:charset w:val="01"/><w:family w:val="swiss"/><w:pitch
w:val="default"/></w:font><w:font w:name="Trajan Pro"><w:charset
w:val="01"/><w:family w:val="swiss"/><w:pitch w:val="default"/></w:font><w:font
w:name="H-Helvetica Thin"><w:charset w:val="01"/><w:family
w:val="swiss"/><w:pitch w:val="default"/></w:font></w:fonts>

Note that the second mention of the “Times New roman” font has been removed
(This particular line):
<w:font w:name="Times New Roman"><w:charset w:val="01"/><w:family
w:val="swiss"/><w:pitch w:val="default"/></w:font>

Microsoft Office has a different method for describing font in the
word/fontTable.xml. This is how it looks in the DOCX saved by Microsoft Office
2013:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:fonts xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml"
xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml"
mc:Ignorable="w14 w15"><w:font w:name="Symbol"><w:panose1
w:val="05050102010706020507"/><w:charset w:val="02"/><w:family
w:val="roman"/><w:pitch w:val="variable"/><w:sig w:usb0="00000000"
w:usb1="10000000" w:usb2="00000000" w:usb3="00000000" w:csb0="80000000"
w:csb1="00000000"/></w:font><w:font w:name="Times New Roman"><w:panose1
w:val="02020603050405020304"/><w:charset w:val="EE"/><w:family
w:val="roman"/><w:pitch w:val="variable"/><w:sig w:usb0="E0002EFF"
w:usb1="C0007843" w:usb2="00000009" w:usb3="00000000" w:csb0="000001FF"
w:csb1="00000000"/></w:font><w:font w:name="Courier New"><w:panose1
w:val="02070309020205020404"/><w:charset w:val="EE"/><w:family
w:val="modern"/><w:pitch w:val="fixed"/><w:sig w:usb0="E0002AFF"
w:usb1="C0007843" w:usb2="00000009" w:usb3="00000000" w:csb0="000001FF"
w:csb1="00000000"/></w:font><w:font w:name="Wingdings"><w:panose1
w:val="05000000000000000000"/><w:charset w:val="02"/><w:family
w:val="auto"/><w:pitch w:val="variable"/><w:sig w:usb0="00000000"
w:usb1="10000000" w:usb2="00000000" w:usb3="00000000" w:csb0="80000000"
w:csb1="00000000"/></w:font><w:font w:name="Calibri"><w:panose1
w:val="020F0502020204030204"/><w:charset w:val="EE"/><w:family
w:val="swiss"/><w:pitch w:val="variable"/><w:sig w:usb0="E00002FF"
w:usb1="4000ACFF" w:usb2="00000001" w:usb3="00000000" w:csb0="0000019F"
w:csb1="00000000"/></w:font><w:font w:name="Trajan Pro"><w:altName w:val="Times
New Roman"/><w:panose1 w:val="00000000000000000000"/><w:charset
w:val="00"/><w:family w:val="roman"/><w:notTrueType/><w:pitch
w:val="variable"/><w:sig w:usb0="00000003" w:usb1="00000000" w:usb2="00000000"
w:usb3="00000000" w:csb0="00000001" w:csb1="00000000"/></w:font><w:font
w:name="H-Helvetica Thin"><w:altName w:val="Times New Roman"/><w:panose1
w:val="00000000000000000000"/><w:charset w:val="00"/><w:family
w:val="roman"/><w:notTrueType/><w:pitch w:val="default"/></w:font><w:font
w:name="Tahoma"><w:panose1 w:val="020B0604030504040204"/><w:charset
w:val="00"/><w:family w:val="swiss"/><w:notTrueType/><w:pitch
w:val="variable"/><w:sig w:usb0="00000003" w:usb1="00000000" w:usb2="00000000"
w:usb3="00000000" w:csb0="00000001" w:csb1="00000000"/></w:font><w:font
w:name="Cambria"><w:panose1 w:val="02040503050406030204"/><w:charset
w:val="EE"/><w:family w:val="roman"/><w:pitch w:val="variable"/><w:sig
w:usb0="E00002FF" w:usb1="400004FF" w:usb2="00000000" w:usb3="00000000"
w:csb0="0000019F" w:csb1="00000000"/></w:font></w:fonts>

Note that Microsoft Office has some additional tags like “w:panose1” and
“w:sig”. It seems that this makes it possible to store properties for the same
font multiple times in this particular file.

The word/settings.xml also needed some modifications:

Original word/settings.xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:settings
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:zoom
w:percent="100"/><w:defaultTabStop w:val="708"/><w:compat><w:compatSetting
w:name="compatibilityMode" w:uri="http://schemas.microsoft.com/office/word"
w:val="14"/><w:compatSetting
w:name="overrideTableStyleFontSizeAndJustification"
w:uri="http://schemas.microsoft.com/office/word" w:val="1"/><w:compatSetting
w:name="enableOpenTypeFeatures"
w:uri="http://schemas.microsoft.com/office/word" w:val="1"/><w:compatSetting
w:name="doNotFlipMirrorIndents"
w:uri="http://schemas.microsoft.com/office/word"
w:val="1"/></w:compat><w:themeFontLang w:val="hu-HU" w:eastAsia=""
w:bidi=""/></w:settings>

Modified word/settings.xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:settings xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:zoom
w:percent="100"/><w:defaultTabStop w:val="708"/><w:compat><w:compatSetting
w:name="compatibilityMode" w:uri="http://schemas.microsoft.com/office/word"
w:val="14"/><w:compatSetting
w:name="overrideTableStyleFontSizeAndJustification"
w:uri="http://schemas.microsoft.com/office/word" w:val="1"/><w:compatSetting
w:name="enableOpenTypeFeatures"
w:uri="http://schemas.microsoft.com/office/word" w:val="1"/><w:compatSetting
w:name="doNotFlipMirrorIndents"
w:uri="http://schemas.microsoft.com/office/word"
w:val="1"/></w:compat><w:themeFontLang w:val="hu-HU"/><w:clrSchemeMapping
w:bg1="light1" w:t1="dark1" w:bg2="light2" w:t2="dark2" w:accent1="accent1"
w:accent2="accent2" w:accent3="accent3" w:accent4="accent4" w:accent5="accent5"
w:accent6="accent6" w:hyperlink="hyperlink"
w:followedHyperlink="followedHyperlink"/><w:shapeDefaults><o:shapedefaults
v:ext="edit"/></w:shapeDefaults></w:settings>

Note, that the following tags had been added to w:settings: “xmlns:o” and
“xmlns:v”

The parameters of the w:themeFontLang tag has been changed from
“<w:themeFontLang w:val="hu-HU" w:eastAsia="" w:bidi=""/>” to <w:themeFontLang
w:val="hu-HU"/>.

Also, the “w:clrSchemeMapping” and “w:shapeDefaults” tags have been added to
the end of the document.

After making these modifications, SharePoint's web editor was able to open the
document for editing.

These method was only tested with the provided DOCX file, different documents
might need further steps to ensure compatibility with the SharePoint web
editor.

Steps to reproduce:
1. Download the following file: SharePoint-editor-testfile-LO54.docx
2. Rename the file to ZIP: SharePoint-editor-testfile-LO54.zip
3. Extract the zip file.
4. Edit the word/fontTable.xml and word/settings.xml according to the
description above.
5. Compress the modified files as zip and rename it to DOCX.
6. Upload the file to a SharePoint server, and try the web editor.

Actual results:
Modifications are needed on XML level to make the SharePoint Server 2010 web
editor work with DOCX files saved in LibreOffice.

Expected results:
LibreOffice should be able to create DOCX files compatible with SharePoint
Server 2010 web editor out of the box.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180310/e10366e5/attachment-0001.html>


More information about the Libreoffice-bugs mailing list