Commit Graph

224 Commits

Author SHA1 Message Date
8bf8a2f349 fdo#46808, Convert script::InvocationAdapterFactory to new style
Change-Id: I2fe24c863f4c43471f46032ed15fcd5b98863fc1
2013-05-14 13:39:29 +02:00
094978d48d No need for RTLD_NOW here
...it was like that "since the beginning," but for no apparent reason.

Change-Id: Ic293739b5cd5de0bfe9e2580a0755af64202e582
2013-05-08 20:16:44 +02:00
288c8b9d59 adapt path for test.dll for WNT
Change-Id: I4d7cb081805213f55ae69c4ade8638bbfc06f0c4
2013-04-21 15:00:51 +02:00
89035356bc pyuno_dlopenwrapper: give error message before abort() if dlopen() fails
Change-Id: Idf39b33efe4c7838f2669aec8773616416811d57
2013-04-12 09:47:18 +02:00
4eccc3798b warning C4101: 'e' : unreferenced local variable
Change-Id: I2828021d60d82e43358ba98a1a3b4967a6901cd6
2013-04-09 12:33:56 +02:00
542cf6d9ea unbreak windows tinderbox
Change-Id: Ic777267cb86acdb62b53a7b324e1423b7c6b67c5
2013-04-09 09:46:38 +02:00
ebeae438db move Python tests in-process
This is nice to make them more easily debuggable.
A series of crude hacks are employed to bootstrap enough services from
python so the current tests run.
This is only tested with system python3 on Fedora.

Change-Id: I5e06741e55ead7fddec41ff776ff8ca5d2399469
Reviewed-on: https://gerrit.libreoffice.org/3215
Reviewed-by: David Ostrovsky <David.Ostrovsky@gmx.de>
Tested-by: David Ostrovsky <David.Ostrovsky@gmx.de>
2013-04-09 05:52:49 +00:00
1946794ae0 mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).

Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-07 14:23:11 +02:00
8333cbf2a3 Remove RTL_CONSTASCII_(U)STRINGPARAM in pyuno
and use append() instead of appendAscii()

Change-Id: Iaf29a2f18eff39db5d1b5cc298cce23442ac51a9
2013-03-28 22:54:38 +01:00
39d45390f4 removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings declarations
s/(OUString\s+[a-zA-Z_][A-Za-z0-9_]*\s*)\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/$1\($2\)/gms

Change-Id: Iad20f242c80c4bdc69df17e2d7a69d58ea53654b
Reviewed-on: https://gerrit.libreoffice.org/2835
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-03-19 10:48:30 +00:00
8b27d78b4a automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex:

s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms

Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec
Reviewed-on: https://gerrit.libreoffice.org/2832
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-03-19 09:00:26 +00:00
21e1e859a7 fdo#60724 change spelling error REMOVEABLE -> REMOVABLE
Only applies to PropertyAttribute::REMOVEABLE, and all instances in comments.
All other instances of the misspelling have remained the same.
Example: AF_REMOVEABLE

Change-Id: I391f4101bbc3e06689318235a37d616065bc1686
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-03-06 10:39:30 +01:00
76fb62755b coverity#983056: Resource leak
Change-Id: Ic40776f3cec5139e7f7accb4985533e78bd7c158
2013-03-04 21:27:27 +01:00
f68cd77923 Fix type unkown -> unknown
Change-Id: I8d55d5ae5ae38ae2b252859b5400e36301f19ef0
2013-02-21 21:50:01 +01:00
77fd448d09 Removed several useless macros: UNISTRING, USTR, USTR_ASCII, ASCII_STR, ASCII_STRING, CONST_ASCII, ASCSTR, ASCII, DEFINE_CONST_UNICODE, DEFINE_CONST_OUSTRING
Change-Id: I96d690bf9f9b319e9eeafcf218ec5ce87f21215f
Reviewed-on: https://gerrit.libreoffice.org/1954
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Tested-by: Tor Lillqvist <tml@iki.fi>
2013-02-14 13:20:14 +00:00
bd2c4e8dc4 Adapt PyUNO getConstantByName to previous TypeDescriptionMgr API CHANGE
Change-Id: I5a91c6c6dce103a8e4daa1572a638e1968a48fd8
2013-01-30 18:13:26 +01:00
d72a0b5c61 Check for __GNUC__ instead of GCC in sources
We still have checks for $(COM) being GCC or MSC in makefiles, of
course. But there is no reason to pass -D$(COM) to compilations.
Checking the built-in compiler-specific macros __GNUC__, _MSC_VER
(etc) is the right thing to do.

