summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorStephan Bergmann <stephan.bergmann@allotropia.de>2024-02-29 11:35:46 +0100
committerStephan Bergmann <stephan.bergmann@allotropia.de>2024-02-29 13:25:54 +0100
commitf1a47d476a6d993121a4b1c8ee405c20cd808820 (patch)
treeefdec037b99224cc1f44a1a2e14e2e93f9b49489 /static
parente66f5cb353bc0ea1020061bab4981380f98499b9 (diff)
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.bergmann@allotropia.de>
Diffstat (limited to 'static')
-rw-r--r--static/README.wasm.md4
1 files changed, 3 insertions, 1 deletions
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();
}
}
```