diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-02-11 15:40:42 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-02-11 15:40:42 +0000 |
commit | 21c30ab37fd6520d654f125316c74c840c30e0a3 (patch) | |
tree | 822ef620e2e91d75b409d091097ad210ca06b8c1 /pyuno | |
parent | 71ff0547fdea4dc7567f7826e68d1f691f11db81 (diff) |
INTEGRATION: CWS pyunofixes1 (1.7.2); FILE MERGED
2004/12/19 20:57:54 jbu 1.7.2.1: #i31159# struct any members can now be assigned with uno.Any
Diffstat (limited to 'pyuno')
-rw-r--r-- | pyuno/source/module/pyuno_module.cxx | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx index 4f23df2f7296..16dc6bd71cea 100644 --- a/pyuno/source/module/pyuno_module.cxx +++ b/pyuno/source/module/pyuno_module.cxx @@ -2,9 +2,9 @@ * * $RCSfile: pyuno_module.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: obo $ $Date: 2004-11-15 13:13:00 $ + * last change: $Author: hr $ $Date: 2005-02-11 16:40:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -128,7 +128,7 @@ static sal_Int32 fillStructWithInitializer( throw RuntimeException(buf.makeStringAndClear(), Reference< XInterface > ()); } PyObject *element = PyTuple_GetItem( initializer, i + nIndex ); - Any a = runtime.pyObject2Any( element ); + Any a = runtime.pyObject2Any( element, ACCEPT_UNO_ANY ); inv->setValue( pCompType->ppMemberNames[i], a ); } return i+nIndex; @@ -287,9 +287,20 @@ static PyObject* getComponentContext (PyObject* self, PyObject* args) iniFileName.appendAscii( "/" ); iniFileName.appendAscii( SAL_CONFIGFILE( "pyuno" ) ); iniFile = iniFileName.makeStringAndClear(); + osl::DirectoryItem item; + if( osl::DirectoryItem::get( iniFile, item ) == item.E_None ) + { + // in case pyuno.ini exists, use this file for bootstrapping + PyThreadDetach antiguard; + ctx = cppu::defaultBootstrap_InitialComponentContext (iniFile); + } + else + { + // defaulting to the standard bootstrapping + PyThreadDetach antiguard; + ctx = cppu::defaultBootstrap_InitialComponentContext (); + } - PyThreadDetach antiguard; - ctx = cppu::defaultBootstrap_InitialComponentContext (iniFile); } if( ! Runtime::isInitialized() ) |