Download it now!
Bug 128106 - creating master document from *.odt breaks cross-references
Summary: creating master document from *.odt breaks cross-references
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Master-Doc Fields-Cross-Reference
  Show dependency treegraph
 
Reported: 2019-10-12 12:51 UTC by Oliver Brinzing
Modified: 2020-02-11 17:30 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
cross reference demo (9.84 KB, application/vnd.oasis.opendocument.text)
2019-10-12 12:51 UTC, Oliver Brinzing
Details
cross reference demo with bookmarks (11.64 KB, application/vnd.oasis.opendocument.text)
2019-10-13 06:58 UTC, Oliver Brinzing
Details
global document with repaired bookmarks (28.93 KB, application/x-zip-compressed)
2019-10-13 07:19 UTC, Oliver Brinzing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Brinzing 2019-10-12 12:51:58 UTC
Created attachment 154954 [details]
cross reference demo

steps to reproduce:

- open attached writer document, it contains chapter numbering and some cross 
  references, inserted via Menu Insert/Cross-reference/Headings

- Menu File/Send/Create Master Document 

- after update links, references are broken, showing: 
  Error: Reference source not found
Comment 1 Roman Kuznetsov 2019-10-12 20:49:38 UTC
When you create master document from your file you get master and two different ODT files splitted by Heading 1 style paragraph.
Now you have TWO files and Writer can't work with cross-reference between different files. It works only inside one file.

There is a workaround for it. You can use bookmarks in every ODT with unique names and then you'll paste bookmarks using fields->cross-reference->bookmarks in need ODT. In ODT you'll see some error, but when you'll open your master document its will be works fine.

May be it's a bug, but now it works that way...

Possible better will create an enhancement about cros-references between different files
Comment 2 Oliver Brinzing 2019-10-13 06:58:27 UTC
Created attachment 154965 [details]
cross reference demo with bookmarks

Added a second example with additionally two standard bookmarks/references:

- bookmark "bookmarkchapter1" has a reference from Chapter 2
- bookmark "bookmarkchapter1_text" has a reference from inside Chapter 1

But during master document export *all* xml <bookmark-start/><bookmark-end/> elements will be removed.

IMHO it could work, if the <bookmark-start/> <bookmark-end/> elements would not be removed during export. Maybe the unique "__RefHeading__4_2121972034" names need to be renamed before too.
Comment 3 Oliver Brinzing 2019-10-13 07:19:39 UTC
Created attachment 154966 [details]
global document with repaired bookmarks

added an attachment with manual repaired bookmarks in "global1.odt":

- bookmark "bookmarkchapter1_text"
- bookmark "Chapter 1.1" (Chapter 1.1)

cross references from "global2.odt" will now work
Comment 4 Dieter 2019-10-27 16:39:01 UTC
(In reply to Oliver Brinzing from comment #0)
> Created attachment 154954 [details]
> cross reference demo
> 
> steps to reproduce:
> 
> - open attached writer document, it contains chapter numbering and some
> cross 
>   references, inserted via Menu Insert/Cross-reference/Headings
> 
> - Menu File/Send/Create Master Document 
> 
> - after update links, references are broken, showing: 
>   Error: Reference source not found

I confirm it with

Version: 6.4.0.0.alpha1 (x64)
Build ID: cc57df8f942f239d29cb575ea5a7cb01405db787
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: GL; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

I set status to NEW, because I think this shouldn't happen or there should be at least a warning.