summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)Author
2017-07-16Avoid crash when rSignal.Handler is SIG_DFL etc.Stephan Bergmann
Change-Id: I20bccf4f6d52986334725cf72909730fcfc5109b
2017-07-13use more OUString::operator== in forms..salNoel Grandin
Change-Id: I70d7e50f8c1e019524ccad915f0cca912c5035dc Reviewed-on: https://gerrit.libreoffice.org/39899 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-13These arguments can apparently never be nullStephan Bergmann
Fixing 7b4f4f15971047664fa278fff96b959d53b272b3 "osl: followup to 7c6ccc42 for w32/unx file.cxx" for good... Change-Id: Icedaaa0b0f909d802dbdcf4fdaa40fd338bcbf11 Reviewed-on: https://gerrit.libreoffice.org/39892 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-12strip some linefeeds from the end of debug outputNoel Grandin
Change-Id: I2821969d86b7f8cee53404e6a0acfbebbe53b3ac Reviewed-on: https://gerrit.libreoffice.org/39824 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11osl: unx file.cxx nullptr testing cleanupChris Sherlock
Change-Id: Id265092c1cbf09f8c29c77c048edbf14f15070eb Reviewed-on: https://gerrit.libreoffice.org/39515 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-07-10simplify some OUString compareTo callsNoel Grandin
to either startsWith or == or != Change-Id: Ie4b4662f5b8e4532cbc1ab36910389e0b3d41ef0 Reviewed-on: https://gerrit.libreoffice.org/39750 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10teach unnecessaryparen loplugin about identifiersNoel Grandin
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10osl: w32/pipe.cxx fPipeAvailable -> bPipeAvailableChris Sherlock
Change-Id: I2e57e9413f98de9a6d240c3c61c85fd7bd435498
2017-07-10osl: followup - m_NamedObject never INVALID_HANDLE_VALUEChris Sherlock
Change-Id: Ia4517b01a39c02619ccae73e4c182ac8d7e6e22c
2017-07-10Followup: m_NamedObject never INVALID_HANDLE_VALUE, must be nullptrChris Sherlock
Change-Id: I6837937945749a0f44e4e50aae1267edb37921d7
2017-07-10osl: CreateMutexW returns NULL on failure, not INVALID_HANDLE_VALUEChris Sherlock
Fun fact - CreateFileW returns INVALID_HANDLE_VALUE (-1_) because the 16-bit functions OPenFile, _lopen and _lcreat return -1, so the Win32 API function CreateFile function also returned INVALID_HANDLE_VALUE to ease porting Win16 code to Win32. CreateMutexW, on the other hand, had no corresponding function in 16-bit Windows so it returns NULL on failure. cf. https://blogs.msdn.microsoft.com/oldnewthing/20040302-00/?p=40443 Raymond Chen is a gem who explains clearly why Win32 code is so idiosyncratic. Change-Id: I7888d46b048e5674ad776c8ac8070a1e57aa37a6
2017-07-08osl: followup to 7c6ccc42 for w32/unx file.cxxChris Sherlock
As pointed out by sberg, either the issue is a programming error that needs an assert, or the issue is unusual and should just generated a warning, but never both. Change-Id: I07ae1e99597cd6c342791aa268b2240db987ae91 Reviewed-on: https://gerrit.libreoffice.org/39514 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-07-07tdf#43157 - osl: convert OSL_ASSERT in unx/file_misc.cxxChris Sherlock
Change-Id: I99e3f1e1fe2f51c6c3891a6e508b468ec068cae0 Reviewed-on: https://gerrit.libreoffice.org/39539 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-07-07osl: unx osl_getDirectoryItem() cleanupChris Sherlock
Whitespacing made consistent in function, and switch to more conventional nullptr testing style. Change-Id: I70921e9f79e8e0ebf4a74b84f73313aed033ec5b Reviewed-on: https://gerrit.libreoffice.org/39538 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-07osl: unx osl_getNextDirectoryItem() cleanupChris Sherlock
I could not easily tell on first reading this function if Directory was a pointer or not (it is), so changed name to pDirectory). The signature was too long, so fixed this, whitespacing was inconsistent so small change there. Also converted to more contentional testing of nullptr. Change-Id: Ia8b1d33a4a4fbe3e050d63116997ef57a28d73b3 Reviewed-on: https://gerrit.libreoffice.org/39537 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-07osl: osl_closeDirectory cleanupChris Sherlock
When I was reading this code, it wasn't entirely clear to me without looking at the typedef of oslDirectory whether I was dealing with a variable or a pointer, so I have changed this to pDirectory. I also made a small tweak to the whitespace to help readability. I also changed from explicit comparison to nullptr to the more conventional style. Change-Id: I4e9a69575733ab71a175d14a30c1976e6771ed5b Reviewed-on: https://gerrit.libreoffice.org/39536 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-07loplugin:unnecessaryparen handle parens inside call exprNoel Grandin
stick to single-arg function calls, sometimes parens in multi-arg calls might be there for clarity Change-Id: Ib80190c571ce65b5d219a88056687042de749e74 Reviewed-on: https://gerrit.libreoffice.org/39676 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07C++11 remove std::binary_function bases from functorsJochen Nitschke
std::binary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::binary_function base class was used by deprecated std::bind2nd, this was solved in individual commits. The members first_argument_type and second_argument_type were used in chart2/source/controller/dialogs/DataBrowserModel.cxx: DataBrowserModel::implColumnLess and are inlined in this commit. Change-Id: I60ded60a8d4afd59e15ac15a58e18d2498c9be5a Reviewed-on: https://gerrit.libreoffice.org/39659 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06use OString::operator== in preference to ::equalsNoel Grandin
Change-Id: Ib291521963a791a9c6175964571e9d9895072acf Reviewed-on: https://gerrit.libreoffice.org/39646 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06tdf#43157 - osl: convert OSL_ASSERT in unx & w32 tempfile.cxxChris Sherlock
Change-Id: I243a5dc4061844af95eae83347ddb15ea7134c0c Reviewed-on: https://gerrit.libreoffice.org/39542 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-07-06teach unnecessaryparen plugin about other kinds of statementsNoel Grandin
i.e. do / while / switch Change-Id: Id0985015cc425557f9984734701d56466f8a6088 Reviewed-on: https://gerrit.libreoffice.org/39601 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06loplugin unnecessaryparan improvementsNoel Grandin
Change-Id: I73e945d6ec53537a0da45f6b6291018c7f251a7e Reviewed-on: https://gerrit.libreoffice.org/39587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05tdf#59424 unset open flag O_EXCL if O_CREAT is not setTomaž Vajngerl
If O_EXCL is set and O_CREAT is not, then the behaviour is undefined. See open(3) man page. Change-Id: If61aaf0a0e46babae7df7e17ffbdcb4c81ab6a3c Reviewed-on: https://gerrit.libreoffice.org/38978 Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2017-07-05new loplugin unnecessaryparenNoel Grandin
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05loplugin:casttovoid (clang-cl): salStephan Bergmann
Change-Id: I03e22f73404e1e52761bce1757b224cf6368bd61
2017-07-03loplugin:oncevar (clang-cl): salStephan Bergmann
Change-Id: Ib43dd6f8c96274d251bbf5935888789964ba3f9b
2017-07-03Rather translate "Sonderzeichen" as "special characters"Stephan Bergmann
...as had been done in sal/textenc/tcvtlat1.tab, in 5034e8217c9844293dc94e5dff0bdc865ad7a91a "Translate German comments and debug strings (leftovers in dirs sal to sc)". What those comments actually want to say is that, despite being the ASCII control character region, those encodings contain some graphic characters there. Change-Id: Iefad9c45341891c3e91e6b9fb265d3070d1220ad
2017-07-03C++11 remove std::unary_function bases from functorsJochen Nitschke
std::unary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::unary_function base class was used in 3 places: * chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole is used in a std::not1 function helper who uses the members return_type and argument_type. - replace deprecated std::not1 with a lambda * chart2/source/tools/ModifyListenerHelper.cxx: lcl_weakReferenceToSame used the argument_type member in the operator() parameter. - inline the parameter type. * xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement used result_type and argument_type in operator(). - inline the types Also fix compile error with gcc about finding std::for_each. Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f Reviewed-on: https://gerrit.libreoffice.org/39358 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-03Translate German comments and debug strings (leftovers in dirs sal to sc)Johnny_M
Translates leftovers found using a custom regex and manually checking the rest of the affected file. Additionally: - A few spelling fixes Change-Id: I2b83bd11adf520b90bb29c8ea624990759dad3c6 Reviewed-on: https://gerrit.libreoffice.org/39427 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-07-02loplugin:casttovoid: salStephan Bergmann
Change-Id: I70cf54799f08e3bc586d42d6c634eb02a049ea0f
2017-06-27-Werror=catch-value= (GCC 8)Stephan Bergmann
("error: catching polymorphic type ‘class std::length_error’ by value") Change-Id: I56398642709f5f14c17b0b2928ae06d8fea0a13b
2017-06-26s/catched/caughtNoel Grandin
Change-Id: I7ea6977a9749e86f8058b78cdb91cd2c62da8264 Reviewed-on: https://gerrit.libreoffice.org/39164 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-26loplugin:oncevar in oox..saxNoel Grandin
Change-Id: I0fee8bcddaeea48335e3be05761d2ad2c45020e2 Reviewed-on: https://gerrit.libreoffice.org/39238 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-26osl: w32/pipe.cxx typo should have been caught, not cachedChris Sherlock
Change-Id: Iacdf76eec11aedc8a3308897edfda400790bdc19 Reviewed-on: https://gerrit.libreoffice.org/39245 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-25osl: socket.cxx nullptr comparison cleanupsChris Sherlock
Change-Id: Ie0339482bf3a9b108e26008526bc5e73b761d27b Reviewed-on: https://gerrit.libreoffice.org/39223 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-25osl: for should be a whileChris Sherlock
Change-Id: Id4e92f0c7927bbc767061461361936dbad8da778 Reviewed-on: https://gerrit.libreoffice.org/39204 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-25osl: test condition fixes in unx/file.cxxChris Sherlock
Change-Id: I8debaa590c570ea7a6447668b053a2d4c507edf0 Reviewed-on: https://gerrit.libreoffice.org/39203 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-25osl: whitespace cleanup of unx/file.cxxChris Sherlock
Change-Id: I10c9a8d1474920afb7f6afc4d7d34172c398ab4d Reviewed-on: https://gerrit.libreoffice.org/39201 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-25osl: doxygen comments in unx/file.cxxChris Sherlock
Change-Id: I26d8b665e8940fd3821d29ced0046c2d1dd5a59c Reviewed-on: https://gerrit.libreoffice.org/39200 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-25osl: cleanup headers of unx/file.cxxChris Sherlock
Change-Id: Ic1d171cf11cf36058f6d1f40c9ca041012e1b0e1 Reviewed-on: https://gerrit.libreoffice.org/39198 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-25tdf#43157 - osl: convert OSL_PRECONDs in w32 & unx file.cxxChris Sherlock
Change-Id: Ic914d9240e6b06b7e6550fe311fd69e310254bd5 Reviewed-on: https://gerrit.libreoffice.org/39197 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-25osl: remove unneeded comment in unx/file.cxxChris Sherlock
Change-Id: If2e4c06a1d083f82ab531a15ae0bd983f7a5586e Reviewed-on: https://gerrit.libreoffice.org/39199 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-25osl: remove comment cruft from pipe.cxx on win32 and unxChris Sherlock
Change-Id: I774497c07f682a3923a6317af5804e477540995c Reviewed-on: https://gerrit.libreoffice.org/39225 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-06-25osl: whitespace cleanup of pipe.cxx for unx and w32Chris Sherlock
Change-Id: I9c8933616d36027314c990301e67a54c567429b5 Reviewed-on: https://gerrit.libreoffice.org/39222 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-06-23osl: w32/file.cxx cleanup signatures of definitionsChris Sherlock
Change-Id: Ic704e71258c5b8a3dc018862afd1aab1bdb5ab84 Reviewed-on: https://gerrit.libreoffice.org/39146 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23osl: w32/file.cxx normalized LHS/RHS if conditionsChris Sherlock
Change-Id: I6fa3a5153ede3ed6cbe8cd4e8d6eb1dba4ea4a56 Reviewed-on: https://gerrit.libreoffice.org/39145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23osl: w32/file.cxx remove extraneous space from around bracesChris Sherlock
Change-Id: I6a397dd09e2bdcf62e7a24f4edf8faaf35b49657 Reviewed-on: https://gerrit.libreoffice.org/39144 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23osl: w32/file.cxx update commentsChris Sherlock
Change-Id: I837db449b4e1eb16580bbfd57647f6372b43e4d8 Reviewed-on: https://gerrit.libreoffice.org/39143 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23osl: w32/file.cxx update headersChris Sherlock
Change-Id: Ie5f9bb56afc00d1de7285008d9f99308b2673f25 Reviewed-on: https://gerrit.libreoffice.org/39142 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23osl: getpagesize() uses sysconf(_SC_PAGESIZE) on all BSDsChris Sherlock
OpenBSD, FreeBSD, OS X, NetBSD and DragonflyBSD all now use POSIX sysconf, so there isn't any need to use the BSD getpagesize() anymore. Looking at the FreeBSD source in their VCS, it appears it sysconf support for _SC_PAGESIZE was introduced in the following commit on March 4, 1998: https://svnweb.freebsd.org/base/head/lib/libc/gen/sysconf.c?r1=12674&r2=34030 The man page for sysconf(3) says it has been available since BSD4.4 And it looks like OSX has supported this at least as far back as 10.6.2. Change-Id: Id8c188c00a8d87dbd8056635b5bf7f5940508ab1 Reviewed-on: https://gerrit.libreoffice.org/39120 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>