acknak wrote:I'm just guessing, but I rather doubt you'll find what you want, because a formula object in a Writer document is not a simple graphic, it's an embedded ("OLE") object. That means that some other application (e.g. OOo Math) is responsible for generating the object content, and that other application will know the correct size for the object. Formula objects are not scalable; they have a specific size determined by the fonts used, spacing settings, and so forth--all of which is know to the Math application but not to OOo Writer.
Thanks for your answer. Actually, I tend to agree with what you are saying. Since formula objects are not scalable, I thought that OOo Writer would not take for granted the size given by the svg:width/height attributes. Instead, it would query the OOo Math to get the correct size. This is indeed the behavior that I experienced with OOo Writer 2.3.0 (under openSuSE 10.3) but not with OOo Writer 2.4.0.
Here are more information about the problem I am facing and I hope someone who knows the inner workings of OOo can give me some insight.
You will find in attachment the test document SampleOriginal.odt, where the mathematical formulas are expressed without svg:width/attributes.
Code: Select all
<draw:frame draw:name="idXXX" text:anchor-type="as-char" draw:z-index="0">
<draw:object><math:math>[... MathML content here ...]</math:math></draw:object></draw:frame>
If I open this file with OOo Writer 2.3.0 in openSuSE 10.3, the formulas appear with the correct size (see SampleOriginalOOo23openSuSE103.png). However, if I open this file with OOo Writer 2.4.0, the formula are incorrectly sized (see SampleOriginalOOo24Win.png).
In both cases, I saved the file to see how OOo Writer handles this. In the correct case with OOo Writer 2.3.0, the svg:width/height attributes are added, each formula having a different size, consistently with what appears on screen. OOo Writer 2.4.0 also added the svg:width/height attributes, but all formulas got the same values:
Code: Select all
<draw:frame draw:style-name="fr1" draw:name="id55141" text:anchor-type="as-char" svg:width="0.201cm" svg:height="0.467cm" draw:z-index="0">
For OOo Writer 2.4.0, it seems that all formula should be 0.201cm x 0.467cm, no matter what they are!
I hope this clarifies what I am trying to do and which problem I am encountering.
Many thanks in advance to all.
gvarek