Issue 71707

Summary: Export of a master document as a ODT creates uneditable file
Product: Writer Reporter: dlanderson <duane.anderson>
Component: save-exportAssignee: eric.savary
Status: CLOSED FIXED QA Contact: issues@sw <issues>
Severity: Trivial    
Priority: P3 CC: esigra, issues
Version: OOo 2.0.4   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Test Master document (1 of 3)
none
Test Sub-document (2 of 3)
none
ODT result of export from ODM (3 of 3) none

Description dlanderson 2006-11-19 02:44:24 UTC
1) Create a ODT Sub-document
2) Put Heading 2, Text Body, into the Sub-document
3) Create a ODM Master document
4) Put Heading 1, Text Body, into the "Text" part of the Master document
5) Insert Sub-document into Master document
6) Export Master document as ODT file
7) Open ODT file created from Master
8) Can edit that part which was Text in the ODM file
9) Cannot edit the part of ODT file that was from Sub-document file: can't
select text -- pointer jumps back to editable "Text" part that was from ODM file.
Comment 1 dlanderson 2006-11-19 03:53:19 UTC
Created attachment 40686 [details]
Test Master document (1 of 3)
Comment 2 dlanderson 2006-11-19 03:54:38 UTC
Created attachment 40687 [details]
Test Sub-document (2 of 3)
Comment 3 dlanderson 2006-11-19 03:56:36 UTC
Created attachment 40688 [details]
ODT result of export from ODM (3 of 3)
Comment 4 michael.ruess 2006-11-20 07:42:11 UTC
Reassigned to ES.
Comment 5 srhoades 2006-11-20 14:43:12 UTC
I ran into this same problem yesterday (Win XP, OOO 2.0.4). It looked like the
document that was created was basically a master doc. If I moved the sub docs,
the file was empty. Only the first section of the doc (cover page) was editable.

I've used this feature before without trouble, but it was long ago.

I'm especially interested in this issue, both because I need it to work and
because I'm the current owner of the Master Doc chapter of the Writer Guide and
so I'm interested in the documentation implications of this problem.
Comment 6 eric.savary 2006-11-22 12:18:44 UTC
- Press F5 to show the Navigator
- Choose "Sections"
- Right click on your sub-document, "Edit"
- Uncheck "Protected" or "Remove" the section.
Comment 7 eric.savary 2006-11-22 12:19:10 UTC
closed
Comment 8 srhoades 2006-11-22 14:55:55 UTC
I followed the steps to resolve the problem and was able to edit the file. It
appeared to be fixed. Then I saved and reloaded and my edits were gone. So it
looks like you *can* edit the file. You just can't keep your edits.

My Test:
1. Open master document.
2. Export to odt.
3. Open exported file.
4. Unprotect last sub document.
5. Type the word "test" at the end of the document.
6. Save, close, then reopen.

"Test" no longer appears at the end of the document.

It looks like the only way to really get an edited single doc from a master
document is to export, then change every section (one at a time, no way to do it
for all sections) so that it is no longer a link to a subdoc. That's quite a bit
of manual work required to get the result I expected when I exported a master
doc to a single file (an editable document containing all the content that was
in the master doc, that can be worked on or distrubuted separately, without the
sub docs.)

Am I missing something?
Comment 9 eric.savary 2006-11-22 15:59:19 UTC
Yes, you cannot edit the content of a linked document from the container document.

2 posibilities:

1) when you are in a master document (odm):
- Click on "Save content as well" in the Navigator
- Make your changes
- Save
- Reload and answer "No" to "Update all links"

2) Open and modify the document itself
Comment 10 dlanderson 2006-11-22 19:42:01 UTC
From the OpenOffice.org Writer Help

   Using Master Documents and Subdocuments 

   To export a master document as a OpenOffice.org text document:
   1.Choose File - Export.
   2.In the File format list, select a text document file format and click Export.

Notice that there is no mention that the resulting ODT file from the ODM file
becomes a Section that is inserted as a Link and that the section is Write
Protected. At the very least, the help instructions should note explain this to
prevent confusion to thousands of users like me and my employees. 

Similarly, apparently there is nothing in OpenOffice.org Writer Help that
discusses how to edit Linked documents from within an ODT document. 

