diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-03-07 16:43:48 +0100 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-03-07 21:21:24 +0100 |
commit | 2364e6d62d4a95e437981f80ad26ce1c46b8b29e (patch) | |
tree | b1d97527e9bdca408f85dc3c381a1a225d0103d9 /static/source | |
parent | 8f75226dd99cb02e349abf476eeaeb7b9f6022ae (diff) |
Add $equals to Embind'ing of UNO interfaces
...so one can write foo.$equals(bar.$query) to check for UNO object equality
Change-Id: I727386e833507c86573cf033a1364ff145ed31ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164544
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'static/source')
-rw-r--r-- | static/source/embindmaker/embindmaker.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/static/source/embindmaker/embindmaker.cxx b/static/source/embindmaker/embindmaker.cxx index a3558e5b4e04..f0f14b7e31aa 100644 --- a/static/source/embindmaker/embindmaker.cxx +++ b/static/source/embindmaker/embindmaker.cxx @@ -958,7 +958,12 @@ SAL_IMPLEMENT_MAIN() << cppName(ifc) << "> const & the_self) { return " "::com::sun::star::uno::Reference<::com::sun::star::uno::XInterface>(the_" - "self); })\n"; + "self); })\n" + " .function(\"$equals\", +[](::com::sun::star::uno::Reference<" + << cppName(ifc) + << "> const & the_self, " + "::com::sun::star::uno::Reference<::com::sun::star::uno::XInterface> const & " + "the_other) { return the_self == the_other; })\n"; if (bases.size() > 1) { std::set<OUString> visitedBases; |