Created attachment 113522 [details] bugdoc The attached document has a cross reference field, which is broken. It shows "Error: Reference source not found" instead of "1.1".
It is a regression from aa852c88c8312512e3595accefb9bc4d234a26a3 fdo#68963 recognize __RefHeading__ bookmarks as TOC in .doc files
If you've already gone to the trouble of identifying the commit, I think this can be -> NEW :)
Michael Meeks committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=45306431759ec5e1bda8caa1ed428fc77035b0f2 tdf#89482 - return size of system virtual device resource at construction. It will be available in 4.5.0. 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.
(In reply to Commit Notification from comment #3) > Michael Meeks committed a patch related to this issue. Wrong bug id in commit message, it is unrelated.
Created attachment 113826 [details] Broken cross-ref .doc example Replaces the original example which was saved with the "corrupt" cross-reference, and so displayed the "Reference source not found" error in EVERY version of LO.
The regression is caused by sw/source/filter/ww8/ww8par5.cxx line: pReffedStck->NewAttr( aStart, SwFltBookmark( EnsureTOCBookmarkName( sOrigName ), aVal, pB->GetHandle(), IsTOCBookmarkName( sOrigName ) )); The reference name is "__RefHeading__3_20764935". Previously the call to IsTOCBookmarkName was returning false - now it is returning true.
I am pretty sure that _Toc is an MSWord-only convention, and that __Refheader__ is a comparable LO convention. So after a long review, I think my original "fix" is still conceptually valid. (see CrossRefBookmark.cxx, as well as all of the "ensure __Refheader__ prefix whenever isTocBookmark is true). Not all references to __Refheader__ bookmarks update aReferencedTOCBookmarks, and ww8par.cxx deletes any TOC bookmarks that aren't there (and thus this regression). Since ww8par.cxx is primarily concerned about importing Word's .doc format, I think it is safe to change it so that ONLY "_Toc" bookmarks that are not referenced are deleted. That would leave all LibreOffice generated bookmarks intact. However, this doesn't resolve another complication: Only ONE crossreferenceBookmark is allowed - so that might cause other regressions if more than one bookmark attempts to reference the same header. (sw/source/core/doc/docbm.cxx:383: MarkManager::makeMark(..) - refusing to create duplicate CrossRefBookmark) Alternative 1) Reverse bug 68963 and find out why a REFERENCE *must* be marked as a TOC in order to be visible. (I haven't been able to discover why). This would be the ideal alternative if possible. Alternative 2) In the CrossRefHeadingBookmark constructor, append a "_Toc" to the prefix. This might work without causing regressions, but it would affect all of LO, not just .doc. This would only affect newly created documents.
(In reply to Justin L from comment #5) > Created attachment 113826 [details] > Broken cross-ref .doc example > > Replaces the original example which was saved with the "corrupt" > cross-reference, and so displayed the "Reference source not found" error in > EVERY version of LO. It was saved from Word 2010, and it works in Word 2010. I appreciate, if it is a different problem. Your bugdoc is the one, that I wanted to create really.
Michael Meeks committed a patch related to this issue. It has been pushed to "libreoffice-4-4": http://cgit.freedesktop.org/libreoffice/core/commit/?id=fe00fba292a9ad1c416acc199e7aba6657ab40b3&h=libreoffice-4-4 tdf#89482 - return size of system virtual device resource at construction. It will be available in 4.4.2. 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.
(In reply to Commit Notification from comment #9) > Michael Meeks committed a patch related to this issue. Again, it is for bug 89492.
fix proposed at https://gerrit.libreoffice.org/#/c/14822/ Notes: 1.) The major part of the fix is in Read_F_Ref - adding a common block of code to ensure that aReferencedTOCBookmarks is updated. 2.) There were still combinations that would cause "duplicate" cross-references to be attempted, so I added _Toc to all cross-ref bookmarks. (docbm.cxx: SAL_WARN("sw.core", "MarkManager::makeMark(..) - refusing to create duplicate CrossRefBookmark") These combinations exist in the updated .doc testfile included in the patch. 3.) The "_Toc" additon will affect all formats, not just .doc. I couldn't find any other way to identify a REF_CONTENT type of .doc bookmark though, and don't think this should cause any regressions. (code search for __Refheading__ | GetCrossRefHeadingBookmarkNamePrefix() | isTOKBookmark | IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK). Just to be safe, I won't push the crossreference.cxx change to the stable 4.3 branch, meaning that although it will be able to edit existing 4.4.2 authored docs OK, it can't create an original doc with working crossref headers (which it already can't do). Sorry for the initial regression. I hope this patch is better.
Justin Luth committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=2ad285eacda91bb95ec2fbb44ce6fa0b4d50f817 tdf#89482 fix __refheading__ regression, set only CrossRefs as TOC. It will be available in 4.5.0. 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.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-4-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d66458347f552cbd436d82700626d45eeb1f80fb&h=libreoffice-4-3 tdf#68963 avoid __refheading__ regression reported in tdf#89482 It will be available in 4.3.7. 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.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-4-4": http://cgit.freedesktop.org/libreoffice/core/commit/?id=92a43d05d14b1ab7b8bfb4052874d0f0e6c62ef9&h=libreoffice-4-4 tdf#89482 fix __refheading__ regression, set only CrossRefs as TOC. It will be available in 4.4.3. 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.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-4-4-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=18b9bb8bafc3946305e2b011f5f100cb34fea959&h=libreoffice-4-4-2 tdf#89482 fix __refheading__ regression, set only CrossRefs as TOC. It will be available in 4.4.2. 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.
I think the problem is solved in 4.4.2 with a .doc file. But if you save a cross reference to a .docx file and try to open the docx file, LO crashes. I attach 2 files (original odt + file saved as docx which cause LO crash).
Created attachment 114641 [details] original odt file
Created attachment 114642 [details] file saved as docx if I try to open this file in LO, LO crashes
Test environment: Windows 7 (64bit). LibreOffice 4.4.1 failed .doc file as described in this bug. LibreOffice 4.4.2 opens .doc file correctly and without crashing. LibreOffice 4.4.1 failed .docx file as described in this bug LibreOffice 4.4.2 crashes when opening .docx (if quickstart not running, all other LO closed). Returning status to "fixed" since the .doc file works properly. A new bug will be created for the unrelated .docx crashing problem.
Migrating Whiteboard tags to Keywords: (bibisected) [NinjaEdit]
Bug 89482's cross-reference problem highlights a frequent difficulty when utilizing DOC imports. Broken fields can disrupt workflows, so fixing them carefully is necessary. An essay writing service UK may be a useful choice for people struggling with academic responsibilities with these intricacies, providing assistance with writing assignments. visit: https://masteressaywriters.co.uk/