Apache OpenOffice (AOO) Bugzilla – Issue 32829
The method XTextDocument::reformat doesn't adjust math objects
Last modified: 2013-08-07 14:56:01 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.
Created attachment 17066 [details] bugdoc
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.
I just checked with 2.0 m121 and it seems to have been fixed (works properly). anyone can confirm?
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
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.
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
reassign to tl@openoffice.org
reset resolution to FIXED
Settin component to "formula editor" in order to find this issue with Math specific queries.
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.
.
The remaining problems will be solved with the fix to issue 67283. *** This issue has been marked as a duplicate of 67283 ***
close the duplicate