Bug 37386 - Bad refresh and bad height of formula with some operators
Summary: Bad refresh and bad height of formula with some operators
Status: RESOLVED DUPLICATE of bug 62355
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All Linux (All)
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 60545 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-05-19 14:01 UTC by Christophe Devalland
Modified: 2013-05-10 11:58 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe Devalland 2011-05-19 14:01:20 UTC
Symbols widetilde and widehat don't update the height of formula properly. So the symbols are truncated (on ubuntu 9.10/LibO 3.4 beta5)
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 Christophe Devalland 2011-05-19 14:08:06 UTC
(In reply to comment #0)
in the macro, the bug number is not 118043 (it's OOo number) but 37327 (LibO number)
sorry
Comment 2 Björn Michaelsen 2011-12-23 12:06:04 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 3 Frédéric Buclin 2012-03-04 15:30:44 UTC
I have the exact same problem with 3.5.0 final. The hats are cut at mid-height.
Comment 4 Christophe Devalland 2012-05-17 13:44:49 UTC
the bug is still there (LibO 3.5.3)
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 5 Michael Seifert 2012-06-04 08:11:47 UTC
I can confirm this issue.
I am using
LibreOffice 3.5.2.2 
Build-ID: 350m1(Build:202)
under Gentoo Linux 3.4.0 x86_64.

Creating the formula
hat %delta
has an inappropriate height.

Adjusting the height manually in the formula editor is a workaround.
Comment 6 Jorendc 2013-02-23 23:05:03 UTC
*** Bug 60545 has been marked as a duplicate of this bug. ***
Comment 7 Dorange-Pattoret Didier 2013-02-25 11:05:51 UTC
I confirm this bug with LibreOffice 4.0 for all : widetilde, widehat and widevec.
Comment 8 Jorendc 2013-05-10 11:58:18 UTC

*** This bug has been marked as a duplicate of bug 62355 ***