Bug 86484

Summary: Exporting a Master document and editing the subsequent exported file fails as the exported file is read-only
Product: LibreOffice Reporter: Rohinton <rohinton.kazak>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED DUPLICATE    
Severity: enhancement CC: libreoffice-ux-advise, robinson.libreoffice
Priority: medium Keywords: needsUXEval
Version: 4.3.4.1 release   
Hardware: x86-64 (AMD64)   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 107805    

Description Rohinton 2014-11-20 08:29:13 UTC
To reproduce:

1. create a document with some headings, I used header-1,
   and minimal text under them.

2. (For OS X) I used File->Send To-> Create Master Document.
   Follow instruction there.

3. Restart LO and edit the newly create master document. 

4. Now use the File ->export menu option to export this
   Master Document + sub-documents out to a new .odt document
   file. ( There is only one choice! ).

This now gives us a file the same as original, we hope.

5. Now try and edit this newly exported file, and we see that
   LO thinks it's chapters are still read-only
Comment 1 Rohinton 2014-11-20 08:56:03 UTC
I have done a bit more digging and see the following, which may mean my expectation
of export is incorrect.  Basically I am using export to reconstitute the original document, as it was before I converted it to a 'Master' document. This way I can
Save As... a different format, required by the receiver of this document.

I see, via the navigator pane, a normal result as if this was a single document
however in the 'Sections' section I guess what are the original links to the
sub documents?

And finally if I remove the entries from "Sections" I am back to my original
document....

So is my assumption of Export reverting this back to a single document/file
is incorrect, but it is the only way to get what I need.

Is this just a documentation issue then?  Why are the entries in the "Sections"
there in the first place after an export? As removing them now gives me what I
wanted.
Comment 2 Robinson Tryon (qubit) 2014-11-20 09:28:19 UTC
TESTING with LO 4.4.0.0.alpha2 + Ubuntu 14.04

(In reply to Rohinton from comment #0)
> To reproduce:
> 
> 1. create a document with some headings, I used header-1,
>    and minimal text under them.
> 
> 2. (For OS X) I used File->Send To-> Create Master Document.
>    Follow instruction there.
> 
> 3. Restart LO and edit the newly create master document. 
> 
> 4. Now use the File ->export menu option to export this
>    Master Document + sub-documents out to a new .odt document
>    file. ( There is only one choice! ).
> 
> This now gives us a file the same as original, we hope.
> 
> 5. Now try and edit this newly exported file, and we see that
>    LO thinks it's chapters are still read-only

CONFIRMED

(In reply to Rohinton from comment #1)
> And finally if I remove the entries from "Sections" I am back to my original
> document....

Indeed. Diffing the content.xml files, they look identical.

> Is this just a documentation issue then?  Why are the entries in the
> "Sections"
> there in the first place after an export? As removing them now gives me what
> I wanted.

Good question. I wouldn't expect the sections and read-only settings to remain after the conversion back to ODT, so let's mark this as an enhancement and change Status -> NEW.

There is limited documentation about this behavior, but it doesn't explain why retaining read-protected sections is the default:
https://help.libreoffice.org/Writer/Working_with_Master_Documents_and_Subdocuments#To_Export_a_Master_Document_as_a_LibreOffice_Text_Document

At the very least, I think it would make sense to add a warning when converting ODM -> ODT.
Comment 3 Buovjaga 2021-03-11 08:03:34 UTC
(In reply to Robinson Tryon (qubit) from comment #2)
> At the very least, I think it would make sense to add a warning when
> converting ODM -> ODT.

Design team: what do you think?
Comment 4 Heiko Tietze 2021-03-16 08:48:36 UTC
Exporting a master document to standard ODT converts the individual files into sections that link to the target document, which is more or less the same as a master document. It's well documented and I don't see a reason to change the behavior.

Nevertheless this ticket is a duplicate.

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