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
f5eeaaac
Kaydet (Commit)
f5eeaaac
authored
Agu 31, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:stringconstant: OUStringBuffer: appendAscii -> append
Change-Id: I98058ff0653a3aab3399735271d04b16a05a3684
üst
f14a9da3
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
64 additions
and
64 deletions
+64
-64
pyuno_loader.cxx
pyuno/source/loader/pyuno_loader.cxx
+2
-2
pyuno_adapter.cxx
pyuno/source/module/pyuno_adapter.cxx
+6
-6
pyuno_except.cxx
pyuno/source/module/pyuno_except.cxx
+7
-7
pyuno_module.cxx
pyuno/source/module/pyuno_module.cxx
+25
-25
pyuno_runtime.cxx
pyuno/source/module/pyuno_runtime.cxx
+16
-16
pyuno_type.cxx
pyuno/source/module/pyuno_type.cxx
+7
-7
pyuno_util.cxx
pyuno/source/module/pyuno_util.cxx
+1
-1
No files found.
pyuno/source/loader/pyuno_loader.cxx
Dosyayı görüntüle @
f5eeaaac
...
@@ -71,7 +71,7 @@ static void raiseRuntimeExceptionWhenNeeded() throw ( RuntimeException )
...
@@ -71,7 +71,7 @@ static void raiseRuntimeExceptionWhenNeeded() throw ( RuntimeException )
Runtime
runtime
;
Runtime
runtime
;
com
::
sun
::
star
::
uno
::
Any
a
=
runtime
.
extractUnoException
(
excType
,
excValue
,
excTraceback
);
com
::
sun
::
star
::
uno
::
Any
a
=
runtime
.
extractUnoException
(
excType
,
excValue
,
excTraceback
);
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"python-loader:"
);
buf
.
append
(
"python-loader:"
);
if
(
a
.
hasValue
()
)
if
(
a
.
hasValue
()
)
buf
.
append
(
static_cast
<
com
::
sun
::
star
::
uno
::
Exception
const
*>
(
a
.
getValue
())
->
Message
);
buf
.
append
(
static_cast
<
com
::
sun
::
star
::
uno
::
Exception
const
*>
(
a
.
getValue
())
->
Message
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
...
@@ -98,7 +98,7 @@ static PyRef getObjectFromLoaderModule( const char * func )
...
@@ -98,7 +98,7 @@ static PyRef getObjectFromLoaderModule( const char * func )
if
(
!
object
.
is
()
)
if
(
!
object
.
is
()
)
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"pythonloader: couldn't find core element pythonloader."
);
buf
.
append
(
"pythonloader: couldn't find core element pythonloader."
);
buf
.
appendAscii
(
func
);
buf
.
appendAscii
(
func
);
throw
RuntimeException
(
buf
.
makeStringAndClear
());
throw
RuntimeException
(
buf
.
makeStringAndClear
());
}
}
...
...
pyuno/source/module/pyuno_adapter.cxx
Dosyayı görüntüle @
f5eeaaac
...
@@ -241,8 +241,8 @@ Any Adapter::invoke( const OUString &aFunctionName,
...
@@ -241,8 +241,8 @@ Any Adapter::invoke( const OUString &aFunctionName,
if
(
!
method
.
is
()
)
if
(
!
method
.
is
()
)
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"pyuno::Adapter: Method "
).
append
(
aFunctionName
);
buf
.
append
(
"pyuno::Adapter: Method "
).
append
(
aFunctionName
);
buf
.
append
Ascii
(
" is not implemented at object "
);
buf
.
append
(
" is not implemented at object "
);
PyRef
str
(
PyObject_Repr
(
mWrappedObject
.
get
()
),
SAL_NO_ACQUIRE
);
PyRef
str
(
PyObject_Repr
(
mWrappedObject
.
get
()
),
SAL_NO_ACQUIRE
);
buf
.
append
(
pyString2ustring
(
str
.
get
()));
buf
.
append
(
pyString2ustring
(
str
.
get
()));
throw
IllegalArgumentException
(
buf
.
makeStringAndClear
(),
Reference
<
XInterface
>
(),
0
);
throw
IllegalArgumentException
(
buf
.
makeStringAndClear
(),
Reference
<
XInterface
>
(),
0
);
...
@@ -359,8 +359,8 @@ void Adapter::setValue( const OUString & aPropertyName, const Any & value )
...
@@ -359,8 +359,8 @@ void Adapter::setValue( const OUString & aPropertyName, const Any & value )
if
(
!
hasProperty
(
aPropertyName
)
)
if
(
!
hasProperty
(
aPropertyName
)
)
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"pyuno::Adapter: Property "
).
append
(
aPropertyName
);
buf
.
append
(
"pyuno::Adapter: Property "
).
append
(
aPropertyName
);
buf
.
append
Ascii
(
" is unknown."
);
buf
.
append
(
" is unknown."
);
throw
UnknownPropertyException
(
buf
.
makeStringAndClear
()
);
throw
UnknownPropertyException
(
buf
.
makeStringAndClear
()
);
}
}
...
@@ -406,8 +406,8 @@ Any Adapter::getValue( const OUString & aPropertyName )
...
@@ -406,8 +406,8 @@ Any Adapter::getValue( const OUString & aPropertyName )
if
(
!
pyRef
.
is
()
||
PyErr_Occurred
())
if
(
!
pyRef
.
is
()
||
PyErr_Occurred
())
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"pyuno::Adapter: Property "
).
append
(
aPropertyName
);
buf
.
append
(
"pyuno::Adapter: Property "
).
append
(
aPropertyName
);
buf
.
append
Ascii
(
" is unknown."
);
buf
.
append
(
" is unknown."
);
throw
UnknownPropertyException
(
buf
.
makeStringAndClear
()
);
throw
UnknownPropertyException
(
buf
.
makeStringAndClear
()
);
}
}
ret
=
runtime
.
pyObject2Any
(
pyRef
);
ret
=
runtime
.
pyObject2Any
(
pyRef
);
...
...
pyuno/source/module/pyuno_except.cxx
Dosyayı görüntüle @
f5eeaaac
...
@@ -50,11 +50,11 @@ void raisePyExceptionWithAny( const com::sun::star::uno::Any &anyExc )
...
@@ -50,11 +50,11 @@ void raisePyExceptionWithAny( const com::sun::star::uno::Any &anyExc )
anyExc
>>=
e
;
anyExc
>>=
e
;
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"Couldn't convert uno exception to a python exception ("
);
buf
.
append
(
"Couldn't convert uno exception to a python exception ("
);
buf
.
append
(
anyExc
.
getValueType
().
getTypeName
());
buf
.
append
(
anyExc
.
getValueType
().
getTypeName
());
buf
.
append
Ascii
(
": "
);
buf
.
append
(
": "
);
buf
.
append
(
e
.
Message
);
buf
.
append
(
e
.
Message
);
buf
.
append
Ascii
(
")"
);
buf
.
append
(
")"
);
PyErr_SetString
(
PyErr_SetString
(
PyExc_SystemError
,
PyExc_SystemError
,
OUStringToOString
(
buf
.
makeStringAndClear
(),
RTL_TEXTENCODING_ASCII_US
).
getStr
()
);
OUStringToOString
(
buf
.
makeStringAndClear
(),
RTL_TEXTENCODING_ASCII_US
).
getStr
()
);
...
@@ -87,8 +87,8 @@ static PyRef createClass( const OUString & name, const Runtime &runtime )
...
@@ -87,8 +87,8 @@ static PyRef createClass( const OUString & name, const Runtime &runtime )
if
(
!
desc
.
is
()
)
if
(
!
desc
.
is
()
)
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"pyuno.getClass: uno exception "
);
buf
.
append
(
"pyuno.getClass: uno exception "
);
buf
.
append
(
name
).
append
Ascii
(
" is unknown"
);
buf
.
append
(
name
).
append
(
" is unknown"
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
}
}
...
@@ -98,10 +98,10 @@ static PyRef createClass( const OUString & name, const Runtime &runtime )
...
@@ -98,10 +98,10 @@ static PyRef createClass( const OUString & name, const Runtime &runtime )
if
(
!
isStruct
&&
!
isExc
&&
!
isInterface
)
if
(
!
isStruct
&&
!
isExc
&&
!
isInterface
)
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"pyuno.getClass: "
).
append
(
name
).
appendAscii
(
"is a "
);
buf
.
append
(
"pyuno.getClass: "
).
append
(
name
).
append
(
"is a "
);
buf
.
appendAscii
(
buf
.
appendAscii
(
typeClassToString
(
(
com
::
sun
::
star
::
uno
::
TypeClass
)
desc
.
get
()
->
eTypeClass
));
typeClassToString
(
(
com
::
sun
::
star
::
uno
::
TypeClass
)
desc
.
get
()
->
eTypeClass
));
buf
.
append
Ascii
(
", expected EXCEPTION, STRUCT or INTERFACE"
);
buf
.
append
(
", expected EXCEPTION, STRUCT or INTERFACE"
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
}
}
...
...
pyuno/source/module/pyuno_module.cxx
Dosyayı görüntüle @
f5eeaaac
...
@@ -111,15 +111,15 @@ public:
...
@@ -111,15 +111,15 @@ public:
if
(
initialised
[
key
])
if
(
initialised
[
key
])
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"pyuno._createUnoStructHelper: member '"
);
buf
.
append
(
"pyuno._createUnoStructHelper: member '"
);
buf
.
append
(
key
);
buf
.
append
(
key
);
buf
.
append
Ascii
(
"'"
);
buf
.
append
(
"'"
);
if
(
pos
>=
0
)
if
(
pos
>=
0
)
{
{
buf
.
append
Ascii
(
" at position "
);
buf
.
append
(
" at position "
);
buf
.
append
(
pos
);
buf
.
append
(
pos
);
}
}
buf
.
append
Ascii
(
" initialised multiple times."
);
buf
.
append
(
" initialised multiple times."
);
throw
RuntimeException
(
buf
.
makeStringAndClear
());
throw
RuntimeException
(
buf
.
makeStringAndClear
());
}
}
initialised
[
key
]
=
true
;
initialised
[
key
]
=
true
;
...
@@ -189,11 +189,11 @@ static void fillStruct(
...
@@ -189,11 +189,11 @@ static void fillStruct(
if
(
!
state
.
isInitialised
(
memberName
)
)
if
(
!
state
.
isInitialised
(
memberName
)
)
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"pyuno._createUnoStructHelper: member '"
);
buf
.
append
(
"pyuno._createUnoStructHelper: member '"
);
buf
.
append
(
memberName
);
buf
.
append
(
memberName
);
buf
.
append
Ascii
(
"' of struct type '"
);
buf
.
append
(
"' of struct type '"
);
buf
.
append
(
pCompType
->
aBase
.
pTypeName
);
buf
.
append
(
pCompType
->
aBase
.
pTypeName
);
buf
.
append
Ascii
(
"' not given a value."
);
buf
.
append
(
"' not given a value."
);
throw
RuntimeException
(
buf
.
makeStringAndClear
());
throw
RuntimeException
(
buf
.
makeStringAndClear
());
}
}
}
}
...
@@ -265,10 +265,10 @@ static PyObject* getComponentContext(
...
@@ -265,10 +265,10 @@ static PyObject* getComponentContext(
OUStringBuffer
iniFileName
;
OUStringBuffer
iniFileName
;
iniFileName
.
append
(
path
);
iniFileName
.
append
(
path
);
#ifdef MACOSX
#ifdef MACOSX
iniFileName
.
append
Ascii
(
"/../"
LIBO_ETC_FOLDER
);
iniFileName
.
append
(
"/../"
LIBO_ETC_FOLDER
);
#endif
#endif
iniFileName
.
append
Ascii
(
"/"
);
iniFileName
.
append
(
"/"
);
iniFileName
.
append
Ascii
(
SAL_CONFIGFILE
(
"pyuno"
)
);
iniFileName
.
append
(
SAL_CONFIGFILE
(
"pyuno"
)
);
iniFile
=
iniFileName
.
makeStringAndClear
();
iniFile
=
iniFileName
.
makeStringAndClear
();
osl
::
DirectoryItem
item
;
osl
::
DirectoryItem
item
;
if
(
osl
::
DirectoryItem
::
get
(
iniFile
,
item
)
==
item
.
E_None
)
if
(
osl
::
DirectoryItem
::
get
(
iniFile
,
item
)
==
item
.
E_None
)
...
@@ -419,10 +419,10 @@ static PyObject *createUnoStructHelper(
...
@@ -419,10 +419,10 @@ static PyObject *createUnoStructHelper(
if
(
state
.
getCntConsumed
()
!=
PyTuple_Size
(
initializer
)
)
if
(
state
.
getCntConsumed
()
!=
PyTuple_Size
(
initializer
)
)
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"pyuno._createUnoStructHelper: too many "
);
buf
.
append
(
"pyuno._createUnoStructHelper: too many "
);
buf
.
append
Ascii
(
"elements in the initializer list, expected "
);
buf
.
append
(
"elements in the initializer list, expected "
);
buf
.
append
(
state
.
getCntConsumed
()
);
buf
.
append
(
state
.
getCntConsumed
()
);
buf
.
append
Ascii
(
", got "
);
buf
.
append
(
", got "
);
buf
.
append
(
(
sal_Int32
)
PyTuple_Size
(
initializer
)
);
buf
.
append
(
(
sal_Int32
)
PyTuple_Size
(
initializer
)
);
throw
RuntimeException
(
buf
.
makeStringAndClear
());
throw
RuntimeException
(
buf
.
makeStringAndClear
());
}
}
...
@@ -521,8 +521,8 @@ static PyObject *getConstantByName(
...
@@ -521,8 +521,8 @@ static PyObject *getConstantByName(
>>=
td
))
>>=
td
))
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"pyuno.getConstantByName: "
).
append
(
typeName
);
buf
.
append
(
"pyuno.getConstantByName: "
).
append
(
typeName
);
buf
.
append
Ascii
(
"is not a constant"
);
buf
.
append
(
"is not a constant"
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
}
}
PyRef
constant
=
runtime
.
any2PyObject
(
td
->
getConstantValue
()
);
PyRef
constant
=
runtime
.
any2PyObject
(
td
->
getConstantValue
()
);
...
@@ -663,11 +663,11 @@ static PyObject *systemPathToFileUrl(
...
@@ -663,11 +663,11 @@ static PyObject *systemPathToFileUrl(
if
(
e
!=
osl
::
FileBase
::
E_None
)
if
(
e
!=
osl
::
FileBase
::
E_None
)
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"Couldn't convert "
);
buf
.
append
(
"Couldn't convert "
);
buf
.
append
(
sysPath
);
buf
.
append
(
sysPath
);
buf
.
append
Ascii
(
" to a file url for reason ("
);
buf
.
append
(
" to a file url for reason ("
);
buf
.
append
(
(
sal_Int32
)
e
);
buf
.
append
(
(
sal_Int32
)
e
);
buf
.
append
Ascii
(
")"
);
buf
.
append
(
")"
);
raisePyExceptionWithAny
(
raisePyExceptionWithAny
(
makeAny
(
RuntimeException
(
buf
.
makeStringAndClear
()
)));
makeAny
(
RuntimeException
(
buf
.
makeStringAndClear
()
)));
return
NULL
;
return
NULL
;
...
@@ -689,11 +689,11 @@ static PyObject * fileUrlToSystemPath(
...
@@ -689,11 +689,11 @@ static PyObject * fileUrlToSystemPath(
if
(
e
!=
osl
::
FileBase
::
E_None
)
if
(
e
!=
osl
::
FileBase
::
E_None
)
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"Couldn't convert file url "
);
buf
.
append
(
"Couldn't convert file url "
);
buf
.
append
(
sysPath
);
buf
.
append
(
sysPath
);
buf
.
append
Ascii
(
" to a system path for reason ("
);
buf
.
append
(
" to a system path for reason ("
);
buf
.
append
(
(
sal_Int32
)
e
);
buf
.
append
(
(
sal_Int32
)
e
);
buf
.
append
Ascii
(
")"
);
buf
.
append
(
")"
);
raisePyExceptionWithAny
(
raisePyExceptionWithAny
(
makeAny
(
RuntimeException
(
buf
.
makeStringAndClear
()
)));
makeAny
(
RuntimeException
(
buf
.
makeStringAndClear
()
)));
return
NULL
;
return
NULL
;
...
@@ -712,13 +712,13 @@ static PyObject * absolutize( SAL_UNUSED_PARAMETER PyObject *, PyObject * args )
...
@@ -712,13 +712,13 @@ static PyObject * absolutize( SAL_UNUSED_PARAMETER PyObject *, PyObject * args )
if
(
e
!=
osl_File_E_None
)
if
(
e
!=
osl_File_E_None
)
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"Couldn't absolutize "
);
buf
.
append
(
"Couldn't absolutize "
);
buf
.
append
(
ouRel
);
buf
.
append
(
ouRel
);
buf
.
append
Ascii
(
" using root "
);
buf
.
append
(
" using root "
);
buf
.
append
(
ouPath
);
buf
.
append
(
ouPath
);
buf
.
append
Ascii
(
" for reason ("
);
buf
.
append
(
" for reason ("
);
buf
.
append
(
(
sal_Int32
)
e
);
buf
.
append
(
(
sal_Int32
)
e
);
buf
.
append
Ascii
(
")"
);
buf
.
append
(
")"
);
PyErr_SetString
(
PyErr_SetString
(
PyExc_OSError
,
PyExc_OSError
,
...
...
pyuno/source/module/pyuno_runtime.cxx
Dosyayı görüntüle @
f5eeaaac
...
@@ -168,11 +168,11 @@ static PyRef importUnoModule( ) throw ( RuntimeException )
...
@@ -168,11 +168,11 @@ static PyRef importUnoModule( ) throw ( RuntimeException )
PyRef
str
(
PyObject_Str
(
excTraceback
.
get
()
),
SAL_NO_ACQUIRE
);
PyRef
str
(
PyObject_Str
(
excTraceback
.
get
()
),
SAL_NO_ACQUIRE
);
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"python object raised an unknown exception ("
);
buf
.
append
(
"python object raised an unknown exception ("
);
PyRef
valueRep
(
PyObject_Repr
(
excValue
.
get
()
),
SAL_NO_ACQUIRE
);
PyRef
valueRep
(
PyObject_Repr
(
excValue
.
get
()
),
SAL_NO_ACQUIRE
);
buf
.
appendAscii
(
PyStr_AsString
(
valueRep
.
get
())).
append
Ascii
(
", traceback follows
\n
"
);
buf
.
appendAscii
(
PyStr_AsString
(
valueRep
.
get
())).
append
(
", traceback follows
\n
"
);
buf
.
appendAscii
(
PyStr_AsString
(
str
.
get
()
)
);
buf
.
appendAscii
(
PyStr_AsString
(
str
.
get
()
)
);
buf
.
append
Ascii
(
")"
);
buf
.
append
(
")"
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
}
}
PyRef
dict
(
PyModule_GetDict
(
module
.
get
()
)
);
PyRef
dict
(
PyModule_GetDict
(
module
.
get
()
)
);
...
@@ -472,9 +472,9 @@ PyRef Runtime::any2PyObject (const Any &a ) const
...
@@ -472,9 +472,9 @@ PyRef Runtime::any2PyObject (const Any &a ) const
}
}
}
}
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"Any carries enum "
);
buf
.
append
(
"Any carries enum "
);
buf
.
append
(
a
.
getValueType
().
getTypeName
());
buf
.
append
(
a
.
getValueType
().
getTypeName
());
buf
.
append
Ascii
(
" with invalid value "
).
append
(
l
);
buf
.
append
(
" with invalid value "
).
append
(
l
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
}
}
case
typelib_TypeClass_EXCEPTION
:
case
typelib_TypeClass_EXCEPTION
:
...
@@ -488,7 +488,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const
...
@@ -488,7 +488,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const
if
(
!
ret
.
is
()
)
if
(
!
ret
.
is
()
)
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"Couldn't instantiate python representation of structured UNO type "
);
buf
.
append
(
"Couldn't instantiate python representation of structured UNO type "
);
buf
.
append
(
a
.
getValueType
().
getTypeName
()
);
buf
.
append
(
a
.
getValueType
().
getTypeName
()
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
}
}
...
@@ -561,7 +561,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const
...
@@ -561,7 +561,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const
default
:
default
:
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"Unknown UNO type class "
);
buf
.
append
(
"Unknown UNO type class "
);
buf
.
append
(
(
sal_Int32
)
a
.
getValueTypeClass
()
);
buf
.
append
(
(
sal_Int32
)
a
.
getValueTypeClass
()
);
throw
RuntimeException
(
buf
.
makeStringAndClear
(
)
);
throw
RuntimeException
(
buf
.
makeStringAndClear
(
)
);
}
}
...
@@ -599,13 +599,13 @@ static OUString
...
@@ -599,13 +599,13 @@ static OUString
lcl_ExceptionMessage
(
PyObject
*
const
o
,
OUString
const
*
const
pWrapped
)
lcl_ExceptionMessage
(
PyObject
*
const
o
,
OUString
const
*
const
pWrapped
)
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"Couldn't convert "
);
buf
.
append
(
"Couldn't convert "
);
PyRef
reprString
(
PyObject_Str
(
o
),
SAL_NO_ACQUIRE
);
PyRef
reprString
(
PyObject_Str
(
o
),
SAL_NO_ACQUIRE
);
buf
.
appendAscii
(
PyStr_AsString
(
reprString
.
get
())
);
buf
.
appendAscii
(
PyStr_AsString
(
reprString
.
get
())
);
buf
.
append
Ascii
(
" to a UNO type"
);
buf
.
append
(
" to a UNO type"
);
if
(
pWrapped
)
if
(
pWrapped
)
{
{
buf
.
append
Ascii
(
"; caught exception: "
);
buf
.
append
(
"; caught exception: "
);
buf
.
append
(
*
pWrapped
);
buf
.
append
(
*
pWrapped
);
}
}
return
buf
.
makeStringAndClear
();
return
buf
.
makeStringAndClear
();
...
@@ -973,9 +973,9 @@ Any Runtime::extractUnoException( const PyRef & excType, const PyRef &excValue,
...
@@ -973,9 +973,9 @@ Any Runtime::extractUnoException( const PyRef & excType, const PyRef &excValue,
}
}
else
else
{
{
buf
.
append
Ascii
(
"no typename available"
);
buf
.
append
(
"no typename available"
);
}
}
buf
.
append
Ascii
(
": "
);
buf
.
append
(
": "
);
PyRef
valueRep
(
PyObject_Str
(
excValue
.
get
()
),
SAL_NO_ACQUIRE
);
PyRef
valueRep
(
PyObject_Str
(
excValue
.
get
()
),
SAL_NO_ACQUIRE
);
if
(
valueRep
.
is
()
)
if
(
valueRep
.
is
()
)
{
{
...
@@ -983,17 +983,17 @@ Any Runtime::extractUnoException( const PyRef & excType, const PyRef &excValue,
...
@@ -983,17 +983,17 @@ Any Runtime::extractUnoException( const PyRef & excType, const PyRef &excValue,
}
}
else
else
{
{
buf
.
append
Ascii
(
"Couldn't convert exception value to a string"
);
buf
.
append
(
"Couldn't convert exception value to a string"
);
}
}
buf
.
append
Ascii
(
", traceback follows
\n
"
);
buf
.
append
(
", traceback follows
\n
"
);
if
(
!
str
.
isEmpty
()
)
if
(
!
str
.
isEmpty
()
)
{
{
buf
.
append
(
str
);
buf
.
append
(
str
);
buf
.
append
Ascii
(
"
\n
"
);
buf
.
append
(
"
\n
"
);
}
}
else
else
{
{
buf
.
append
Ascii
(
", no traceback available
\n
"
);
buf
.
append
(
", no traceback available
\n
"
);
}
}
RuntimeException
e
;
RuntimeException
e
;
e
.
Message
=
buf
.
makeStringAndClear
();
e
.
Message
=
buf
.
makeStringAndClear
();
...
...
pyuno/source/module/pyuno_type.cxx
Dosyayı görüntüle @
f5eeaaac
...
@@ -165,10 +165,10 @@ Any PyEnum2Enum( PyObject *obj ) throw ( RuntimeException )
...
@@ -165,10 +165,10 @@ Any PyEnum2Enum( PyObject *obj ) throw ( RuntimeException )
if
(
desc
.
get
()
->
eTypeClass
!=
typelib_TypeClass_ENUM
)
if
(
desc
.
get
()
->
eTypeClass
!=
typelib_TypeClass_ENUM
)
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"pyuno.checkEnum: "
).
append
(
strTypeName
).
appendAscii
(
"is a "
);
buf
.
append
(
"pyuno.checkEnum: "
).
append
(
strTypeName
).
append
(
"is a "
);
buf
.
appendAscii
(
buf
.
appendAscii
(
typeClassToString
(
(
com
::
sun
::
star
::
uno
::
TypeClass
)
desc
.
get
()
->
eTypeClass
));
typeClassToString
(
(
com
::
sun
::
star
::
uno
::
TypeClass
)
desc
.
get
()
->
eTypeClass
));
buf
.
append
Ascii
(
", expected ENUM"
);
buf
.
append
(
", expected ENUM"
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
}
}
...
@@ -186,7 +186,7 @@ Any PyEnum2Enum( PyObject *obj ) throw ( RuntimeException )
...
@@ -186,7 +186,7 @@ Any PyEnum2Enum( PyObject *obj ) throw ( RuntimeException )
if
(
i
==
pEnumDesc
->
nEnumValues
)
if
(
i
==
pEnumDesc
->
nEnumValues
)
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"value "
).
appendAscii
(
stringValue
).
appendAscii
(
"is unknown in enum "
);
buf
.
append
(
"value "
).
appendAscii
(
stringValue
).
append
(
"is unknown in enum "
);
buf
.
appendAscii
(
PyStr_AsString
(
typeName
.
get
()
)
);
buf
.
appendAscii
(
PyStr_AsString
(
typeName
.
get
()
)
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
}
}
...
@@ -195,7 +195,7 @@ Any PyEnum2Enum( PyObject *obj ) throw ( RuntimeException )
...
@@ -195,7 +195,7 @@ Any PyEnum2Enum( PyObject *obj ) throw ( RuntimeException )
else
else
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"enum "
).
appendAscii
(
PyStr_AsString
(
typeName
.
get
())
).
appendAscii
(
" is unknown"
);
buf
.
append
(
"enum "
).
appendAscii
(
PyStr_AsString
(
typeName
.
get
())
).
append
(
" is unknown"
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
}
}
return
ret
;
return
ret
;
...
@@ -219,15 +219,15 @@ Type PyType2Type( PyObject * o ) throw(RuntimeException )
...
@@ -219,15 +219,15 @@ Type PyType2Type( PyObject * o ) throw(RuntimeException )
if
(
!
desc
.
is
()
)
if
(
!
desc
.
is
()
)
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"type "
).
append
(
name
).
appendAscii
(
" is unknown"
);
buf
.
append
(
"type "
).
append
(
name
).
append
(
" is unknown"
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
}
}
if
(
desc
.
get
()
->
eTypeClass
!=
(
typelib_TypeClass
)
*
static_cast
<
sal_Int32
const
*>
(
enumValue
.
getValue
())
)
if
(
desc
.
get
()
->
eTypeClass
!=
(
typelib_TypeClass
)
*
static_cast
<
sal_Int32
const
*>
(
enumValue
.
getValue
())
)
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"pyuno.checkType: "
).
append
(
name
).
appendAscii
(
" is a "
);
buf
.
append
(
"pyuno.checkType: "
).
append
(
name
).
append
(
" is a "
);
buf
.
appendAscii
(
typeClassToString
(
(
TypeClass
)
desc
.
get
()
->
eTypeClass
)
);
buf
.
appendAscii
(
typeClassToString
(
(
TypeClass
)
desc
.
get
()
->
eTypeClass
)
);
buf
.
append
Ascii
(
", but type got construct with typeclass "
);
buf
.
append
(
", but type got construct with typeclass "
);
buf
.
appendAscii
(
typeClassToString
(
(
TypeClass
)
*
static_cast
<
sal_Int32
const
*>
(
enumValue
.
getValue
())
)
);
buf
.
appendAscii
(
typeClassToString
(
(
TypeClass
)
*
static_cast
<
sal_Int32
const
*>
(
enumValue
.
getValue
())
)
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
throw
RuntimeException
(
buf
.
makeStringAndClear
()
);
}
}
...
...
pyuno/source/module/pyuno_util.cxx
Dosyayı görüntüle @
f5eeaaac
...
@@ -106,7 +106,7 @@ PyRef getObjectFromUnoModule( const Runtime &runtime, const char * func )
...
@@ -106,7 +106,7 @@ PyRef getObjectFromUnoModule( const Runtime &runtime, const char * func )
if
(
!
object
.
is
()
)
if
(
!
object
.
is
()
)
{
{
OUStringBuffer
buf
;
OUStringBuffer
buf
;
buf
.
append
Ascii
(
"couldn't find core function "
);
buf
.
append
(
"couldn't find core function "
);
buf
.
appendAscii
(
func
);
buf
.
appendAscii
(
func
);
throw
RuntimeException
(
buf
.
makeStringAndClear
());
throw
RuntimeException
(
buf
.
makeStringAndClear
());
}
}
...
...
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