diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-10-30 15:01:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-10-30 16:42:34 +0100 |
commit | 814cc6e8a30bde58adfb9f114c435dcb11c1e013 (patch) | |
tree | 0cb4c131cb69b68a577f5c667c5bc14a43f5156b /sw | |
parent | c11acfa916302e2af9ecc4c1657ac7461148bfcf (diff) |
tdf#126788 reduce number of comparisons to query XUnoTunnel
Change-Id: I581fa6944f9da9195651bacd2f11fd7f35967ebb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142041
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unotbl.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unotext.cxx | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 2201a3ebb688..f1d697a36c81 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -781,9 +781,9 @@ void SAL_CALL SwXCell::release( ) noexcept uno::Any SAL_CALL SwXCell::queryInterface( const uno::Type& aType ) { - uno::Any aRet = SwXCellBaseClass::queryInterface(aType); + uno::Any aRet = SwXText::queryInterface(aType); if(aRet.getValueType() == cppu::UnoType<void>::get()) - aRet = SwXText::queryInterface(aType); + aRet = SwXCellBaseClass::queryInterface(aType); return aRet; } diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index be1f76fe5353..bdaf1d0357e3 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -198,6 +198,10 @@ SwXText::queryInterface(const uno::Type& rType) { aRet <<= uno::Reference< text::XText >(this); } + else if (rType == cppu::UnoType<lang::XUnoTunnel>::get()) + { + aRet <<= uno::Reference< lang::XUnoTunnel >(this); + } else if (rType == cppu::UnoType<text::XSimpleText>::get()) { aRet <<= uno::Reference< text::XSimpleText >(this); @@ -226,10 +230,6 @@ SwXText::queryInterface(const uno::Type& rType) { aRet <<= uno::Reference< beans::XPropertySet >(this); } - else if (rType == cppu::UnoType<lang::XUnoTunnel>::get()) - { - aRet <<= uno::Reference< lang::XUnoTunnel >(this); - } else if (rType == cppu::UnoType<text::XTextAppendAndConvert>::get()) { aRet <<= uno::Reference< text::XTextAppendAndConvert >(this); |