In a message dated 2010.08.31 21:33 -0500, Andrew Douglas Pitonyak wrote:
Note that my intention for my questions was related to what is expected
from the macro, not how are they implemented in OOo.
More below and inline.
On 08/31/2010 10:58 AM, John Kaufmann wrote:
Does [WP Reveal Codes] differentiate between a change based on a
style and a hard coded change?
Yes, explicitly.
What I was really asking is.....
Does the user requesting a reveal codes to have it pointed out to
them that a change is caused by a style or because the user selected
the text and said "make this bold". If I work with text directly,
this can be tricky to differentiate.
In WP it's easy, because you have the text in front of you. So you move
the cursor to that point in the text where the change of interest
occurs, and then see what code occurs at the corresponding cursor point
in the Reveal Codes pane - to take your example, either [Bold] (which is
matched by the paired Bold-off code sometime later) or
[Style:<style_name>...] (which may or may not have a matching style-off
code).
Also, what if the user says "remove that bold thing", does this mean
to implement a "hard coded change", or try to determine if that
attribute was set by a style and then possibly remove the style. I
think that the later is too difficult to implement.
Because the user is told what causes the change of interest, the user is
responsible for any corrective action. From the user's standpoint, that
is very easy.
...
WordPerfect worked (if I remember correctly) by turning
attributes on and off, which makes it easier to simply delete a
tag (because you do not need to set it to something else).
That's right.
To properly duplicate the functionality as done in WP, would
require significant effort (split display, etc), which is why it
has likely not been done.
Splitting a display screen between the intended output (typically
at the top of the screen) and the codes to produce that output (at
the bottom) is a fairly natural use of screen real-estate; WP has
done it forever. More likely what impedes the building of something
like Reveal Codes for Writer is the fundamental difference in the
document model: a Writer document is not a stream of characters
punctuated by structures like frames and tables, but a collection
of objects including streamed characters, needing something like an
XML structure editor.
I am not arguing that it is not natural, and not a good way to do it,
I am just saying that implementing the split screen where there is
currently no support for it is a difficult task (which is probably
why the reveal codes macro uses a dialog rather than a split screen).
Oh yes. I'm sorry I was slow to pick up on the fact that you were
contemplating doing this in a macro implementation. I should not be so
surprised, since I have admired your macro work before, but this would
go way beyond any macro project I have seen or contemplated.
I suppose that in a perfect world, the macro would have multiple modes.
Work based on styles, work based on attributes in the text, etc...
I see that the problem runs much deeper. Fixing this would require
significant time (primarily because I have no idea what it is doing,
but I know that it is not correct). For example, when I click on a
tag for something that is bold, it removes or adds numbering. I
tracked it a bit. Perhaps I won't bother sending the fix.
Somewhere on the to-do list of this longtime WP admirer and new OOo
admirer is to integrate something like WP's Reveal Codes with the help
of an open-source XML editor. It would be very valuable, as Séamas says
(though I can't quite agree that it is of the highest priority). Thanks
for trying to do something about it.
John
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]