Bug 72563 - PAGEREF field flags are not preserved in Roundtrip file
Summary: PAGEREF field flags are not preserved in Roundtrip file
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium major
Assignee: Tushar Bende
URL:
Whiteboard: target:4.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-10 12:33 UTC by Rajashri
Modified: 2014-02-26 12:42 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Document to test PAGEREF (25.70 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2013-12-10 12:33 UTC, Rajashri
Details
RoundTrip Document after fix (13.90 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-01-23 06:49 UTC, Tushar Bende
Details
Original document for PAGEREF (59.32 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-02-11 08:37 UTC, Nikhil Walvekar
Details
This is the file which is getting corrupt after RT with patch applied (101.58 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-02-11 08:50 UTC, Tushar Bende
Details
This is the file which is getting corrupt after RT with patch applied (121.36 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-02-11 08:52 UTC, Tushar Bende
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rajashri 2013-12-10 12:33:45 UTC
Created attachment 90570 [details]
Document to test PAGEREF

PAGEREF filed is not preserved in RT.
Comment 1 Tushar Bende 2014-01-23 06:02:50 UTC
There is a problem that in case of TOC,PAGEREF field tag was not preserved inside <hyperlink> during Roundtrip.
Reason found is there is support available in export.

Steps to reproduce:
1. Open the attached file "y13.01.07 - Table of Contents - Same Even and Odd.docx" in LibreOffice.
2. Click File -> Save As (Microsoft Word 2007/2010 (.docx))
3. Open in MS Office 2010 and compare with original document
Expected:
1. File should contain PAGEREF field tag inside <hyperlink>.
Actual:
PAGEREF field tag missing inside <hyperlink>.
Comment 2 Tushar Bende 2014-01-23 06:49:56 UTC
Created attachment 92638 [details]
RoundTrip Document after fix
Comment 3 Tushar Bende 2014-01-23 06:54:52 UTC
This is how PAGEREF field tag is coming in <w:hyperlink> after fix

<w:hyperlink w:anchor="_Toc355095261">
	<w:r>
		<w:rPr>
			<w:webHidden />
			<w:rStyle w:val="IndexLink" />
		</w:rPr>
		<w:t>
			Heading 1

		</w:t>
	</w:r>
	<w:r>
		<w:fldChar w:fldCharType="begin" />
	</w:r>
	<w:r>
		<w:instrText>
			PAGEREF _Toc355095261 \h

		</w:instrText>
	</w:r>
	<w:r>
		<w:fldChar w:fldCharType="separate" />
	</w:r>
	<w:r>
		<w:rPr>
			<w:rStyle w:val="IndexLink" />
			<w:vanish w:val="false" />
		</w:rPr>
		<w:tab />
		<w:t>
			2

		</w:t>
	</w:r>
	<w:r>
		<w:fldChar w:fldCharType="end" />
	</w:r>
</w:hyperlink>
Comment 4 Commit Notification 2014-02-07 09:44:25 UTC
Tushar Bende committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=138bd3d656c30911d5f45a8b6804e50857f6b30c

fdo#72563 : PAGEREF field tag not preserved during Roundtrip



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Nikhil Walvekar 2014-02-11 08:37:24 UTC
Created attachment 93847 [details]
Original document for PAGEREF

merged patch corrupting this document.
Comment 6 Miklos Vajna 2014-02-11 08:41:56 UTC
OK, as requested I'll just revert the fix in master till we have a better one.
Comment 7 Tushar Bende 2014-02-11 08:50:15 UTC
Created attachment 93849 [details]
This is the file which is getting corrupt after RT with patch applied
Comment 8 Commit Notification 2014-02-11 08:51:37 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=be7d41a2bed7f424f38e2e7340f9b98c3f4f8fa2

Revert "fdo#72563 : PAGEREF field tag not preserved during Roundtrip"



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Tushar Bende 2014-02-11 08:52:02 UTC
Created attachment 93851 [details]
This is the file which is getting corrupt after RT with patch applied
Comment 10 Commit Notification 2014-02-26 10:44:32 UTC
Tushar Bende committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0fb3bdc5d3aa47a61affc67b20bdbb775808fb66

fdo#72563 : PAGEREF field tag not preserved during Roundtrip



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.