Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
c57ffac6
Kaydet (Commit)
c57ffac6
authored
Mar 31, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I22ee2cbacad8b19bb55db234e816d401edcf4a35
üst
6d393f82
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
60 deletions
+60
-60
helper_purpenv_Proxy.cxx
cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx
+1
-1
current.cxx
cppu/source/threadpool/current.cxx
+2
-2
EnvStack.cxx
cppu/source/uno/EnvStack.cxx
+5
-5
data.cxx
cppu/source/uno/data.cxx
+1
-1
lbenv.cxx
cppu/source/uno/lbenv.cxx
+2
-2
Any.hxx
include/com/sun/star/uno/Any.hxx
+45
-45
genfunc.hxx
include/com/sun/star/uno/genfunc.hxx
+4
-4
No files found.
cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx
Dosyayı görüntüle @
c57ffac6
...
@@ -172,7 +172,7 @@ extern "C" { static void SAL_CALL s_Proxy_dispatch(
...
@@ -172,7 +172,7 @@ extern "C" { static void SAL_CALL s_Proxy_dispatch(
extern
"C"
void
SAL_CALL
Proxy_free
(
SAL_UNUSED_PARAMETER
uno_ExtEnvironment
*
/*pEnv*/
,
void
*
pProxy
)
SAL_THROW_EXTERN_C
()
extern
"C"
void
SAL_CALL
Proxy_free
(
SAL_UNUSED_PARAMETER
uno_ExtEnvironment
*
/*pEnv*/
,
void
*
pProxy
)
SAL_THROW_EXTERN_C
()
{
{
Proxy
*
pThis
=
static_cast
<
Proxy
*
>
(
reinterpret
_cast
<
uno_Interface
*>
(
pProxy
));
Proxy
*
pThis
=
static_cast
<
Proxy
*
>
(
static
_cast
<
uno_Interface
*>
(
pProxy
));
delete
pThis
;
delete
pThis
;
}
}
...
...
cppu/source/threadpool/current.cxx
Dosyayı görüntüle @
c57ffac6
...
@@ -146,7 +146,7 @@ extern "C" void SAL_CALL delete_IdContainer( void * p )
...
@@ -146,7 +146,7 @@ extern "C" void SAL_CALL delete_IdContainer( void * p )
{
{
if
(
p
)
if
(
p
)
{
{
IdContainer
*
pId
=
reinterpret
_cast
<
IdContainer
*
>
(
p
);
IdContainer
*
pId
=
static
_cast
<
IdContainer
*
>
(
p
);
if
(
pId
->
pCurrentContext
)
if
(
pId
->
pCurrentContext
)
{
{
(
*
pId
->
pCurrentContextEnv
->
releaseInterface
)(
(
*
pId
->
pCurrentContextEnv
->
releaseInterface
)(
...
@@ -168,7 +168,7 @@ IdContainer * getIdContainer()
...
@@ -168,7 +168,7 @@ IdContainer * getIdContainer()
static
ThreadKey
s_key
(
delete_IdContainer
);
static
ThreadKey
s_key
(
delete_IdContainer
);
oslThreadKey
aKey
=
s_key
.
getThreadKey
();
oslThreadKey
aKey
=
s_key
.
getThreadKey
();
IdContainer
*
pId
=
reinterpret
_cast
<
IdContainer
*
>
(
::
osl_getThreadKeyData
(
aKey
)
);
IdContainer
*
pId
=
static
_cast
<
IdContainer
*
>
(
::
osl_getThreadKeyData
(
aKey
)
);
if
(
!
pId
)
if
(
!
pId
)
{
{
pId
=
new
IdContainer
();
pId
=
new
IdContainer
();
...
...
cppu/source/uno/EnvStack.cxx
Dosyayı görüntüle @
c57ffac6
...
@@ -228,7 +228,7 @@ extern "C" { static void s_pull(va_list * pParam)
...
@@ -228,7 +228,7 @@ extern "C" { static void s_pull(va_list * pParam)
static
void
s_callInto_v
(
uno_Environment
*
pEnv
,
uno_EnvCallee
*
pCallee
,
va_list
*
pParam
)
static
void
s_callInto_v
(
uno_Environment
*
pEnv
,
uno_EnvCallee
*
pCallee
,
va_list
*
pParam
)
{
{
cppu
::
Enterable
*
pEnterable
=
reinterpret
_cast
<
cppu
::
Enterable
*>
(
pEnv
->
pReserved
);
cppu
::
Enterable
*
pEnterable
=
static
_cast
<
cppu
::
Enterable
*>
(
pEnv
->
pReserved
);
if
(
pEnterable
)
if
(
pEnterable
)
pEnterable
->
callInto
(
s_pull
,
pCallee
,
pParam
);
pEnterable
->
callInto
(
s_pull
,
pCallee
,
pParam
);
...
@@ -247,7 +247,7 @@ static void s_callInto(uno_Environment * pEnv, uno_EnvCallee * pCallee, ...)
...
@@ -247,7 +247,7 @@ static void s_callInto(uno_Environment * pEnv, uno_EnvCallee * pCallee, ...)
static
void
s_callOut_v
(
uno_Environment
*
pEnv
,
uno_EnvCallee
*
pCallee
,
va_list
*
pParam
)
static
void
s_callOut_v
(
uno_Environment
*
pEnv
,
uno_EnvCallee
*
pCallee
,
va_list
*
pParam
)
{
{
cppu
::
Enterable
*
pEnterable
=
reinterpret
_cast
<
cppu
::
Enterable
*>
(
pEnv
->
pReserved
);
cppu
::
Enterable
*
pEnterable
=
static
_cast
<
cppu
::
Enterable
*>
(
pEnv
->
pReserved
);
if
(
pEnterable
)
if
(
pEnterable
)
pEnterable
->
callOut_v
(
pCallee
,
pParam
);
pEnterable
->
callOut_v
(
pCallee
,
pParam
);
...
@@ -336,7 +336,7 @@ extern "C" void SAL_CALL uno_Environment_enter(uno_Environment * pTargetEnv)
...
@@ -336,7 +336,7 @@ extern "C" void SAL_CALL uno_Environment_enter(uno_Environment * pTargetEnv)
switch
(
res
)
switch
(
res
)
{
{
case
-
1
:
case
-
1
:
pEnterable
=
reinterpret
_cast
<
cppu
::
Enterable
*>
(
pCurrEnv
->
pReserved
);
pEnterable
=
static
_cast
<
cppu
::
Enterable
*>
(
pCurrEnv
->
pReserved
);
if
(
pEnterable
)
if
(
pEnterable
)
pEnterable
->
leave
();
pEnterable
->
leave
();
pCurrEnv
->
release
(
pCurrEnv
);
pCurrEnv
->
release
(
pCurrEnv
);
...
@@ -344,7 +344,7 @@ extern "C" void SAL_CALL uno_Environment_enter(uno_Environment * pTargetEnv)
...
@@ -344,7 +344,7 @@ extern "C" void SAL_CALL uno_Environment_enter(uno_Environment * pTargetEnv)
case
1
:
case
1
:
pNextEnv
->
acquire
(
pNextEnv
);
pNextEnv
->
acquire
(
pNextEnv
);
pEnterable
=
reinterpret
_cast
<
cppu
::
Enterable
*>
(
pNextEnv
->
pReserved
);
pEnterable
=
static
_cast
<
cppu
::
Enterable
*>
(
pNextEnv
->
pReserved
);
if
(
pEnterable
)
if
(
pEnterable
)
pEnterable
->
enter
();
pEnterable
->
enter
();
break
;
break
;
...
@@ -363,7 +363,7 @@ int SAL_CALL uno_Environment_isValid(uno_Environment * pEnv, rtl_uString ** pRea
...
@@ -363,7 +363,7 @@ int SAL_CALL uno_Environment_isValid(uno_Environment * pEnv, rtl_uString ** pRea
rtl
::
OUString
typeName
(
cppu
::
EnvDcp
::
getTypeName
(
pEnv
->
pTypeName
));
rtl
::
OUString
typeName
(
cppu
::
EnvDcp
::
getTypeName
(
pEnv
->
pTypeName
));
if
(
typeName
==
UNO_LB_UNO
)
if
(
typeName
==
UNO_LB_UNO
)
{
{
cppu
::
Enterable
*
pEnterable
=
reinterpret
_cast
<
cppu
::
Enterable
*>
(
pEnv
->
pReserved
);
cppu
::
Enterable
*
pEnterable
=
static
_cast
<
cppu
::
Enterable
*>
(
pEnv
->
pReserved
);
if
(
pEnterable
)
if
(
pEnterable
)
result
=
pEnterable
->
isValid
(
reinterpret_cast
<
rtl
::
OUString
*>
(
pReason
));
result
=
pEnterable
->
isValid
(
reinterpret_cast
<
rtl
::
OUString
*>
(
pReason
));
}
}
...
...
cppu/source/uno/data.cxx
Dosyayı görüntüle @
c57ffac6
...
@@ -95,7 +95,7 @@ void * binuno_queryInterface( void * pUnoI, typelib_TypeDescriptionReference * p
...
@@ -95,7 +95,7 @@ void * binuno_queryInterface( void * pUnoI, typelib_TypeDescriptionReference * p
"exception occurred querying for interface "
"exception occurred querying for interface "
<<
OUString
(
pDestType
->
pTypeName
)
<<
": ["
<<
OUString
(
pDestType
->
pTypeName
)
<<
": ["
<<
OUString
(
pExc
->
pType
->
pTypeName
)
<<
"] "
<<
OUString
(
pExc
->
pType
->
pTypeName
)
<<
"] "
<<
*
reinterpret
_cast
<
OUString
const
*>
(
pExc
->
pData
));
<<
*
static
_cast
<
OUString
const
*>
(
pExc
->
pData
));
// Message is very first member
// Message is very first member
uno_any_destruct
(
pExc
,
0
);
uno_any_destruct
(
pExc
,
0
);
}
}
...
...
cppu/source/uno/lbenv.cxx
Dosyayı görüntüle @
c57ffac6
...
@@ -882,7 +882,7 @@ static void SAL_CALL unoenv_computeObjectIdentifier(
...
@@ -882,7 +882,7 @@ static void SAL_CALL unoenv_computeObjectIdentifier(
static
void
SAL_CALL
unoenv_acquireInterface
(
static
void
SAL_CALL
unoenv_acquireInterface
(
SAL_UNUSED_PARAMETER
uno_ExtEnvironment
*
,
void
*
pUnoI_
)
SAL_UNUSED_PARAMETER
uno_ExtEnvironment
*
,
void
*
pUnoI_
)
{
{
uno_Interface
*
pUnoI
=
reinterpret
_cast
<
uno_Interface
*
>
(
pUnoI_
);
uno_Interface
*
pUnoI
=
static
_cast
<
uno_Interface
*
>
(
pUnoI_
);
(
*
pUnoI
->
acquire
)(
pUnoI
);
(
*
pUnoI
->
acquire
)(
pUnoI
);
}
}
...
@@ -890,7 +890,7 @@ static void SAL_CALL unoenv_acquireInterface(
...
@@ -890,7 +890,7 @@ static void SAL_CALL unoenv_acquireInterface(
static
void
SAL_CALL
unoenv_releaseInterface
(
static
void
SAL_CALL
unoenv_releaseInterface
(
SAL_UNUSED_PARAMETER
uno_ExtEnvironment
*
,
void
*
pUnoI_
)
SAL_UNUSED_PARAMETER
uno_ExtEnvironment
*
,
void
*
pUnoI_
)
{
{
uno_Interface
*
pUnoI
=
reinterpret
_cast
<
uno_Interface
*
>
(
pUnoI_
);
uno_Interface
*
pUnoI
=
static
_cast
<
uno_Interface
*
>
(
pUnoI_
);
(
*
pUnoI
->
release
)(
pUnoI
);
(
*
pUnoI
->
release
)(
pUnoI
);
}
}
}
}
...
...
include/com/sun/star/uno/Any.hxx
Dosyayı görüntüle @
c57ffac6
...
@@ -255,7 +255,7 @@ inline bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal
...
@@ -255,7 +255,7 @@ inline bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal
{
{
if
(
typelib_TypeClass_BOOLEAN
==
rAny
.
pType
->
eTypeClass
)
if
(
typelib_TypeClass_BOOLEAN
==
rAny
.
pType
->
eTypeClass
)
{
{
value
=
(
*
reinterpret
_cast
<
const
sal_Bool
*
>
(
rAny
.
pData
)
!=
sal_False
);
value
=
(
*
static
_cast
<
const
sal_Bool
*
>
(
rAny
.
pData
)
!=
sal_False
);
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -265,7 +265,7 @@ template<>
...
@@ -265,7 +265,7 @@ template<>
inline
bool
SAL_CALL
operator
==
(
const
Any
&
rAny
,
const
sal_Bool
&
value
)
inline
bool
SAL_CALL
operator
==
(
const
Any
&
rAny
,
const
sal_Bool
&
value
)
{
{
return
(
typelib_TypeClass_BOOLEAN
==
rAny
.
pType
->
eTypeClass
&&
return
(
typelib_TypeClass_BOOLEAN
==
rAny
.
pType
->
eTypeClass
&&
(
value
!=
sal_False
)
==
(
*
reinterpret
_cast
<
const
sal_Bool
*
>
(
rAny
.
pData
)
!=
sal_False
));
(
value
!=
sal_False
)
==
(
*
static
_cast
<
const
sal_Bool
*
>
(
rAny
.
pData
)
!=
sal_False
));
}
}
...
@@ -274,7 +274,7 @@ inline bool SAL_CALL operator >>= ( Any const & rAny, bool & value )
...
@@ -274,7 +274,7 @@ inline bool SAL_CALL operator >>= ( Any const & rAny, bool & value )
{
{
if
(
rAny
.
pType
->
eTypeClass
==
typelib_TypeClass_BOOLEAN
)
if
(
rAny
.
pType
->
eTypeClass
==
typelib_TypeClass_BOOLEAN
)
{
{
value
=
*
reinterpret
_cast
<
sal_Bool
const
*
>
(
value
=
*
static
_cast
<
sal_Bool
const
*
>
(
rAny
.
pData
)
!=
sal_False
;
rAny
.
pData
)
!=
sal_False
;
return
true
;
return
true
;
}
}
...
@@ -287,7 +287,7 @@ inline bool SAL_CALL operator == ( Any const & rAny, bool const & value )
...
@@ -287,7 +287,7 @@ inline bool SAL_CALL operator == ( Any const & rAny, bool const & value )
{
{
return
(
rAny
.
pType
->
eTypeClass
==
typelib_TypeClass_BOOLEAN
&&
return
(
rAny
.
pType
->
eTypeClass
==
typelib_TypeClass_BOOLEAN
&&
(
value
==
(
value
==
(
*
reinterpret
_cast
<
sal_Bool
const
*
>
(
rAny
.
pData
)
(
*
static
_cast
<
sal_Bool
const
*
>
(
rAny
.
pData
)
!=
sal_False
)));
!=
sal_False
)));
}
}
...
@@ -298,7 +298,7 @@ inline bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal
...
@@ -298,7 +298,7 @@ inline bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal
{
{
if
(
typelib_TypeClass_BYTE
==
rAny
.
pType
->
eTypeClass
)
if
(
typelib_TypeClass_BYTE
==
rAny
.
pType
->
eTypeClass
)
{
{
value
=
*
reinterpret
_cast
<
const
sal_Int8
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_Int8
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -311,11 +311,11 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value )
...
@@ -311,11 +311,11 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value )
switch
(
rAny
.
pType
->
eTypeClass
)
switch
(
rAny
.
pType
->
eTypeClass
)
{
{
case
typelib_TypeClass_BYTE
:
case
typelib_TypeClass_BYTE
:
value
=
*
reinterpret
_cast
<
const
sal_Int8
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_Int8
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_SHORT
:
case
typelib_TypeClass_SHORT
:
case
typelib_TypeClass_UNSIGNED_SHORT
:
case
typelib_TypeClass_UNSIGNED_SHORT
:
value
=
*
reinterpret
_cast
<
const
sal_Int16
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_Int16
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
default
:
default
:
return
false
;
return
false
;
...
@@ -328,11 +328,11 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value )
...
@@ -328,11 +328,11 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value )
switch
(
rAny
.
pType
->
eTypeClass
)
switch
(
rAny
.
pType
->
eTypeClass
)
{
{
case
typelib_TypeClass_BYTE
:
case
typelib_TypeClass_BYTE
:
value
=
(
sal_uInt16
)(
*
reinterpret
_cast
<
const
sal_Int8
*
>
(
rAny
.
pData
)
);
value
=
(
sal_uInt16
)(
*
static
_cast
<
const
sal_Int8
*
>
(
rAny
.
pData
)
);
return
true
;
return
true
;
case
typelib_TypeClass_SHORT
:
case
typelib_TypeClass_SHORT
:
case
typelib_TypeClass_UNSIGNED_SHORT
:
case
typelib_TypeClass_UNSIGNED_SHORT
:
value
=
*
reinterpret
_cast
<
const
sal_uInt16
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_uInt16
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
default
:
default
:
return
false
;
return
false
;
...
@@ -346,17 +346,17 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value )
...
@@ -346,17 +346,17 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value )
switch
(
rAny
.
pType
->
eTypeClass
)
switch
(
rAny
.
pType
->
eTypeClass
)
{
{
case
typelib_TypeClass_BYTE
:
case
typelib_TypeClass_BYTE
:
value
=
*
reinterpret
_cast
<
const
sal_Int8
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_Int8
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_SHORT
:
case
typelib_TypeClass_SHORT
:
value
=
*
reinterpret
_cast
<
const
sal_Int16
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_Int16
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_UNSIGNED_SHORT
:
case
typelib_TypeClass_UNSIGNED_SHORT
:
value
=
*
reinterpret
_cast
<
const
sal_uInt16
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_uInt16
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_LONG
:
case
typelib_TypeClass_LONG
:
case
typelib_TypeClass_UNSIGNED_LONG
:
case
typelib_TypeClass_UNSIGNED_LONG
:
value
=
*
reinterpret
_cast
<
const
sal_Int32
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_Int32
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
default
:
default
:
return
false
;
return
false
;
...
@@ -369,17 +369,17 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value )
...
@@ -369,17 +369,17 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value )
switch
(
rAny
.
pType
->
eTypeClass
)
switch
(
rAny
.
pType
->
eTypeClass
)
{
{
case
typelib_TypeClass_BYTE
:
case
typelib_TypeClass_BYTE
:
value
=
(
sal_uInt32
)(
*
reinterpret
_cast
<
const
sal_Int8
*
>
(
rAny
.
pData
)
);
value
=
(
sal_uInt32
)(
*
static
_cast
<
const
sal_Int8
*
>
(
rAny
.
pData
)
);
return
true
;
return
true
;
case
typelib_TypeClass_SHORT
:
case
typelib_TypeClass_SHORT
:
value
=
(
sal_uInt32
)(
*
reinterpret
_cast
<
const
sal_Int16
*
>
(
rAny
.
pData
)
);
value
=
(
sal_uInt32
)(
*
static
_cast
<
const
sal_Int16
*
>
(
rAny
.
pData
)
);
return
true
;
return
true
;
case
typelib_TypeClass_UNSIGNED_SHORT
:
case
typelib_TypeClass_UNSIGNED_SHORT
:
value
=
*
reinterpret
_cast
<
const
sal_uInt16
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_uInt16
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_LONG
:
case
typelib_TypeClass_LONG
:
case
typelib_TypeClass_UNSIGNED_LONG
:
case
typelib_TypeClass_UNSIGNED_LONG
:
value
=
*
reinterpret
_cast
<
const
sal_uInt32
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_uInt32
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
default
:
default
:
return
false
;
return
false
;
...
@@ -393,23 +393,23 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value )
...
@@ -393,23 +393,23 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value )
switch
(
rAny
.
pType
->
eTypeClass
)
switch
(
rAny
.
pType
->
eTypeClass
)
{
{
case
typelib_TypeClass_BYTE
:
case
typelib_TypeClass_BYTE
:
value
=
*
reinterpret
_cast
<
const
sal_Int8
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_Int8
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_SHORT
:
case
typelib_TypeClass_SHORT
:
value
=
*
reinterpret
_cast
<
const
sal_Int16
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_Int16
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_UNSIGNED_SHORT
:
case
typelib_TypeClass_UNSIGNED_SHORT
:
value
=
*
reinterpret
_cast
<
const
sal_uInt16
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_uInt16
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_LONG
:
case
typelib_TypeClass_LONG
:
value
=
*
reinterpret
_cast
<
const
sal_Int32
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_Int32
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_UNSIGNED_LONG
:
case
typelib_TypeClass_UNSIGNED_LONG
:
value
=
*
reinterpret
_cast
<
const
sal_uInt32
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_uInt32
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_HYPER
:
case
typelib_TypeClass_HYPER
:
case
typelib_TypeClass_UNSIGNED_HYPER
:
case
typelib_TypeClass_UNSIGNED_HYPER
:
value
=
*
reinterpret
_cast
<
const
sal_Int64
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_Int64
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
default
:
default
:
return
false
;
return
false
;
...
@@ -422,23 +422,23 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value )
...
@@ -422,23 +422,23 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value )
switch
(
rAny
.
pType
->
eTypeClass
)
switch
(
rAny
.
pType
->
eTypeClass
)
{
{
case
typelib_TypeClass_BYTE
:
case
typelib_TypeClass_BYTE
:
value
=
(
sal_uInt64
)(
*
reinterpret
_cast
<
const
sal_Int8
*
>
(
rAny
.
pData
)
);
value
=
(
sal_uInt64
)(
*
static
_cast
<
const
sal_Int8
*
>
(
rAny
.
pData
)
);
return
true
;
return
true
;
case
typelib_TypeClass_SHORT
:
case
typelib_TypeClass_SHORT
:
value
=
(
sal_uInt64
)(
*
reinterpret
_cast
<
const
sal_Int16
*
>
(
rAny
.
pData
)
);
value
=
(
sal_uInt64
)(
*
static
_cast
<
const
sal_Int16
*
>
(
rAny
.
pData
)
);
return
true
;
return
true
;
case
typelib_TypeClass_UNSIGNED_SHORT
:
case
typelib_TypeClass_UNSIGNED_SHORT
:
value
=
*
reinterpret
_cast
<
const
sal_uInt16
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_uInt16
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_LONG
:
case
typelib_TypeClass_LONG
:
value
=
(
sal_uInt64
)(
*
reinterpret
_cast
<
const
sal_Int32
*
>
(
rAny
.
pData
)
);
value
=
(
sal_uInt64
)(
*
static
_cast
<
const
sal_Int32
*
>
(
rAny
.
pData
)
);
return
true
;
return
true
;
case
typelib_TypeClass_UNSIGNED_LONG
:
case
typelib_TypeClass_UNSIGNED_LONG
:
value
=
*
reinterpret
_cast
<
const
sal_uInt32
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_uInt32
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_HYPER
:
case
typelib_TypeClass_HYPER
:
case
typelib_TypeClass_UNSIGNED_HYPER
:
case
typelib_TypeClass_UNSIGNED_HYPER
:
value
=
*
reinterpret
_cast
<
const
sal_uInt64
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_uInt64
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
default
:
default
:
return
false
;
return
false
;
...
@@ -452,16 +452,16 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, float & value )
...
@@ -452,16 +452,16 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, float & value )
switch
(
rAny
.
pType
->
eTypeClass
)
switch
(
rAny
.
pType
->
eTypeClass
)
{
{
case
typelib_TypeClass_BYTE
:
case
typelib_TypeClass_BYTE
:
value
=
*
reinterpret
_cast
<
const
sal_Int8
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_Int8
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_SHORT
:
case
typelib_TypeClass_SHORT
:
value
=
*
reinterpret
_cast
<
const
sal_Int16
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_Int16
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_UNSIGNED_SHORT
:
case
typelib_TypeClass_UNSIGNED_SHORT
:
value
=
*
reinterpret
_cast
<
const
sal_uInt16
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_uInt16
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_FLOAT
:
case
typelib_TypeClass_FLOAT
:
value
=
*
reinterpret
_cast
<
const
float
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
float
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
default
:
default
:
return
false
;
return
false
;
...
@@ -475,25 +475,25 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, double & value )
...
@@ -475,25 +475,25 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, double & value )
switch
(
rAny
.
pType
->
eTypeClass
)
switch
(
rAny
.
pType
->
eTypeClass
)
{
{
case
typelib_TypeClass_BYTE
:
case
typelib_TypeClass_BYTE
:
value
=
*
reinterpret
_cast
<
const
sal_Int8
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_Int8
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_SHORT
:
case
typelib_TypeClass_SHORT
:
value
=
*
reinterpret
_cast
<
const
sal_Int16
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_Int16
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_UNSIGNED_SHORT
:
case
typelib_TypeClass_UNSIGNED_SHORT
:
value
=
*
reinterpret
_cast
<
const
sal_uInt16
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_uInt16
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_LONG
:
case
typelib_TypeClass_LONG
:
value
=
*
reinterpret
_cast
<
const
sal_Int32
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_Int32
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_UNSIGNED_LONG
:
case
typelib_TypeClass_UNSIGNED_LONG
:
value
=
*
reinterpret
_cast
<
const
sal_uInt32
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
sal_uInt32
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_FLOAT
:
case
typelib_TypeClass_FLOAT
:
value
=
*
reinterpret
_cast
<
const
float
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
float
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
case
typelib_TypeClass_DOUBLE
:
case
typelib_TypeClass_DOUBLE
:
value
=
*
reinterpret
_cast
<
const
double
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
double
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
default
:
default
:
return
false
;
return
false
;
...
@@ -506,7 +506,7 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & value )
...
@@ -506,7 +506,7 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & value )
{
{
if
(
typelib_TypeClass_STRING
==
rAny
.
pType
->
eTypeClass
)
if
(
typelib_TypeClass_STRING
==
rAny
.
pType
->
eTypeClass
)
{
{
value
=
*
reinterpret
_cast
<
const
::
rtl
::
OUString
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
::
rtl
::
OUString
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -516,7 +516,7 @@ template<>
...
@@ -516,7 +516,7 @@ template<>
inline
bool
SAL_CALL
operator
==
(
const
Any
&
rAny
,
const
::
rtl
::
OUString
&
value
)
inline
bool
SAL_CALL
operator
==
(
const
Any
&
rAny
,
const
::
rtl
::
OUString
&
value
)
{
{
return
(
typelib_TypeClass_STRING
==
rAny
.
pType
->
eTypeClass
&&
return
(
typelib_TypeClass_STRING
==
rAny
.
pType
->
eTypeClass
&&
value
.
equals
(
*
reinterpret
_cast
<
const
::
rtl
::
OUString
*
>
(
rAny
.
pData
)
));
value
.
equals
(
*
static
_cast
<
const
::
rtl
::
OUString
*
>
(
rAny
.
pData
)
));
}
}
// type
// type
...
@@ -525,7 +525,7 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, Type & value )
...
@@ -525,7 +525,7 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, Type & value )
{
{
if
(
typelib_TypeClass_TYPE
==
rAny
.
pType
->
eTypeClass
)
if
(
typelib_TypeClass_TYPE
==
rAny
.
pType
->
eTypeClass
)
{
{
value
=
*
reinterpret
_cast
<
const
Type
*
>
(
rAny
.
pData
);
value
=
*
static
_cast
<
const
Type
*
>
(
rAny
.
pData
);
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -535,7 +535,7 @@ template<>
...
@@ -535,7 +535,7 @@ template<>
inline
bool
SAL_CALL
operator
==
(
const
Any
&
rAny
,
const
Type
&
value
)
inline
bool
SAL_CALL
operator
==
(
const
Any
&
rAny
,
const
Type
&
value
)
{
{
return
(
typelib_TypeClass_TYPE
==
rAny
.
pType
->
eTypeClass
&&
return
(
typelib_TypeClass_TYPE
==
rAny
.
pType
->
eTypeClass
&&
value
.
equals
(
*
reinterpret
_cast
<
const
Type
*
>
(
rAny
.
pData
)
));
value
.
equals
(
*
static
_cast
<
const
Type
*
>
(
rAny
.
pData
)
));
}
}
// any
// any
...
@@ -557,7 +557,7 @@ inline bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value
...
@@ -557,7 +557,7 @@ inline bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value
{
{
if
(
typelib_TypeClass_INTERFACE
==
rAny
.
pType
->
eTypeClass
)
if
(
typelib_TypeClass_INTERFACE
==
rAny
.
pType
->
eTypeClass
)
{
{
return
reinterpret
_cast
<
const
BaseReference
*
>
(
rAny
.
pData
)
->
operator
==
(
value
);
return
static
_cast
<
const
BaseReference
*
>
(
rAny
.
pData
)
->
operator
==
(
value
);
}
}
return
false
;
return
false
;
}
}
...
...
include/com/sun/star/uno/genfunc.hxx
Dosyayı görüntüle @
c57ffac6
...
@@ -36,12 +36,12 @@ namespace uno
...
@@ -36,12 +36,12 @@ namespace uno
inline
void
SAL_CALL
cpp_acquire
(
void
*
pCppI
)
inline
void
SAL_CALL
cpp_acquire
(
void
*
pCppI
)
{
{
reinterpret
_cast
<
XInterface
*
>
(
pCppI
)
->
acquire
();
static
_cast
<
XInterface
*
>
(
pCppI
)
->
acquire
();
}
}
inline
void
SAL_CALL
cpp_release
(
void
*
pCppI
)
inline
void
SAL_CALL
cpp_release
(
void
*
pCppI
)
{
{
reinterpret
_cast
<
XInterface
*
>
(
pCppI
)
->
release
();
static
_cast
<
XInterface
*
>
(
pCppI
)
->
release
();
}
}
inline
void
*
SAL_CALL
cpp_queryInterface
(
void
*
pCppI
,
typelib_TypeDescriptionReference
*
pType
)
inline
void
*
SAL_CALL
cpp_queryInterface
(
void
*
pCppI
,
typelib_TypeDescriptionReference
*
pType
)
...
@@ -50,11 +50,11 @@ inline void * SAL_CALL cpp_queryInterface( void * pCppI, typelib_TypeDescription
...
@@ -50,11 +50,11 @@ inline void * SAL_CALL cpp_queryInterface( void * pCppI, typelib_TypeDescription
{
{
try
try
{
{
Any
aRet
(
reinterpret
_cast
<
XInterface
*
>
(
pCppI
)
->
queryInterface
(
Any
aRet
(
static
_cast
<
XInterface
*
>
(
pCppI
)
->
queryInterface
(
*
reinterpret_cast
<
const
Type
*
>
(
&
pType
)
)
);
*
reinterpret_cast
<
const
Type
*
>
(
&
pType
)
)
);
if
(
typelib_TypeClass_INTERFACE
==
aRet
.
pType
->
eTypeClass
)
if
(
typelib_TypeClass_INTERFACE
==
aRet
.
pType
->
eTypeClass
)
{
{
XInterface
*
pRet
=
reinterpret
_cast
<
XInterface
*
>
(
aRet
.
pReserved
);
XInterface
*
pRet
=
static
_cast
<
XInterface
*
>
(
aRet
.
pReserved
);
aRet
.
pReserved
=
0
;
aRet
.
pReserved
=
0
;
return
pRet
;
return
pRet
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment