How to unprotect readonly parts of a document?

Evidently this mailing list doesn't like attachments. I have stored
the demo document at:

  http://www.rowland.harvard.edu/~stern/readonly-demo.odt

Alan Stern

When I click on this URL, a HTML document appears based from LO -
            with only 1 line.

       I can delete, add, ... to this line.

       Hopefully someone else will understand your question and will come
to your aid -
           as for me, your question is beyond me.

       BTW - attachments are not allowed on this list :wink:

Hi :slight_smile:
@ Alan.  Normally a greyed area like that indicates it is a Table of Contents or index or something.  Uusually the right-click menu gives more options such as "update ToC".  I'm not sure what has gone wrong with this one.  Hopefully others  ...

@ Anne
Try
Tools - Options - Internet - "Browser Plugin"
and UNtick the box to prevent ODF documents from opening up in your web-browser.  Quite a few people get the plugin for Firefox or whatever, thinking it would be great and then regret it

Regards from
Tom :slight_smile:

This is very strange. I have not seen this issue before.

After experimenting with the file for a bit, I found that
1. I saved the file to my disk
2. added a space at the beginning of the line
3 saved the file again
4. closed the file
5 opened the file in LibreOffice. I found that the read-only protection
had been removed. I was then able to edit that read-only area of the line
- as well as remove the space at the beginning of the line.

I would love to know how the file had been generated to cause this problem.
regards
Mike

This is very strange. I have not seen this issue before.

After experimenting with the file for a bit, I found that
1. I saved the file to my disk
2. added a space at the beginning of the line
3 saved the file again
4. closed the file
5 opened the file in LibreOffice. I found that the read-only protection
had been removed. I was then able to edit that read-only area of the line
- as well as remove the space at the beginning of the line.

That doesn't work for me.

I would love to know how the file had been generated to cause this problem.

I don't know the exact details. In outline, the file was originally
created in Microsoft Word (probably on a Mac) and the readonly fields
were added by way of the EndNote plugin. I then imported the .doc file
into LibreOffice and saved it in .odt format.

Does this sound like a bug? Perhaps I should report it.

Here's another odd thing I encountered. Moving the cursor one
character at a time (using the right-arrow key), I find what appears to
be two hidden characters: one at the beginning of the readonly field
and one at its end.

That is, start with the cursor just to the left of the blank space
before the "(9)" field. Pressing right-arrow advances the cursor to
the right of the space, leaving it on the left-hand edge of the '('.
Pressing right-arrow again doesn't move the cursor at all. Pressing it
once more advances the cursor between the '(' and '9'.

Alan Stern

Hi :slight_smile:
Err, you could try copy&pasting in or re-pasting but use 
Shift Ctrl v
to paste in as unformatted text.  But then you will lose the functionality of the strange 9 thing
Regards from 
Tom :slight_smile:

Alan Stern wrote:
<snip>

Here's another odd thing I encountered. Moving the cursor one
character at a time (using the right-arrow key), I find what appears to
be two hidden characters: one at the beginning of the readonly field
and one at its end.

That is, start with the cursor just to the left of the blank space
before the "(9)" field. Pressing right-arrow advances the cursor to
the right of the space, leaving it on the left-hand edge of the '('. Pressing right-arrow again doesn't move the cursor at all. Pressing it
once more advances the cursor between the '(' and '9'.

Alan Stern
  

Alan,
Did you try viewing hidden objects?
Check the following:
View -> Field Names
View -> Nonprinting Characters
View -> Hidden Paragraphs

Maybe one of those will make your "hidden characters" visible and give you a clue as to what it is doing.

Another more painful option could be to unzip the file and look at the text to see what is there at these "hidden" characters, optionally editing it out manually.

Third, maybe another ODF processor, such as KDE's editor, Kword, may not support this readonly attribute and allow you to edit it normally.

Hope these suggestions help.
Girvin Herr

Alan Stern wrote:
<snip>
> Here's another odd thing I encountered. Moving the cursor one
> character at a time (using the right-arrow key), I find what appears to
> be two hidden characters: one at the beginning of the readonly field
> and one at its end.
>
> That is, start with the cursor just to the left of the blank space
> before the "(9)" field. Pressing right-arrow advances the cursor to
> the right of the space, leaving it on the left-hand edge of the '('.
> Pressing right-arrow again doesn't move the cursor at all. Pressing it
> once more advances the cursor between the '(' and '9'.
>
> Alan Stern
>
Alan,
Did you try viewing hidden objects?
Check the following:
View -> Field Names
View -> Nonprinting Characters
View -> Hidden Paragraphs

I have tried these. They make no difference.

