Apache OpenOffice (AOO) Bugzilla – Issue 28554
CharHeight property of Impress textshapes becomes disassociated with contained text
Last modified: 2017-05-20 11:08:42 UTC
Attempted to create macro to handle user request at http://www.oooforum.org/forum/viewtopic.php?t=8190, as a means of reducing the point count of selected shape by one. The following code works for shape objects containing text with the default font size unchanged. However, manually changing the font size using the UI results in the code no longer working. The message boxes will show what the CharHeight property contains, but the on-screen text will not change in size. Sub ChangeCharHeight() oCurr = ThisComponent.getCurrentSelection() If not IsNull(oCurr) then If (oCurr.getCount() > 0) then For i = 0 to oCurr.getCount() - 1 MsgBox oCurr.getByIndex( i ).CharHeight oCurr.getByIndex( i ).CharHeight = oCurr.getByIndex( i ).CharHeight - 1 MsgBox oCurr.getByIndex( i ).CharHeight Next i Else MsgBox "Selected item contains nothing.",48,"Empty Selection Error" EndIf Else MsgBox "Nothing selected",48,"Selection Error" EndIf End Sub To Reproduce -- Create a simple Impress doc with two shapes containing some text. For one shape, make sure to only type in text. For the other, type in some sample text, and also manually change the font size. Select the first shape and run the macro. You should see the text shrink by one point. Select the second shape and run the macro. You should see the message boxes indicating a change in size, but the onscreen text will not change.
Reproducible. Reassigned to Christian.
setting to NEW
Reset assigne to the default "issues@openoffice.apache.org".