Commit graph

310 commits

Author SHA1 Message Date
Szabolcs Dezsi
8a01ee6243 Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Pattern used:

find . -name "*.cxx" -exec sed -i 's/\( *\)\(else if\|if\) *( *\([^!()|&]*\)\.equalsAsciiL( *RTL_CONSTASCII_STRINGPARAM *( *\([^)]*\) ) *) *)$/\1\2 ( \3 == \4 )/' \{\} \;
2012-04-06 14:30:05 +02:00
Tor Lillqvist
2a1171929e chmod -x 2012-03-21 13:00:45 +02:00
David Bolen
742dca7366 fdo#46926: PyUNO_cmp: return acquired reference 2012-03-16 22:18:43 +01:00
Michael Stahl
06484b6946 fdo#46926: fix the fix for Python 3
Thanks to Maxime de Roucy for the hint that the "cmpfunc" type doesn't exist.
2012-03-09 15:40:00 +01:00
David Bolen
387389b644 fdo#46926: fix UNO struct comparison in Python 2
This requires setting a rich comparison flag in Python 2, while Python 3
uses rich comparison by default.
(regression from a09ce46818)
2012-03-07 11:17:13 +01:00
David Bolen
4634cbc237 fdo#46859: adapt string type checks to work with both Python 2 and 3
(regression from a09ce46818)
2012-03-07 11:17:13 +01:00
Stephan Bergmann
123c59342c Adapted GCThread to safer-to-use salhelper::Thread 2012-02-23 10:47:35 +01:00
Elton Chung
23af031b09 Fix typos in comments 2012-02-18 09:35:43 +00:00
Michael Stahl
29177b1d04 pyuno: decreaseRefCount: valgrind warning:
Apparently the thread spawned in decreaseRefCount runs and deletes
itself before the "m_hThread != 0" from osl::Thread::create is executed;
try a lame workaround for that.

==1877== Invalid read of size 8
==1877==    at 0x2A70E546: osl::Thread::create() (in pyuno/unxlngx6/lib/libpyuno.so)
==1877==    by 0x2A70E351: pyuno::decreaseRefCount(_is*, _object*) (in pyuno/unxlngx6/lib/libpyuno.so)
==1877==    by 0x2A7092B4: pyuno::Adapter::~Adapter() (in pyuno/unxlngx6/lib/libpyuno.so)
==1877==    by 0x2A709393: pyuno::Adapter::~Adapter() (in pyuno/unxlngx6/lib/libpyuno.so)
==1877==    by 0x5EF2F64: cppu::OWeakObject::release() (weak.cxx:213)
==1877==    by 0x2A70DE69:
==1877==  Address 0x1ee30818 is 8 bytes inside a block of size 32 free'd
==1877==    at 0x4A0662E: free (vg_replace_malloc.c:366)
==1877==    by 0x4C44B62: rtl_freeMemory_SYSTEM(void*) (alloc_global.cxx:285)
==1877==    by 0x4C44DC7: rtl_freeMemory (alloc_global.cxx:355)
==1877==    by 0x2A70E41E: osl::Thread::operator delete(void*) (in pyuno/unxlngx6/lib/libpyuno.so)
==1877==    by 0x2A70E6EF: pyuno::GCThread::~GCThread() (in pyuno/unxlngx6/lib/libpyuno.so)
==1877==    by 0x2A70E303: pyuno::GCThread::onTerminated() (in pyuno/unxlngx6/lib/libpyuno.so)
==1877==    by 0x2A70E671: threadFunc (in pyuno/unxlngx6/lib/libpyuno.so)
==1877==    by 0x4C2E242: osl_thread_start_Impl (thread.c:292)
==1877==    by 0x3C26607D8F: start_thread (pthread_create.c:309)
==1877==    by 0x3C262EF48C: clone (clone.S:115)
2012-02-18 00:07:31 +01:00
Stephan Bergmann
a545badd65 Work around macro redefinition warning 2012-02-16 18:15:04 +01:00
Stephan Bergmann
d90fd406fd Missing return 2012-02-16 17:07:07 +01:00
Stephan Bergmann
1bb0d979b5 Adapt pyuno.so wrapper to Python 3 support 2012-02-16 16:30:58 +01:00
Alexander Bergmann
99b2adf721 Removed unused code 2012-02-10 14:20:52 +00:00
Stephan Bergmann
0b1be1ce0e Reintroduce pyuno.so wrapper around libpyuno.so
...it was cleaned away by a09ce46818 "Port PyUno
to support Python 3" but is still needed to make sure libpyuno.so is loaded
RTLD_GLOBAL (Python apparently loads its modules RTLD_LOCAL).  At least with
pre 4.5 GCC this can cause problems with C++ exception handling, see the mail
thread starting at
<http://lists.freedesktop.org/archives/libreoffice/2012-February/025166.html>
"LibO 3.5RC2: terminate called after throwing an instance of
'com::sun::registry::InvalidRegistryException'" for details.
2012-02-06 14:45:46 +01:00
Josh Heidenreich
fb78dbcdc5 Added READMEs for modules related to URE, with content from the wiki 2012-02-06 05:28:46 +01:00
Alexander Bergmann
0439af27e1 Code cleanup: ( () ) replaced by (()) 2012-01-26 17:41:07 +00:00
Stephan Bergmann
7c704c78d3 Removed some unused parameters; added SAL_UNUSED_PARAMETER.
SAL_UNUSED_PARAMETER (expanding to __attribute__ ((unused)) for GCC)
is used to annotate legitimately unused parameters, so that static
analysis tools can tell legitimately unused parameters from truly
unnecessary ones.  To that end, some patches for external modules
are also added, that are only applied when compiling with GCC and
add necessary __attribute__ ((unused)) in headers.
2012-01-21 15:21:16 +01:00
Olivier Hallot
85d1ce27ad Fix for fdo43460 Part XXVII getLength() to isEmpty()
Please find attached a partial fix for Easy Hack FDO43460

