Peter.Schulte at gad.de wrote:
> 
> I have made some further investigations and I have found 2 reasons for
> my problem:
> 
> Reason 1:
> In order to move sections from "right to  left" I use the command
> decrSectionLevel within my macro command. DecrSectionLevel is a command
> written in Java provided in the product, which obviously does not use
> the API "isEditable". You can simply reproduce the problem if you call
> this command on a section within a referenced part of a document. The
> command seems to do its job but it cannot be because the changes are in
> the referenced part. Furthermore the action cannot be undone.

This is obviously a bug in the incrSectionLevel/decrSectionLevel
commands. It will be fixed in next release.


> Reason 2:
> In order to move chapters or sections up and down I use an expanded
> version of docb.moveItemUp/docb.moveItemDown. If you have a chapter as a
> referenced part of a document and if you mark this part (that means the
> whole chapter) then the following happens:
> 
> - the chapter is cut
> - the content (not the reference) of the chapter is pasted before/after
> 
> The problem is that I do not know in my command if the marked element is
> a reference or not. If you mark a part of a part, the cut-command does
> not work. But if you mark the whole part, the cut-command works and puts
> the content (not the reference) into the clipboard.

This is not a bug. What you described works as expected:

* The chapter you want to cut is read-only, but not its book parent.
Therefore cutting the chapter is indeed possible.

* Command "cut", just like the plain "copy" command, and unlike command
"copyAsReference", is not ``reference-enabled''. Therefore what is being
copied to the clipboard is plain XML nodes (and not a ``reference'').



> Fortunately you can see that the grey background disappeared (that means
> the referenced element is no longer referenced) and that this command
> can be undone.

Do not hesitate to suggest the tool you need to solve your problem (a
way to test in a macro if a node is editable?). We'll try to implement
it in next release.

Reply via email to