Issue 67283 - Formulas don't auto-size when changing base font programmatically
Summary: Formulas don't auto-size when changing base font programmatically
Status: CLOSED FIXED
Alias: None
Product: Math
Classification: Application
Component: code (show other issues)
Version: OOo 2.0.3
Hardware: PC All
: P3 Trivial with 2 votes (vote)
Target Milestone: ---
Assignee: michael.ruess
QA Contact: issues@sw
URL:
Keywords:
: 32829 (view as issue list)
Depends on:
Blocks:
 
Reported: 2006-07-12 15:30 UTC by cdeval
Modified: 2013-08-07 14:56 UTC (History)
2 users (show)

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


Attachments
Document where I pasted the above given macro sample (8.44 KB, application/vnd.oasis.opendocument.text)
2006-10-27 13:57 UTC, michael.ruess
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description cdeval 2006-07-12 15:30:38 UTC
Hello,
Thank's for the issue 59205. But the problem is half-resolved.
When the text of formula changes, the box auto-size -> success (issue 59205 solved)!
When the size of formula changes, the box doesn't auto-size. And it was
auto-size in OOo version 1.1.5 !

type following macro to see the problem :

Sub Main

	oDoc = ThisComponent
	TEObj = oDoc.createInstance("com.sun.star.text.TextEmbeddedObject")
	TEObj.setPropertyValue("CLSID", "078B7ABA-54FC-457F-8551-6147e776a997")
	TEObj.setPropertyValue("AnchorType",
com.sun.star.text.TextContentAnchorType.AS_CHARACTER)
	xText = oDoc.getText()
	xRange = xText.getEnd()
	xText.insertTextContent(xRange, TEObj, false)
	
	math = TEObj.getEmbeddedObject()
	' Youpi : now the following line resizes box (issue 59205 solved)
	math.setPropertyValue("Formula", "{x+y} over z")
	' but not with this line :
	math.BaseFontHeight=25
	' and not with this line too :
	math.setmodified(TRUE)

End Sub

Thank's for your help.
Comment 1 michael.ruess 2006-07-12 18:05:57 UTC
Same as issue 59205. Will be fixed in OOo 2.0.4.

*** This issue has been marked as a duplicate of 59205 ***
Comment 2 michael.ruess 2006-07-12 18:06:40 UTC
Closed.
Comment 3 cdeval 2006-10-13 20:44:05 UTC
Hello,

I tried my macro with version 2.0.4 and the bug is still here.
The problem is half-resolved, when I change the text of formula, it autosizes,
when I change the size of character, it doesn't.

Many users are affected by this bug (using Dmaths or CmathOOo).
Please, please, help....
It was fine in 1.1.5 !!!!!
Comment 4 michael.ruess 2006-10-27 13:54:23 UTC
MRU->TL: it is a special case which makes this defferently from issue 59205. 
A formula object where the base font is changed by macro won't auto size.
See my (to be) attached sample.
Comment 5 michael.ruess 2006-10-27 13:55:05 UTC
.
Comment 6 michael.ruess 2006-10-27 13:57:03 UTC
Created attachment 40117 [details]
Document where I pasted the above given macro sample
Comment 7 Mathias_Bauer 2007-12-03 11:00:00 UTC
target 3.x
Comment 8 cdeval 2007-12-07 22:15:04 UTC
Hi,

In OOo version 2.3.1, bug 59205 has returned. Try my macro above to see the problem.
Many teachers and students use addons such as Dmaths or CmathOOo wich no longer
work.
Thank's for your help.


Comment 9 thomas.lange 2007-12-10 09:48:06 UTC
.
Comment 10 thomas.lange 2008-01-16 10:50:24 UTC
.
Comment 11 thomas.lange 2008-01-16 10:57:09 UTC
Fixed in CWS tl51.
However for this to completely work as expected issue 85282 needs to be fixed as
well.
The fix will now also work for all other format/property changes done via API as
well.

Usability note: since changing multiple properties one after another may result
in resizing/recalculating and redrawing the object for each change it will
probably be a good idea to lock the controller while the properties are changed.

Files changed: 
- starmath/source/unomodel.cxx
Comment 12 thomas.lange 2008-01-16 10:59:22 UTC
TL->MRU: Also that case was most likely never broken. In the past it just simply
worked for changes of the formula text. If you were lucky to do that change as
the last of several changes it was seemingly as if the other were working as
well though.
Comment 13 thomas.lange 2008-01-16 11:42:05 UTC
*** Issue 32829 has been marked as a duplicate of this issue. ***
Comment 14 thomas.lange 2008-02-26 14:59:53 UTC
.
Comment 15 stefan.baltzer 2008-03-25 18:10:07 UTC
Verified in CWS tl51.
Comment 16 pitpit 2008-04-14 19:18:44 UTC
could it be rised to 2.4.1 ?
Comment 17 ddorange 2008-04-21 17:08:29 UTC
Hello,

This bug is not fixed in
ftp://ftp.free.fr/mirrors/ftp.openoffice.org/developer/DEV300_m9

Thank you for your work ...
Comment 18 stefan.baltzer 2008-05-03 22:18:35 UTC
SBA->MRU: Please proceed this boomerang, thx.
Comment 19 michael.ruess 2008-05-16 08:21:46 UTC
As TL mentioned above, also issue 85282 must be fixed to have it fully "as
expected". Currently this issue solved, that the content is fully visible in its
frame. Due to heavy workload, this hasn't been done yet, but will happen to OO
3.0 either.
Comment 20 cdeval 2008-07-01 08:24:17 UTC
Hi,
Currently this issue is not fixed in dev300_m21.
Please help ! Many teachers await this fix to use Dmaths and CmathOOo extensions
again for scientific texts. In France, M$ gives Office 2007 to all teachers for
free (with a new scientific editor). With this bug, we are disarmed.
It is very disappointing because it worked fine with OOo 2.2.1
Thank's a lot.
Comment 21 michael.ruess 2008-07-01 16:27:11 UTC
Fix for issue 85282 has not been introduced / integrated into the OO 3.0
codeline yet. Will be done in m23 or m24 as it looks. Thus, the fix for this
issue is still not really visible.
Comment 22 michael.ruess 2008-07-01 16:54:36 UTC
Closed.
Please do not reopen, wait until issue 85282 has been integrated into product.