static/source/embindmaker/embindmaker.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit 2364e6d62d4a95e437981f80ad26ce1c46b8b29e Author: Stephan Bergmann <stephan.bergm...@allotropia.de> AuthorDate: Thu Mar 7 16:43:48 2024 +0100 Commit: Stephan Bergmann <stephan.bergm...@allotropia.de> CommitDate: Thu Mar 7 21:21:24 2024 +0100 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.bergm...@allotropia.de> 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); }) "; + "self); }) " + " .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; }) "; if (bases.size() > 1) { std::set<OUString> visitedBases;