Note: The procedure given by es' in response to srhoades' statement that "It
looks like the only way to really get an edited single doc from a master
document is to..." didn't result in a single editable ODT document as srhoades
wanted. So, still apparently the only method of getting single merged ODT file
from an ODM file is to export the ODM file to an ODT file and then unchecking
both the Link and Protected boxes in the Edit Sections dialog works for each
Section corresponding to the ODM sub-document files. 

So, similarly, there is nothing in OpenOffice.org Writer Help that describes the
procedure given by to get an editable single merged ODT file from an ODM file. 

Unless OpenOffice.org likes disgruntled users, I suggest that this issue be
reopened so that OpenOffice.org Help can be improved to resolve the above
issues. This would be a positive response to feedback from users. 
Comment 11 eric.savary 2006-11-23 08:28:22 UTC
->dlanderson: in the Section dialog you can press Ctrl+A in the section list box
to work on (unprotect, remove...) all sections at a time.

Please Note: I am reopening the issue because of possible improvements in the
documentation concerning this problem, NOT because of indirect blackmail such as
"Unless OpenOffice.org likes disgruntled users..." which is based on facts and
therefore seldom works... Please avoid this in the future.
Comment 12 eric.savary 2006-11-23 08:44:44 UTC
ES->UFI: PLease add follwing improvements to the documentation:

1) Text Documents - Editing Sections.

After the list introduced by "You can protect, hide, and convert sections to
normal text in your document.", add a notice that one can edit multiple sections
at a time using in the section list box common keyboard shortcuts such as:
- Ctrl+A to select all sections
- Shift+Click to select a block of entries
- Ctrl+Click to select diverses sections

2) Text Documents - Master Documents - Using Master Documents and Subdocuments -
To export a master document as a OpenOffice.org text document:

Please add a comment about:
a) exisiting (remaining) linked sections after export
b) how to remove thoses section to get a merged document (See 1) )
Comment 13 Uwe Fischer 2006-11-23 12:47:25 UTC
Master document help is in swriter/guide/globaldoc.xhp. This needs some work to
be splitted up into useful chunks of guides.
Comment 14 dlanderson 2006-11-26 11:51:06 UTC
Regarding the comment by srhoades:

"It looks like the only way to really get an edited single doc from a master
document is to export, then change every section (one at a time, no way to do it
for all sections) so that it is no longer a link to a subdoc. That's quite a bit
of manual work required to get the result I expected when I exported a master
doc to a single file (an editable document containing all the content that was
in the master doc, that can be worked on or distributed separately, without the
sub docs.)"

To allow a user to avoid the manual work described by srhoades when converting a
ODM to an ODT (especially when the ODM contains a lot of ODT sub-documents),
that when exporting an ODM to an ODT a dialog box appear asking the user to
choose whether the he/she wants the resulting sections to have the Link OR
Protected properties.
Comment 15 srhoades 2006-11-27 03:23:14 UTC
The proposed solution is exactly what I'd like to see. Thanks! I'd like the
default to be to not import as links, but that's not that important. Having the
choice would make me very happy, whatever the default happens to be.
Comment 16 dlanderson 2006-11-27 10:22:17 UTC
In addition to or alternative to my previous suggestion how to allow a user to
avoid the manual work described by srhoades when converting a ODM to an ODT, in
the Master View window when MULTIPLE LINKS are selected and a right-click quick
menu appears let the "Edit link" selection appear in the menu and, when "Edit
link" is selected, allow clearing of the Link OR Protected properties. Thus, the
Link OR Protected properties for multiple links can be modified at any time
after an ODM file is exported to an ODT file. 
Comment 17 Uwe Fischer 2007-01-23 08:25:14 UTC
Changed files swriter/guide/section_edit.xhp and swriter/guide/globaldoc.xhp in
CWS hcshared08 as suggested.
However, I believe it is a bug that sections (and even protected sections) are
generated when a master doc is exported to a plain single doc. The output should
be a single continuos doc without any sections.
Comment 18 Uwe Fischer 2007-03-06 11:16:53 UTC
@es: please verify in cws hcshared08. Open Writer help, index "master
documents". Find a note down in the text about "The subdocuments will be
exported as sections. Use Format - Sections to unprotect and remove sections, if
you prefer a plain text document without sections."
Open Writer help, index "sections;editing". Find the text "You can press Ctrl+A
to select all sections in the list, and you can Shift+click or Ctrl+click to
select some sections."
Comment 19 eric.savary 2007-03-08 14:46:08 UTC
Verified in CWS hcshared08.
Comment 20 eric.savary 2007-04-27 13:28:16 UTC
Ok in m210