Issue 32829 - The method XTextDocument::reformat doesn't adjust math objects
Summary: The method XTextDocument::reformat doesn't adjust math objects
Status: CLOSED DUPLICATE of issue 67283
Alias: None
Product: Math
Classification: Application
Component: code (show other issues)
Version: 680m49
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: thomas.lange
QA Contact: issues@sw
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2004-08-11 08:33 UTC by stephan.wunderlich
Modified: 2013-08-07 14:56 UTC (History)
2 users (show)

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


Attachments
bugdoc (10.28 KB, application/vnd.sun.xml.writer)
2004-08-11 08:34 UTC, stephan.wunderlich
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description stephan.wunderlich 2004-08-11 08:33:13 UTC
The attached document contains some formulas and the macro that is part of it
tries to change the BaseFontSize in the following manner:

Sub Main
	embeddedObjects = ThisComponent.getEmbeddedObjects()
	elementNames = embeddedObjects.getElementNames()
	for i=0 to UBOUND(elementNames)
		element = embeddedObjects.getByName(elementNames(i)).Model
		if (element.supportsService("com.sun.star.formula.FormulaProperties")) then
			element.BaseFontHeight = 20		
		endif
	next i
	ThisComponent.reformat()	
End Sub

After this macro ran nothing seems to have changed, but when I change the
printer via "File-Printer Settings..." the document is forced to reformat and
with that the formulas are adjusted. This should also happen when
XTextDocument.reformat() is called.
Comment 1 stephan.wunderlich 2004-08-11 08:34:05 UTC
Created attachment 17066 [details]
bugdoc
Comment 2 christianjunker 2004-10-21 22:52:45 UTC
I looked into the source code for 1.1.3 (sw/source/core/viewviewsh.cxx) and for 
void ViewShell::Reformat() 
and it says that all font-information is flushed either when zoom or print
resolution changes.
Comment 3 christianjunker 2005-08-07 21:12:34 UTC
I just checked with 2.0 m121 and it seems to have been fixed (works properly).
anyone can confirm?
Comment 4 andreschnabel 2005-08-07 21:53:38 UTC
checked with m122 on linux. Font size is changed as expected, but I need to
force a redraw (scoll formulas out of the visible area and scroll back again ->
new font size is displayed).

So .. I'll leave it to you to close
Comment 5 christianjunker 2005-08-07 22:01:45 UTC
cyb->andreschnabel:
That is another thing and must be taken care of by the API developer by changing
the size of the shape.

As to the property change, it works both tested on WinXP and Linux now.
Thus, resolving to FIXED.
Comment 6 stephan.wunderlich 2005-08-09 12:54:20 UTC
The reformat command also has to adjust the size of the math formulas, since
these can't be changed otherwise. With the current behaviour the user has to
open and manipulate each formula by hand.

re-open issue and reassign to tl@openoffice.org
Comment 7 stephan.wunderlich 2005-08-09 12:54:26 UTC
reassign to tl@openoffice.org
Comment 8 stephan.wunderlich 2005-08-09 12:54:32 UTC
reset resolution to FIXED
Comment 9 thomas.lange 2006-09-22 11:59:43 UTC
Settin component to "formula editor" in order to find this issue with Math
specific queries.
Comment 10 thomas.lange 2007-08-30 09:10:15 UTC
The issue as described is not fixed because a change to the font size will not
resize the formula automatically.
Automatic resizing works if e.g. the formula text is modified.
( e.g. element.Formula = "a^2 + b^2 = c^2" )

Looks like a missing notification when the settings are changed since it
basically is already possible to have the formula automatically resized.

Changing target to OOo 2.x.
Comment 11 thomas.lange 2007-12-03 15:16:44 UTC
.
Comment 12 thomas.lange 2008-01-16 11:42:06 UTC
The remaining problems will be solved with the fix to issue 67283.

*** This issue has been marked as a duplicate of 67283 ***
Comment 13 Mechtilde 2008-11-05 20:29:34 UTC
close the duplicate