Adding an implemented UNO interface
Lionel Élie Mamane
lionel at mamane.lu
Sat Sep 2 06:53:26 UTC 2023
Context
https://gerrit.libreoffice.org/c/core/+/155950/5/connectivity/source/inc/java/sql/Connection.hxx
Given the following code:
typedef ::cppu::WeakComponentImplHelper2 <
css::Baz,
css::qux > bar_BASE;
class bar : public bar_BASE
{
...
}
to implement css:corge, one would just change the bar_BASE typedef to:
typedef ::cppu::WeakComponentImplHelper3 <
css::Baz,
css::qux,
css::corge > bar_BASE;
But now consider:
#include <grault.hxx>
/* grault .hxx contains:
*
* typedef ::cppu::WeakComponentImplHelper2 <
* css::Baz,
* css::qux > grault_BASE;
*
* class grault : public grault_BASE { ... }
*/
typedef grault bar_BASE;
_and_ I can't touch the definition of "grault" in grault.hxx because
it is used by other classes in other files. Now, how does one add
implementation of css:corge? Can one just nest them and do:
typedef ::cppu::WeakComponentImplHelper2 <
grault,
css::corge > bar_BASE;
>From reading existing code, I get the impression that one _cannot_
do:
typedef ::cppu::WeakComponentImplHelper2 <
css::Baz,
css::qux > grault;
typedef grault bar_BASE;
class bar : public bar_BASE,
public ::cppu::WeakComponentImplHelper1 < css::corge >
More information about the LibreOffice
mailing list