summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)Author
2016-09-29tdf#83306: sal: fix compare of rtl::OUString/OString containing '\0'Michael Stahl
For whatever reason oox shape import code uses OUStrings that contain '\0' characters. The rtl_uString / rtl_String are allowed to contain '\0' but the strncmp/wcsncmp functions stop comparing on the first '\0', so use memcmp/wmemcmp instead. (regression from 281989007fd7dea997ed9a65f513f80b1aff67dd) Change-Id: If148927f19d065a21f32f3c14433b0bda7ae9301 Reviewed-on: https://gerrit.libreoffice.org/29384 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-09-26sal: Mac OS X 10.8 fails test_log1pMichael Stahl
... because its libc log1p() does not return -0.0 unmodified but as +0.0 Change-Id: Ib3fcd005a9876e0e74775bf4f826a887cdd29279 Reviewed-on: https://gerrit.libreoffice.org/29237 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2016-09-23-Werror,-Wunused-variable (clang-cl)Stephan Bergmann
Change-Id: I829e2d45ac9fabc8fe1a26bebd9e6ce8c2af29c7
2016-09-23This is fixed with MSVC 2015Stephan Bergmann
Change-Id: I032b872f75b59904c1c81e8932ad8058ece301b0
2016-09-20CPPUNIT_ASSERT_EQUAL disambiguationStephan Bergmann
Change-Id: I31d30627badb08469f7e0fd3ded957df78b58275
2016-09-20Related cid#1371289: Work around missing OUStringBuffer move semanticsStephan Bergmann
...by adding more assign op overloads instead Change-Id: I2d2e1b7f19d1b57528707ed5a5cce94b5fa5c2d0
2016-09-18loplugin:unusedenumvaluesNoel Grandin
Change-Id: Icf17f936ce6d07d0e152252833c8645cf9b1163b Reviewed-on: https://gerrit.libreoffice.org/28942 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-15Remove outdated commentTor Lillqvist
Change-Id: I8547760d4ea24205e21f215f25f0c58757bd9329
2016-09-15loplugin:singlevalfields in l10ntools..saxNoel Grandin
and ignore URE headers in the plugin Change-Id: I939df744c1173cf0f67d515f6c3fb4ac4cb25588
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-12Bin some noise comments and superfluous vertical whitespaceTor Lillqvist
Change-Id: I3c19457bb29cd1392f14598fc8798aed4b1a1a7f
2016-09-02Fix MSVC 2015 buildStephan Bergmann
...which has HAVE_CXX11_UTF16_STRING_LITERAL but cannot use chart16_t string literals with ConstCharArrayDetector (which uses sal_Unicode) as long as sal_Unicode is still wchar_t instead of char16_t for MSVC. Change-Id: I7c55e0361d1c8c717467d5ab6c942bce3569f3a7
2016-08-30Let OUStringLiteral1 take its arg as ctor arg, not template argStephan Bergmann
...which makes it more flexible, can now also be used on non-const arguments. The drawback of the argument no longer being a compile-time constant is remedied by making the ctor constexpr. Change-Id: Ia4903a2cc86791fece92eac0cb8406b6659dd19d
2016-08-29Make OUStringLiteral1 a wrapper around UTF-16 instead of just ASCIIStephan Bergmann
...not merely an ASCII character Change-Id: Id2b381b35fe3a15574728ed973d60263dfef7249 Reviewed-on: https://gerrit.libreoffice.org/28446 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-08-29Support ConstCharArrayDetector also for UTF-16 arraysStephan Bergmann
The long-term benefit will be support of C++11 char16_t string literals (for cases of string literals with non-ASCII content) once we drop any compilers that don't support those yet. The short-term benefit is support for an improved OUStringLiteral1 that accepts any sal_Unicode value, not just ASCII ones (see next commit). Change-Id: I3f8f6697d7eb62b5176b7e812b5a5113c53b83a4 Reviewed-on: https://gerrit.libreoffice.org/28445 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-08-29OUString construction from OUStringLiteral1 must not be overruled by...Stephan Bergmann
...Except[Const]CharArrayDetector, under RTL_STRING_UNITTEST Change-Id: Ib185fb8406c4afcff1c854a2b74dae02a0ee2b3f Reviewed-on: https://gerrit.libreoffice.org/28444 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-08-19coverity#1371449 Uninitialized scalar fieldCaolán McNamara
Change-Id: I9e43b01f40cc325b83d23903fcec9010f848fb28
2016-08-18Fix sal log for 32 bit Linux buildGiuseppe Castagno
Change-Id: I2644079cafa46db8689463e1d0abc1cf3bdf49de Reviewed-on: https://gerrit.libreoffice.org/28222 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2016-08-18Move comment block back where it wasTor Lillqvist
Change-Id: I020c1def83d7cc37f9d5e14f2fefacb31a56bbbf
2016-08-18If no WARN in SAL_LOG, use the INFO selection for WARNs, tooTor Lillqvist
Often the choice whether some particular message is displayed with SAL_INFO or SAL_WARN has not necessarily been that well thought through. Many SAL_WARNs are not actually warnings but purely informative. If you want to see the INFOs for an area it makes sense to want to see also the WARNs for it. So make it so, unless a specific WARN selection is specified. Change-Id: I6286c5f856b29e68bedb7f20efadf56953f94b72
2016-08-18Add handling of a +RELATIVETIMER flag in the SAL_LOG environment variableTor Lillqvist
Outputs a timestamp in decimal seconds (with millisecond accuracy). Simplified the handling of SAL_LOG if no "level" is specified. Now just a totally unset (or empty) SAL_LOG causes the default of "+WARN" to be used. Given how the code works, it would have become too unwieldy to check for all combinations of TIMESTAMP and RELATIVETIMER but no WARN or INFO. Change-Id: I7bb5bb665d4e764e7eee447e93486f6467042e97
2016-08-18No need for nested unnamed namespacesTor Lillqvist
Change-Id: I586c11d4fe61b56624ee158c04e365cfb0cc4012
2016-08-18Add handling of a +TIMESTAMP flag in the SAL_LOG environment variableTor Lillqvist
Change-Id: I9bdcd8b2d7b46a087d7f5461b6f7c3d9f02ec084
2016-08-16new loplugin to check for static OUStringsNoel Grandin
that are better declared as OUStringLiteral Change-Id: Ifb5d9a12bb31a68641940bec16971a8181a46567 Reviewed-on: https://gerrit.libreoffice.org/27377 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-05loplugin:countusersofdefaultparams in oox..sdNoel Grandin
Change-Id: I4504939a3957606979c6ac36af6611e1fe072d01 Reviewed-on: https://gerrit.libreoffice.org/27902 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27improve passstuffbyref return analysisNoel Grandin
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-19clang-tidy performance-unnecessary-value-param in salStephan Bergmann
Change-Id: I2931871fc80f52b79d070961a3709117d0a8fd3a
2016-07-15new loplugin unnecessary overrideNoel Grandin
Change-Id: I88d3e33823d68745b98625050a8a274f9ef04bcb Reviewed-on: https://gerrit.libreoffice.org/27135 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-13Remove __cplusplus-checks from apparently-C++-only filesStephan Bergmann
Change-Id: I87e9ce45cf945e75e8140a9d4608da8abcddada6 Reviewed-on: https://gerrit.libreoffice.org/27187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-13sal: fix remaining loplugin:cppunitassertequals warningsMiklos Vajna
Change-Id: I9f9b647ed73e06a5e926eff8f95dda92fec134c0 Reviewed-on: https://gerrit.libreoffice.org/27177 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-11loplugin:salbool: Better heuristic to determine code shared between C and C++Stephan Bergmann
Change-Id: I09c9c57d5adeb665cc2508fad9727085a3289bfb
2016-07-08loplugin:redundantcast: redundant static_casts in salStephan Bergmann
Change-Id: I2641f16530ec7f1087c217a74aeb39b5c3a8aba5
2016-07-08CppunitTest_sal_rtl_ostring: fix loplugin:cppunitassertequals warningsMiklos Vajna
Change-Id: Ie5168b9844dadd042bcbd825e8f48030ac1ef91c Reviewed-on: https://gerrit.libreoffice.org/27032 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-06Silence loplugin:staticmethods under --disable-debugStephan Bergmann
...after 0d3f9667bbc7b1a22d33dc92a2028fc712495a8e "AllocatorTraits::size can be static after all" Change-Id: I7fb2558c322dd7d92f3a3bda9a93a1b3da575d2e
2016-07-05Clarify calculation precedence tdf#39440Muhammet Kara
Use parentheses to clarify the code. Change-Id: I864dc6dacadb5b9ba9dca8e0abd9fa4e6db1eddc Reviewed-on: https://gerrit.libreoffice.org/25677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-07-01cppunittester: always print execution time of each testMichael Stahl
Not much point in disabling this by default, nobody but the author will find it. Change-Id: I637b214644d2cc7bc70b8bca4f214955355ea951
2016-07-01CppunitTest_sal_rtl_ostringbuffer: fix loplugin:cppunitassertequals warningsMiklos Vajna
Change-Id: I1b7710556f179f35694c05e209854bbcb152041f Reviewed-on: https://gerrit.libreoffice.org/26842 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-29move #includes to top of fileNoel Grandin
instead of being randomly embedded somewhere deep inside the CXX code. Found with: git grep -nP '^#include' -- *.cxx | sort -g -k 2 -t : Change-Id: I9ee432d3b665ecb6ec600bd51cc4b735a1b1127a Reviewed-on: https://gerrit.libreoffice.org/26764 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-06-28AllocatorTraits::size can be static after allStephan Bergmann
Change-Id: If9ce8a094af878497e980cdcfaf11604d613e5b8
2016-06-27unit tests for stringToDouble() separator without digitsEike Rathke
Change-Id: I85cfe8123a6ef1c3a1aa1b1085e2961055dfa907
2016-06-27stringToDouble() do not parse separator without digit as 0.0Eike Rathke
Occurred in CSV import without "detect special numbers" activated for data like ,., where the . dot resulted in a numeric cell value 0 Change-Id: Ie715d7a8ed02196b59968a92919ad286b3bedf64
2016-06-27comfort the unhappy compilerEike Rathke
Change-Id: I376040a22b17037893704afbce2b651f8cf2c074
2016-06-27stringToDouble() fix broken reverse logic for NaN and INFEike Rathke
... and do not test up to three characters if the string is shorter.. Change-Id: I52b74cbde10c14c991cc8c68760c87c1e08ab7e4
2016-06-24clang-analyzer-deadcode.DeadStoresStephan Bergmann
Change-Id: Idb7996e9063955dbb8126243670bdc30bd8dd97a
2016-06-24CppunitTest_sal_rtl_digest: fix loplugin:cppunitassertequals warningsMiklos Vajna
Change-Id: Ic23ba93667f5de4b2cdb7868f9e3fc8cf8bacbd3 Reviewed-on: https://gerrit.libreoffice.org/26626 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-23tdf#99589 - tolower / toupper - dangerous to Turks ...Gökhan Gurbetoğlu
Change-Id: I8b0fe9354232a7b60f3605fa6f90f6741f7bf683 Reviewed-on: https://gerrit.libreoffice.org/26537 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-20switch to EHs on windowsMarkus Mohrhard
This seems to be a good idea based on several discussions in the project. In the end catching SEH exceptions is just going to cause strange platform dependent bahavior. This patch is based on on http://thread.gmane.org/gmane.comp.documentfoundation.libreoffice.scm/39102/focus=55516 and includes some additional cleanup of the sal signal code. Change-Id: Iedc998e37e6495afec445eccb60fa1c2b1a7defd Reviewed-on: https://gerrit.libreoffice.org/26497 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-06-19loplugin:salbool: Implicit conversions from non-Boolean fundamental typesStephan Bergmann
Change-Id: I67eac95686678e6f5a2d60798535b2c65a9ba5d7
2016-06-18move the code for tdf#99410 to the sal init windows codeMarkus Mohrhard
Change-Id: I4ead30fa1736a3a99fb3379e89367934c8df2809 Reviewed-on: https://gerrit.libreoffice.org/26444 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-17Revert "fdo#38913: Prevent invalid parameter handler crashes"Stephan Bergmann
This reverts commit a82e532ce006c54b2740de74d1da5d11307da7c1. That hack should no longer be necessary now that the root cause for tdf#38913 has probably been found and fixed with b5876bfcb69a65c87d602bae687b3c0634c0a1e7 "passing a NULL pointer to fileno is not allowed". Conflicts: sal/osl/w32/salinit.cxx Change-Id: Id3a3d3163945acc9b5d5e74a8d357dfa2ce63f37 Reviewed-on: https://gerrit.libreoffice.org/26411 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>