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:
In a message dated 2010.08.31 08:29 -0500, Andrew Douglas Pitonyak wrote:

I used a version [of WordPerfect Reveal Codes] once. I don't remember what it showed.

Which of the following [numbers added to facilitate discussion] are shown:

[1] Page styles
[2] Numbering styles
[3] character styles
[4] paragraph styles
[5] font change
[6] italics
[7] bold

To begin: 3 and all attributes of 3 (like 5,6,7 and much more), based on an early WP model of styles being either Open (going on forever) or Paired (going on until style closes). That style model, in turn, is based on a natural model of formatted text as (a) a stream of characters (b) laid down on some output medium (screen, paper, etc). IOW, it's a model very like SGML/HTML with styling, except that (at least the last time I looked), styling is not cascaded from multiple sources. That means that, to a larger extent than Word or Writer, much is under the user's control in the WP model. Style groupings that are media-dependent (like 1) or structural (like 4, or tables), can be defined as a user-defined grouping. For example, I can make a style "Envelope" and /call/ it a page style, but at root it is simply a Paired style.

Next: 2, although WP calls them "Outline styles" - being any hierarchical style set, nested to any level determined by the user (as opposed to Writer's fixed 10 levels).

So, as word processing goes, it's a very sleek, elegant and powerful model, derived from considering the basic elements of putting thoughts down on a medium of display, and letting the user build style constructs as needed, rather than defining construct classes. Reveal Codes shows them all - built-in attributes (like Bold) and user-defined styles (that might include Bold). [Note that WP distinction between "attributes" (which are always paired - of definite duration) and "styles" (which may be paired or open).] There is /nothing/ in a document that is not revealed. [I have Writer documents with spacing problems that I have not been able to diagnose; that never happened to me with WordPerfect - because, if needed, I could always look at the positioning codes.]


Does this 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. 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.


What does it mean to delete a style from the display?

The style is removed, with all attributes of which it is composed.


Does this mean that things are set to use the default style, or to
inherit the previous item's style?

Again, please see description above of Paired vs Open styles. One nice thing about Reveal Codes is to make it easy to see the effects of styles on output.

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).

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.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to