Part XXVII
Modules
padmin, pyuno, rdbmaker, regexp, registry, rsc, sal
2012-01-02 19:17:17 +01:00
Takeshi Abe
7958f8244c catch exception by constant reference 2011-12-21 21:57:54 +09:00
Lionel Elie Mamane
7f4cb27518 fix loading of python-uno module by package.module name 2011-12-12 22:14:50 +01:00
Caolán McNamara
9e8ac5c91e more debug spew in non-debug product 2011-12-12 15:21:49 +00:00
Caolán McNamara
fb37327df4 Let's not have debug spew all the time 2011-12-12 14:17:08 +00:00
Michael Meeks
1a7eee2446 Improve pyuno debugging in various ways - add stack traces etc. 2011-12-05 20:53:24 +00:00
Michael Meeks
41b8bad143 wizards: completely work python wizard packaging and registration
Also improve exception handling and error printing in pythonloader
Allow registration of explicit .py components - the only method that works
2011-12-05 20:53:24 +00:00
Tor Lillqvist
c81bdf3bcd Do build cpputools also for non-DESKTOP OSes, needed for bridgetest 2011-11-17 17:57:23 +02:00
Tor Lillqvist
469c9ac2f9 Enforce a "lib" prefix for UNO components for Android
This commit for the old build system. (Don't bother for components not
relevant for Android.)

The Android package installer (as invoked through "adb install", from
"ant debug install") silently ignores native libraries in app packages
(.apk files) whose names don't start with "lib" and end with ".so".

