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
8375ac01
Kaydet (Commit)
8375ac01
authored
10 years ago
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clean up C-style casts from pointers to void
Change-Id: I3676d56e65dd2d5b36882073c63e571a79819fee
üst
d0c9cb0c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
28 deletions
+28
-28
pyuno_loader.cxx
pyuno/source/loader/pyuno_loader.cxx
+1
-1
pyuno.cxx
pyuno/source/module/pyuno.cxx
+19
-19
pyuno_adapter.cxx
pyuno/source/module/pyuno_adapter.cxx
+1
-1
pyuno_runtime.cxx
pyuno/source/module/pyuno_runtime.cxx
+5
-5
pyuno_type.cxx
pyuno/source/module/pyuno_type.cxx
+2
-2
No files found.
pyuno/source/loader/pyuno_loader.cxx
Dosyayı görüntüle @
8375ac01
...
...
@@ -73,7 +73,7 @@ static void raiseRuntimeExceptionWhenNeeded() throw ( RuntimeException )
OUStringBuffer
buf
;
buf
.
appendAscii
(
"python-loader:"
);
if
(
a
.
hasValue
()
)
buf
.
append
(
((
com
::
sun
::
star
::
uno
::
Exception
*
)
a
.
getValue
())
->
Message
);
buf
.
append
(
static_cast
<
com
::
sun
::
star
::
uno
::
Exception
const
*>
(
a
.
getValue
())
->
Message
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
}
}
...
...
This diff is collapsed.
Click to expand it.
pyuno/source/module/pyuno.cxx
Dosyayı görüntüle @
8375ac01
...
...
@@ -84,10 +84,10 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
case
typelib_TypeClass_INTERFACE
:
{
buf
.
append
(
"0x"
);
buf
.
append
(
reinterpret_cast
<
sal_IntPtr
>
(
*
(
void
**
)
pVal
),
16
);
buf
.
append
(
reinterpret_cast
<
sal_IntPtr
>
(
*
static_cast
<
void
*
const
*>
(
pVal
)
),
16
);
if
(
VAL2STR_MODE_DEEP
==
mode
)
{
buf
.
append
(
"{"
);
Reference
<
XInterface
>
r
=
*
(
Reference
<
XInterface
>
*
)
pVal
;
buf
.
append
(
"{"
);
Reference
<
XInterface
>
r
=
*
static_cast
<
Reference
<
XInterface
>
const
*>
(
pVal
)
;
Reference
<
XServiceInfo
>
serviceInfo
(
r
,
UNO_QUERY
);
Reference
<
XTypeProvider
>
typeProvider
(
r
,
UNO_QUERY
);
if
(
serviceInfo
.
is
()
)
...
...
@@ -150,7 +150,7 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
buf
.
append
(
" = "
);
typelib_TypeDescription
*
pMemberType
=
0
;
TYPELIB_DANGER_GET
(
&
pMemberType
,
ppTypeRefs
[
nPos
]
);
buf
.
append
(
val2str
(
(
char
*
)
pVal
+
pMemberOffsets
[
nPos
],
pMemberType
->
pWeakRef
,
mode
)
);
buf
.
append
(
val2str
(
static_cast
<
char
const
*>
(
pVal
)
+
pMemberOffsets
[
nPos
],
pMemberType
->
pWeakRef
,
mode
)
);
TYPELIB_DANGER_RELEASE
(
pMemberType
);
if
(
nPos
<
(
nDescr
-
1
))
buf
.
append
(
", "
);
...
...
@@ -166,7 +166,7 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
typelib_TypeDescription
*
pTypeDescr
=
0
;
TYPELIB_DANGER_GET
(
&
pTypeDescr
,
pTypeRef
);
uno_Sequence
*
pSequence
=
*
(
uno_Sequence
**
)
pVal
;
uno_Sequence
*
pSequence
=
*
static_cast
<
uno_Sequence
*
const
*>
(
pVal
)
;
typelib_TypeDescription
*
pElementTypeDescr
=
0
;
TYPELIB_DANGER_GET
(
&
pElementTypeDescr
,
reinterpret_cast
<
typelib_IndirectTypeDescription
*>
(
pTypeDescr
)
->
pType
);
...
...
@@ -195,17 +195,17 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
}
case
typelib_TypeClass_ANY
:
buf
.
append
(
"{ "
);
buf
.
append
(
val2str
(
((
uno_Any
*
)
pVal
)
->
pData
,
((
uno_Any
*
)
pVal
)
->
pType
,
buf
.
append
(
val2str
(
static_cast
<
uno_Any
const
*>
(
pVal
)
->
pData
,
static_cast
<
uno_Any
const
*>
(
pVal
)
->
pType
,
mode
)
);
buf
.
append
(
" }"
);
break
;
case
typelib_TypeClass_TYPE
:
buf
.
append
(
(
*
(
typelib_TypeDescriptionReference
**
)
pVal
)
->
pTypeName
);
buf
.
append
(
(
*
static_cast
<
typelib_TypeDescriptionReference
*
const
*>
(
pVal
)
)
->
pTypeName
);
break
;
case
typelib_TypeClass_STRING
:
buf
.
append
(
'\"'
);
buf
.
append
(
*
(
rtl_uString
**
)
pVal
);
buf
.
append
(
*
static_cast
<
rtl_uString
*
const
*>
(
pVal
)
);
buf
.
append
(
'\"'
);
break
;
case
typelib_TypeClass_ENUM
:
...
...
@@ -217,7 +217,7 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
sal_Int32
nPos
=
reinterpret_cast
<
typelib_EnumTypeDescription
*>
(
pTypeDescr
)
->
nEnumValues
;
while
(
nPos
--
)
{
if
(
pValues
[
nPos
]
==
*
(
int
*
)
pVal
)
if
(
pValues
[
nPos
]
==
*
static_cast
<
int
const
*>
(
pVal
)
)
break
;
}
if
(
nPos
>=
0
)
...
...
@@ -229,41 +229,41 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
break
;
}
case
typelib_TypeClass_BOOLEAN
:
if
(
*
(
sal_Bool
*
)
pVal
)
if
(
*
static_cast
<
sal_Bool
const
*>
(
pVal
)
)
buf
.
append
(
"true"
);
else
buf
.
append
(
"false"
);
break
;
case
typelib_TypeClass_CHAR
:
buf
.
append
(
'\''
);
buf
.
append
(
*
(
sal_Unicode
*
)
pVal
);
buf
.
append
(
*
static_cast
<
sal_Unicode
const
*>
(
pVal
)
);
buf
.
append
(
'\''
);
break
;
case
typelib_TypeClass_FLOAT
:
buf
.
append
(
*
(
float
*
)
pVal
);
buf
.
append
(
*
static_cast
<
float
const
*>
(
pVal
)
);
break
;
case
typelib_TypeClass_DOUBLE
:
buf
.
append
(
*
(
double
*
)
pVal
);
buf
.
append
(
*
static_cast
<
double
const
*>
(
pVal
)
);
break
;
case
typelib_TypeClass_BYTE
:
buf
.
append
(
"0x"
);
buf
.
append
(
(
sal_Int32
)
*
(
sal_Int8
*
)
pVal
,
16
);
buf
.
append
(
(
sal_Int32
)
*
static_cast
<
sal_Int8
const
*>
(
pVal
)
,
16
);
break
;
case
typelib_TypeClass_SHORT
:
buf
.
append
(
"0x"
);
buf
.
append
(
(
sal_Int32
)
*
(
sal_Int16
*
)
pVal
,
16
);
buf
.
append
(
(
sal_Int32
)
*
static_cast
<
sal_Int16
const
*>
(
pVal
)
,
16
);
break
;
case
typelib_TypeClass_UNSIGNED_SHORT
:
buf
.
append
(
"0x"
);
buf
.
append
(
(
sal_Int32
)
*
(
sal_uInt16
*
)
pVal
,
16
);
buf
.
append
(
(
sal_Int32
)
*
static_cast
<
sal_uInt16
const
*>
(
pVal
)
,
16
);
break
;
case
typelib_TypeClass_LONG
:
buf
.
append
(
"0x"
);
buf
.
append
(
*
(
sal_Int32
*
)
pVal
,
16
);
buf
.
append
(
*
static_cast
<
sal_Int32
const
*>
(
pVal
)
,
16
);
break
;
case
typelib_TypeClass_UNSIGNED_LONG
:
buf
.
append
(
"0x"
);
buf
.
append
(
(
sal_Int64
)
*
(
sal_uInt32
*
)
pVal
,
16
);
buf
.
append
(
(
sal_Int64
)
*
static_cast
<
sal_uInt32
const
*>
(
pVal
)
,
16
);
break
;
case
typelib_TypeClass_HYPER
:
case
typelib_TypeClass_UNSIGNED_HYPER
:
...
...
@@ -278,7 +278,7 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
buf
.
append
(
aVal
,
16
);
}
#else
buf
.
append
(
*
(
sal_Int64
*
)
pVal
,
16
);
buf
.
append
(
*
static_cast
<
sal_Int64
const
*>
(
pVal
)
,
16
);
#endif
break
;
...
...
This diff is collapsed.
Click to expand it.
pyuno/source/module/pyuno_adapter.cxx
Dosyayı görüntüle @
8375ac01
...
...
@@ -86,7 +86,7 @@ void raiseInvocationTargetExceptionWhenNeeded( const Runtime &runtime )
PyErr_Fetch
(
reinterpret_cast
<
PyObject
**>
(
&
excType
),
reinterpret_cast
<
PyObject
**>
(
&
excValue
),
reinterpret_cast
<
PyObject
**>
(
&
excTraceback
));
Any
unoExc
(
runtime
.
extractUnoException
(
excType
,
excValue
,
excTraceback
)
);
throw
InvocationTargetException
(
((
com
::
sun
::
star
::
uno
::
Exception
*
)
unoExc
.
getValue
())
->
Message
,
static_cast
<
com
::
sun
::
star
::
uno
::
Exception
const
*>
(
unoExc
.
getValue
())
->
Message
,
Reference
<
XInterface
>
(),
unoExc
);
}
}
...
...
This diff is collapsed.
Click to expand it.
pyuno/source/module/pyuno_runtime.cxx
Dosyayı görüntüle @
8375ac01
...
...
@@ -380,7 +380,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const
}
case
typelib_TypeClass_CHAR
:
{
sal_Unicode
c
=
*
(
sal_Unicode
*
)
a
.
getValue
(
);
sal_Unicode
c
=
*
static_cast
<
sal_Unicode
const
*>
(
a
.
getValue
()
);
return
PyRef
(
PyUNO_char_new
(
c
,
*
this
),
SAL_NO_ACQUIRE
);
}
case
typelib_TypeClass_BOOLEAN
:
...
...
@@ -454,7 +454,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const
}
case
typelib_TypeClass_ENUM
:
{
sal_Int32
l
=
*
(
sal_Int32
*
)
a
.
getValue
(
);
sal_Int32
l
=
*
static_cast
<
sal_Int32
const
*>
(
a
.
getValue
()
);
TypeDescription
desc
(
a
.
getValueType
()
);
if
(
desc
.
is
()
)
{
...
...
@@ -500,7 +500,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const
// assuming that the Message is always the first member, wuuuu
void
*
pData
=
(
void
*
)
a
.
getValue
();
OUString
message
=
*
(
OUString
*
)
pData
;
OUString
message
=
*
static_cast
<
OUString
*>
(
pData
)
;
PyRef
pymsg
=
ustring2PyString
(
message
);
PyTuple_SetItem
(
args
.
get
(),
0
,
pymsg
.
getAcquired
()
);
// the exception base functions want to have an "args" tuple,
...
...
@@ -1024,7 +1024,7 @@ PyThreadAttach::~PyThreadAttach()
PyObject
*
value
=
PyDict_GetItemString
(
PyThreadState_GetDict
(
),
g_NUMERICID
);
if
(
value
)
setlocale
(
LC_NUMERIC
,
(
const
char
*
)
PyLong_AsVoidPtr
(
value
)
);
setlocale
(
LC_NUMERIC
,
static_cast
<
const
char
*>
(
PyLong_AsVoidPtr
(
value
)
)
);
PyThreadState_Clear
(
tstate
);
PyEval_ReleaseThread
(
tstate
);
PyThreadState_Delete
(
tstate
);
...
...
@@ -1037,7 +1037,7 @@ PyThreadDetach::PyThreadDetach() throw ( com::sun::star::uno::RuntimeException )
PyObject
*
value
=
PyDict_GetItemString
(
PyThreadState_GetDict
(
),
g_NUMERICID
);
if
(
value
)
setlocale
(
LC_NUMERIC
,
(
const
char
*
)
PyLong_AsVoidPtr
(
value
)
);
setlocale
(
LC_NUMERIC
,
static_cast
<
const
char
*>
(
PyLong_AsVoidPtr
(
value
)
)
);
PyEval_ReleaseThread
(
tstate
);
}
...
...
This diff is collapsed.
Click to expand it.
pyuno/source/module/pyuno_type.cxx
Dosyayı görüntüle @
8375ac01
...
...
@@ -222,13 +222,13 @@ Type PyType2Type( PyObject * o ) throw(RuntimeException )
buf
.
appendAscii
(
"type "
).
append
(
name
).
appendAscii
(
" is unknown"
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
}
if
(
desc
.
get
()
->
eTypeClass
!=
(
typelib_TypeClass
)
*
(
sal_Int32
*
)
enumValue
.
getValue
(
)
)
if
(
desc
.
get
()
->
eTypeClass
!=
(
typelib_TypeClass
)
*
static_cast
<
sal_Int32
const
*>
(
enumValue
.
getValue
()
)
)
{
OUStringBuffer
buf
;
buf
.
appendAscii
(
"pyuno.checkType: "
).
append
(
name
).
appendAscii
(
" is a "
);
buf
.
appendAscii
(
typeClassToString
(
(
TypeClass
)
desc
.
get
()
->
eTypeClass
)
);
buf
.
appendAscii
(
", but type got construct with typeclass "
);
buf
.
appendAscii
(
typeClassToString
(
(
TypeClass
)
*
(
sal_Int32
*
)
enumValue
.
getValue
(
)
)
);
buf
.
appendAscii
(
typeClassToString
(
(
TypeClass
)
*
static_cast
<
sal_Int32
const
*>
(
enumValue
.
getValue
()
)
)
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
}
return
desc
.
get
()
->
pWeakRef
;
...
...
This diff is collapsed.
Click to expand it.
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