diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-23 10:15:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-23 15:25:26 +0200 |
commit | 8a54339fc83fe9abaaace6f9f374697e6923d684 (patch) | |
tree | 516e82bb9eca2d586aa7acebbe369f67ff707a7f /forms | |
parent | d34f1df73806e9ca05fa0d07da619e2c0f01b6f7 (diff) |
loplugin:referencecasting look through more clang Types
Note that because of where the fix resides, loplugin:redundantcast
also notices a few more things.
Change-Id: I0b66047fadfff2c5ceafcbd3eab085de00d861a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120865
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/FormComponent.cxx | 3 | ||||
-rw-r--r-- | forms/source/component/FormattedField.cxx | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index e2a6a582ed31..c71c02c1c34f 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -1719,8 +1719,7 @@ void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, co } // Check if we and the given model have a common ancestor (up to the forms collection) - Reference<XChild> xCont( - static_cast<XWeak*>(this), css::uno::UNO_QUERY); + Reference<XChild> xCont(this); Reference< XInterface > xMyTopLevel = xCont->getParent(); while (xMyTopLevel.is()) { diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index bb4eb3b27228..00388525a63b 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -477,9 +477,7 @@ Reference< XNumberFormatsSupplier > OFormattedModel::calcFormatsSupplier() const Reference<XNumberFormatsSupplier> OFormattedModel::calcFormFormatsSupplier() const { - Reference<XChild> xMe( - static_cast<XWeak*>(const_cast<OFormattedModel*>(this)), - css::uno::UNO_QUERY); + Reference<XChild> xMe(const_cast<OFormattedModel*>(this)); // By this we make sure that we get the right object even when aggregating DBG_ASSERT(xMe.is(), "OFormattedModel::calcFormFormatsSupplier : I should have a content interface !"); // Iterate through until we reach a StartForm (starting with an own Parent) |