diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-07-16 10:27:10 +0200 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-07-16 12:48:49 +0200 |
commit | f10d51709d08bdafdbd5c92f73ddb62cb217b6dd (patch) | |
tree | 979359e5fe78c4cc0d5a8420f58150974f9bc70c /unotest/source/embindtest | |
parent | e8e6a5f7951da0cf94171fd4b9457864e9528a08 (diff) |
Embind: Implement UNO interface attributes as JS accessor properties
Change-Id: I39b1f5676b2e5ba6071b39bf031c10d9c85f1ad1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170566
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'unotest/source/embindtest')
-rw-r--r-- | unotest/source/embindtest/embindtest.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/unotest/source/embindtest/embindtest.js b/unotest/source/embindtest/embindtest.js index e923a4f85d0a..bb4d2716ee5d 100644 --- a/unotest/source/embindtest/embindtest.js +++ b/unotest/source/embindtest/embindtest.js @@ -688,22 +688,22 @@ Module.addOnPostRun(function() { css.task.XJobExecutor.query(obj).trigger('from JS'); { const attrs = Module.uno.org.libreoffice.embindtest.XAttributes.query(obj); - console.assert(attrs.getLongAttribute() === -123456); - attrs.setLongAttribute(789); - console.assert(attrs.getLongAttribute() === 789); - console.assert(attrs.getStringAttribute() === 'hä'); - attrs.setStringAttribute('foo'); - console.assert(attrs.getStringAttribute() === 'foo'); - console.assert(attrs.getReadOnlyAttribute() === 1); //TODO: true + console.assert(attrs.LongAttribute === -123456); + attrs.LongAttribute = 789; + console.assert(attrs.LongAttribute === 789); + console.assert(attrs.StringAttribute === 'hä'); + attrs.StringAttribute = 'foo'; + console.assert(attrs.StringAttribute === 'foo'); + console.assert(attrs.ReadOnlyAttribute === 1); //TODO: true try { - attrs.setReadOnlyAttribute(false); + attrs.ReadOnlyAttribute = false; console.assert(false); } catch (e) {} console.assert(test.checkAttributes(attrs)); } - console.assert(test.getStringAttribute() === 'hä'); - test.setStringAttribute('foo'); - console.assert(test.getStringAttribute() === 'foo'); + console.assert(test.StringAttribute === 'hä'); + test.StringAttribute = 'foo'; + console.assert(test.StringAttribute === 'foo'); const args = new Module.uno_Sequence_any( [new Module.uno_Any(Module.uno_Type.Interface('com.sun.star.uno.XInterface'), test)]); |