Issue 30715 - Formula editor saves incorrect width and height
Summary: Formula editor saves incorrect width and height
Status: CONFIRMED
Alias: None
Product: Math
Classification: Application
Component: ui (show other issues)
Version: OOo 1.1.2
Hardware: All Windows XP
: P3 Trivial with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-25 05:05 UTC by maynp
Modified: 2013-08-07 14:54 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description maynp 2004-06-25 05:05:03 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?
Comment 1 eric.savary 2004-06-25 16:32:53 UTC
ES->DVO: Please have a look
Comment 2 eric.savary 2004-06-25 16:39:57 UTC
Reassigning
Comment 3 quetschke 2004-06-25 17:18:36 UTC
confirmed, without update the settings are wrong.
Comment 4 Rob Weir 2013-07-30 02:18:58 UTC
Reset assignee on issues not touched by assignee in more than 2000 days.