Maybe one of those will make your "hidden characters" visible and give
you a clue as to what it is doing.

Nope.

Another more painful option could be to unzip the file and look at the
text to see what is there at these "hidden" characters, optionally
editing it out manually.

Interesting; I didn't know one could do that. The content.xml file
shows the following (the "..." part is where I erased a lot of
irrelevant material; I also wrapped a couple of long lines):

Normal</text:span>
<text:span text:style-name="T3"> </text:span>
<field:fieldmark-start text:name="__Fieldmark__24_1596095481"
field:type="vnd.oasis.opendocument.field.UNHANDLED">
<field:param field:name="vnd.oasis.opendocument.field.code"
field:value=" ADDIN EN.CITE &lt;EndNote&gt; ... "/>
<field:param field:name="vnd.oasis.opendocument.field.id" field:value="81"/>
</field:fieldmark-start>
<text:span text:style-name="T5">(9)</text:span>
<field:fieldmark-end/>
<text:span text:style-name="T1"> </text:span>
<text:span text:style-name="T2">Normal again.

I don't know enough to interpret all that, but clearly there is a field
of a sort that LibreOffice isn't ready to handle.

Is there some way to get this information from within LibreOffice
itself? I would that the field name and/or value should be accessible.

Third, maybe another ODF processor, such as KDE's editor, Kword, may not
support this readonly attribute and allow you to edit it normally.

Maybe. I don't see where in there the field is marked as readonly.

Alan Stern

Alan Stern wrote:

Alan Stern wrote:
<snip>
    

Here's another odd thing I encountered. Moving the cursor one
character at a time (using the right-arrow key), I find what appears to
be two hidden characters: one at the beginning of the readonly field
and one at its end.

That is, start with the cursor just to the left of the blank space
before the "(9)" field. Pressing right-arrow advances the cursor to
the right of the space, leaving it on the left-hand edge of the '('. Pressing right-arrow again doesn't move the cursor at all. Pressing it
once more advances the cursor between the '(' and '9'.

Alan Stern
  

Alan,
Did you try viewing hidden objects?
Check the following:
View -> Field Names
View -> Nonprinting Characters
View -> Hidden Paragraphs
    
I have tried these. They make no difference.

Maybe one of those will make your "hidden characters" visible and give you a clue as to what it is doing.
    
Nope.

Another more painful option could be to unzip the file and look at the text to see what is there at these "hidden" characters, optionally editing it out manually.
    
Interesting; I didn't know one could do that. The content.xml file shows the following (the "..." part is where I erased a lot of irrelevant material; I also wrapped a couple of long lines):

Normal</text:span>
<text:span text:style-name="T3"> </text:span>
<field:fieldmark-start text:name="__Fieldmark__24_1596095481"
field:type="vnd.oasis.opendocument.field.UNHANDLED">
<field:param field:name="vnd.oasis.opendocument.field.code"
field:value=" ADDIN EN.CITE &lt;EndNote&gt; ... "/>
<field:param field:name="vnd.oasis.opendocument.field.id" field:value="81"/>
</field:fieldmark-start>
<text:span text:style-name="T5">(9)</text:span>
<field:fieldmark-end/>
<text:span text:style-name="T1"> </text:span>
<text:span text:style-name="T2">Normal again.

I don't know enough to interpret all that, but clearly there is a field of a sort that LibreOffice isn't ready to handle.

Is there some way to get this information from within LibreOffice itself? I would that the field name and/or value should be accessible.

Third, maybe another ODF processor, such as KDE's editor, Kword, may not support this readonly attribute and allow you to edit it normally.
    
Maybe. I don't see where in there the field is marked as readonly.

Alan Stern
  

Alan,
I am not an expert in decoding the XML for LO. Maybe someone else on the list can explain that. Even though there is no "smoking gun" reference to a "readonly" attribute, there do seem to be a lot of numbers in your snippet above that could mean something to LO. On the other hand, I am not sure what LO would do when it encounters something it doesn't understand. One option for it is to protect the information just to be sure, and that could be what you are seeing. I am guessing.

Of course, you could make a test copy of this file and just try changing suspicious things on the copy and see what LO does. Painful, but instructive.

Didn't you say this file had been converted from MSWORD? If so, and LO did the conversion, there may indeed be a bug in the converter that needs to be brought to the attention of the devs.

Girvin

Alan:

In looking at the content.xml file myself, I tend to think that the field in question is created by the End Note extension, and unless the End Note extension is installed, LO does not recognize the field in question. This makes it un-editable.

TomW

Hi :slight_smile:  
Abiword is a lot lighter-weight than KWord and might be good for the first comparison
Regards from 
Tom :slight_smile: