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
93b4ec39
Kaydet (Commit)
93b4ec39
authored
Nis 07, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:cstylecast, loplugin:redundantcast
Change-Id: If5d839b05c1babecc84b76d2bcdf47009d0f713c
üst
d1b27a1d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
cpp2uno.cxx
bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
+8
-8
except.cxx
bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
+2
-2
uno2cpp.cxx
bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
+6
-6
No files found.
bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
Dosyayı görüntüle @
93b4ec39
...
...
@@ -45,7 +45,7 @@ void cpp2uno_call(
void
*
pReturnValue
)
{
// pCallStack: ret, [return ptr], this, params
char
*
pCppStack
=
(
char
*
)
(
pCallStack
+
1
);
char
*
pCppStack
=
reinterpret_cast
<
char
*>
(
pCallStack
+
1
);
// return
typelib_TypeDescription
*
pReturnTypeDescr
=
0
;
...
...
@@ -78,12 +78,12 @@ void cpp2uno_call(
// stack space
static_assert
(
sizeof
(
void
*
)
==
sizeof
(
sal_Int32
),
"### unexpected size!"
);
// parameters
void
**
pUnoArgs
=
(
void
**
)
alloca
(
4
*
sizeof
(
void
*
)
*
nParams
);
void
**
pUnoArgs
=
static_cast
<
void
**>
(
alloca
(
4
*
sizeof
(
void
*
)
*
nParams
)
);
void
**
pCppArgs
=
pUnoArgs
+
nParams
;
// indices of values this have to be converted (interface conversion cpp<=>uno)
sal_Int32
*
pTempIndices
=
(
sal_Int32
*
)
(
pUnoArgs
+
(
2
*
nParams
));
sal_Int32
*
pTempIndices
=
reinterpret_cast
<
sal_Int32
*>
(
pUnoArgs
+
(
2
*
nParams
));
// type descriptions for reconversions
typelib_TypeDescription
**
ppTempParamTypeDescr
=
(
typelib_TypeDescription
**
)
(
pUnoArgs
+
(
3
*
nParams
));
typelib_TypeDescription
**
ppTempParamTypeDescr
=
reinterpret_cast
<
typelib_TypeDescription
**>
(
pUnoArgs
+
(
3
*
nParams
));
sal_Int32
nTempIndices
=
0
;
...
...
@@ -248,7 +248,7 @@ extern "C" void cpp_vtable_call(
(
"illegal "
+
OUString
::
unacquired
(
&
pTypeDescr
->
aBase
.
pTypeName
)
+
" vtable index "
+
OUString
::
number
(
nFunctionIndex
)
+
"/"
+
OUString
::
number
(
pTypeDescr
->
nMapFunctionIndexToMemberIndex
)),
(
XInterface
*
)
pThis
);
static_cast
<
XInterface
*>
(
pThis
)
);
}
// determine called method
...
...
@@ -301,7 +301,7 @@ extern "C" void cpp_vtable_call(
case
0
:
// queryInterface() opt
{
typelib_TypeDescription
*
pTD
=
0
;
TYPELIB_DANGER_GET
(
&
pTD
,
reinterpret
_cast
<
Type
*
>
(
pCallStack
[
3
]
)
->
getTypeLibType
()
);
TYPELIB_DANGER_GET
(
&
pTD
,
static
_cast
<
Type
*
>
(
pCallStack
[
3
]
)
->
getTypeLibType
()
);
if
(
pTD
)
{
XInterface
*
pInterface
=
0
;
...
...
@@ -313,7 +313,7 @@ extern "C" void cpp_vtable_call(
if
(
pInterface
)
{
::
uno_any_construct
(
reinterpret
_cast
<
uno_Any
*
>
(
pCallStack
[
1
]
),
static
_cast
<
uno_Any
*
>
(
pCallStack
[
1
]
),
&
pInterface
,
pTD
,
cpp_acquire
);
pInterface
->
release
();
TYPELIB_DANGER_RELEASE
(
pTD
);
...
...
@@ -335,7 +335,7 @@ extern "C" void cpp_vtable_call(
}
default
:
{
throw
RuntimeException
(
"no member description found!"
,
(
XInterface
*
)
pThis
);
throw
RuntimeException
(
"no member description found!"
,
static_cast
<
XInterface
*>
(
pThis
)
);
}
}
}
...
...
bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
Dosyayı görüntüle @
93b4ec39
...
...
@@ -142,7 +142,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr )
#if defined(FREEBSD) && __FreeBSD_version < 702104
/* #i22253# */
rtti
=
(
type_info
*
)
dlsym
(
RTLD_DEFAULT
,
symName
.
getStr
()
);
#else
rtti
=
(
type_info
*
)
dlsym
(
m_hApp
,
symName
.
getStr
()
);
rtti
=
static_cast
<
type_info
*>
(
dlsym
(
m_hApp
,
symName
.
getStr
()
)
);
#endif
if
(
rtti
)
...
...
@@ -200,7 +200,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr )
extern
"C"
{
static
void
_GLIBCXX_CDTOR_CALLABI
deleteException
(
void
*
pExc
)
{
__cxa_exception
const
*
header
=
((
__cxa_exception
const
*
)
pExc
-
1
)
;
__cxa_exception
const
*
header
=
static_cast
<
__cxa_exception
const
*>
(
pExc
)
-
1
;
typelib_TypeDescription
*
pTD
=
0
;
OUString
unoName
(
toUNOname
(
header
->
exceptionType
->
name
()
)
);
::
typelib_typedescription_getByName
(
&
pTD
,
unoName
.
pData
);
...
...
bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
Dosyayı görüntüle @
93b4ec39
...
...
@@ -46,7 +46,7 @@ static void cpp_call(
{
// max space for: [complex ret ptr], values|ptr ...
char
*
pCppStack
=
(
char
*
)
alloca
(
sizeof
(
sal_Int32
)
+
((
nParams
+
2
)
*
sizeof
(
sal_Int64
))
);
static_cast
<
char
*>
(
alloca
(
sizeof
(
sal_Int32
)
+
((
nParams
+
2
)
*
sizeof
(
sal_Int64
))
)
);
char
*
pCppStackStart
=
pCppStack
;
// return
...
...
@@ -84,11 +84,11 @@ static void cpp_call(
// stack space
static_assert
(
sizeof
(
void
*
)
==
sizeof
(
sal_Int32
),
"### unexpected size!"
);
// args
void
**
pCppArgs
=
(
void
**
)
alloca
(
3
*
sizeof
(
void
*
)
*
nParams
);
void
**
pCppArgs
=
static_cast
<
void
**>
(
alloca
(
3
*
sizeof
(
void
*
)
*
nParams
)
);
// indices of values this have to be converted (interface conversion cpp<=>uno)
sal_Int32
*
pTempIndices
=
(
sal_Int32
*
)
(
pCppArgs
+
nParams
);
sal_Int32
*
pTempIndices
=
reinterpret_cast
<
sal_Int32
*>
(
pCppArgs
+
nParams
);
// type descriptions for reconversions
typelib_TypeDescription
**
ppTempParamTypeDescr
=
(
typelib_TypeDescription
**
)
(
pCppArgs
+
(
2
*
nParams
));
typelib_TypeDescription
**
ppTempParamTypeDescr
=
reinterpret_cast
<
typelib_TypeDescription
**>
(
pCppArgs
+
(
2
*
nParams
));
sal_Int32
nTempIndices
=
0
;
...
...
@@ -328,7 +328,7 @@ void unoInterfaceProxyDispatch(
case
0
:
// queryInterface() opt
{
typelib_TypeDescription
*
pTD
=
0
;
TYPELIB_DANGER_GET
(
&
pTD
,
reinterpret
_cast
<
Type
*
>
(
pArgs
[
0
]
)
->
getTypeLibType
()
);
TYPELIB_DANGER_GET
(
&
pTD
,
static
_cast
<
Type
*
>
(
pArgs
[
0
]
)
->
getTypeLibType
()
);
if
(
pTD
)
{
uno_Interface
*
pInterface
=
0
;
...
...
@@ -339,7 +339,7 @@ void unoInterfaceProxyDispatch(
if
(
pInterface
)
{
::
uno_any_construct
(
reinterpret
_cast
<
uno_Any
*
>
(
pReturn
),
static
_cast
<
uno_Any
*
>
(
pReturn
),
&
pInterface
,
pTD
,
0
);
(
*
pInterface
->
release
)(
pInterface
);
TYPELIB_DANGER_RELEASE
(
pTD
);
...
...
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