Change-Id: Ia961a29ba74e2c4977e5300a92318f38104c6592
2012-12-27 13:38:15 +02:00
43df436f60 WaE: Fix needed with MSVS 2010, too
Change-Id: I1d1da64b14139c1d90ac07685f3fe88e99253815
2012-12-25 10:55:29 +02:00
781548472b VS2012 WaE: C4211: nonstandard extension used : redefined extern to static
Some screwup with hypot(). As a workaround, include <math.h> early.

Change-Id: Ic8c6abc45f8502097c6b6b619108d50ea3c22392
2012-12-21 18:39:28 +02:00
374c9af20d i118798 - Fix Pyuno dead-lock
Fixes fdo#57569, thanks to Miklós Prisznyák for the hint.

git-svn-id: https://svn-master.apache.org/repos/asf/incubator/ooo/trunk@1232123 13f79535-47bb-0310-9956-ffa450edef68
2012-12-11 19:40:50 +01:00
a0f86c9c1d Python/pep8: fix E711 (is or is not None instead of = or !=) in pyuno module
Change-Id: I8ee9abc9a31a6d7791a006ed589d83d5858de267
2012-12-09 23:16:08 +01:00
31170413ae API CHANGE: com.sun.star.lang.IllegalArgumentException
... derives from com.sun.star.uno.RuntimeException instead of
com.sun.star.uno.Exception.

Only test that breaks with this change is jurt_uno/AnyConverter_Test,
which for mysterious reasons effectively tests that
IllegalArgumentException is a subclass of Exception and not
RuntimeException.  Presumably this is just a generic exception test that
happens to use IllegalArgumentException.

Some further testing indicates there are no problems expected at
runtime:
Running "make subsequentcheck" with all Java test code compiled against
a ridl.jar that does not contain the change, running against a soffice
that uses ridl.jar and rdbs with the change + ridl.jar with the change
on the test side yields exactly the same AnyConverter_Test failure, with
no other failures.

Change-Id: Iad183de76ec7e0d56648084e97cdcc160b5b033d
2012-11-26 23:14:33 +01:00
669f0da19b use correct PyString_Size for python2
This reverts commit 8ea4657f64e7575696be4bba5b2a4309ac029ae4.

Conflicts:
	pyuno/source/module/pyuno_util.cxx

Change-Id: I252688b72610864613ceb80aac9030062e63fdac
2012-11-26 13:48:58 +01:00
b7617d50dc New try to fix pystring size
I don't know if it's ok but compilation doesn't fail

Change-Id: I6960b2cd4587b3f49ccfa7fb24874c288ccfce6a
2012-11-25 19:05:01 +01:00
8ea4657f64 attempted blind fix for pystring size.
Change-Id: I637292be9791484a58b60e8889962176a37e2c07
2012-11-25 16:55:25 +00:00
af2b7fac27 pyuno: fix handling of "str", "unicode", "bytes" types:
Replace currrent wrappers of Python 2 only PyString_* functions with
better abstractions that handle default "str" (PyStr_*) or byte strings
("str"/"bytes" depending on version, PyStrBytes_*) and adjust all
invocations to work on appropriate string types.
Fixes obvious "attributes typeName and/or value of uno.Enum are not
strings" exceptions with Python 3.

Change-Id: I255dcb1bc198fd7f6a62b83b957901521071a480
2012-11-25 16:06:40 +01:00
a38b59265c pyuno: adjust uno.ByteSequence to work with "bytes"
This is necessary for Python3; "str" type is still accepted so it runs
on Python 2 as well.

Change-Id: I51098feca00e4cd8ce3ceebf663d4ce79252cbcd
2012-11-25 16:06:40 +01:00
e60f936ece pyuno: Runtime::pyObject2Any only allowed to throw RuntimeException
... so wrap the InvocationTargetException that happens when loading
Python 2 only LightProof into Python 3 so LO does not crash.

