summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-01-20 15:21:15 +0100
committerStephan Bergmann <sbergman@redhat.com>2023-01-20 20:26:36 +0000
commit022085ece4149a31d22cc85028e71cd2340409ed (patch)
tree2a06d092c2212d74d0f3967716f238ad1b7bcd8d /chart2
parentc6cf80af60d23fc52502f88f24dc23ad85462e77 (diff)
New loplugin:unoaggregation
"Find classes that derive from css::uno::XAggregation, but which implement queryInterface in violation of the protocol laid out in the documentation at udkapi/com/sun/star/uno/XAggregation.idl (which implies that such a class either doesn't actually make use of the deprecated XAggregation mechanism, which should thus be removed from that class hierarchy, or that its implementation of queryInterface needs to be fixed)." (compilerplugins/clang/unoaggregation.cxx) The basesHaveOnlyPureQueryInterface check in compilerplugins/clang/unoaggregation.cxx is "a crude approximation (but which appears to work OK)" to filter out any queryInterface base implementations of class hierarchies supporting XAggregation (i.e., cppu::OWeakAggObject::queryInterface). It only fails for the odd ChartDocumentWrapper::queryInterface, which manually implements the XAggregation functionality rather than (indirectly) deriving from OWeakAggObject. But changing that manual implementation looks tricky, so leave that alone for now and add a loplugin warning suppression there, and leave proper clean up for later. Change-Id: Ib16e26237bd703e60b0d9cb7134cb39840842d54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145912 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 51f066c3ba3e..5ce060e9891f 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -653,6 +653,7 @@ ChartDocumentWrapper::~ChartDocumentWrapper()
}
// ____ XInterface (for new interfaces) ____
+// [-loplugin:unoaggregation]
uno::Any SAL_CALL ChartDocumentWrapper::queryInterface( const uno::Type& aType )
{
if( m_xDelegator.is())