To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=972





------- Additional comments from [EMAIL PROTECTED] Wed Feb 22 06:05:48 -0800 
2006 -------
I want to describe our findings so that you can see where the problems are that
we have to solve. 

First it should be clear that we only talk about formula objects that are
anchored "as character". I don't think that the feature "base line alignment"
makes sense for other anchoring modes.

Currently the alignment of an object is described by two parameters, one
describing the anchor point in the text, one the way how the formula object is
aligned to that point. While for the first attribute "base line" is possible, it
isn't for the latter, here only "top, bottom, center, from top" are possible
(note: in the GUI "from top" is unfortunately called "from bottom", but this is
for "historical" reasons). "From top" allows you to have a free positioning of
the formula relative to the text.

It is very important that the way how we describe the position of the formula
object is compatible to older versions of OpenOffice.org so that loading
documents using base line alignment into such versions will give the correct
display. Of course what you can't get then is maintaining the baseline alignment
when you change the formula in this old version. 

That said we can't just simply add a new "base line" orientation to the object,
we have to stick to the four orientations we have, at least in the file format.
In the GUI we can have the new "base line" attribute, but it must be treated
explicitly. 

My suggestion is to have the "base line to base line" orientation only at
runtime (when the document is edited). In the file format we translate this to
"free positioning relative to the text" by using "from top" orientation. The
distance will be calculated from the difference between the "top-base line" and
the "base line - base line" alignment.

If you load this document into any version of OpenOffice.org you will always get
perfect base line arrangement of text and formula - until you change either of 
them.

If either the text base line moves due to changes in the text attributes or if
the formula base line moves due to changes in the formula we simply can
recalculate the position of the formula object and again store it as "from top".
In the first case (change text) Writer must ask the formula for its base line
and then start the calculation, in the latte (change formula) case the formula
must send a notification to Writer that it should do this.

The problem now is that we don't want to have this recalculation for *all*
objects that are aligned "from top", so an additional setting is needed in the
Writer file format that triggers recalculation if necessary. Old versions of OOo
will ignore this setting of course so changing the formula in such a version
will lose the base line alignment.

Such setting is an extension of the file format, so we must talk to the Open
Document TC about it. I don't expect a problem here, because it's a "compatible"
change, but it will take some time.

Selecting the new alignment in the GUI will export this to to "from top" and
switch on the new setting in the XML file format.

What we have to do for this:

- extend file format, implement loading/storing of the new attribute
- add and implement "base line" item in the "Format Frame" dialog of Writer
- implement recalculation of positions as described above 
- implement base line calculation in Math
- implement an API to retrieve and recalculate the base line from a formula 
object
- implement a listener/broadcaster relationship in Writer that triggers
recalculation of position if the base line of the formula changes

I hope I didn't forget anything. :-)
Currently we are going to hand over the extension of the file format to the
OASIS Open Document TC as the first step.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

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


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

Reply via email to