Bug Hunting Session
Bug 83299 - Format > Sections is disabled when the cursor is inside a protected section (Word type form fields protected document)
Summary: Format > Sections is disabled when the cursor is inside a protected section (...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2014-08-31 16:03 UTC by eu
Modified: 2016-02-09 11:15 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:

Sample document exhibiting the behavior (36.58 KB, application/vnd.oasis.opendocument.text)
2014-08-31 16:34 UTC, eu
docx document (69.58 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-05-31 20:47 UTC, Mohammed Sameer

Note You need to log in before you can comment on or make changes to this bug.
Description eu 2014-08-31 16:03:22 UTC
I have a document which is, in its entirety, a write-protected section (it contains a fillable form, but the form itself cannot be modified). I wanted to adjust the form, which according to the official help (https://help.libreoffice.org/Writer/Editing_Sections) is done by going to Format > Sections, finding the appropriate section, and unchecking the write-protection.

However, when inside a protected section, the Format > Section menu entry is disabled; and since the document is a write-protected section in its entirety, there is no way to place the cursor into an area which is modifiable.

I would expect the Format > Section to be always enabled.

An loosely related enhancement suggestion would be to make the "read-only" message in the notification bar (at the bottom) right-clickable (or something similar) to remove write-protection quickly.
Comment 1 sophie 2014-08-31 16:12:45 UTC
Hi, could you provide the document, because with my own, the menu Format > Sections is available when I put the cursor inside the writing protected section. Thanks - Sophie
Comment 2 eu 2014-08-31 16:15:31 UTC
@sophie: I can send it with PM if you agree, it contains personal information which I don't necessarily want to have disclosed on the forum I am not able to delete those from the document either ;)
Comment 3 sophie 2014-08-31 16:17:12 UTC
Yes, please, send it to me, thanks - Sophie
Comment 4 eu 2014-08-31 16:34:08 UTC
Created attachment 105494 [details]
Sample document exhibiting the behavior

I managed to remove any personal information by editing content.xml and zipping the bundle again. So there it is. 

> What is strange is that your document is showing no section in the
> Navigator (F5). Are you sure you inserted a section? or is it a table
> instead?

I received the document by e-mail as .doc, I don't know how it was created.
Comment 5 Joel Madero 2014-09-03 21:05:54 UTC
It's something specific to this document, we'd need clear reproducible steps for a blank document. I've tested multiple times with a new document and it always works so it must be something funky with this particular document.

Marking as NOTOURBUG - if you can give us repro steps from scratch that we can create the issue mark as UNCONFIRMED. Thanks
Comment 6 eu 2014-09-03 21:08:48 UTC
It is a legitimate document however it was created and LO should handle it; if you want, mark is as a bug in the DOC importer, but it is definitely an issue people might have. You can check the document internals to see what is wrong. I am sorry to not be able to provide any more details.
Comment 7 Joel Madero 2014-09-03 21:14:39 UTC
I'm not sure what a "legitimate document" is - it could just as easily be a bug on Microsoft's side. That's why we need steps that are reproducible, vs. a single test case that no one knows how it was created nor how to recreate it.
Comment 8 QA Administrators 2014-09-03 21:54:31 UTC
I was curious so I did in fact look into the file and I see that the file contains no "Sect" text in the content.xml - I then created a very simple test case with a single section and it in fact has the "sect1" in the text of the content.xml file. 

More convinced than ever that however this file was created - something funky happened that without repro steps we can't do much about it.
Comment 9 eu 2014-09-04 06:32:50 UTC
Can the bug be retitled then, so that it reflects what the actual problem is? The fact that it is a section problem was just by first guess, but I did not know for sure.
Comment 10 Joel Madero 2014-09-04 06:39:20 UTC
How can it be our bug at all if the actual document is missing the ODF tags that enable sections? The file itself is missing tags that are required to enable sections . . .
Comment 11 eu 2014-09-04 13:51:52 UTC
Ah, ok. The original document was a DOC, which I received by e-mail. If you want, I can send that one privately - it contains personal data. The one attached has those manually removed by editing Content.xml, and was created by opening the DOC in LO and saving as ODT.
Comment 12 Joel Madero 2014-09-04 13:55:04 UTC
What would be better is if you just strip out the private data or create a new really simple test case in Microsoft Office, saving it as a doc, reproducing the same problem in LibreOffice, and then giving us both the doc and the odt file of the new test case. We don't really accept private files - no way to track, makes it a nightmare to get them to developers, most developers don't want to be responsible for private documents, etc . . . etc . . .
Comment 13 eu 2014-09-04 13:59:12 UTC
Sorry, I dont have MS Office here around. If you do, could you strip it yourself and post it, after you get PM?
Comment 14 Mohammed Sameer 2015-05-31 20:45:30 UTC
I received a docx document which has the same problem. I am attaching it here. I have no idea how it was generated though.

I will also reopen this bug and I apologize if that is not considered an appropriate behavior.
Comment 15 Mohammed Sameer 2015-05-31 20:47:46 UTC
Created attachment 116204 [details]
docx document

This is a docx document which causes libreoffice to show a disabled sections entry.
Comment 16 Jean-Baptiste Faure 2016-02-03 05:53:30 UTC
(In reply to Mohammed Sameer from comment #15)
> Created attachment 116204 [details]
> docx document
> This is a docx document which causes libreoffice to show a disabled sections
> entry.

There is no problem to modify this document in LO 5.0. The entry Section in the Format menu is indeed disabled but that does not mean there is a defect.

Closing again as NotOurBug.
Feel free to reopen if you are able to provide a clear step by step scenario to reproduce an unexpected behavior.

Best regards. JBF
Comment 17 eu 2016-02-08 09:08:11 UTC
I re-tried with my attachment 105494 [details] and LO 5.0.3rc2 still exhibits the erroneous behavior -- I can fill the form fields (darker ones), but whenever I try to modify something outside of the fields (such as editing the AAAA-BBBB text), I get a popup saying: "Write-protected content cannot be be changed. / No modifications will be accepted.". No change from 4.x.

With Mohammed's document (attachment 116204 [details]), Format/Section is disabled as well, but I can edit the document freely.

I'd call this bug in Word import (since the section structure is missing in the ODT), but unless someone else has the issue, I won't reopen the bug.
Comment 18 Jean-Baptiste Faure 2016-02-09 06:18:26 UTC
I reproduce the protection alert with your doc, but you can ignore this protection. Try this:
In menu Tools > Options > libreOffice Writer > Formatting Aids -> check "Ignore protection" under "Protected Areas".

I do not know how to remove this protection. If there is a bug, maybe it is there.

Best regards. JBF
Comment 19 eu 2016-02-09 06:26:43 UTC
@J-B: excellent hint, I confirm this makes the document editable :)

I would be for mentioning this in the protection pop-up. Instead of just saying "No changes will be accepted.", something along the lines "No changes will be accepted. (You can override write-protection by setting Tools > Options > libreOffice Writer > Formatting Aids > Protected Areas > Ignore protection.)". It would be suitable for that small number of cases where the document is (for whatever reason) missing section data, without going into Word import code.

I will open a separate bug requesting that.
Comment 20 Cor Nouws 2016-02-09 11:08:17 UTC
This is typical behaviour when you have Word type form fields with protection.
There is no Section in the document, as we know them in Writer.

 ..  Options > libreOffice Writer > Formatting Aids -> check "Ignore protection" under "Protected Areas" has only be added relatively recent.

Before that, indeed there was no way to change the protection.

However, since Word form fields can be password protected, an enhancement to allow password protection and handle it in/with the mentioned option, seems valid.

I think NOTOURBUG is not the proper resolution. Let me set WORKSFORME.