Hi Bill,

William W. Austin wrote:

> 1.    A "delay" or "at location" feature existed which basically said  
> start with such-and-such format (font, size, paragraph params, etc.),  
> and at this point (usually specified in terms of page position, number  
> of lines down, or inches/picas/mm/etc. down from paragraph start)  
> change the format to do something else automatically. (A simple  
> example:  start with a line length of, say 6".  Every 3 lines, decrease  
> the line length by 0.5" until it reaches a width of 3", and then stay  
> at that length - all in a single paragraph).

A feature like this might be useful for an application where position
and content of each line are fixed, but both isn't true for OOo. The
reason is that OOo mainly defines its text as a list of paragraphs, each
of them positioned relative to its predecessor. A line structure does
not exist in OOo, it is dynamically created in the text layout. So
things like line numbers, positions on a page etc. are not known to OOo
before the document is layouted.

So you will need to layout the text before you can assign styles to
parts of the text. Such a document can't be loaded or processed
correctly without layouting the document exactly as OOo does it. This is
not how OOo documents (ODF) are meant to be.

Another reason why this feature would be unfortunate: the already very
complex layouting algorithm would become even more complicated as it
then contained a feedback loop between content and layout.

Features like this would be better suited for page oriented text
processors where every text and every object is positioned on a page
explicitly.

> 2.    Automatic text - or file - insertion was also possible in many  
> of these systems as the "automatic text" could be entered as part of  
> the format (style) command itself, _or_ it could be entered once in the  
> document and automatically copied and duplicated elsewhere in the  
> document when the format was found in the doc.  This was extremely  
> useful for boilerplate among other things, as if the "boilerplate" was  
> in a separate file, it made it possible to create a large number of  
> docs (contracts and font display pages come to mind) so that the  
> appropriate text could be entered once and included in hundreds of of  
> documents. And if the boilerplate changed, one only had to print out  
> new copies of the docs including it to have the newest version with the  
> changes included. (a real time saver when there are hundreds of docs).

OOo (or more exactly: ODF) separates between content and layout. Adding
text (content) to styles (layout) is not compatible with this approach.
So it's very unlikely that this will be added anytime soon. At least if
you wanted to have it as part of the file content.

> I suspect that these might be possible by including some type of macro  
> capability as a part of a style, but I haven't figured out how  
> design/code either of these yet at all.  The second one might be the  
> more useful, so I would like to look at it first.

Using embedded macros that automatically modify the document is a hairy
thing. Actually this is against the idea of an exchangeable document
format as macros are beyond the scope of ODF. OOo nevertheless allows to
assign macros to different user actions, something that is applied to
the document at runtime. This way you can see the macro as not being
part of the document but part of the logic the application applies to it
after loading it.

If I had to do things like this (I hope I understood your suggestion
correctly) I would use a macro that is executed automatically when the
document is loaded (this also is an explicit user action!). The macro
could scan the document for places where a particular style is used and
then do anything possible with the text.

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to