Difference between revisions of "TextAlignment"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Created page with '{{Development}}')
 
Line 1: Line 1:
{{Development}}
+
__TOC__
 +
 
 +
= Issue i105270 - see [http://qa.openoffice.org/issues/show_bug.cgi?id=105270 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 <code>LEFT</code> and <code>RIGHT</code> 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 <code>LEFT</code> and <code>RIGHT</code> are mapped to <code>START</code> and <code>END</code> 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 <code>fo:text-align="END"</code>. <code>fo:text-align="END"</code> is interpreted by OOo as internal text alignment attribute value <code>RIGHT</code> in order to align the paragraph at the right border. But, this is not correct. According to ODF the text alignment attribute value <code>END</code> 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 <code>LEFT/START</code> and <code>RIGHT/END</end> and everything is ok.
 +
 
 +
Unfortunately

Revision as of 12:29, 19 July 2010

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