Apache OpenOffice (AOO) Bugzilla – Issue 30715
Formula editor saves incorrect width and height
Last modified: 2013-08-07 14:54:45 UTC
I use a Java UNO application to create a formula maths document (.sxm), although this problem can be recreated by hand. However, the formula editor does not correctly set the width and height of the formula. To recreate the problem: 1. Create a new formula. 2. Enter the example formula "SR = {sum (r_i P_i)} over {sum P_i}" (without quotes). 3. Save the formula. In the resulting settings.xml in the .sxm document the width and height of the formula are: <config:config-item config:name="ViewAreaWidth" config:type="int"> 2000 </config:config-item> <config:config-item config:name="ViewAreaHeight" config:type="int"> 1000 </config:config-item> I'm building a Writer document by creating the XML document in a DOM, adding the <draw:object> XML tags for the formulas as if they had been added by using the Insert -> Object -> Formula menu option in Writer, and adding the formula documents to the .sxw file and manifest. This works properly as far as the document itself is concerned. However, I cannot set the svg:width and svg:height attributes of the <draw:object> tag correctly, since the formula's ViewAreaWidth and ViewAreaHeight are incorrect. This means that, with the width and height set according to the values above, the formula does not display within the resulting frame in the writer document. When creating the formula above, if the View -> Update menu item is selected after step 2 before saving the formula, the width and height now seem to be correct, and I can use those values to set the svg:width and svg:height correctly in the writer document. <config:config-item config:name="ViewAreaWidth" config:type="int"> 2708 </config:config-item> <config:config-item config:name="ViewAreaHeight" config:type="int"> 1249 </config:config-item> Translating these to svg:width="2.708cm" and svg:height="1.249cm" causes the formula to be correctly displayed in the writer document frame. However, it's not obvious to me that there is a UNO equivalent of performing the View -> Update operation in the formula editor. Is there any way of ensuring that the formula editor writes out the correct width and height when saving the formula? Alternatively, is there a workaround so I can use the correct width and height when building the XML for the frame containing the formula?
ES->DVO: Please have a look
Reassigning
confirmed, without update the settings are wrong.
Reset assignee on issues not touched by assignee in more than 2000 days.