From ad73967e99235a2ba9b5a2106c5d6d0f8efaa1ca Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sat, 22 Feb 2014 17:09:35 +0100 Subject: Remove unnecessary extractInterface Change-Id: I4848bf84615274ad5732223a354fb7a6b845d9a8 --- linguistic/source/lngsvcmgr.cxx | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'linguistic') 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 #include #include -#include #include #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 { -- cgit