static/README.wasm.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit f1a47d476a6d993121a4b1c8ee405c20cd808820 Author: Stephan Bergmann <stephan.bergm...@allotropia.de> AuthorDate: Thu Feb 29 11:35:46 2024 +0100 Commit: Stephan Bergmann <stephan.bergm...@allotropia.de> CommitDate: Thu Feb 29 13:25:54 2024 +0100 Improve sample code, missing delete() Change-Id: I26ddbfb8b6742d816290d122d22c3c6c3ceabcc0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164143 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de> diff --git a/static/README.wasm.md b/static/README.wasm.md index f2abc8219ce8..91b418122bf2 100644 --- a/static/README.wasm.md +++ b/static/README.wasm.md @@ -248,7 +248,9 @@ while (xParaEnumeration.hasMoreElements()) { xParagraph = new css.text.XTextRange(xParaEnumeration.nextElement(), Module.uno_Reference.FromAny); if (xParagraph.$is()) { xParaProps = new css.beans.XPropertySet(xParagraph.$query()); - xParaProps.setPropertyValue("CharColor", new Module.Any(Math.floor(Math.random() * 0xFFFFFF), css.uno.TypeClass.LONG)); + let color = new Module.Any(Math.floor(Math.random() * 0xFFFFFF), css.uno.TypeClass.LONG); + xParaProps.setPropertyValue("CharColor", color); + color.delete(); } } ```