diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-22 17:09:35 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-24 08:08:00 +0100 |
commit | ad73967e99235a2ba9b5a2106c5d6d0f8efaa1ca (patch) | |
tree | 5b11b7812b84c2647c64d1002bad7ed8a1d1754d /linguistic | |
parent | a53577e6ff3629c4e9219616960d89eea9463593 (diff) |
Remove unnecessary extractInterface
Change-Id: I4848bf84615274ad5732223a354fb7a6b845d9a8
Diffstat (limited to 'linguistic')
-rw-r--r-- | linguistic/source/lngsvcmgr.cxx | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index 96052cf52581..104a4a07a478 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -34,7 +34,6 @@ #include <i18nlangtag/languagetag.hxx> #include <cppuhelper/factory.hxx> #include <cppuhelper/supportsservice.hxx> -#include <comphelper/extract.hxx> #include <boost/checked_delete.hpp> #include "lngsvcmgr.hxx" @@ -1075,7 +1074,12 @@ void LngSvcMgr::GetAvailableSpellSvcs_Impl() uno::Reference< lang::XSingleServiceFactory > xFactory; uno::Reference< linguistic2::XSpellChecker > xSvc; - if ( cppu::extractInterface( xCompFactory, aCurrent ) || ::cppu::extractInterface( xFactory, aCurrent ) ) + xCompFactory.set(aCurrent, css::uno::UNO_QUERY); + if (!xCompFactory.is()) + { + xFactory.set(aCurrent, css::uno::UNO_QUERY); + } + if ( xCompFactory.is() || xFactory.is() ) { try { @@ -1132,7 +1136,12 @@ void LngSvcMgr::GetAvailableGrammarSvcs_Impl() uno::Reference< lang::XSingleServiceFactory > xFactory; uno::Reference< linguistic2::XProofreader > xSvc; - if ( cppu::extractInterface( xCompFactory, aCurrent ) || ::cppu::extractInterface( xFactory, aCurrent ) ) + xCompFactory.set(aCurrent, css::uno::UNO_QUERY); + if (!xCompFactory.is()) + { + xFactory.set(aCurrent, css::uno::UNO_QUERY); + } + if ( xCompFactory.is() || xFactory.is() ) { try { @@ -1189,7 +1198,12 @@ void LngSvcMgr::GetAvailableHyphSvcs_Impl() uno::Reference< lang::XSingleServiceFactory > xFactory; uno::Reference< linguistic2::XHyphenator > xSvc; - if ( cppu::extractInterface( xCompFactory, aCurrent ) || ::cppu::extractInterface( xFactory, aCurrent ) ) + xCompFactory.set(aCurrent, css::uno::UNO_QUERY); + if (!xCompFactory.is()) + { + xFactory.set(aCurrent, css::uno::UNO_QUERY); + } + if ( xCompFactory.is() || xFactory.is() ) { try { @@ -1245,7 +1259,12 @@ void LngSvcMgr::GetAvailableThesSvcs_Impl() uno::Reference< lang::XSingleServiceFactory > xFactory; uno::Reference< linguistic2::XThesaurus > xSvc; - if ( cppu::extractInterface( xCompFactory, aCurrent ) || ::cppu::extractInterface( xFactory, aCurrent ) ) + xCompFactory.set(aCurrent, css::uno::UNO_QUERY); + if (!xCompFactory.is()) + { + xFactory.set(aCurrent, css::uno::UNO_QUERY); + } + if ( xCompFactory.is() || xFactory.is() ) { try { |