The package builder (as invoked through "ant debug") in the SDK gladly
includes also thusly named native libraries in the .apk, though. Yay
for consistency.
2011-11-17 15:22:59 +02:00
Stephan Bergmann
c1bd2a254b New LO_{LIB,JAVA}_DIR make special inbuild component handling superfluous. 2011-11-10 13:36:20 +01:00
Stephan Bergmann
d03465a446 Undo basis/brand split: removed RPATH BRAND (same as OOO now). 2011-10-24 22:56:48 +02:00
Stephan Bergmann
b786a33cfd Undo basis/brand split: Move SDK and ure-link, remove OOO_BASE_DIR and BaseInstallation. 2011-10-24 13:59:58 +02:00
Stephan Bergmann
fecde94354 Undo basis/brand split: moved Python from basis to brand.
The Windows-only code in pyuno/zipcore/python.cxx may still need fixing.
2011-10-20 23:04:12 +02:00
Stephan Bergmann
6671fa81db Removed uses of rtl::O[U]String[Buffer]::operator sal_{char|Unicode} const *(). 2011-09-27 20:22:03 +02:00
Fridrich Štrba
bb5bdbbdca Revert "Trying to chop out the uwinapi library"
This reverts commit 2dea0dab4f.
2011-09-16 16:26:03 +02:00
Fridrich Štrba
2dea0dab4f Trying to chop out the uwinapi library 2011-09-16 15:52:40 +02:00
Tor Lillqvist
d6cde02dbc Fix dbgutil build of pyuno
Whether things actually work when pyuno is built against the debugging
runtime, but the internal Python (to the best of my knowledge) still
against the normal one, I don't know. But anyway, this makes the build
succeed here.
2011-08-22 23:54:48 +03:00
Julien Nabet
b2da8254dc There was still overload ambiguous 2011-08-21 11:18:13 +02:00
Lionel Elie Mamane
790d4bd44a OUStringBuffer.append call: add explicit radix to disambiguate overload 2011-08-21 11:03:13 +02:00
Lionel Elie Mamane
cb937e72b8 use boost::unordered_map instead of STL one so as not to require C++0x 2011-08-21 10:37:48 +02:00
Lionel Elie Mamane
ac2359cf84 pyuno: close opened parenthesis in raised exception message 2011-08-21 01:46:09 +02:00
Lionel Elie Mamane
21192c6ea9 pyuno: some comments 2011-08-21 01:46:09 +02:00
Lionel Elie Mamane
58aa95c944 Janitorial: remove unnecessary const_casts
The python C API has consts at these places
2011-08-21 01:46:09 +02:00
Lionel Elie Mamane
d269a18250 Janitorial: remove unused variable 2011-08-21 01:46:08 +02:00
Lionel Elie Mamane
fa43b77422 pyuno: make extractUnoException handle exceptions raised by uno.py loading
This allows having a meaningful error message when extractUnoException
is called from pyuno_loader::getLoaderModule() (via
raiseRuntimeExceptionWhenNeeded()). If it is called to treat an error
that cropped up in loading uno.py, the old code would abort the whole
operation by throwing an exception because... it gets essentially the
same error. The new code leads to a sensible message on the Python
debug console.
2011-08-21 01:46:07 +02:00
Lionel Elie Mamane
41a68a4f77 pyuno: hook into import *after* the _whole_ uno module is successfully loaded
This avoids breaking the whole python process module importing
when an uno.py import failure happens after the hooking point.
In that case, _uno_import is still the python module loader,
but _g_delegatee is not anymore bound to the previously installed
importer, and thus any module import fails with:
  File "/home/master/src/libreoffice/core/install/basis3.5/program/uno.py", line 260, in _uno_import
    return _g_delegatee( name, *optargs, **kwargs )
TypeError: 'NoneType' object is not callable
2011-08-21 01:46:07 +02:00
Lionel Elie Mamane
a9b9b40570 pyuno: allow uno structs to be initliased with keyword arguments 2011-08-21 01:46:07 +02:00
Lionel Elie Mamane
0c3409364b TMP_LIONEL_NOTES 2011-08-17 18:11:00 +02:00
Caolán McNamara
9495925936 Related: fdo#34184 on windows find the openssl libs that _ssl.pyd needs 2011-07-29 14:46:26 +01:00
Christian Lohmaier
c78b2702a4 minor whitespace/makefile cleanup 2011-07-24 19:23:32 +02:00
Matúš Kukan
15f10fc946 Remove component_getImplementationEnvironment 2011-07-12 16:30:06 +02:00
Tor Lillqvist
4f7e535510 Build cpputools only for desktop OSes 2011-07-09 15:06:52 +03:00
Jesús Corrius
a81f06f209 Use $(DLLTOOL) instead of dlltool 2011-06-24 15:38:47 +02:00