summaryrefslogtreecommitdiff
path: root/pyuno/source
AgeCommit message (Collapse)AuthorFilesLines
2014-04-02coverity#1019376 Resource leakCaolán McNamara2-4/+9
Change-Id: Ifa9c5a7b3aa0d219e09fa3081e66d870a508a84d
2014-03-26First batch of adding SAL_OVERRRIDE to overriding function declarationsStephan Bergmann2-8/+8
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-18Find places where OUString and OString are passed by value.Noel Grandin1-2/+2
It's not very efficient, because we generally end up copying it twice - once into the parameter and again into the destination OUString. So I create a clang plugin that finds such places and generates a warning so that we can convert them to pass-by-reference. Change-Id: I5341a6ea9e3190f4b4c05c42c85595e3dcd83361
2014-03-10pyuno: simplify deprecated XTypeProvider.getImplementationIdStephan Bergmann1-3/+3
Change-Id: Ia99dca3619fb893d1b9f3a46f1f1285e3fe1bc8e
2014-03-07Introduce com.sun.star.beans.theIntrospection singletonStephan Bergmann1-3/+3
...deprecating com.sun.star.beans.Introspection (single-instance) service. Change-Id: Ica2e3a3541c7dcb1aab79222c5abf40d6988c882
2014-02-26cppuhelper: retrofit std::exception into overriding exception specsStephan Bergmann2-14/+14
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26Remove visual noise from pyunoAlexander Wilms1-3/+3
Change-Id: I27f5edf45d5968879436e2466f953576651ed8ae Reviewed-on: https://gerrit.libreoffice.org/8290 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23Remove unneccessary commentsAlexander Wilms1-2/+2
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb Reviewed-on: https://gerrit.libreoffice.org/8182 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-01-31Remove UNOIDL "array" and "union" vaporware remnantsStephan Bergmann2-9/+0
...and deprecate what cannot be removed for compatibility. Change-Id: I1ea335af775b867b468b8285113631167729a92a
2014-01-30coverity#983054, reorder code to avoid memory leakStephan Bergmann1-25/+20
Change-Id: If14160802f77673e3ebe69850e00d0506125969c
2014-01-29bool improvementsStephan Bergmann1-1/+1
Change-Id: I0dc09b7a6ee2849bd0c2ffc31be45f81cd2c15ee
2014-01-28bool improvementsStephan Bergmann2-2/+2
Change-Id: I42f6d8b3e62834b0612d84586f791f25e967c9c7
2014-01-28coverity#440338 Dereference null return valueCaolán McNamara1-1/+8
Change-Id: I5da7c1d8fe7f4632b386a02dd54f4b203a00fc25
2014-01-10Use boolStephan Bergmann1-4/+4
Change-Id: I4c05c602ecdd77d07e8106387270bf01718e975b
2014-01-07No serviceNames attribute in LoaderStephan Bergmann1-1/+1
Change-Id: I6cc001d18683fc412f0ec0b6a33054d6e745463f
2014-01-07remove unnecessary sal_Unicode casts in OUStringBuffer::append callsNoel Grandin1-8/+8
Convert code like: buf.append( static_cast<sal_Unicode>('!') ); to: buf.append( '!' ); Change-Id: Iacb03a61de65a895540940953b49620677b3d051
2013-12-17Adapt all (non-extension, SharedLibrary) .components to environment="..."Stephan Bergmann1-2/+2
Change-Id: I56f38bd786f3a026cb2908f28540dc9c4003af83
2013-11-25Fix different typos for "unknown"Julien Nabet1-1/+1
Change-Id: Ib2ee00d4e9f4c6c05d090adfcd5fb791fcbca72c
2013-11-14SAL_WARN_UNUSED com::sun::star::uno::AnyStephan Bergmann1-1/+0
Change-Id: I9058044d13f696e07667dce706f6c311af6dbea0
2013-11-14-Werror,-Wunused-member-functionStephan Bergmann1-12/+0
Change-Id: Ic4dba1d313c3a27ac02f9d382d2b55218e1bad10
2013-11-11convert OUString compareToAscii == 0 to equalsAsciiNoel Grandin1-1/+1
Convert code like aStr.compareToAscii("XXX") == 0 to aStr.equalsAscii("XXX") which is both easier to read and faster. Change-Id: I448abf58f2fa0e7715dba53f8e8825ca0587c83f
2013-11-11convert OUString 0==compareToAscii to equalsAsciiNoel Grandin1-3/+3
Convert code like: 0 == aStr.compareToAscii("XXX") to aStr.equalsAscii("XXX") which is both clearer and faster. Change-Id: I2e906d7d38494db38eb292702fadb781b1251e07
2013-11-11remove unnecessary use of OUString constructorNoel Grandin1-5/+5
Change-Id: Ifb220af71857ddacd64e8204fb6d3e4aad8eef71
2013-10-10sal: add special handling of argc==0 to osl_setCommandArgs()Michael Stahl1-4/+1
... to set up a fake command line. This is used from pyuno, when invoked from the "python" executable as "import uno". On WNT there is an API to get the actual command line, so just use that even in the "fake" case; on UNX just fake something up. Just for the record the whole osl_setCommandArgs() is called exactly once assumption should work out _unless_ there is a program that uses SAL_MAIN _and_ does a python-level "import uno" _before_ it wants to create a python-based UNO service (via pyuno_loader::CreateInstance), since pyuno already takes care to call Runtime::initialize() at most once. Change-Id: Ifd23de733ea3e6b694d46ab039b6aa4fd3e7fc1b Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-10-09pyuno: set up fake command line in getComponentContext()Michael Stahl1-0/+8
Easy to trigger the assert in osl_getCommandArgCount(), just run instdir/*/program/python and "import unohelper". Avoid that by setting up a fake command line, hopefully nobody expects to be able to give relevant args to python... Change-Id: I0df6c23d6ecbb3c2bce81a9d5bcecdcb1729ddbb
2013-10-07fdo#70196: Python 2 compatibility for UNO import error handlingDavid Bolen1-8/+9
Add backwards compatibility support for Python 2 to the earlier change in fdo#66025 to improve import error handling under Python 3. Change-Id: I47bf8ef255c4c2a3e4a2754414977aaa8ed32483 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-10-02WaE: unused variableTor Lillqvist1-1/+0
Change-Id: Iea8461444c29de9968a5bfa85a2dabb186db47ca
2013-09-22gbuild: remove libraries from OUTDIR and WORKDIRMichael Stahl1-7/+5
Refactor everything to find and link libraries directly in INSTDIR. - add gb_LinkTarget_get_linksearchpath_for_layer, and use it to set up -L paths for T_LDFLAGS in such a way that only allowed libraries can be linked against; i.e. it's not possible to link URE linktargets against OOO or not-installed libraries - gb_Library_get_target is now same as the gb_LinkTarget_get_target (TODO: this needs cleanup) - since a pattern rule won't work for linking libraries in INSTDIR, add a separate per-file rule for every INSTDIR lib - pattern rule can't find link target in the clean target any more so add a LINKTARGET variable - disable gb_Library_add_auxtarget, no auxtargets need to be copied - tweak the call to gb_Library_Library_platform to pass in a path in sdk/lib for the versioned URE libs - fix the Library clean target - add LAYER parameter to gb_LinkTarget_LinkTarget - adjust platform link commands - MSVC link command now uses explicit -manifestfile and -pdb parameters to keep misc. files out of INSTDIR - remove gb_Helper_OUTDIR_FOR_BUILDLIBDIR - adjust Extension, CppunitTest, JunitTest, PythonTest, Gallery, various CustomTargets to search INSTDIR - remove SDK library symlinks and import libs from odk/Package_lib - on Mac OS X, put .dylib symlinks into sdk/lib even though those are not packaged and would be created by the SDK configury; we need these to be somewhere for linking anyway - add a (unfortunately cyclic) dependency on Package ure_install to sal Change-Id: I70d88742f8c8232ad7b9521416275c67b64fe6cf
2013-09-09pyuno: this rc file seems to be unusedMatúš Kukan1-21/+0
Change-Id: I98b6263a464b46075e69e363c3eb9e4ec4557c46
2013-08-21finish deprecation of O(U)String::valueOf()Luboš Luňák1-1/+1
Compiler plugin to replace with matching number(), boolean() or OUString ctor, ran it, few manual tweaks, mark as really deprecated. Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
2013-08-21osl_getThreadIdentifier(0) -> osl::Thread::getCurrentIdentifier()Stephan Bergmann1-1/+2
Change-Id: Ida9785c4b9fda0459769957734952e69d7a9de44
2013-08-18Use subfolder names from <config_folders.h>Tor Lillqvist3-1/+15
Change all instances of hardcoded "program", "share" etc subfolder names to use those from <config_folders.h> instead. In normal builds, the end result will not change. Change-Id: I91c95cd8e482818be67307e889ae6df887763f53
2013-08-15Mark as constTakeshi Abe1-1/+1
Change-Id: Ic7ee570935b5d827dc01a483877ea5021da5abea
2013-08-13fdo#50470: Restore pyuno object method introspection in Python 3David Bolen3-24/+45
Switch to __dir__ entry point for introspection as Python 3 dropped support for __members__/__methods__. This is backwards compatible to Python 2.6. Module initialization adjusted to complete type setup (needed for tp_dict) via PyType_Ready. Change-Id: Ie1f7b9dd4279242de89d009eb7acdc8c786dab8f Reviewed-on: https://gerrit.libreoffice.org/5375 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2013-07-29Remove whitespace from line endsStephan Bergmann1-18/+18
Change-Id: Ie894879eaebda32bc4f99e7ad7f810c569e86a7a
2013-07-29fdo#66025: Improve accuracy of ImportError traceback and messageDavid Bolen1-18/+31
The ImportError raised on an import failure with the uno module loaded now includes a complete traceback and the original Python exception message text, combined with the most relevant (nearest to failure if imports are nested) uno lookup that also failed. Change-Id: Id968d84d7f09d555a81017a99369beb503d61439 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-07-24fdo#66025: Simplify new ImportError logicDavid Bolen1-8/+4
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-07-24fdo#66025: Minor clean-up of previous patchDavid Bolen1-1/+1
Change-Id: Idaaf8ebbf419899ba04b77cf10b217c141652a3a Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-07-24fdo#66025: Improve ImportError raised from _uno_importDavid Bolen1-8/+31
Change-Id: I92301f0c37d69e5977a12ab4d5a360f7a4ff20fe Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-07-12Resolves: #i120788# remove unused members from PyUNO_callable_InternalsHerbert Dürr3-13/+1
Patch by: Tsutomu Uchino <hanya.runo@gmail.com> (cherry picked from commit 5e2c3fd88906494965979bd20ca852391bee3bac) Conflicts: pyuno/source/module/pyuno_impl.hxx Change-Id: If73d5f7b799f04b79b5cc71d2d44c797851b18d0
2013-06-29remove OUString wrap for string literalsThomas Arnhold2-6/+6
For some functions and all kinds of Exceptions. CannotConvertException CloseVetoException DisposedException EmptyUndoStackException ErrorCodeIOException Exception GridInvalidDataException GridInvalidModelException IOException IllegalAccessException IllegalArgumentException IllegalTypeException IndexOutOfBoundsException NoMasterException NoSuchElementException NoSupportException PropertyVetoException RuntimeException SAXException ScannerException StorageWrappedTargetException UnsupportedFlavorException VetoException WrappedTargetException ZipIOException throwGenericSQLException throwIllegallArgumentException createInstance createInstanceWithContext forName getByName getPackageManager getPropertyValue getUnpackedValueOrDefault getValueByName hasPropertyByName openKey setName setPropertyValue supportsService bash command: for i in `cat list`; do git grep "$i\s*(\s*OUString(\s*\"" -- '*.[hc]xx' | cut -d ':' -f1 | sort -u | xargs sed -i -e "s/\(\<$i\s*(\)\s*OUString(\s*\(\"[^\")\\]*\"\)\s*)\s*/\1\2/g" -e "s/\($i.*\)\"+ /\1\" + /g"; done Change-Id: Iaf8e641b0abf28c082906014f87a183517630535 Reviewed-on: https://gerrit.libreoffice.org/4624 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-06-29reduce some spacingThomas Arnhold1-6/+2
Change-Id: I72d494b1c0ff5ed3c52ae6a078815f497e4dd647
2013-06-16PyUno fixed crash in function isInstanceOfStructOrException()Xiaoli1-2/+4
when we try to call PyUNO_callable object that doesn't have __class__ attribute Change-Id: Ia05f70d70f248d50aa141b09625f7ec50189e1dd Reviewed-on: https://gerrit.libreoffice.org/4309 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2013-05-14fdo#46808, Convert script::InvocationAdapterFactory to new styleNoel Grandin1-9/+2
Change-Id: I2fe24c863f4c43471f46032ed15fcd5b98863fc1
2013-05-08No need for RTLD_NOW hereStephan Bergmann1-1/+1
...it was like that "since the beginning," but for no apparent reason. Change-Id: Ic293739b5cd5de0bfe9e2580a0755af64202e582
2013-04-21adapt path for test.dll for WNTMichael Stahl1-3/+7
Change-Id: I4d7cb081805213f55ae69c4ade8638bbfc06f0c4
2013-04-18pyuno_loader::CreateInstance: delete the initial PyThreadStateMichael Stahl1-0/+4
Don't see how it could be used again, it appears to be leaked and causes the assertion in PyThreadState_Swap to fire. Change-Id: Id6bbb4363928e4fdd8bda1905f6e1f9931dba74c Reviewed-on: https://gerrit.libreoffice.org/3452 Reviewed-by: David Ostrovsky <David.Ostrovsky@gmx.de> Tested-by: David Ostrovsky <David.Ostrovsky@gmx.de>
2013-04-12pyuno_dlopenwrapper: give error message before abort() if dlopen() failsMiklos Vajna1-0/+1
Change-Id: Idf39b33efe4c7838f2669aec8773616416811d57
2013-04-09warning C4101: 'e' : unreferenced local variableStephan Bergmann1-1/+1
Change-Id: I2828021d60d82e43358ba98a1a3b4967a6901cd6
2013-04-09unbreak windows tinderboxDavid Tardon1-1/+1
Change-Id: Ic777267cb86acdb62b53a7b324e1423b7c6b67c5