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
1e25103f
Kaydet (Commit)
1e25103f
authored
May 24, 2003
tarafından
Jörg Budischewski
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#i12504# added conversion mode, fixed a leak for struct/exception conversion
üst
796a2d2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
5 deletions
+31
-5
pyuno_runtime.cxx
pyuno/source/module/pyuno_runtime.cxx
+31
-5
No files found.
pyuno/source/module/pyuno_runtime.cxx
Dosyayı görüntüle @
1e25103f
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: pyuno_runtime.cxx,v $
*
* $Revision: 1.
2
$
* $Revision: 1.
3
$
*
* last change: $Author: jbu $ $Date: 2003-0
3-30 13:32:01
$
* last change: $Author: jbu $ $Date: 2003-0
5-24 23:31:19
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -456,7 +456,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const
PyRef
value
=
PyRef
(
PyUNO_new_UNCHECKED
(
a
,
getImpl
()
->
cargo
->
xInvocation
),
SAL_NO_ACQUIRE
);
PyRef
argsTuple
(
PyTuple_New
(
1
)
,
SAL_NO_ACQUIRE
);
PyTuple_SetItem
(
argsTuple
.
get
()
,
0
,
value
.
getAcquired
()
);
PyRef
ret
(
PyObject_CallObject
(
excClass
.
get
()
,
argsTuple
.
get
Acquired
()
),
SAL_NO_ACQUIRE
);
PyRef
ret
(
PyObject_CallObject
(
excClass
.
get
()
,
argsTuple
.
get
()
),
SAL_NO_ACQUIRE
);
if
(
!
ret
.
is
()
)
{
OUStringBuffer
buf
;
...
...
@@ -572,7 +572,7 @@ static Sequence< Type > invokeGetTypes( const Runtime & r , PyObject * o )
return
ret
;
}
Any
Runtime
::
pyObject2Any
(
const
PyRef
&
source
)
const
Any
Runtime
::
pyObject2Any
(
const
PyRef
&
source
,
enum
ConversionMode
mode
)
const
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
if
(
!
impl
->
cargo
->
valid
)
...
...
@@ -691,7 +691,7 @@ Any Runtime::pyObject2Any ( const PyRef & source ) const
Sequence
<
Any
>
s
(
PyTuple_Size
(
o
));
for
(
int
i
=
0
;
i
<
PyTuple_Size
(
o
);
i
++
)
{
s
[
i
]
=
pyObject2Any
(
PyTuple_GetItem
(
o
,
i
));
s
[
i
]
=
pyObject2Any
(
PyTuple_GetItem
(
o
,
i
)
,
mode
);
}
a
<<=
s
;
}
...
...
@@ -764,6 +764,32 @@ Any Runtime::pyObject2Any ( const PyRef & source ) const
sal_Unicode
c
=
PyChar2Unicode
(
o
,
runtime
);
a
.
setValue
(
&
c
,
getCharCppuType
(
));
}
else
if
(
PyObject_IsInstance
(
o
,
getAnyClass
(
runtime
).
get
()
)
)
{
if
(
ACCEPT_UNO_ANY
==
mode
)
{
a
=
pyObject2Any
(
PyRef
(
PyObject_GetAttrString
(
o
,
"value"
),
SAL_NO_ACQUIRE
)
);
Type
t
;
pyObject2Any
(
PyRef
(
PyObject_GetAttrString
(
o
,
"type"
),
SAL_NO_ACQUIRE
)
)
>>=
t
;
try
{
a
=
getImpl
()
->
cargo
->
xTypeConverter
->
convertTo
(
a
,
t
);
}
catch
(
com
::
sun
::
star
::
uno
::
Exception
&
e
)
{
throw
RuntimeException
(
e
.
Message
,
e
.
Context
);
}
}
else
{
throw
RuntimeException
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"uno.Any instance not accepted during method call, "
"use uno.invoke instead"
)
),
Reference
<
XInterface
>
()
);
}
}
else
{
Reference
<
XInterface
>
mappedObject
;
...
...
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