 | OO-Snippets: Change existing TextCommons| Keywords | font, font family |
|---|
| Language | ooRexx |
|---|
| Application | Writer |
|---|
| Authors | Matthias Prem (initial)
|
|---|
| Supported Versions | 2.0.x |
|---|
| Supported OS | All |
|---|
| Question | How can I change the font family of an existing text?
|
|---|
| Answer | |
|---|
xScriptContext=uno.getScriptContext()
xDesktop=xScriptContext~getDesktop
xComponent = xDesktop~getCurrentComponent()
xModel = xComponent~xModel
xController = xModel~getCurrentController()
xViewCursorSupplier = xController~XTextViewCursorSupplier
xViewCursor = xViewCursorSupplier~getViewCursor()
xCursorPropertySet = xViewCursor~XPropertySet
xCursorPropertySet~setPropertyValue("CharFontName", "Courier New")
::requires UNO.CLS
|
Changelog| Date | User | Modification |
|---|
| 2006-07-10 | matthiasprem | Initial version |
|