Change-Id: I4da230b46ef23c184718e858bf178f340f4b9c1f
2012-11-17 00:45:11 +01:00
b30ee83058 fdo#46808, use service constructor for beans::Introspection
Change-Id: Ieb49277020d31779979d8eb508391d6f8b97bf94
2012-10-23 13:06:14 +02:00
0411360989 Some clean up of previous commit
Change-Id: I05287fd79455f968c770d61bf5f320b07bba7d9e
2012-09-05 15:46:55 +02:00
b679a2a021 fdo#46808, Adapt reflection::CoreReflection UNO service to new style
The XComponent part of the interface made no sense for a singleton,
so it was removed.
Explicitly document the 'theCoreReflection' singleton and move it
into it's own file.
Deprecated the now old CoreReflection service.

Change-Id: Ib8befa87c7da7eb53a2f587948fd54a64c082472
2012-09-05 15:46:55 +02:00
8638f1e72a fdo#46808, Adapt script::Converter service code to new style
Change-Id: I19b3ba7c978e02ce865360f0411007525012149c
2012-08-27 15:40:07 +02:00
618376bcb5 warning C4702: unreachable code
Change-Id: Ie2cc83dde7e0522e0bf669a1dd3d7a8ca680f7e2
2012-07-20 10:32:47 +02:00
ec41ccedb4 Runtime::any2PyObject: warning C4702: unreachable code
Change-Id: I303536b957f902d3bbda9f3a96b507851292523a
2012-07-11 00:15:05 +02:00
1d3e6bb6c4 re-base on ALv2 code. Removing:
a patch contributed by Pedro Giffuni to handle FreeBSD issues
    that are unlikely to be an issue with a two-layer LibreOffice.
    http://svn.apache.org/viewvc?view=revision&revision=1180509
2012-07-02 16:52:50 +01:00
7b6b71ce14 remove bunch of obsolete looking .flt files
Change-Id: Ic3d45afca14d0bebfb6168b6cf6fc6c618754183
2012-06-22 22:39:33 +02:00
b9042fad7c re-base on ALv2 code.
Change-Id: I6c145e984c885c7e06caa1c27bfb354ea49ad9ce
2012-06-21 15:00:05 +01:00
5706c479ff Remove dmake makefiles obsoleted by gbuild'ification
Change-Id: I94b074d7d2e1ea2f80c3075ae49530225947442d
2012-06-14 11:43:16 +02:00
e16ac69372 gbuild migration: pyuno module
Change-Id: I7f923a5622214f7540a789bcdd93bf6fd1d166db
2012-06-14 11:40:23 +02:00
54a908a003 nuke unused defines
Change-Id: I7924da4bff73ca8f82c76eb8cb211401530acdeb
2012-06-04 23:26:57 +09:00
df9ecb71c7 targeted string re-work
Change-Id: I44518bb1b464bb0b458c0b5f1c249ef160ea3b26
2012-06-01 09:41:50 -05:00
9601b63509 targeted string re-work
Change-Id: Ibe5c739c3066f3e706a44b64d4ad775abde9662c
2012-06-01 09:41:49 -05:00
6b915b210a nuke unused typedef
Change-Id: I12a55e08a83b88221d992790c97c830761755582
2012-05-29 23:46:57 +09:00
5394b379eb removed unused temporary rtl::OUString
Change-Id: I9d118a5fbe2306465d8bcdb9ddd0596588137e5e
2012-05-23 01:06:54 +09:00
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
742dca7366 fdo#46926: PyUNO_cmp: return acquired reference 2012-03-16 22:18:43 +01:00
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
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 a09ce46818fd4d5e08b3af9a478501cd8ef5b4fe)
2012-03-07 11:17:13 +01:00
4634cbc237 fdo#46859: adapt string type checks to work with both Python 2 and 3
(regression from a09ce46818fd4d5e08b3af9a478501cd8ef5b4fe)
2012-03-07 11:17:13 +01:00
123c59342c Adapted GCThread to safer-to-use salhelper::Thread 2012-02-23 10:47:35 +01:00