summaryrefslogtreecommitdiff
path: root/sal/rtl
AgeCommit message (Collapse)Author
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-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-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-19loplugin:salbool: Implicit conversions from non-Boolean fundamental typesStephan Bergmann
Change-Id: I67eac95686678e6f5a2d60798535b2c65a9ba5d7
2016-05-22Convert AllocMode to scoped enumNoel Grandin
Change-Id: I642d7546059f1af993ab15eb3948949109df05c4 Reviewed-on: https://gerrit.libreoffice.org/25203 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-10Add SAL_FALLTHROUGH, where apparently appropriateStephan Bergmann
Change-Id: Ib67f7cb71255a32810f09a6b7e528f024bbef9df
2016-05-10Replace fallthrough comments with new SAL_FALLTHROUGH macroStephan Bergmann
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in preparation of enabling -Wimplicit-fallthrough. (This is only relevant for C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.) Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but that would require adding back in dependencies on boost_headers to many libraries where we carefully removed any remaining Boost dependencies only recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its future evolution will not have any impact on the stable URE interface.) C++17 will have a proper [[fallthroug]], eventually removing the need for a macro altogether. Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-05-05clang-tidy modernize-loop-convert in oox to saxNoel Grandin
Change-Id: If0d87b6679765fc6d1f9300c6972845cf3742b9c Reviewed-on: https://gerrit.libreoffice.org/24674 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann
Change-Id: I6c656f991999791469015500aff1905fdb16ba65
2016-04-15fix case when fileName lacks "/MacOS/"Douglas Mencken
Change-Id: Ic89d1c3be1939c8989ad5ee806980e8904f8e44d Reviewed-on: https://gerrit.libreoffice.org/24069 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-11tdf#94306 replace boost::noncopyable r.. to sdextJochen Nitschke
... in modules reportdesign to sdext Replace with C++11 delete copy-constructur and copy-assignment. Remove boost/noncopyable.hpp includes. Make some overloaded ctors explicit (most in sd slidesorter). Add deleted copy-assignment in sc/inc/chart2uno.hxx. Change-Id: I21d4209f0ddb00063ca827474516a05ab4bb2f9a Reviewed-on: https://gerrit.libreoffice.org/23970 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-07Drop pointless "internal" directory level for already internal include filesTor Lillqvist
Change-Id: I496fdbab3e17c806c2d16513412c4c1b9120bc3c
2016-04-07Bin unneeded forward declarations of static functionsTor Lillqvist
The file contains their definitions before they are used anyway. Change-Id: Iaa541ec9a12e4971c0cd4ba7cfb4790d328b7b63
2016-04-04tdf#97499 Fixed containers parameters clearing #4tymyjan
Change-Id: I7c96181399f4d7e62d4aceca404b22d68f903513 Reviewed-on: https://gerrit.libreoffice.org/23754 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-01tdf#97966 Drop 'static' keywordsWastack
Including no keywords from extern "C" blocks Change-Id: I87f2ed75888b51ec9e0cb75566bf7c2351b479b4 Reviewed-on: https://gerrit.libreoffice.org/23675 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-10Drop __rtl_random_ prefix from static entities (avoid reserved identifiers)Stephan Bergmann
Change-Id: Ibb7e6fc2a0fdc357e31f02d8b88e6d3c0ae02f44
2016-03-10Drop __rtl_digest_ prefix from static entities (avoid reserved identifiers)Stephan Bergmann
Change-Id: I9baa60e56cc1f0086218f1ee633e0041436a8f2a
2016-03-10Drop __rtl_cipher prefix from static entities (avoid reserved identifiers)Stephan Bergmann
Change-Id: I4f72ded322d563c6d429e0cfbf4120e4faa85c98
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-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-02-23new loplugin: commaoperatorNoel Grandin
Change-Id: I03f24e61f696b7619855e3c7010aa0d874e5a4ff
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-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-26Bin leftover cruftTor Lillqvist
Change-Id: I15a4237a1ab6d7c180b52c3f8d2834c0e034b7db
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-14handle negative decimal places for rounding, tdf#96918 relatedEike Rathke
Change-Id: Ifa423eabc64ead519c4f4a3370a06e88ea5c7466
2016-01-13sal: as always C++ is too stupid to deduce parameter types of minMichael Stahl
Change-Id: Ib00f29a6024e22c65a30bf4a45332e550994f03f
2016-01-13tdf#96918 display accurate integer double values up to (2^53)-1Eike Rathke
Change-Id: I42001583c72bc3faab94489a4eabfa183cab5ae2
2016-01-06tdf#39631 - branch hints: comment, and tweak variously, also use.Michael Meeks
Find a few million mis-predicted branches (according to callgrind) and annotate them. Mark string acquire/release as hot, and a number of deprecated methods as cold. Change-Id: I678b3981794221c97f9ebb70fd0161c0fda5dceb
2015-12-17OString/OUString: move constructors and operator=Noel Grandin
Change-Id: Icdc5f7137cca8360f116d5d4c7b0bf4a4c526e1d Reviewed-on: https://gerrit.libreoffice.org/20712 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-12-10More loplugin:nullptr automatic rewrite (within templates)Stephan Bergmann
Change-Id: I9bc06cfb5eeb38fd7ae7fb25f876ea9f96e4a65a
2015-11-10Fix SAL_W32Stephan Bergmann
Change-Id: I60333e2b0f71c38aa13e6a6665c2a305e6dc08fa
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I1bc6c87fcd6e5e96362623be94c59be216a3b2b8
2015-11-06loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)Stephan Bergmann
Change-Id: I95283ccf78e4ca699e88ea226d38153a8a92845a
2015-10-26Revert "see if including cmath instead of math.h satisfies Android-ARM"Eike Rathke
This reverts commit 6f9e272da724237e52f2f93f235ae78c5344a21a. A f*cking mess. See 1cdf6ade0eeac9515ed88ae0cd802fe119dd4249 Change-Id: Ia66edb96c9c34742300e882c2796870bfd9919d1
2015-10-26see if including cmath instead of math.h satisfies Android-ARMEike Rathke
Change-Id: Ie96f459dfe6d515ac92d89fcf6e6393a35bb97ac
2015-10-26Revert "attempted fix for android build"Stephan Bergmann
This reverts commit c3acead32e1d844b81e3e90c72549281d4bc73a2, now that cc906ec47eaaad247e8fbed5c9e6f3604a8b64c7 "The Android NDK for some reason don't have these math functions in std::" uses all the declarations from <math.h> instead of <cmath>.
2015-10-26Revert "sal: fix Android build"Miklos Vajna
This workaround is not needed after cc906ec47eaaad247e8fbed5c9e6f3604a8b64c7. This reverts commit d366d680cb62a2c5a7246e7290ef74c7e52eb04f.
2015-10-26sal: fix Android buildMiklos Vajna
Similar to 9a93277b869caca4db054385db59fc7b7d541570 (vcl: fix Android build, 2015-03-06), where the Android has a broken C++ library, having some functions in the global namespace instead of the std one. Work around the problem by using the std namespace till it gets fixed on the Android side. Change-Id: I3d423f42b4e8e325beb3661c1780378e5edf962d
2015-10-26The Android NDK for some reason don't have these math functions in std::Tor Lillqvist
Not even if one includes <cmath> instead of <math.h>. So just use the C functions then. Change-Id: Ic8499bc7bcd5c84b6e52e1d5dc799f9f058db816
2015-10-26attempted fix for android buildNoel Grandin
Change-Id: I47e5e3ebbbf55ae1fbbf2df85f9efbdd8bca1322
2015-10-25replace implementation of rtl_math_expm1() and rtl_math_log1p()Eike Rathke
... with ::std::expm1() and ::std::log1p() of C++11 Change-Id: I0d119958152ea372c136d28705686b44b39015bf Reviewed-on: https://gerrit.libreoffice.org/19588 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-10-24replace implementation of rtl_math_erf() and rtl_math_erfc()Eike Rathke
... with ::std::erf() and ::std::erfc() of C++11 Change-Id: I8ccc86ec4d6d71a92409770fc119f72e7084073a Reviewed-on: https://gerrit.libreoffice.org/19583 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-10-24implement Inf and NaN handling for rtl_math_expm1() and rtl_math_log1p()Eike Rathke
Change-Id: Ie424a6f038107ef8b574d0422efaf49b441c110f
2015-10-24implement proper Inf and NaN handling in rtl_math_erf() and rtl_math_erfc()Eike Rathke
Change-Id: Ib96d7123a3c483e9a1c78666bf042396510d733f
2015-10-24prevent endless recursion through rtl_math_erf* for Inf or NaNEike Rathke
Change-Id: If6eb273bc4d76f85da0844caea4bd697c6263013
2015-10-01remove old standalone Sun bug numbersNoel Grandin
Sun bug numbers without any accompanying text are completely useless. Fixed with git grep -lP '//\s*#\d+#\s*$' | xargs perl -i -ne'/\/\/\s*#\d+#\s*$/d or print' And then hand-checking the result to restore places where it deleted code. And then some more grepping and hand-editing to kill the others. Change-Id: Ia96ce4466db8bb8da363ebf41f0ae7f45f28bf29 Reviewed-on: https://gerrit.libreoffice.org/19023 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>