Bug Hunting Session
Bug 86484 - Exporting a Master document and editing the subsequent exported file fails as the exported file is read-only
Summary: Exporting a Master document and editing the subsequent exported file fails as...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.4.1 release
Hardware: x86-64 (AMD64) All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Master-Doc
  Show dependency treegraph
 
Reported: 2014-11-20 08:29 UTC by Rohinton
Modified: 2017-05-12 19:55 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.