summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2004-07-30 14:39:16 +0000
committerKurt Zenker <kz@openoffice.org>2004-07-30 14:39:16 +0000
commitdda37dfb27d098037eb911387034a26881faa2be (patch)
tree8ea9b9db586f99d24bba00c7019d0f1f72edfca2 /cppuhelper
parenta65615737d8f221ef4f633c450adbf25642ab0ed (diff)
INTEGRATION: CWS gcc340fixes01 (1.4.128); FILE MERGED
2004/07/02 09:38:07 sb 1.4.128.1: #i29352# Avoid problems with dependent names in templates; cleaned up #includes.
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/inc/cppuhelper/queryinterface.hxx175
1 files changed, 91 insertions, 84 deletions
diff --git a/cppuhelper/inc/cppuhelper/queryinterface.hxx b/cppuhelper/inc/cppuhelper/queryinterface.hxx
index 47d8b1545..be7b592b1 100644
--- a/cppuhelper/inc/cppuhelper/queryinterface.hxx
+++ b/cppuhelper/inc/cppuhelper/queryinterface.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: queryinterface.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: dbo $ $Date: 2001-11-09 13:49:15 $
+ * last change: $Author: kz $ $Date: 2004-07-30 15:39:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -62,11 +62,18 @@
#ifndef _CPPUHELPER_QUERYINTERFACE_HXX_
#define _CPPUHELPER_QUERYINTERFACE_HXX_
-#ifndef _COM_SUN_STAR_UNO_XINTERFACE_HPP_
-#include <com/sun/star/uno/XInterface.hpp>
+#ifndef _SAL_CONFIG_H_
+#include "sal/config.h"
#endif
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
-#include <com/sun/star/uno/Reference.hxx>
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include "com/sun/star/uno/Any.hxx"
+#endif
+#ifndef _COM_SUN_STAR_UNO_TYPE_HXX_
+#include "com/sun/star/uno/Type.hxx"
+#endif
+#ifndef _SAL_TYPES_H_
+#include "sal/types.h"
#endif
namespace cppu
@@ -85,7 +92,7 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
Interface1 * p1 )
SAL_THROW( () )
{
- if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 ))
+ if (rType == Interface1::static_type())
return ::com::sun::star::uno::Any( &p1, rType );
else
return ::com::sun::star::uno::Any();
@@ -105,9 +112,9 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
Interface1 * p1, Interface2 * p2 )
SAL_THROW( () )
{
- if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 ))
+ if (rType == Interface1::static_type())
return ::com::sun::star::uno::Any( &p1, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface2 > *)0 ))
+ else if (rType == Interface2::static_type())
return ::com::sun::star::uno::Any( &p2, rType );
else
return ::com::sun::star::uno::Any();
@@ -129,11 +136,11 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
Interface1 * p1, Interface2 * p2, Interface3 * p3 )
SAL_THROW( () )
{
- if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 ))
+ if (rType == Interface1::static_type())
return ::com::sun::star::uno::Any( &p1, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface2 > *)0 ))
+ else if (rType == Interface2::static_type())
return ::com::sun::star::uno::Any( &p2, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface3 > *)0 ))
+ else if (rType == Interface3::static_type())
return ::com::sun::star::uno::Any( &p3, rType );
else
return ::com::sun::star::uno::Any();
@@ -157,13 +164,13 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4 )
SAL_THROW( () )
{
- if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 ))
+ if (rType == Interface1::static_type())
return ::com::sun::star::uno::Any( &p1, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface2 > *)0 ))
+ else if (rType == Interface2::static_type())
return ::com::sun::star::uno::Any( &p2, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface3 > *)0 ))
+ else if (rType == Interface3::static_type())
return ::com::sun::star::uno::Any( &p3, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface4 > *)0 ))
+ else if (rType == Interface4::static_type())
return ::com::sun::star::uno::Any( &p4, rType );
else
return ::com::sun::star::uno::Any();
@@ -189,15 +196,15 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5 )
SAL_THROW( () )
{
- if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 ))
+ if (rType == Interface1::static_type())
return ::com::sun::star::uno::Any( &p1, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface2 > *)0 ))
+ else if (rType == Interface2::static_type())
return ::com::sun::star::uno::Any( &p2, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface3 > *)0 ))
+ else if (rType == Interface3::static_type())
return ::com::sun::star::uno::Any( &p3, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface4 > *)0 ))
+ else if (rType == Interface4::static_type())
return ::com::sun::star::uno::Any( &p4, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface5 > *)0 ))
+ else if (rType == Interface5::static_type())
return ::com::sun::star::uno::Any( &p5, rType );
else
return ::com::sun::star::uno::Any();
@@ -227,17 +234,17 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
Interface6 * p6 )
SAL_THROW( () )
{
- if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 ))
+ if (rType == Interface1::static_type())
return ::com::sun::star::uno::Any( &p1, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface2 > *)0 ))
+ else if (rType == Interface2::static_type())
return ::com::sun::star::uno::Any( &p2, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface3 > *)0 ))
+ else if (rType == Interface3::static_type())
return ::com::sun::star::uno::Any( &p3, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface4 > *)0 ))
+ else if (rType == Interface4::static_type())
return ::com::sun::star::uno::Any( &p4, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface5 > *)0 ))
+ else if (rType == Interface5::static_type())
return ::com::sun::star::uno::Any( &p5, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface6 > *)0 ))
+ else if (rType == Interface6::static_type())
return ::com::sun::star::uno::Any( &p6, rType );
else
return ::com::sun::star::uno::Any();
@@ -269,19 +276,19 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
Interface6 * p6, Interface7 * p7 )
SAL_THROW( () )
{
- if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 ))
+ if (rType == Interface1::static_type())
return ::com::sun::star::uno::Any( &p1, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface2 > *)0 ))
+ else if (rType == Interface2::static_type())
return ::com::sun::star::uno::Any( &p2, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface3 > *)0 ))
+ else if (rType == Interface3::static_type())
return ::com::sun::star::uno::Any( &p3, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface4 > *)0 ))
+ else if (rType == Interface4::static_type())
return ::com::sun::star::uno::Any( &p4, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface5 > *)0 ))
+ else if (rType == Interface5::static_type())
return ::com::sun::star::uno::Any( &p5, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface6 > *)0 ))
+ else if (rType == Interface6::static_type())
return ::com::sun::star::uno::Any( &p6, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface7 > *)0 ))
+ else if (rType == Interface7::static_type())
return ::com::sun::star::uno::Any( &p7, rType );
else
return ::com::sun::star::uno::Any();
@@ -315,21 +322,21 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
Interface6 * p6, Interface7 * p7, Interface8 * p8 )
SAL_THROW( () )
{
- if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 ))
+ if (rType == Interface1::static_type())
return ::com::sun::star::uno::Any( &p1, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface2 > *)0 ))
+ else if (rType == Interface2::static_type())
return ::com::sun::star::uno::Any( &p2, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface3 > *)0 ))
+ else if (rType == Interface3::static_type())
return ::com::sun::star::uno::Any( &p3, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface4 > *)0 ))
+ else if (rType == Interface4::static_type())
return ::com::sun::star::uno::Any( &p4, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface5 > *)0 ))
+ else if (rType == Interface5::static_type())
return ::com::sun::star::uno::Any( &p5, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface6 > *)0 ))
+ else if (rType == Interface6::static_type())
return ::com::sun::star::uno::Any( &p6, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface7 > *)0 ))
+ else if (rType == Interface7::static_type())
return ::com::sun::star::uno::Any( &p7, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface8 > *)0 ))
+ else if (rType == Interface8::static_type())
return ::com::sun::star::uno::Any( &p8, rType );
else
return ::com::sun::star::uno::Any();
@@ -365,23 +372,23 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9 )
SAL_THROW( () )
{
- if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 ))
+ if (rType == Interface1::static_type())
return ::com::sun::star::uno::Any( &p1, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface2 > *)0 ))
+ else if (rType == Interface2::static_type())
return ::com::sun::star::uno::Any( &p2, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface3 > *)0 ))
+ else if (rType == Interface3::static_type())
return ::com::sun::star::uno::Any( &p3, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface4 > *)0 ))
+ else if (rType == Interface4::static_type())
return ::com::sun::star::uno::Any( &p4, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface5 > *)0 ))
+ else if (rType == Interface5::static_type())
return ::com::sun::star::uno::Any( &p5, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface6 > *)0 ))
+ else if (rType == Interface6::static_type())
return ::com::sun::star::uno::Any( &p6, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface7 > *)0 ))
+ else if (rType == Interface7::static_type())
return ::com::sun::star::uno::Any( &p7, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface8 > *)0 ))
+ else if (rType == Interface8::static_type())
return ::com::sun::star::uno::Any( &p8, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface9 > *)0 ))
+ else if (rType == Interface9::static_type())
return ::com::sun::star::uno::Any( &p9, rType );
else
return ::com::sun::star::uno::Any();
@@ -419,25 +426,25 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9, Interface10 * p10 )
SAL_THROW( () )
{
- if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 ))
+ if (rType == Interface1::static_type())
return ::com::sun::star::uno::Any( &p1, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface2 > *)0 ))
+ else if (rType == Interface2::static_type())
return ::com::sun::star::uno::Any( &p2, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface3 > *)0 ))
+ else if (rType == Interface3::static_type())
return ::com::sun::star::uno::Any( &p3, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface4 > *)0 ))
+ else if (rType == Interface4::static_type())
return ::com::sun::star::uno::Any( &p4, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface5 > *)0 ))
+ else if (rType == Interface5::static_type())
return ::com::sun::star::uno::Any( &p5, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface6 > *)0 ))
+ else if (rType == Interface6::static_type())
return ::com::sun::star::uno::Any( &p6, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface7 > *)0 ))
+ else if (rType == Interface7::static_type())
return ::com::sun::star::uno::Any( &p7, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface8 > *)0 ))
+ else if (rType == Interface8::static_type())
return ::com::sun::star::uno::Any( &p8, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface9 > *)0 ))
+ else if (rType == Interface9::static_type())
return ::com::sun::star::uno::Any( &p9, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface10 > *)0 ))
+ else if (rType == Interface10::static_type())
return ::com::sun::star::uno::Any( &p10, rType );
else
return ::com::sun::star::uno::Any();
@@ -479,27 +486,27 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
Interface11 * p11 )
SAL_THROW( () )
{
- if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 ))
+ if (rType == Interface1::static_type())
return ::com::sun::star::uno::Any( &p1, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface2 > *)0 ))
+ else if (rType == Interface2::static_type())
return ::com::sun::star::uno::Any( &p2, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface3 > *)0 ))
+ else if (rType == Interface3::static_type())
return ::com::sun::star::uno::Any( &p3, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface4 > *)0 ))
+ else if (rType == Interface4::static_type())
return ::com::sun::star::uno::Any( &p4, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface5 > *)0 ))
+ else if (rType == Interface5::static_type())
return ::com::sun::star::uno::Any( &p5, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface6 > *)0 ))
+ else if (rType == Interface6::static_type())
return ::com::sun::star::uno::Any( &p6, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface7 > *)0 ))
+ else if (rType == Interface7::static_type())
return ::com::sun::star::uno::Any( &p7, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface8 > *)0 ))
+ else if (rType == Interface8::static_type())
return ::com::sun::star::uno::Any( &p8, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface9 > *)0 ))
+ else if (rType == Interface9::static_type())
return ::com::sun::star::uno::Any( &p9, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface10 > *)0 ))
+ else if (rType == Interface10::static_type())
return ::com::sun::star::uno::Any( &p10, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface11 > *)0 ))
+ else if (rType == Interface11::static_type())
return ::com::sun::star::uno::Any( &p11, rType );
else
return ::com::sun::star::uno::Any();
@@ -543,29 +550,29 @@ inline ::com::sun::star::uno::Any SAL_CALL queryInterface(
Interface11 * p11, Interface12 * p12 )
SAL_THROW( () )
{
- if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface1 > *)0 ))
+ if (rType == Interface1::static_type())
return ::com::sun::star::uno::Any( &p1, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface2 > *)0 ))
+ else if (rType == Interface2::static_type())
return ::com::sun::star::uno::Any( &p2, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface3 > *)0 ))
+ else if (rType == Interface3::static_type())
return ::com::sun::star::uno::Any( &p3, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface4 > *)0 ))
+ else if (rType == Interface4::static_type())
return ::com::sun::star::uno::Any( &p4, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface5 > *)0 ))
+ else if (rType == Interface5::static_type())
return ::com::sun::star::uno::Any( &p5, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface6 > *)0 ))
+ else if (rType == Interface6::static_type())
return ::com::sun::star::uno::Any( &p6, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface7 > *)0 ))
+ else if (rType == Interface7::static_type())
return ::com::sun::star::uno::Any( &p7, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface8 > *)0 ))
+ else if (rType == Interface8::static_type())
return ::com::sun::star::uno::Any( &p8, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface9 > *)0 ))
+ else if (rType == Interface9::static_type())
return ::com::sun::star::uno::Any( &p9, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface10 > *)0 ))
+ else if (rType == Interface10::static_type())
return ::com::sun::star::uno::Any( &p10, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface11 > *)0 ))
+ else if (rType == Interface11::static_type())
return ::com::sun::star::uno::Any( &p11, rType );
- else if (rType == ::getCppuType( (::com::sun::star::uno::Reference< Interface12 > *)0 ))
+ else if (rType == Interface12::static_type())
return ::com::sun::star::uno::Any( &p12, rType );
else
return ::com::sun::star::uno::Any();