summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)Author
2016-03-08tdf#97703 Removed empty setUp/tearDown methodsChirag Manwani
Change-Id: Ia62de30ae94bdae87cd5109c44eab40af4d020e5 Reviewed-on: https://gerrit.libreoffice.org/22985 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-08tdf#98407 PathSubstitution: Add substitution for $(username)Samuel Mehrbrodt
This allows to use the username as a placeholder in the config paths (Autotext, Gallery, etc) Change-Id: I76434e980cd8ec8785a5587d0bc5fdd67dc42de2 Reviewed-on: https://gerrit.libreoffice.org/22901 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-07sal: UNX: in oslDoCopy, rename into destination directory ...Michael Stahl
... not into the source one as that will likely fail with EXDEV if source and target are on different mounts => osl_File_E_EXIST. This broke the xmlsecurity test SigningTest::testOOXMLAppend(). Change-Id: I07ada1d5564fd72a059d588e127a5906a499aca4
2016-03-07tdf#97703 removed empty setUp/tearDown methodsChirag Manwani
Change-Id: I244d481bce4723d172e26c0d31aab0a541334604 Reviewed-on: https://gerrit.libreoffice.org/22959 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-04Work around -Werror,-Wunused-macros with clang-clStephan Bergmann
clang-cl as-is does not provide the intrinsics provided by MSVC; you need to explicitly include Intrin.h (provided by clang) for that. So, as a hack, specify CC/CXX as clang-cl.exe -FIIntrin.h ... to have the intrinsics always available. But Intrin.h includes stdlib.h, so by the time sal/osl/w32/random.c defines _CRT_RAND_S before including stdlib.h, the latter has already been included without _CRT_RAND_S support. So, as a second hack, specify CC rather as clang-cl.exe -D_CRT_RAND_S= -FIIntrin.h ... But then clang-cl starts to emit -Werror,-Wunused-macros, as defining _CRT_RAND_S in the main file has no effect here. Change-Id: I5dfe9872dea7e8eb476d9260f17ab8d8893f48af
2016-03-04Use existing "sal.osl" log areaStephan Bergmann
Change-Id: I7d48c1543b0d3239c8e646ca0765421f933cfecc
2016-03-04Probably better to not disable this cache in all debug modesStephan Bergmann
(f59136a2ed1e3eb01cc5b62c5a7da07c34cbdfae "tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals" had changed it from OSL_DEBUG_LEVEL > 1 to > 0) Change-Id: I40714993fb55ec27b80d225cec28c64f2959ab73
2016-03-04Spurious spacesStephan Bergmann
Change-Id: I60bb1e303f7a26b4324cccf2858258a375b53f34
2016-03-04This is test code, OK to unconditionally print to stdoutStephan Bergmann
...and where appropriate use CPPUNIT_ASSERT_EQUAL to have no need to always print out certain values Change-Id: Iad2ccb235b09852fffd3f010cf069c45b36e2d4b
2016-03-04This is test code, OK to unconditionally print to stdoutStephan Bergmann
Change-Id: I419aba8728b3a65fca69c82a4f950daaf4815187
2016-03-04Remove write-only g_nSocket* debug varsStephan Bergmann
Change-Id: Ie8a1d015242450094928863013030b4cb0bb1f4e
2016-03-04Clean up a SAL_WARN_IFStephan Bergmann
Change-Id: I8a945f3e83559f421aa1a0b4fbfcec1b25932ef7
2016-03-04-Werror,-Wunused-macrosStephan Bergmann
Change-Id: I5402d52ec42fa27c58b276eeb22eeb270c3d7948
2016-03-03tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionalsRohan Kumar
Change-Id: If329cf8257684e7bd2936641b8f14ec3e9b9f733 Reviewed-on: https://gerrit.libreoffice.org/22647 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-03-03sal: replace boost::bind with C++11 lambdasMichael Stahl
Change-Id: If8e16b7805b5b25dafe053e35cd98079abbea83c
2016-03-02tdf#98210 do not require R_OK for pipe dirHank Leininger
Also better error handling if pipe dirs are really not usable. Change-Id: I1c865b9a9f1f08d2cffd07343494feca585ec75e Reviewed-on: https://gerrit.libreoffice.org/22727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-02-23new loplugin: commaoperatorNoel Grandin
Change-Id: I03f24e61f696b7619855e3c7010aa0d874e5a4ff
2016-02-21WaE vs2015: pointer to int castingNorbert Thiebaud
Change-Id: I3be393ef5a9d1ed732f44037cd1115960a6186d2 Reviewed-on: https://gerrit.libreoffice.org/22592 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2016-02-21WaE vs2015: int to pointer castingNorbert Thiebaud
Change-Id: I201e4b44e2a26ff0566f30c7e7c12c0df90a54e6 Reviewed-on: https://gerrit.libreoffice.org/22591 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2016-02-19tdf#97703 Removed a few redundant calls to setUp and tearDownJaskaran
Calls to CppUnit::TextFixture::setUp and CppUnit::TextFixture::tearDown have been removed. I hope that saves a few milliseconds of build time :) Change-Id: I611db2f5c5673ab86bf8f92beb4f6e8a70443b34 Reviewed-on: https://gerrit.libreoffice.org/22496 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-18coverity#1352316 Explicit null dereferencedCaolán McNamara
Change-Id: Ieb80209e0254080bf78fb3b5201b849d7d30880c
2016-02-17use consistent #define checks for the Windows platformNoel Grandin
stage 2 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro In this stage we focus on replacing usage of the WIN macro Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84 Reviewed-on: https://gerrit.libreoffice.org/22393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-16use consistent #define checks for the Windows platformNoel Grandin
stage 1 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro Change-Id: Iece73abdee530937e0737190b1aa97a46cd3075f Reviewed-on: https://gerrit.libreoffice.org/22390 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-16coverity#1352448 Use of untrusted scalar valueCaolán McNamara
and coverity#1352449 Use of untrusted scalar value I suspect this will fix the warning, given that "Casting narrower unsigned pBuffer[i] to wider signed type short effectively tests its lower bound", so if we pass it though as-is we probably quieten these Change-Id: I2ece08f7301f5d548d905d221e5a6af0da51a2bb
2016-02-15Rename rtl::isValidCodePoint -> rtl::isUnicodeCodePointStephan Bergmann
...and fix its documentation, and use it throughout the code base. Change-Id: I349bc2009b1b0aa7115ea90bc6ecd0a812f63698
2016-02-11Avoid duplicate declarationTor Lillqvist
The same extern declaration is already in alloc_impl.hxx which the source file includes earlier. Change-Id: Idacadc8cf938d88892c99b1af3723c52fcae5298
2016-02-10loplugin:nullptr, loplugin:overrideStephan Bergmann
Change-Id: If4500b8b41915a05a2bfb2c776259f49ad9bfc85
2016-02-10Add existing CppUnit test for sal/rtl/randomChristoph Brill
The tests itself already existed, we were just missing the .mk file Change-Id: I662eba5d955aa5cbd774dbb3b4c9f9010dc1d7d6 Reviewed-on: https://gerrit.libreoffice.org/22249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-02-08cppcheck: noExplicitConstructorCaolán McNamara
Change-Id: I74585aa5a50cd335f4fd0a3ba4fed230b98993c3
2016-02-07Platforms that need CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT for sockets usuallyDamjan Jovanovic
need it for pipes too, and even if it isn't necessary it can't hurt. In particular, on FreeBSD 11-CURRENT it seems pipes no longer wake up from accept when closed in other threads, so let's deal with that before FreeBSD 11 is released. Reported by: Matthias Apitz <g u r u a t u n i x a r e a d o t d e> Patch by: me Tested by: Matthias Apitz <g u r u a t u n i x a r e a d o t d e> (cherry picked from commit e18ecd4f644cfbe5d6b871c7ff6c76bd5c220504) Change-Id: I1b4c0438fbcc2ea53625f235906936fc1403e195
2016-02-05cppcheck-suppress sizeofwithsilentarraypointerCaolán McNamara
Change-Id: I794cb2f3f31e9ce48f3568bd5a4afc52abf0f934 Reviewed-on: https://gerrit.libreoffice.org/22160 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-01-26fix the new CPPUNIT_TEST_NAME codeMarkus Mohrhard
Change-Id: I45260555778a733a8c8ba9e39e9ffcce0c9ab78d Reviewed-on: https://gerrit.libreoffice.org/21818 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-01-26support unnamed namespaces with CPPUNIT_TEST_NAMEMarkus Mohrhard
Change-Id: I1ce50ce0ce8a4a461d1b2a34de132cbf57dd7d25 Reviewed-on: https://gerrit.libreoffice.org/21802 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-01-26Bin leftover cruftTor Lillqvist
Change-Id: I15a4237a1ab6d7c180b52c3f8d2834c0e034b7db
2016-01-20drop obsolete cruftDavid Tardon
Change-Id: Ia9b9431252c010d910ed0e9461398651de1de260
2016-01-19loplugin:unusedmethods in sc/Noel Grandin
Change-Id: I2c24d06d9fad26c65fa13cdcaa2c3f908971106c
2016-01-18loplugin: unused return valuesNoel Grandin
Change-Id: I9c61a46c57894bc63a57740206c0bcb4a16553af Reviewed-on: https://gerrit.libreoffice.org/21571 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-18Trade a little weaker test against loplugin:stringconstantStephan Bergmann
(what prompted writing that very fundamental test now anyway?) Change-Id: I83884908f8f5b1e4d58575960c77b411183f2fbb
2016-01-16sal: (rtl) test OUString::isEmpty()Chris Sherlock
Change-Id: If7a6eb598a1e121c1c74e520f7e2238016a3e6e0 Reviewed-on: https://gerrit.libreoffice.org/21506 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-14use ::std::swap() to reverse bufferEike Rathke
Change-Id: I7e18e57636416f0a3ed96c2fa3adc004fb3ba013
2016-01-14use getN10Exp(x) instead of pow(10.0,x)Eike Rathke
Change-Id: Ib7e49126cbffc510fa941c25a8d57222bad51c46
2016-01-14unit test for negative decimal places rounding, tdf#96918 relatedEike Rathke
Change-Id: Ib2f3ffaa7c4216b66479c750465c2beab927405a
2016-01-14handle negative decimal places for rounding, tdf#96918 relatedEike Rathke
Change-Id: Ifa423eabc64ead519c4f4a3370a06e88ea5c7466
2016-01-13Keep MSVC happyStephan Bergmann
(warning C4305 when converting 9007199254740993 from __int64 to double) Change-Id: I0e2b92a01ba5ae1824d609ee2e557f1a1cc85cbd
2016-01-13loplugin:defaultparamsStephan Bergmann
Change-Id: I507a16e1d87460dead79b78621202c68ee12c2c8
2016-01-13sal: as always C++ is too stupid to deduce parameter types of minMichael Stahl
Change-Id: Ib00f29a6024e22c65a30bf4a45332e550994f03f
2016-01-13unit test for tdf#96918 display accurate integer double valuesEike Rathke
Change-Id: I619e0cb0fbbfd0dfba3b2fe9c3476be55a3eea8e
2016-01-13tdf#96918 display accurate integer double values up to (2^53)-1Eike Rathke
Change-Id: I42001583c72bc3faab94489a4eabfa183cab5ae2
2016-01-13sal: avoid " at:\n" at the end of SAL_DEBUG() messagesMiklos Vajna
This reverts one hunk of commit c995196ff0e9f7041b03fc513d703d6e60b8c867 (Fixup SAL_DEBUG_TRACE macro., 2016-01-12). Change-Id: Icbf611c4aaa909b8c495bed1280fad73ba876e8c
2016-01-12Fixup SAL_DEBUG_TRACE macro.Michael Meeks
Change-Id: I276ce9a356086001c208902ba94641863c2f2fdb Reviewed-on: https://gerrit.libreoffice.org/21408 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>