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
b3105952
Kaydet (Commit)
b3105952
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: Ib3610f9d244b15f8f752c0f781600f5c7e7a944f
üst
c96f4e56
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
22 deletions
+22
-22
base.hxx
stoc/source/corereflection/base.hxx
+1
-1
iafactory.cxx
stoc/source/invocation_adapterfactory/iafactory.cxx
+3
-3
javaloader.cxx
stoc/source/javaloader/javaloader.cxx
+1
-1
proxyfac.cxx
stoc/source/proxy_factory/proxyfac.cxx
+3
-3
access_controller.cxx
stoc/source/security/access_controller.cxx
+6
-6
permissions.cxx
stoc/source/security/permissions.cxx
+6
-6
servicemanager.cxx
stoc/source/servicemanager/servicemanager.cxx
+2
-2
No files found.
stoc/source/corereflection/base.hxx
Dosyayı görüntüle @
b3105952
...
...
@@ -387,7 +387,7 @@ inline bool extract(
}
else
if
(
rObj
.
getValueTypeClass
()
==
css
::
uno
::
TypeClass_TYPE
)
{
rDest
=
pRefl
->
forType
(
reinterpret
_cast
<
const
css
::
uno
::
Type
*
>
(
rObj
.
getValue
()
)
->
getTypeLibType
()
);
rDest
=
pRefl
->
forType
(
static
_cast
<
const
css
::
uno
::
Type
*
>
(
rObj
.
getValue
()
)
->
getTypeLibType
()
);
return
rDest
.
is
();
}
}
...
...
stoc/source/invocation_adapterfactory/iafactory.cxx
Dosyayı görüntüle @
b3105952
...
...
@@ -275,7 +275,7 @@ bool AdapterImpl::coerce_assign(
// set runtime exception
constructRuntimeException
(
pOutExc
,
"type coercion failed: "
+
reinterpret
_cast
<
Exception
const
*
>
(
static
_cast
<
Exception
const
*
>
(
p_exc
->
pData
)
->
Message
);
}
::
uno_any_destruct
(
p_exc
,
0
);
...
...
@@ -330,7 +330,7 @@ static void handleInvokExc( uno_Any * pDest, uno_Any * pSource )
{
// unwrap invocation target exception
uno_Any
*
target_exc
=
&
reinterpret
_cast
<
reflection
::
InvocationTargetException
*
>
(
&
static
_cast
<
reflection
::
InvocationTargetException
*
>
(
pSource
->
pData
)
->
TargetException
;
::
uno_type_any_construct
(
pDest
,
target_exc
->
pData
,
target_exc
->
pType
,
0
);
...
...
@@ -773,7 +773,7 @@ static inline AdapterImpl * lookup_adapter(
t_ptr_set
::
const_iterator
const
iEnd
(
adapters_set
.
end
()
);
while
(
iEnd
!=
iPos
)
{
AdapterImpl
*
that
=
reinterpret
_cast
<
AdapterImpl
*
>
(
*
iPos
);
AdapterImpl
*
that
=
static
_cast
<
AdapterImpl
*
>
(
*
iPos
);
// iterate through all types if that is a matching adapter
sal_Int32
nPosTypes
;
for
(
nPosTypes
=
nTypes
;
nPosTypes
--
;
)
...
...
stoc/source/javaloader/javaloader.cxx
Dosyayı görüntüle @
b3105952
...
...
@@ -247,7 +247,7 @@ const css::uno::Reference<XImplementationLoader> & JavaComponentLoader::getJavaL
throw
RuntimeException
(
"javaloader error - no type information for XImplementationLoader"
);
m_javaLoader
=
css
::
uno
::
Reference
<
XImplementationLoader
>
(
reinterpret
_cast
<
XImplementationLoader
*>
(
m_javaLoader
=
css
::
uno
::
Reference
<
XImplementationLoader
>
(
static
_cast
<
XImplementationLoader
*>
(
java_curr
.
mapInterface
(
joJavaLoader
,
pType_XImplementationLoader
)));
pJNIEnv
->
DeleteLocalRef
(
joJavaLoader
);
if
(
!
m_javaLoader
.
is
())
...
...
stoc/source/proxy_factory/proxyfac.cxx
Dosyayı görüntüle @
b3105952
...
...
@@ -134,7 +134,7 @@ UnoInterfaceReference FactoryImpl::binuno_queryInterface(
UnoInterfaceReference
ret
;
if
(
ret_val
.
pType
->
eTypeClass
==
typelib_TypeClass_INTERFACE
)
{
ret
.
set
(
*
reinterpret
_cast
<
uno_Interface
**
>
(
ret_val
.
pData
),
ret
.
set
(
*
static
_cast
<
uno_Interface
**
>
(
ret_val
.
pData
),
SAL_NO_ACQUIRE
);
typelib_typedescriptionreference_release
(
ret_val
.
pType
);
}
...
...
@@ -203,7 +203,7 @@ static void SAL_CALL binuno_proxy_free(
{
(
void
)
pEnv
;
// avoid warning about unused parameter
binuno_Proxy
*
proxy
=
static_cast
<
binuno_Proxy
*
>
(
reinterpret
_cast
<
uno_Interface
*
>
(
pProxy
)
);
static
_cast
<
uno_Interface
*
>
(
pProxy
)
);
OSL_ASSERT
(
proxy
->
m_root
->
m_factory
->
m_uno_env
.
get
()
->
pExtEnv
==
pEnv
);
delete
proxy
;
}
...
...
@@ -254,7 +254,7 @@ static void SAL_CALL binuno_proxy_dispatch(
try
{
Type
const
&
rType
=
*
reinterpret
_cast
<
Type
const
*
>
(
pArgs
[
0
]
);
*
static
_cast
<
Type
const
*
>
(
pArgs
[
0
]
);
Any
ret
(
that
->
m_root
->
queryInterface
(
rType
)
);
uno_type_copyAndConvertData
(
pReturn
,
&
ret
,
::
getCppuType
(
&
ret
).
getTypeLibType
(),
...
...
stoc/source/security/access_controller.cxx
Dosyayı görüntüle @
b3105952
...
...
@@ -276,12 +276,12 @@ static inline Reference< security::XAccessControlContext > getDynamicRestriction
if
(
typeName
==
"com.sun.star.security.XAccessControlContext"
)
{
return
Reference
<
security
::
XAccessControlContext
>
(
*
reinterpret
_cast
<
security
::
XAccessControlContext
**
const
>
(
acc
.
pData
)
);
*
static
_cast
<
security
::
XAccessControlContext
**
const
>
(
acc
.
pData
)
);
}
else
// try to query
{
return
Reference
<
security
::
XAccessControlContext
>::
query
(
*
reinterpret
_cast
<
XInterface
**
const
>
(
acc
.
pData
)
);
*
static
_cast
<
XInterface
**
const
>
(
acc
.
pData
)
);
}
}
}
...
...
@@ -530,14 +530,14 @@ static void dumpPermissions(
inline
void
AccessController
::
clearPostPoned
()
{
delete
reinterpret
_cast
<
t_rec_vec
*
>
(
m_rec
.
getData
()
);
delete
static
_cast
<
t_rec_vec
*
>
(
m_rec
.
getData
()
);
m_rec
.
setData
(
0
);
}
void
AccessController
::
checkAndClearPostPoned
()
{
// check postponed permissions
boost
::
scoped_ptr
<
t_rec_vec
>
rec
(
reinterpret
_cast
<
t_rec_vec
*
>
(
m_rec
.
getData
()
)
);
boost
::
scoped_ptr
<
t_rec_vec
>
rec
(
static
_cast
<
t_rec_vec
*
>
(
m_rec
.
getData
()
)
);
m_rec
.
setData
(
0
);
// takeover ownership
OSL_ASSERT
(
rec
.
get
()
);
if
(
rec
.
get
())
...
...
@@ -646,7 +646,7 @@ PermissionCollection AccessController::getEffectivePermissions(
// call on policy
// iff this is a recurring call for the default user, then grant all permissions
t_rec_vec
*
rec
=
reinterpret
_cast
<
t_rec_vec
*
>
(
m_rec
.
getData
()
);
t_rec_vec
*
rec
=
static
_cast
<
t_rec_vec
*
>
(
m_rec
.
getData
()
);
if
(
rec
)
// tls entry exists => this is recursive call
{
if
(
demanded_perm
.
hasValue
())
...
...
@@ -756,7 +756,7 @@ PermissionCollection AccessController::getEffectivePermissions(
{
// dont check postponed, just cleanup
clearPostPoned
();
delete
reinterpret
_cast
<
t_rec_vec
*
>
(
m_rec
.
getData
()
);
delete
static
_cast
<
t_rec_vec
*
>
(
m_rec
.
getData
()
);
m_rec
.
setData
(
0
);
throw
;
}
...
...
stoc/source/security/permissions.cxx
Dosyayı görüntüle @
b3105952
...
...
@@ -493,17 +493,17 @@ PermissionCollection::PermissionCollection(
if
(
perm_type
.
equals
(
cppu
::
UnoType
<
io
::
FilePermission
>::
get
()))
{
m_head
=
new
FilePermission
(
*
reinterpret
_cast
<
io
::
FilePermission
const
*
>
(
perm
.
pData
),
m_head
);
*
static
_cast
<
io
::
FilePermission
const
*
>
(
perm
.
pData
),
m_head
);
}
else
if
(
perm_type
.
equals
(
cppu
::
UnoType
<
connection
::
SocketPermission
>::
get
()))
{
m_head
=
new
SocketPermission
(
*
reinterpret
_cast
<
connection
::
SocketPermission
const
*
>
(
perm
.
pData
),
m_head
);
*
static
_cast
<
connection
::
SocketPermission
const
*
>
(
perm
.
pData
),
m_head
);
}
else
if
(
perm_type
.
equals
(
cppu
::
UnoType
<
security
::
RuntimePermission
>::
get
()))
{
m_head
=
new
RuntimePermission
(
*
reinterpret
_cast
<
security
::
RuntimePermission
const
*
>
(
perm
.
pData
),
m_head
);
*
static
_cast
<
security
::
RuntimePermission
const
*
>
(
perm
.
pData
),
m_head
);
}
else
if
(
perm_type
.
equals
(
cppu
::
UnoType
<
security
::
AllPermission
>::
get
()))
{
...
...
@@ -578,7 +578,7 @@ void PermissionCollection::checkPermission( Any const & perm ) const
if
(
demanded_type
.
equals
(
cppu
::
UnoType
<
io
::
FilePermission
>::
get
()))
{
FilePermission
demanded
(
*
reinterpret
_cast
<
io
::
FilePermission
const
*
>
(
perm
.
pData
)
);
*
static
_cast
<
io
::
FilePermission
const
*
>
(
perm
.
pData
)
);
if
(
__implies
(
m_head
,
demanded
))
{
#ifdef __DIAGNOSE
...
...
@@ -591,7 +591,7 @@ void PermissionCollection::checkPermission( Any const & perm ) const
else
if
(
demanded_type
.
equals
(
cppu
::
UnoType
<
connection
::
SocketPermission
>::
get
()))
{
SocketPermission
demanded
(
*
reinterpret
_cast
<
connection
::
SocketPermission
const
*
>
(
perm
.
pData
)
);
*
static
_cast
<
connection
::
SocketPermission
const
*
>
(
perm
.
pData
)
);
if
(
__implies
(
m_head
,
demanded
))
{
#ifdef __DIAGNOSE
...
...
@@ -604,7 +604,7 @@ void PermissionCollection::checkPermission( Any const & perm ) const
else
if
(
demanded_type
.
equals
(
cppu
::
UnoType
<
security
::
RuntimePermission
>::
get
()))
{
RuntimePermission
demanded
(
*
reinterpret
_cast
<
security
::
RuntimePermission
const
*
>
(
perm
.
pData
)
);
*
static
_cast
<
security
::
RuntimePermission
const
*
>
(
perm
.
pData
)
);
if
(
__implies
(
m_head
,
demanded
))
{
#ifdef __DIAGNOSE
...
...
stoc/source/servicemanager/servicemanager.cxx
Dosyayı görüntüle @
b3105952
...
...
@@ -1152,7 +1152,7 @@ sal_Bool OServiceManager::has( const Any & Element )
else
if
(
Element
.
getValueTypeClass
()
==
TypeClass_STRING
)
{
OUString
const
&
implName
=
*
reinterpret
_cast
<
OUString
const
*
>
(
Element
.
getValue
());
*
static
_cast
<
OUString
const
*
>
(
Element
.
getValue
());
MutexGuard
aGuard
(
m_mutex
);
return
m_ImplementationNameMap
.
find
(
implName
)
!=
m_ImplementationNameMap
.
end
();
...
...
@@ -1231,7 +1231,7 @@ void OServiceManager::remove( const Any & Element )
else
if
(
Element
.
getValueTypeClass
()
==
TypeClass_STRING
)
{
OUString
const
&
implName
=
*
reinterpret
_cast
<
OUString
const
*
>
(
Element
.
getValue
());
*
static
_cast
<
OUString
const
*
>
(
Element
.
getValue
());
MutexGuard
aGuard
(
m_mutex
);
HashMap_OWString_Interface
::
const_iterator
const
iFind
(
m_ImplementationNameMap
.
find
(
implName
)
);
...
...
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