Issue 118050 - Bad refresh and bad height of formula with some operators
Summary: Bad refresh and bad height of formula with some operators
Status: UNCONFIRMED
Alias: None
Product: Math
Classification: Application
Component: ui (show other issues)
Version: 3.4.0
Hardware: PC Linux, all
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-19 21:04 UTC by cdeval
Modified: 2013-01-29 21:43 UTC (History)
3 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 cdeval 2011-05-19 21:04:35 UTC
Symbols widetilde and widehat don't update the height of formula properly. So
the symbols are truncated (on ubuntu 9.10)
This problem doesn't occur on WindowsXP/OOo3.4 beta1 
To see the problem, run this macro step by step and read the comments.


sub badHeight
    param=ThisComponent.createInstance("com.sun.star.document.Settings")
    param.MathBaselineAlignment=true
    obj=ThisComponent.CreateInstance("com.sun.star.text.TextEmbeddedObject")
    obj.CLSID="078B7ABA-54FC-457F-8551-6147e776a997"
    obj.AnchorType=com.sun.star.text.TextContentAnchorType.AS_CHARACTER
    oViewCursor = ThisComponent.getCurrentController().getViewCursor()
    oTextCursor=oViewCursor.Text.createTextCursorByRange(oViewCursor)
    oTextCursor.Text.insertString(oTextCursor,"a formula : ",false)
    oTextCursor.Text.insertTextContent(oTextCursor, obj, true)
       obj.Model.leftMargin=0
      obj.Model.rightMargin=0
       obj.Model.bottomMargin=0
      obj.Model.topMargin=0
    obj.Model.formula="widetilde{ABC}" 'good alignment but has not the good
height (hat is truncated).
       obj.Model.topMargin=100 'Now good height but bad alignment because of
bug 118043.
    obj.Model.formula="widehat{ABC}" 'no refresh of formula
    obj.Model.setmodified(TRUE) 'no refresh despite setmodified(True)
       obj.Model.topMargin=0 ' now good refresh of formula but not the good
height, tilde is truncated. Good alignment.
    obj.Model.formula="widevec{AB}" 'good refresh of formula without changing
the top or bottom margins. Good height. Good alignment.
end sub
Comment 1 Regina Henschel 2011-05-20 10:30:29 UTC
I'm have only Windows, so I cannot test it, but in my macros I use
    oXCOEO = oEmbeddedObject.ExtendedControlOverEmbeddedObject
    oXCOEO.update()
Comment 2 cdeval 2011-05-20 20:50:49 UTC
(In reply to comment #1)
> I'm have only Windows, so I cannot test it, but in my macros I use
>     oXCOEO = oEmbeddedObject.ExtendedControlOverEmbeddedObject
>     oXCOEO.update()

it's OK for refresh on ubuntu with :
obj.Model.formula="widehat{ABC}" 'no refresh of formula
obj.ExtendedControlOverEmbeddedObject.update() 'refresh the formula

Thanks.
But formulae still have bad height.
Comment 3 cdeval 2012-05-17 21:01:34 UTC
the bug is still there (AOO 3.4)
Run this macro step by step in a blank writer document to see the problem :

sub badHeight
    param=ThisComponent.createInstance("com.sun.star.document.Settings")
    param.MathBaselineAlignment=true
    obj=ThisComponent.CreateInstance("com.sun.star.text.TextEmbeddedObject")
    obj.CLSID="078B7ABA-54FC-457F-8551-6147e776a997"
    obj.AnchorType=com.sun.star.text.TextContentAnchorType.AS_CHARACTER
    oViewCursor = ThisComponent.getCurrentController().getViewCursor()
    oTextCursor=oViewCursor.Text.createTextCursorByRange(oViewCursor)
    oTextCursor.Text.insertString(oTextCursor,"a formula : ",false)
    oTextCursor.Text.insertTextContent(oTextCursor, obj, true)
    obj.Model.leftMargin=0
    obj.Model.rightMargin=0
    obj.Model.bottomMargin=0
    obj.Model.topMargin=0
    obj.Model.formula="widetilde{ABC}" 'bad refresh of formula
    obj.ExtendedControlOverEmbeddedObject.update()  'good refresh, good alignment but has not the good height (tilde is truncated).
    obj.Model.formula="widehat{ABC}"
    obj.ExtendedControlOverEmbeddedObject.update() ' not the good height, hat is truncated. Good alignment.
    obj.Model.formula="widevec{AB}" 'good refresh of formula. Good height. Good alignment.
end sub
Comment 4 Oliver-Rainer Wittmann 2012-06-13 12:26:22 UTC
getting rid of value "enhancement" for field "severity".
For enhancement the field "issue type" shall be used.