TextAlignment

From Apache OpenOffice Wiki
Revision as of 12:29, 19 July 2010 by Od (Talk | contribs)

Jump to: navigation, search

Issue i105270 - see here

The following is about how to solve this issue for OpenOffice.org.

Text Alignment - OpenOffice.org vs. OpenDocument

In OpenOffice.org (OOo) the text alignment attribute values LEFT and RIGHT are treated independent from the writing direction of the paragraph.

In OpenDocument (ODF) which relies on XSL - http://www.w3.org/TR/xsl/#text-align - the text alignment attribute values LEFT and RIGHT are mapped to START and END respectively and are dependent on the writing direction of the paragraph.

This is the root cause of issue i105270. The text alignment of a paragraph whose writing direction is right-to-left and which is text-aligned at the right border is stored by OOo by ODF attribute fo:text-align="END". fo:text-align="END" is interpreted by OOo as internal text alignment attribute value RIGHT in order to align the paragraph at the right border. But, this is not correct. According to ODF the text alignment attribute value END means that the paragraph is text-aligned at the end-edge in the writing direction. For a right-to-left paragraph this is the left border.

Solution

It looks like as this issue is easy to fix: - Just change OOo's interpretation of LEFT/START and RIGHT/END</end> and everything is ok.

Unfortunately

Personal tools