Bug 75946 - FILESAVE docx export -- w:hyperlink tags unbalanced (seems to write w:p to close instead)
Summary: FILESAVE docx export -- w:hyperlink tags unbalanced (seems to write w:p to cl...
Status: RESOLVED DUPLICATE of bug 76316
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.5.3 release
Hardware: x86-64 (AMD64) Linux (All)
: highest critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-09 08:23 UTC by Artur Linhart
Modified: 2014-03-19 11:20 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
DOCX Document created by Libre office and containing more pages of text. After opening this document in libre Office 4.1.5.3 it displays only 2 pages from more previously created (8.53 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-03-09 08:23 UTC, Artur Linhart
Details
document.xml (57.76 KB, text/xml)
2014-03-09 09:29 UTC, Artur Linhart
Details
Repaired document with removed invalid hyperlink tags (8.78 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-03-09 09:52 UTC, Artur Linhart
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Artur Linhart 2014-03-09 08:23:25 UTC
Created attachment 95397 [details]
DOCX Document created by Libre office and containing more pages of text. After opening this document in libre Office 4.1.5.3 it displays only 2 pages from more previously created

In teh stable version under Debian Jessie I have crated a document with docx extension. After I edit the document and save it, it contains the text I have entered (In the file included in the document word/document.xml I can see the changes), but if I open the whole document in Libre office, then only short part of the text (2 pages of 4 or 5 originally saved) is displayed to me.
Comment 1 Artur Linhart 2014-03-09 08:26:13 UTC
... the document has been created and is opened in the same libre office version/installation. I just created it opened the document 2 days later and this effect occurs.

This is a very big problem, which cost me many hours of work. I have saved the document regularily uring the work.
Comment 2 Artur Linhart 2014-03-09 09:29:26 UTC
Created attachment 95401 [details]
document.xml

I have found the document.xml has been generated in the wrong way by the Libre Office save mechanism.

I have reformatted it so it can be seen better (in the attachment) and there is the following error if I try tov alidate the xml document:

The 'w:hyperlink' start tag on line 1281 position 5 does not match the end tag of 'w:p'. Line 1288, position 5.

I looked there, and there is really the problem with the missing hyperlink tag.
Comment 3 Artur Linhart 2014-03-09 09:52:03 UTC
Created attachment 95405 [details]
Repaired document with removed invalid hyperlink tags

same error was also on the line 1444.

It seems this occurs every time, if I write the hyperlink paragraph and on the same line behind the hyperlink I add also the text comment, which is not formatted as hyperlink, but like the normal text, then still in the 
document.xml, there is generated a starting tag like

	<w:hyperlink r:id="rId31">

- it seems the procedure, creating the hyperlink tag automatically generates in this case the start for new hyperlink in such case, but not always - in the text lower there I can find it also correctly. But somehow it that way it can be generated, I guess - just make in the paragraph the hyperlink and try to add text behind the hyperlink into the same paragraph.

I have removed the lines with invalid hyperlink start before this simple text, so it were the lines (in the previously uploaded document.xml):

			<w:hyperlink r:id="rId27">

			<w:hyperlink r:id="rId31">

			<w:hyperlink r:id="rId36">

			<w:hyperlink r:id="rId39">

			<w:hyperlink r:id="rId46">

			<w:hyperlink r:id="rId49">

			<w:hyperlink r:id="rId52">

And I have inserted the document.xml back to the original odt archive and now it opens (There is also 1 Problem for me, because I have reformattted the document.xml in order to be able to perform the repair, so it has inserted a lot of <TAB> characters into the document, but this is not so big problem for me.)

So, it seems, the problem is in the LibreOffice export procedure to docx, which created the invalid document.xml file and the importer then does not import anything, what is behind the first false (unfinished) hyperlink tag, what seems to be the expected behavior for such cases.
Comment 4 Björn Michaelsen 2014-03-15 21:55:24 UTC
I assume attachment 95397 [details] is the already corrupted file, please attach the file before it was corrupted and the steps take to reproduce the corruption. => NEEDINFO
Comment 5 Björn Michaelsen 2014-03-15 21:56:54 UTC
(also please dont confirm your OWN reports by moving them from UNCONFIRMED to NEw, thanks)
Comment 6 Artur Linhart 2014-03-17 10:42:23 UTC
Sorry for changing the status.

Unfortunatelly, I have reated the document in libre office directly and just saved it as docx, so there is was odt available. I will try to reproduce the steps again.
Comment 7 Artur Linhart 2014-03-17 10:43:26 UTC
Sorry for typing errors:
... there was no odt created...
Comment 8 Artur Linhart 2014-03-17 11:11:55 UTC
Unfortunatelly, I canot reproduce it right now. What I remember, there was involved also the copy of the text with the links from Iceweasel (Firefox) :-(.
Comment 9 Björn Michaelsen 2014-03-19 11:20:51 UTC
Would close it as not reproducable usually, but making it a dupe of fdo#76316 now as they appear to be very similar.

*** This bug has been marked as a duplicate of bug 76316 ***