summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)Author
2018-08-06Add missing sal/log.hxx headersGabor Kelemen
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') in files formerly omitted for oversight or non-cxx extension Change-Id: I327c573f44076c6ccfecf737eafccba2da72e1bd Reviewed-on: https://gerrit.libreoffice.org/58600 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-06loplugin:useuniqueptr in sal/qa/OStringBufferNoel Grandin
Change-Id: Ib05e209bfe71bacca99862f0e3266008bb436995 Reviewed-on: https://gerrit.libreoffice.org/58569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-02coverity#1438194 silence Resource leakCaolán McNamara
Change-Id: I54cf8e4fc430feb2e34d3f6f0f2abce81973b09a Reviewed-on: https://gerrit.libreoffice.org/58481 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-02[API CHANGE] add some more asserts to the string functionsNoel Grandin
rtl_[u]String_alloc now requires that the length be >= 0. Since this function is only @since Libreoffice 4.1, it is unlikely to be widely used externally. Removed some unit tests that were testing invalid or out of range paramers, which are already not allowed according to the documented contract of those functions. The change in writerfilter is because the new asserts triggered when running testFdo74745 The change in SwTextNode::EraseText is because testFdo60842 triggered the assert in replaceAt. The change in SwFieldSlot::SwFieldSlot is because testMoveRange::Import_Export_Import triggered the assert in replaceAt. The changes in SwFieldSlot::SwFieldSlot and TabControl::ImplGetItemSize are due to failures in the uitests. Change-Id: Ib317261067649b0de96df12873ce31360cd24681 Reviewed-on: https://gerrit.libreoffice.org/58390 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-02Use memcpy for string ImplNewCopy functionsNoel Grandin
Change-Id: If0072a2fd7d3111b48413143610025124f365207 Reviewed-on: https://gerrit.libreoffice.org/58275 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-02Revert rtl_alloc_preInit back to boolean argumentStephan Bergmann
This effectively reverts 271a663d2f098f3f665cab6da2e13b265a7eab93 "rtl: support start/stop threads around pre-init" again, now that df6ba650469a6f2fda06ef1c2e107ccdd3570505 "Remove 'officially dead now' rtl_cache slab allocator mechanism" removed the wsupdate thread. (rtl_alloc_preInit is an internal-use-only C function, so changing its arguments doesn't affect URE compatibility.) Change-Id: Ie9bce86377f9520e2600e4111ac525dddace10f8 Reviewed-on: https://gerrit.libreoffice.org/58443 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-01Replace rtl_cache_alloc/free with rtl_allocate/freeMemoryStephan Bergmann
...as with the combination of old ce906b8096081dee15dc8cc96e570d5b0b587955 "skip tricky allocators on G_SLICE=always-malloc" and recent bc6a5d8e79e7d0e7d75ac107aa8e6aa275e434e9 "Disable custom allocator", rtl_cache unconditionally just uses malloc/free now (see also db354dfad541fe2edd64a618a2d7cc83a6be2b9e "the custom SAL allocator is no longer used" and df6ba650469a6f2fda06ef1c2e107ccdd3570505 "Remove 'officially dead now' rtl_cache slab allocator mechanism"). So simplify the code. Change-Id: Ia665fd381ee4757e2c8b3d0460363bd34efd373a Reviewed-on: https://gerrit.libreoffice.org/58424 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-01Dead assignmentStephan Bergmann
Change-Id: Ia9459d29ebe823a8e08eed0a7418e89b05ed360b Reviewed-on: https://gerrit.libreoffice.org/58412 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-01Remove "officially dead now" rtl_cache slab allocator mechanismStephan Bergmann
...after <https://gerrit.libreoffice.org/#/c/58263/> "the custom SAL allocator is no longer used" got merged. According to my July 31, 2018 comment there: "However, [...] this change is effectively a final coffin nail for the 'rtl_cache' mechanism. It could be argued that the alleged benefits of that mechanism (if it were still working) might be real (at least on some platforms; which would need measurements), and that it should be made working again (by reverting the effects of both ce906b8096081dee15dc8cc96e570d5b0b587955 'skip tricky allocators on G_SLICE=always-malloc' and bc6a5d8e79e7d0e7d75ac107aa8e6aa275e434e9 'Disable custom allocator' on rtl_cache_alloc/free again). But it could just as well be argued that the 'rtl_cache' mechanism is effectively gone for long enough now (since end of November, 2017, with bc6a5d8e79e7d0e7d75ac107aa8e6aa275e434e9 'Disable custom allocator') without any (apparent) negative consequences, so that it can be removed for good with this change." Change-Id: I8c1e45d494fc22555a9e675ab27be9e6e404abde Reviewed-on: https://gerrit.libreoffice.org/58369 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-31the custom SAL allocator is no longer usedNoel Grandin
ever since commit bc6a5d8e79e7d0e7d75ac107aa8e6aa275e434e9 Date: Wed Nov 15 16:52:44 2017 +0530 Disable custom allocator which makes FORCE_SYSALLOC redundant which makes SYS_ALLOC redundant Change-Id: I42e1d651473e7601e2280d9fb0662c89808c88f6 Reviewed-on: https://gerrit.libreoffice.org/58263 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-07-30avoid writing StringBuffer twiceNoel Grandin
Change-Id: Ib0a8914cc1967f89a2cd3b062e7a0b52de7a972c Reviewed-on: https://gerrit.libreoffice.org/58281 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-29bChanged can be boolNoel Grandin
Change-Id: I7d3f6af5410d93537b6b7a704615f43860160320 Reviewed-on: https://gerrit.libreoffice.org/58278 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-29Use memmove in trim_WithLengthNoel Grandin
Change-Id: If75ac1968b8b0b3314ae36c2a7f163cb5428e9c6 Reviewed-on: https://gerrit.libreoffice.org/58277 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-29optimise newFromStr functionsNoel Grandin
use the other functions in this module so we get the compiler builtins if available Change-Id: Idbd9df44e057e573dd3fb243c50c5186e8edd8d8 Reviewed-on: https://gerrit.libreoffice.org/58276 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-27Related: rhbz#1602589 add comments to coverity annotationsCaolán McNamara
Change-Id: I88c941832a0d682ea4b6028c28edd48cf5df38f7 Reviewed-on: https://gerrit.libreoffice.org/58093 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-27Related: rhbz#1602589 silence leaked_storageCaolán McNamara
Change-Id: Ib489ebf55d3a18d2af6f34b3f6128231d6d7758c Reviewed-on: https://gerrit.libreoffice.org/58090 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-26loplugin:returnconstant in sal,l10ntools,sotNoel Grandin
Change-Id: I3f4e4efa8ea839f48b9700ebc26c7e5ab279ce49 Reviewed-on: https://gerrit.libreoffice.org/57975 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-23Missing includes (--disable-pch)Stephan Bergmann
Change-Id: Ie3427dfbbdf6ecf96b4fc36c534022dc881b3957
2018-07-23ofz#9507 wrong start point for Johab block 59Caolán McNamara
Change-Id: I011f4cbb10324c4a7d4e1be3ab1355291f79730b Reviewed-on: https://gerrit.libreoffice.org/57838 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-10tdf#42949 Fix IWYU warnings in include/osl/*hxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7b19938246ca8498fa300f781589bf17b3d486aa Reviewed-on: https://gerrit.libreoffice.org/56723 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-08tdf#84323 - sal - add sane sleep interface: cleanup osl_waitThreadKevin Dubrulle
Replace osl_waitThread by osl::Thread::wait. Use std::chrono instead of TimeValue. Change-Id: I71691d014feeeb0c5d0ba29d048bda8e25e6e7dd Reviewed-on: https://gerrit.libreoffice.org/57130 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-29Improved loplugin:redundantcast (const-qualified typedefs): salStephan Bergmann
Change-Id: I64b6ffd3e43f14c5884bf6cf1c12ff3b147db6bd Reviewed-on: https://gerrit.libreoffice.org/56699 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-06-29Make the RELATIVETIMER be relative to start of the process, not to first callTor Lillqvist
Make it easier to compare timing logs even if you add a SAL_DEBUG() that happens much earlier than the others, the timestamps of the others will still be comparable to those from earlier runs. Change-Id: I13872ef9112d8515e563e561f9b2a50c8510bae8 Reviewed-on: https://gerrit.libreoffice.org/56676 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-28tdf#42949 Fix IWYU warnings in include/osl/*hGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib2301526d7aa6982af6c8c79ed7e9a4c34b7bbf7 Reviewed-on: https://gerrit.libreoffice.org/56491 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-21Don't reset signal that hasn't been setStephan Bergmann
Once an in-process JVM is instantiated, it is vital that the disposition for SIGSEGV is not changed afterwards, as we do not make use of Java's libjsig.so (cf. <https://docs.oracle.com/javase/8/docs/technotes/guides/vm/ signal-chaining.html>) in our processes. I observed sporadic SIGSEGV crashes of CppunitTest_dbaccess_RowSetClones on a 64-core aarch64 machine (see comment at <https://github.com/flathub/ org.libreoffice.LibreOffice/issues/42#issuecomment-395731088> "OpenJDK 10 is now available"). What apparently happenes is that the cppunittester process first sets up its signal handlers through vclbootstrapprotector, which doesn't set one for SIGSEGV because bSetSEGVHandler is false in sal/osl/unx/signal.cxx because !is_soffice_Impl(). Then later when the in-process JVM is instantiated it sets its handlers, including a SIGSEGV one. Towards the end of the process, DeInitVCL calls osl_removeSignalHandler calls onDeInitSignal, which erroneously resets the SIGSEGV handler because it doesn't honor bSetSEGVHandler. But it can apparently happen that JVM threads are still running at that time and are executing JIT'ed code that can cause SIGSEGV that relies on the JVM's handler being installed, which it no longer is. (This can probably also happen for soffice.bin itself, where bSetSEGVHandler will be true. That will need a different, follow-up fix.) Change-Id: Ib6d99c23e57daa0b7576964908aadff511f2bb21 Reviewed-on: https://gerrit.libreoffice.org/56232 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-06-19Don't waste time in macxp_resolveAlias() on files inside the app bundleTor Lillqvist
LibreOffice uses its low-level API to look up files inside the app bundle thousands of times, all the time, and especially when starting something. Both when the process starts, and when a specific aspects of the application starts (like after typing a first character into a Writer document in a session). Having all those, too, go through this alias (bookmark) resolve dance is just insane. There won't be any aliases (bookmarks) there. This shaves almost a second from the delay after typing the first character into a Writer document in a session. There is still a noticeable delay left, though, likely mostly caused by Python (Lightproof) initialisation slowness. (It's cross-platform.) I would say that it is a bit questionable whether the macxp_resolveAlias() functionality is worth it at all, even. Change-Id: I2461141c6b58738befd0db4902eb25e63b788b79
2018-06-18Resolves: tdf#118073 one leading 0 is significant for 0.Eike Rathke
Regression from commit 9a6527a98fb968b3fe6bc293ff7520a9480d43d0 CommitDate: Mon Jun 27 21:57:52 2016 +0200 stringToDouble() do not parse separator without digit as 0.0 Change-Id: I9d90aedc324ef0938297224297d89817e3fd1e90 Reviewed-on: https://gerrit.libreoffice.org/56028 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-06-12tdf#96099 Remove some trivial std::vector typedefsArkadiy Illarionov
Cleanup package, reportdesign, sal. Change-Id: I8622465886f7ec97700b00740ea37d40767ec98e Reviewed-on: https://gerrit.libreoffice.org/55616 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-11new loplugin:shouldreturnboolNoel Grandin
look for methods returning only 1 and/or 0, which (most of the time) should be returning bool. Off by default, because some of this is a matter of taste Change-Id: Ib17782e629888255196e89d4a178618a9612a0de Reviewed-on: https://gerrit.libreoffice.org/54379 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-05sal: WNT -> _WIN32Thorsten Behrens
Still some holdouts from that bad old habit it seems. Change-Id: Ib0fe2c7eb006649b121668c549ff8e0bb060e120 Reviewed-on: https://gerrit.libreoffice.org/55331 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-06-05sal: fix logfile path retrieval from logging.iniThorsten Behrens
Change-Id: I39803413533ae5b291d2e1abf4aa1bfe1f5900b5 Reviewed-on: https://gerrit.libreoffice.org/55268 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-06-01loplugin: look for CPPUNIT_ASSERT_EQUALS with params swappedNoel Grandin
idea originally from either tml or moggi, can't remember which Change-Id: Id78d75035036d3aa1666e33469c6eeb38f9e624d Reviewed-on: https://gerrit.libreoffice.org/55126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-28loplugin:unusedfieldsNoel Grandin
Change-Id: I625b73152c0c277c6e0ce3e24e4704094fc4e8ff Reviewed-on: https://gerrit.libreoffice.org/54822 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-28loplugin:unusedmethodsNoel Grandin
Change-Id: I64df1f467986b3d70c058adff289a6dd8f00fb20 Reviewed-on: https://gerrit.libreoffice.org/54821 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-22Fix typosAndrea Gelmini
Change-Id: I5ad14286712e27e8d15174c9ed420bf93367d041 Reviewed-on: https://gerrit.libreoffice.org/54579 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2018-05-17New o3tl::temporary to simplify calls of std::modfStephan Bergmann
...that ignore the out-parameter integral part Change-Id: I05f07c1a8909023232f8aecf75ea5541d4eb81ca Reviewed-on: https://gerrit.libreoffice.org/54474 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-05-17loplugin:redundantcast improvements for floating-integer conversionsStephan Bergmann
Change-Id: I63dbf18f144a792ae775fe6706da81657f790016 Reviewed-on: https://gerrit.libreoffice.org/54416 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-05-17Remove leftover "#pragma GCC diagnostic ignored" halfStephan Bergmann
...where the other half introduced with 1b12d5ecb1be36267534e0b980d7c53d50645511 "Work around GCC 7 mis-feature" has now been removed with 6da400912e8c69ae86650e799767da54ee422392 "[API CHANGE] Remove no longer working rtl_arena -> rtl_cache feature" Change-Id: I79b71d119848150c0ebd2244f0ace08609fd17e9 Reviewed-on: https://gerrit.libreoffice.org/54417 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-05-16[API CHANGE] Remove no longer working rtl_arena -> rtl_cache featureStephan Bergmann
rtl_arena_create's quantum_cache_max parameter (when non-zero) would have allowed an rtl_arena to internally use an rtl_cache for chunk allocation. (And none of the LO-internal uses of rtl_arena_create makes use of that.) However, with the combination of old ce906b8096081dee15dc8cc96e570d5b0b587955 "skip tricky allocators on G_SLICE=always-malloc" and recent bc6a5d8e79e7d0e7d75ac107aa8e6aa275e434e9 "Disable custom allocator", rtl_cache unconditionally just uses malloc/free now, so the rtl_arena_create quantum_cache_max feature has effectively become irrelevant. As those changes appear to have no negative consequences overall (and help remove quite a chunk of no-longer used code), leave it at that and officially abandon the quantum_cache_max feature. Change-Id: I7d186a4a1589db6a73059c2be164aa81d81aef47 Reviewed-on: https://gerrit.libreoffice.org/54388 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-05-10sal: log windows traces to debugger console, take twoThorsten Behrens
This reverts most of commit 4c5b4752786ae2c174cd8fa8aa42b27a0994f34a and just keeps the OutputDebugStringA() call unconditionally. Change-Id: Ia838052b3147ca2d66c7d28b04eadd9700244669 Reviewed-on: https://gerrit.libreoffice.org/54029 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-05-08sal: log windows trace output to debugger consoleThorsten Behrens
Change-Id: Ic8fea70fd3b0b2d4881cd30e3616f5bbf7c0c533 Reviewed-on: https://gerrit.libreoffice.org/53776 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-04-27loplugin:constantparamNoel Grandin
Change-Id: I966dcf87be021520e7cc394338b9c0574bb8afee Reviewed-on: https://gerrit.libreoffice.org/53541 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-20loplugin:constantparamNoel Grandin
Change-Id: Ia58d8950b3b9e48bbe9f075b9fe1eed62d9abf0d Reviewed-on: https://gerrit.libreoffice.org/53188 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-19cppcheck - fix variableScope in some filesGökhan Gurbetoğlu
Reduced the scope of some variables in source. Change-Id: I705e7f2587fd81015f06fb301eb8d4a270668d73 Reviewed-on: https://gerrit.libreoffice.org/53042 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Gökhan Gurbetoğlu <gokhan.gurbetoglu@pardus.org.tr> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-16loplugin:useuniqueptr in sal/qa/Noel Grandin
Change-Id: I20b5cfe2fd95da3f37a6812af5683bcc4d918b06 Reviewed-on: https://gerrit.libreoffice.org/52882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-16cppcheck: variableScope & unreadVariableMuhammet Kara
Change-Id: Iaa3adc54d547e243b977a562fa4dbc2b9b9c6592 Reviewed-on: https://gerrit.libreoffice.org/52905 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
2018-04-08Properly filter(out) - pattern words are the first argumentMike Kaganski
https://www.gnu.org/software/make/manual/html_node/Text-Functions.html Change-Id: Ifb1d92cd9c7b59360d296026f01aa54ed83ed9c3 Reviewed-on: https://gerrit.libreoffice.org/52604 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-04-08While at it, combine the check for ANDROID with the ones for WNT and HAIKUTor Lillqvist
Also, order them alphabetically. Change-Id: I144331d71455c1c794d300f9a4f4e2e21fcd5e1b
2018-04-08GNU Make's filter-out is hard to useTor Lillqvist
Change-Id: I99ec6176c0876b948e35880f02d54905d26e7280
2018-04-06osl: Remember the last error before returning osl_Socket_ErrorTakeshi Abe
This prevents from e.g. com.sun.star.bridge.UnoUrlResolver's emitting confusing messages, when trying to connect to a port on which no LibreOffice process is listening, like: > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > __main__.NoConnectException: Connector : couldn't connect to socket (Success) ^^^^^^^ After applying this patch: > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > __main__.NoConnectException: Connector : couldn't connect to socket (Connection refused) You can see the above behavior with the following python code: import uno x = uno.getComponentContext() y = x.ServiceManager z = y.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver", x) url = "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" a = z.resolve(url) ... provided that no process is waiting on port 2002. Change-Id: Id094cf9271fe77d84f2284d91a0e452448de2bc2 Reviewed-on: https://gerrit.libreoffice.org/52018 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>