summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-02-12 17:20:49 +0200
committerNoel Grandin <noel@peralex.com>2013-03-04 10:13:19 +0200
commit57dbe20c2bfa0cf5ced0826f61a130414c948f83 (patch)
tree35a95e63d2080f0903f4270737ba3ccdc6ffd25a
parent587c294daba76f89f8de17e86ab0cae495123997 (diff)
fdo#46808, clean up some old queryInterface() calls
clean up stuff like this xI->queryInterface( getCppuType((const Reference< XExtendedInputSequenceChecker>*)0) ) >>= xISC; to xISC.set(xI, UNO_QUERY); Change-Id: I3b16a38c2a363440f6079cfe6ae47f009d3940db
-rw-r--r--i18npool/source/breakiterator/breakiteratorImpl.cxx2
-rw-r--r--i18npool/source/calendar/calendarImpl.cxx2
-rw-r--r--i18npool/source/characterclassification/characterclassificationImpl.cxx2
-rw-r--r--i18npool/source/collator/collatorImpl.cxx2
-rw-r--r--i18npool/source/indexentry/indexentrysupplier.cxx2
-rw-r--r--i18npool/source/textconversion/textconversionImpl.cxx2
-rw-r--r--i18npool/source/textconversion/textconversion_ko.cxx2
-rw-r--r--sd/source/ui/unoidl/unosrch.cxx15
-rw-r--r--svx/source/accessibility/AccessibleControlShape.cxx4
-rw-r--r--toolkit/source/controls/unocontrol.cxx2
10 files changed, 17 insertions, 18 deletions
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index 4f2207a84413..55b0315d9728 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -549,7 +549,7 @@ sal_Bool SAL_CALL BreakIteratorImpl::createLocaleSpecificBreakIterator(const OUS
OUString("com.sun.star.i18n.BreakIterator_") + aLocaleName, m_xContext);
if ( xI.is() ) {
- xI->queryInterface( getCppuType((const Reference< XBreakIterator>*)0) ) >>= xBI;
+ xBI.set(xI, UNO_QUERY);
if (xBI.is()) {
lookupTable.push_back(new lookupTableItem(Locale(aLocaleName, aLocaleName, aLocaleName), xBI));
return sal_True;
diff --git a/i18npool/source/calendar/calendarImpl.cxx b/i18npool/source/calendar/calendarImpl.cxx
index e7c76efae144..81a191b72e57 100644
--- a/i18npool/source/calendar/calendarImpl.cxx
+++ b/i18npool/source/calendar/calendarImpl.cxx
@@ -86,7 +86,7 @@ CalendarImpl::loadCalendar(const OUString& uniqueID, const Locale& rLocale ) thr
}
if ( xI.is() )
- xI->queryInterface(::getCppuType((const Reference< XCalendar3>*)0)) >>= xCalendar;
+ xCalendar.set(xI, UNO_QUERY);
else
throw ERROR;
diff --git a/i18npool/source/characterclassification/characterclassificationImpl.cxx b/i18npool/source/characterclassification/characterclassificationImpl.cxx
index 6786449d25f9..d3ab35100bcf 100644
--- a/i18npool/source/characterclassification/characterclassificationImpl.cxx
+++ b/i18npool/source/characterclassification/characterclassificationImpl.cxx
@@ -145,7 +145,7 @@ sal_Bool SAL_CALL CharacterClassificationImpl::createLocaleSpecificCharacterClas
Reference < XCharacterClassification > xCI;
if ( xI.is() ) {
- xI->queryInterface(::getCppuType((const Reference< XCharacterClassification>*)0) ) >>= xCI;
+ xCI.set( xI, UNO_QUERY );
if (xCI.is()) {
lookupTable.push_back( cachedItem = new lookupTableItem(rLocale, serviceName, xCI) );
return sal_True;
diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx
index fde6eef3373a..35cfd3c91c7b 100644
--- a/i18npool/source/collator/collatorImpl.cxx
+++ b/i18npool/source/collator/collatorImpl.cxx
@@ -159,7 +159,7 @@ CollatorImpl::createCollator(const lang::Locale& rLocale, const OUString& servic
if (xI.is()) {
Reference < XCollator > xC;
- xI->queryInterface( getCppuType((const Reference< XCollator>*)0) ) >>= xC;
+ xC.set( xI, UNO_QUERY );
if (xC.is()) {
lookupTable.push_back(cachedItem = new lookupTableItem(rLocale, rSortAlgorithm, serviceName, xC));
return sal_True;
diff --git a/i18npool/source/indexentry/indexentrysupplier.cxx b/i18npool/source/indexentry/indexentrysupplier.cxx
index 9005d12e4f10..9c5ab1736483 100644
--- a/i18npool/source/indexentry/indexentrysupplier.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier.cxx
@@ -105,7 +105,7 @@ sal_Bool SAL_CALL IndexEntrySupplier::createLocaleSpecificIndexEntrySupplier(con
OUString("com.sun.star.i18n.IndexEntrySupplier_") + name, m_xContext);
if ( xI.is() ) {
- xI->queryInterface( ::getCppuType((const Reference< com::sun::star::i18n::XExtendedIndexEntrySupplier>*)0) ) >>= xIES;
+ xIES.set( xI, UNO_QUERY );
return xIES.is();
}
return sal_False;
diff --git a/i18npool/source/textconversion/textconversionImpl.cxx b/i18npool/source/textconversion/textconversionImpl.cxx
index ab2ad1f2ea92..c03517718421 100644
--- a/i18npool/source/textconversion/textconversionImpl.cxx
+++ b/i18npool/source/textconversion/textconversionImpl.cxx
@@ -102,7 +102,7 @@ TextConversionImpl::getLocaleSpecificTextConversion(const Locale& rLocale) throw
OUString("_") + aLocale.Variant, m_xContext);
if (xI.is())
- xI->queryInterface( getCppuType((const Reference< XTextConversion>*)0) ) >>= xTC;
+ xTC.set( xI, UNO_QUERY );
else if (xTC.is())
xTC.clear();
}
diff --git a/i18npool/source/textconversion/textconversion_ko.cxx b/i18npool/source/textconversion/textconversion_ko.cxx
index bb86903f41c9..f20a1e6f62bd 100644
--- a/i18npool/source/textconversion/textconversion_ko.cxx
+++ b/i18npool/source/textconversion/textconversion_ko.cxx
@@ -49,7 +49,7 @@ TextConversion_ko::TextConversion_ko( const Reference < XComponentContext >& xCo
OUString("com.sun.star.i18n.ConversionDictionary_ko"), xContext);
if ( xI.is() )
- xI->queryInterface( getCppuType((const Reference< XConversionDictionary>*)0) ) >>= xCD;
+ xCD.set( xI, UNO_QUERY );
xCDL = ConversionDictionaryList::create(xContext);
diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx
index 62d685107254..83fe43a9ccf5 100644
--- a/sd/source/ui/unoidl/unosrch.cxx
+++ b/sd/source/ui/unoidl/unosrch.cxx
@@ -120,7 +120,7 @@ sal_Int32 SAL_CALL SdUnoSearchReplaceShape::replaceAll( const uno::Reference< ut
{
uno::Reference< drawing::XDrawPage > xPage( mpPage );
- xPage->queryInterface( ITYPE( drawing::XShapes ) ) >>= xShapes;
+ xShapes.set( xPage, uno::UNO_QUERY );
if( xShapes.is() && (xShapes->getCount() > 0) )
{
@@ -223,7 +223,7 @@ uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL SdUnoSearch
if(mpPage)
{
uno::Reference< drawing::XDrawPage > xPage( mpPage );
- xPage->queryInterface( ITYPE( drawing::XShapes ) ) >>= xShapes;
+ xShapes.set( xPage, uno::UNO_QUERY );
if( xShapes.is() && xShapes->getCount() > 0 )
{
@@ -267,9 +267,9 @@ uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL SdUnoSearch
// test if its a group
uno::Reference< drawing::XShapes > xGroupShape;
- uno::Any aAny( xShape->queryInterface( ITYPE( drawing::XShapes )));
+ xGroupShape.set( xShape, uno::UNO_QUERY );
- if( (aAny >>= xGroupShape ) && xGroupShape->getCount() > 0 )
+ if( xGroupShape.is() && xGroupShape->getCount() > 0 )
{
pContext = new SearchContext_impl( xGroupShape, pContext );
xShape = pContext->firstShape();
@@ -382,7 +382,7 @@ uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SdUnoSearchReplaceS
else
xCurrentShape = NULL;
- xCurrentShape->queryInterface( ITYPE( text::XTextRange ) ) >>= xRange;
+ xRange.set( xCurrentShape, uno::UNO_QUERY );
if(!(xCurrentShape.is() && (xRange.is())))
xRange = NULL;
}
@@ -468,8 +468,7 @@ uno::Reference< text::XTextRange > SdUnoSearchReplaceShape::Search( uno::Refere
if( !xParent.is() )
{
- uno::Any aAny( xText->queryInterface( ITYPE( text::XText )) );
- aAny >>= xParent;
+ xParent.set( xText, uno::UNO_QUERY );
}
const OUString aText( xParent->getString() );
@@ -684,7 +683,7 @@ uno::Reference< drawing::XShape > SdUnoSearchReplaceShape::GetShape( uno::Refer
{
do
{
- xText->queryInterface( ITYPE( drawing::XShape )) >>= xShape;
+ xShape.set( xText, uno::UNO_QUERY );
if(!xShape.is())
{
uno::Reference< text::XText > xParent( xText->getText() );
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx
index 972804e61dc4..17084fe7b881 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -265,8 +265,8 @@ void AccessibleControlShape::Init()
if ( xNativeControlContext.is() )
{
m_xControlContextProxy = xFactory->createProxy( xNativeControlContext );
- OSL_VERIFY( xNativeControlContext->queryInterface( ::getCppuType( &m_xControlContextTypeAccess ) ) >>= m_xControlContextTypeAccess );
- OSL_VERIFY( xNativeControlContext->queryInterface( ::getCppuType( &m_xControlContextComponent ) ) >>= m_xControlContextComponent );
+ m_xControlContextTypeAccess.set( xNativeControlContext, UNO_QUERY_THROW );
+ m_xControlContextComponent.set( xNativeControlContext, UNO_QUERY_THROW );
// aggregate the proxy
osl_atomic_increment( &m_refCount );
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index 01944885c150..f3d9bd9a85ae 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -311,7 +311,7 @@ Reference< XWindow > UnoControl::getParentPeer() const
{
Reference< XWindowPeer > xP = xContComp->getPeer();
if ( xP.is() )
- xP->queryInterface( ::getCppuType((const Reference< XWindow >*)0) ) >>= xPeer;
+ xPeer.set( xP, UNO_QUERY );
}
}
return xPeer;