summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)Author
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>
2017-06-23loplugin:unusedfields in registry..saxNoel Grandin
Change-Id: Ie0e2ecaadb49273cb4e78bc894111523940e7c8e Reviewed-on: https://gerrit.libreoffice.org/39098 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-20fix android buildNoel Grandin
after commit 05f67637fc4f71750dda46fccf0bed5b3fd99233 "new cannot return nullptr" Change-Id: I53902e0b4cf93435be498db673111619d11b00fa
2017-06-20new cannot return nullptrNoel Grandin
unless we are using std::nothrow Change-Id: I3bdd13c8ce18f4e977f18ee5196311bf4fc62de0 Reviewed-on: https://gerrit.libreoffice.org/38998 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-19Remove questionable assertsStephan Bergmann
Both osl_add/removeSignalHandler apparently handle !handler gracefully (the former even including explicit code for that case, which doesn't fit with having an assert), and before bca760c294c256fcb1fd3649dbf50f61a4bda474 "tdf#43157 - osl: convert OSL_ASSERTs to assert in signalshared.cxx" those asserts were merely OSL_ASSERTs. So keep this published API accepting !handler (even if the documentation is silent on this). Change-Id: I63512916a66a2a58b932174ec5d92ce612c236a2
2017-06-18Fix TBJulien Nabet
Include cassert and fix assert logical, we do want to have an handler here. Following https://cgit.freedesktop.org/libreoffice/core/commit/?id=bca760c294c256fcb1fd3649dbf50f61a4bda474 Change-Id: I5ec7c399469a5674f0bc455fc3233c3421cc491f Reviewed-on: https://gerrit.libreoffice.org/38933 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-18tdf#43157 - osl: convert OSL_ASSERTs to assert in signalshared.cxxChris Sherlock
Change-Id: I690ea82e41bb3e632909193550009721360a9f76 Reviewed-on: https://gerrit.libreoffice.org/38697 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-06-18remove unused osl/mutex.hxx includesJochen Nitschke
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb Reviewed-on: https://gerrit.libreoffice.org/38905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-16osl: signalshared.cxx no longer uses pVar (!=|==) nullptr expressionsChris Sherlock
Change-Id: I789051e4721cf9f0af13e1fdb128953c8ba2521e Reviewed-on: https://gerrit.libreoffice.org/38696 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-06-16Remove a bunch of comment cruft - esp. "the end." bitsChris Sherlock
Change-Id: I5a339a4211ec8eb547459996be69610b9f2b3766 Reviewed-on: https://gerrit.libreoffice.org/38147 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-06-14use default handler for SIGALRM for fuzzersCaolán McNamara
https://github.com/google/oss-fuzz/issues/671 Change-Id: Ic22f279fa8ef477540afdfa06a22138c9e3a8270 Reviewed-on: https://gerrit.libreoffice.org/38793 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-14use more SAL_N_ELEMENTS part 2Noel Grandin
Change-Id: If00e371c3cd3ae616309a172c875faed016e391b Reviewed-on: https://gerrit.libreoffice.org/38773 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-09clang-tidy readability-non-const-parameterNoel Grandin
Change-Id: I7b2680898dbfc49185fb949349d81f4ac615a470 Reviewed-on: https://gerrit.libreoffice.org/38593 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-08Avoid -fsanitize=signed-integer-overflowStephan Bergmann
...in recently introduced basic/qa/basic_coverage/test_string_overflow_safe.vb in CppunitTest_basic_macros Change-Id: Ib33272afa26e90729617cb86ae979c0b35b45f62
2017-06-07tdf#108039: check for nullptr in rtl_uString and OUStringMike Kaganski
rtl_[u]String_newConcat now checks allocation result to return early and avoid SIGSEGV. Other functions are not modified, to keep old behavior relying on allocation success and crashing early on OOM to avoid added overhead in performance-critical places. OUString operator+= now checks rtl_uString_newConcat result and throws std::bad_alloc on failure, to specifically address BASIC problem. It keeps strong exception guarantee of leaving this' state unaltered. Concatenation in BASIC now checks for bad string allocation (previously SIGSEGV was generated). Unit test included. Change-Id: I1513311d3d58eac43b2d2ec9a230e22dff0b4245 Reviewed-on: https://gerrit.libreoffice.org/37965 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-06-07sal: use thread safe local static in getInternMutexJochen Nitschke
Change-Id: Iac7ca87e05228f3a2a187646496869a8b1bff602 Reviewed-on: https://gerrit.libreoffice.org/38436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-06add COVERITY_NOEXCEPT_FALSECaolán McNamara
to markup dtors that coverity warns might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: I32b94814e8245372e1d1dc36be0d81e3564042f4 Reviewed-on: https://gerrit.libreoffice.org/38318 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-31clang-tidy readability-redundant-control-flowNoel Grandin
Change-Id: I832f7ef0f1bd55e365db7e49823fe8bc30390c04 Reviewed-on: https://gerrit.libreoffice.org/38215 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-30sal,external: remove checks for obsolete VCVER=120Michael Stahl
Change-Id: I4d32b7c4b2e545a8d979bc516f64cfcbf66ecd07
2017-05-30sal,sd: remove deprecated Windows XP socket codeMichael Stahl
Change-Id: I220911496ed2734224b1eb96a929ec8d8bf2a3ef
2017-05-30Make loplugin:redundantcast accept bool(FD_ISSET(...)) againStephan Bergmann
Change-Id: I4e96c55c246cf806f17df31844a00d0e8a5e4f56
2017-05-30teach redundantcast plugin about functional castsNoel Grandin
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0 Reviewed-on: https://gerrit.libreoffice.org/37910 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-29osl: qa test of %2F - for file URIs this is invalidChris Sherlock
Change-Id: I3871355bb4556b408504ab70194885a2084ad80b Reviewed-on: https://gerrit.libreoffice.org/37859 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-05-29remove some unnecessary OString constructor callsNoel Grandin
Change-Id: I11358f17770cacb2a33011797f4be82dc02340b7 Reviewed-on: https://gerrit.libreoffice.org/38130 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-27osl: remove LLA sigs, fix typos and convert to Doxygen commentChris Sherlock
Change-Id: I07311894c25a906d0f3d64f39684851c7b23d672 Reviewed-on: https://gerrit.libreoffice.org/37872 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-27osl: convert to variable == value, not value == variableChris Sherlock
Change-Id: I20e68c135f43d03cf6035eda488c85a2067910e0 Reviewed-on: https://gerrit.libreoffice.org/37864 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>