summaryrefslogtreecommitdiff
path: root/include/osl
AgeCommit message (Collapse)Author
2021-09-01clang-tidy:readability-redundant-member-initNoel Grandin
Change-Id: I78339f1df1f0c55c7edaa552940b07d1ada3aeb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121386 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-27[API CHANGE] Drop obsolete osl_demultiplexSocketEvents et alStephan Bergmann
...which were deprecated in 0a126b4c661d65860fd2de92f8cc49bdb65a957c "Deprecate osl_demultiplexSocketEvents et al" towards LO 7.2 (and leave aborting stubs in place for backwards compatibility) Change-Id: Ice6032eb2f351af87dd56eecb002aa2a91e79373 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119560 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-06-02Revert "sb138: #i115619# fix for MinGW"Mike Kaganski
This reverts commit 6727dc5d9414e77975b9fd765993c6e207f872f3. We now don't support compiling using MinGW. Change-Id: I0dee00780bfb4b7deceddd8cd30af03b7f7ed212 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116591 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-05-25Deprecate osl_demultiplexSocketEvents et alStephan Bergmann
The oslSocketSet/osl_*SocketSet/osl_demultiplexSocketEvents functionality is based on the POSIX fd_set/FD_*/select functionality, which suffers from the issue that it has undefined behavior for file descriptors with numerical values greater than or equal to FD_SETSIZE. (And this can be a real issue e.g. on Linux, where tools::extendApplicationEnvironment in tools/source/misc/extendapplicationenvironment.cxx bumps the soft RLIMIT_NOFILE to the hard limit---so that file descriptors can likely have large values---, but where the GNU C library sets FD_SETSIZE to only 1024 and ignores larger descriptors.) This functionality is unused at least by LO itself, and also likely unused by third-party code. So instead of fixing the Unix-based implementation in sal/osl/unx/socket.cxx (by e.g. switching it from select to poll), just mark the functionality as deprecated (with the option of eventually removing the functionality completely from sal/osl/{unx,w32}/socket.cxx, leaving just stubs in sal/osl/all/compat.cxx). Change-Id: I2b97f8a37b45f298da9328660006f3c14361c9a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116089 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-05WASM: add initial support for Emscripten cross buildJan-Marek Glogowski
- configure with: - --host=wasm64-local-emscripten - had to make a few externals optional, so adding: - --disable-nss - --disable-cmis - --disable-curl Change-Id: I48d1c73d2675ad2e2beaf2c341578199efbd24ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111130 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-19[API CHANGE] Do not call getaddrinfo if we just want the hostnameSamuel Mehrbrodt
Similiar to afc41a467fdfabb2cd0879be3e4f1879a1d1dc91 , don't call getaddrinfo in getLocalHostname which calls DNS. This causes a lag when creating the lockfile on opening a document if the network is flaky/disabled. See tdf#97931 and tdf#47179 for some problems caused by this. For the one case where it is expected to call DNS, add a separate function to restore the old behavior. The (semantic) [API CHANGE] is in osl_getLocalHostname, it does no longer return a FQDN. Change-Id: I43455715a474ff6770351d1ce007c28aeb08f32e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107554 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-04-08allow more trivial #if's for including headers in PCHsLuboš Luňák
Change-Id: I734ac1832bafe0f4e5710b9b27bd03833179e2d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113800 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-02-05Revert "Fix typo in code"Stephan Bergmann
This reverts commit 3ed9bba283a6a67864c0928186e277240be0d9ba. osl_Pos_Absolut (include/osl/file.h) is part of the stable URE interface; it must not be changed. Change-Id: I1f49923a9351e4be5aee39b10720d38b424feb9b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110435 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-04Fix typo in codeAndrea Gelmini
Change-Id: Ib8b306a27d25a34e784aeeb72708b0d5d1511f3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110394 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-02-02tdf#130978 Added comment to all published APImsrijita18
Change-Id: I744788bde9778f85ccd9d7667e19d16842900a29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110248 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-30Simplify osl_getGlobalMutex to use function-local staticMike Kaganski
Change-Id: I36df8be817d0f0cb75efa00b0b523f379f67d1d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110126 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-27tdf#96505 Get rid of cargo cult 'long' integer literalsAlchemist
Change-Id: I8746b7b32cbebd275fe9f47cce9c80aa87fbc583 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108809 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-21tdf#123936 Formatting files in module include with clang-formatPhilipp Hofer
Change-Id: I0507dd797cd5a35e0ae14f4b69ee4e172d08a71a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105681 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
2020-09-17osl+tools: fix Windows Arm64 buildJan-Marek Glogowski
Change-Id: I17cbc1c8474880024921f476aa602d61978da868 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102851 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-09-12Replace remaining uses of sal_CharJulien Nabet
+ remove sal_Char check on compilerplugins Change-Id: I0f7da14e620f0c3d031d038aa8345ba4080fb3e9 Change-Id: Ia6dba4f27b47bc9e0c89159182ad80a5aee17166 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102499 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-06Fix warn "unbalanced grouping commands" in socket.hJulien Nabet
Change-Id: I290d96f8c2bcc9688e1d7acba95564b6bc97b64b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102097 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-26[API CHANGE] Drop OSL_THIS_FUNC, directly use C++11 __func__Stephan Bergmann
It had been documented as "the macro OSL_THIS_FUNC is intended to be an office internal macro for now", so take the liberty of removing it, even if technically that can be considered an incompatible API change. Change-Id: I7580a932e1da54845934378a650e894f3f3a9062 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101406 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-24Fix typosAndrea Gelmini
Change-Id: I9385704bea54ff504457f7ac1ec39ed98cfdaf97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101276 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-17[API CHANGE] remove OSL_SIGNAL_USER_RESOURCEFAILURENoel Grandin
which is unused since commit 00657aef09d854c74fb426a935a3e8b1fc390bb0 Date: Sun Jun 11 20:56:30 2017 +0100 migrate to boost::gettext Change-Id: Ia66a3a729dc4999c95b96ae1754b07c372121370 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100810 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-15loplugin:buriedassign in salNoel Grandin
Change-Id: I5a7bc9378ceacb9116c03e3a9fc01c5675c40908 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92243 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-24Fix typoAndrea Gelmini
Change-Id: I5a430d2e681b0c95476b4b59ca5281da6a05ee8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90924 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-02-05Fix typoAndrea Gelmini
Change-Id: Ia64904100110472464e9025b1e53ef65bd2416c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88001 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2020-02-05Fix typoAndrea Gelmini
Change-Id: I1a241b6d84d4129f94cf19ba764b3a40ec2a7887 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88000 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-11-19Fix multiple documentation sections (osl)Julien Nabet
Fix these warnings: Line 45: /cygdrive/c/BLP/core/instdir/sdk/include/osl/file.h:1308: warning: return value 'osl_File_E_LOOP' of osl_removeFile has multiple documentation sections Line 49: /cygdrive/c/BLP/core/instdir/sdk/include/osl/file.hxx:1893: warning: return value 'E_BUSY' of osl::Directory::remove has multiple documentation sections Line 50: /cygdrive/c/BLP/core/instdir/sdk/include/osl/file.hxx:1361: warning: return value 'E_LOOP' of osl::File::remove has multiple documentation sections Change-Id: Id82280efd9c6d1e33df966159dbef677839f6083 Reviewed-on: https://gerrit.libreoffice.org/83229 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-10-10Adapt osl_replaceFile documentationStephan Bergmann
...to eedf523c123a82bf3cbc5f389783e22d75b2e2c5 "tdf#127069 sal: preserve gid of files in the unx osl_replaceFile()" Change-Id: I47627418a9cd662802e4de3aa4cad4128af82ad4 Reviewed-on: https://gerrit.libreoffice.org/80606 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-30new loplugin:noexceptmoveNoel Grandin
idea from mike kaganski look for places where we can mark move operators as noexcept, which makes some STL operations more efficient Change-Id: Id732b89d1fcadd5ceb0ea2b9d159fed06136330f Reviewed-on: https://gerrit.libreoffice.org/78251 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-20Fix typosAndrea Gelmini
Change-Id: Iac38284daf0196d6a7f29aaa6e2103c1d76d7cc4 Reviewed-on: https://gerrit.libreoffice.org/77755 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-14Fix typoAndrea Gelmini
Change-Id: If136ac948234ec77d67058fc47922dc2154b1831 Reviewed-on: https://gerrit.libreoffice.org/75593 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-14Fix typoAndrea Gelmini
Change-Id: I151f472d5c542b989e858da22b29140c8e1b9b5b Reviewed-on: https://gerrit.libreoffice.org/75584 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-14Fix typoAndrea Gelmini
Change-Id: Icbd1d5f76611734e66481f18ec0239d159fea5d6 Reviewed-on: https://gerrit.libreoffice.org/75592 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-14Fix typoAndrea Gelmini
Change-Id: I0444435d86014891462adababc8de5ccb06fa6cd Reviewed-on: https://gerrit.libreoffice.org/75591 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-14Fix typoAndrea Gelmini
Change-Id: I8fa5e8afe6de453f20c241e9b03f06841f63ed5d Reviewed-on: https://gerrit.libreoffice.org/75590 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-14Fix typoAndrea Gelmini
Change-Id: I39efb064f94354ad3b8881f875311f0422fe6925 Reviewed-on: https://gerrit.libreoffice.org/75583 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-10an is used before a vowel soundCaolán McNamara
not before vowels with a consonant sound so its a url not an url Change-Id: Ic27ff3bee67469284d460c31ced6f63cb3633db2 Reviewed-on: https://gerrit.libreoffice.org/72062 Reviewed-by: Jens Carl <j.carl43@gmx.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-11[API CHANGE] Restore old exteral API behaviourJan-Marek Glogowski
Commit d38f9934f08939032cca64a32de58fa3901a88d5 ("[API CHANGE] Asserts to never clear already cleared guard") changes the API in a way, which can silently break compiling code for no reason. As discussed on the mailing list, this uses LIBO_INTERNAL_ONLY to restores the old behaviour for external API users. Change-Id: I43c9b955c1c8f5402588fcea2bfc38ab6fa9f263 Reviewed-on: https://gerrit.libreoffice.org/70528 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2019-04-10Fix typoAndrea Gelmini
Change-Id: I2df9e24ff0d4683819db8fa17bd6a0dfda223e13 Reviewed-on: https://gerrit.libreoffice.org/70534 Reviewed-by: himajin100000 <himajin100000@gmail.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-10Unify deleted function templates and improve docsJan-Marek Glogowski
... and doesn't change any code or API. Change-Id: Ic769831130bb78b8192ffd33375760bef9b76911 Reviewed-on: https://gerrit.libreoffice.org/70466 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-04-09[API CHANGE] Asserts to never clear already cleared guardMike Kaganski
... which could help catch copy-paste errors when wrong guard is cleared second time. Also an assert added that when resetting, there's something to reset (i.e., no descendant class had cleared protected pResetT, making reset impossible, and thus actually unable to guard anything). framework/source/layoutmanager/layoutmanager.cxx: made sure to not call clear() second time framework/source/layoutmanager/toolbarlayoutmanager.cxx: restored lock lost in commit 777bc22ca6490a4300f30fc1b45287dce789a36f forms/source/misc/InterfaceContainer.cxx: removed a leftover from commit a19cd21e3c03559877428315bebc0ceaf367a461 which reduced guarded scope forms/source/component/DatabaseForm.cxx: fixed clear-reset sequence broken from the initial commit bf4154eb5307ec8c35f000fd1df39ef3abb2eb6d Change-Id: Ibab6660c79561eee31faf3e6c1128ab141a7e8a3 Reviewed-on: https://gerrit.libreoffice.org/70381 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-09Add asserts to *Guard pointer constructors...Jan-Marek Glogowski
... as we can't drop them. IMHO it's still better then just a crash. Has to use NULL, as the API is pre-C++11 compatible. Change-Id: Idb4395d14a9185f4d7d1c2f048ad950518eef133 Reviewed-on: https://gerrit.libreoffice.org/70465 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2019-03-11android: Expose setting of the JavaVM.Jan Holesovsky
Needed when we use the liblo-native-code as a library. Change-Id: Ia4d1d72f2203a96d1196d015b521201919bbb165 Reviewed-on: https://gerrit.libreoffice.org/67965 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-03-08Fix @param documentation sectionsJulien Nabet
include/osl/thread.h:198: warning: argument 'name' from the argument list of osl_setThreadName has muliple @param documentation sections include/cppuhelper/propshlp.hxx:329: warning: argument 'bIgnoreRuntimeExceptionsWhileFiring' from the argument list of cppu::IEventNotificationHook::fireEvents has muliple @param documentation sections Change-Id: Ic1a2a7239596ec62c0d60c14480ea4a115eaaaa1 Reviewed-on: https://gerrit.libreoffice.org/68944 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-09-27tdf#119238: keep replaced file's identity when renaming docfileMike Kaganski
Regression from 2157a3536f97ff5ae7c82611a801fef7e3708983 sfx2 store: try rename before copying Rename is cheaper then copying the content over manually, so try that first. On Windows, we need to keep the file's dentity, including metadata (e.g., creation time, which is kept in FS). WinAPI has ReplaceFileW specifically for this, and it keeps ACLs of the original file, and otherwise makes the changed file not a separate entry, but updated old file from system's PoV. Eventually, we could try to restructure creating backup copies (e.g., for documents when configured so) to take advantage of this function being able to do that. Change-Id: I6001a2a3af5e10bc010f5ef129f4bb6f83ee1581 Reviewed-on: https://gerrit.libreoffice.org/60163 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2018-09-11Use [[nodiscard]] in SAL_WARN_UNUSED_RESULT where availableStephan Bergmann
...which required some lax placements of SAL_WARN_UNUSED_RESULT to be fixed. Also, Clang unfortunately is rather picky about the relative order of SAL_WARN_UNUSED_RESULT expanding to [[nodiscard]] and uses of the DLLPUBLIC macros (expanding to __attribute__(...) resp. __declspec(..) for clang-cl). Change-Id: Iae6ca36bef97f1864873aefdb5f05c7f5e045ad3 Reviewed-on: https://gerrit.libreoffice.org/60274 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-27sal: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann
...by removing explicitly user-provided functions that do the same as their implicitly-defined counterparts, but may prevent implicitly declared copy functions from being defined as non-deleted in the future Change-Id: I4da623b67ef1792f9dd04382dcb0e772d66bdb40 Reviewed-on: https://gerrit.libreoffice.org/58104 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@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-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-05-22Fix typosAndrea Gelmini
Change-Id: Idbe136fbfd222e8baad588dc36a2f9b7ce6996ec Reviewed-on: https://gerrit.libreoffice.org/54590 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2018-03-05Make LibreOffice buildable on Haiku.Kacper Kasper
* Obviously VCL wiring is missing, but most components do build. Change-Id: Ie853ada1423a8f4c2b647be59cd47a7730c42978 Reviewed-on: https://gerrit.libreoffice.org/50293 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-02-22tdf#115383: revert mixup of E_ROFS and E_SPIPE in file.hxxAron Budea
Regression from a9739f2dec197793fa9400dd95be49494dc85264 Change-Id: I1b55b0201888a63bd2439be8c0421f450d609018 Reviewed-on: https://gerrit.libreoffice.org/50103 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Michael Stahl <mstahl@redhat.com>