[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Non-portable paragraph rendering settings,
From: Martin Ellis <martin () ellis ! name>
Date: 2006-05-17 21:28:55
Message-ID: 200605172228.56054.martin () ellis ! name
[Download RAW message or body]
Daniel,
[CC'ing koffice-devel, should anyone be interested]
On Wednesday 17 May 2006 11:26, Martin Ellis wrote:
> > > I think it's spilling for other reasons.
> On Wednesday 17 May 2006 11:01, Daniel Carrera wrote:
> > Any idea what that might be?
> Well, on the contents page, it looks to me as though there is some
> difference in interpretation of the paragraph spacing - the
> 'before' and 'after' values - where both values are set in
> consecutive paragraphs.
Hmm, I think I was just about right....
I've rummaged through your OpenOffice document, and managed
to edit to do the following:
* Firstly, make it validate against the schema :o)
* Cut it down to a minimal example that for which KWord has larger
paragraph spacing, and OpenOffice does not.
* Figure out what causes KWord to space out the paragraphs further
apart than OpenOffice, despite them both agreeing on the Spacing
Before/After Paragraph settings.
* Edit the file again, such that they have the same behaviour.
The minimal example is here:
http://martin.ellis.name/koffice/with.odt
(For now, ignore that KWord does not render a space at the top of the
first page but OpenOffice does)
If you open this in OpenOffice, select the first few lines, and reduce
Format->Paragraph->Spacing->After Paragraph to 0cm, you'll notice no
change in the display.
If you do the same in KWord, the spacing between paragraphs reduces.
The behaviour of OpenOffice is that (in this case) the *maximum*
height of the top and bottom borders is being used as the paragraph
spacing. KWord is using the *sum* of the border sizes.
Which is right? Well, both. :o(
Following the links from the ODF spec, to the XSL spec and then to the
CSS spec (!) we get:
"Vertical margins **MAY** collapse between certain boxes:
Two or more adjoining vertical margins of block boxes in the normal
flow collapse. The resulting margin width is the maximum of the
adjoining margin widths." (empasis added)
http://www.w3.org/TR/REC-CSS2/box.html#collapsing-margins
It turns out that OpenOffice uses it's own config. option in
settings.xml to determine whether vertical collapsing takes place.
However, there doesn't seem to be anywhere in the GUI to set that
option.
In contrast, KWord never seems to do vertical collapsing, which is why
you see larger gaps.
If you remove the OO.o specific option in question, you get the
following file:
http://martin.ellis.name/koffice/without.odt
.... which just has the option commented out:
diff -ur with/settings.xml without/settings.xml
--- with/settings.xml 2006-05-17 22:03:29.750913040 +0100
+++ without/settings.xml 2006-05-17 22:03:29.852897536 +0100
@@ -3,7 +3,9 @@
<office:settings>
<config:config-item-set config:name="ooo:configuration-settings">
<config:config-item config:name="foo"
config:type="boolean">false</config:config-item>
+<!--
<config:config-item config:name="AddParaTableSpacing"
config:type="boolean">false</config:config-item>
+-->
</config:config-item-set>
</office:settings>
</office:document-settings>
After doing this, your document behaves more or less the same in both
KWord and OO.o Writer, i.e. OO.o Writer now uses the *sum* of before
and after spacings.
Martin
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic