summaryrefslogtreecommitdiffstats
path: root/include/rtl
Commit message (Collapse)AuthorAgeFilesLines
* fix incorrect example in rtl_Instance docsLuboš Luňák2018-05-301-1/+1
| | | | Change-Id: I1cb0c9bfca7ebcf8de96ef25554a41d52b9d7df5
* Fix typosAndrea Gelmini2018-05-231-1/+1
| | | | | | | Change-Id: Ibe94c7379a9389a0506c33666bf2bfb033f96f08 Reviewed-on: https://gerrit.libreoffice.org/54670 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
* [API CHANGE] Remove no longer working rtl_arena -> rtl_cache featureStephan Bergmann2018-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | rtl_arena_create's quantum_cache_max parameter (when non-zero) would have allowed an rtl_arena to internally use an rtl_cache for chunk allocation. (And none of the LO-internal uses of rtl_arena_create makes use of that.) However, with the combination of old ce906b8096081dee15dc8cc96e570d5b0b587955 "skip tricky allocators on G_SLICE=always-malloc" and recent bc6a5d8e79e7d0e7d75ac107aa8e6aa275e434e9 "Disable custom allocator", rtl_cache unconditionally just uses malloc/free now, so the rtl_arena_create quantum_cache_max feature has effectively become irrelevant. As those changes appear to have no negative consequences overall (and help remove quite a chunk of no-longer used code), leave it at that and officially abandon the quantum_cache_max feature. Change-Id: I7d186a4a1589db6a73059c2be164aa81d81aef47 Reviewed-on: https://gerrit.libreoffice.org/54388 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
* sal: MSVC: pragma warning: make more specific, remove obsoleteMike Kaganski2018-02-021-1/+1
| | | | | | | Change-Id: Ib7ad23257a966447d627b4f73698d9298790f759 Reviewed-on: https://gerrit.libreoffice.org/49042 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* loplugin:cstylecast (clang-cl, manual fix of conditional code)Stephan Bergmann2018-01-221-2/+3
| | | | | | | Change-Id: I7d9c935897107fd0c8471f472234d789e9b8c2da Reviewed-on: https://gerrit.libreoffice.org/48315 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* SAL_W32 is just an alias for _WIN32Stephan Bergmann2018-01-193-6/+6
| | | | | | | | | ...so consistently use the latter instead of the former Change-Id: I144d5e7c472632f93b2258461510346bc85892d9 Reviewed-on: https://gerrit.libreoffice.org/48135 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* tdf#114939 sal: deprecate rtl_digest_*SHA* and rtl_digest_PBKDF2Michael Stahl2018-01-121-0/+63
| | | | | | | Document the disaster but don't fix it so this implementation can be used to import existing documents with bad SHA1 hashes. Change-Id: I4f3648dd0987392ef49dc149a9213bcafcefb202
* More loplugin:cstylecast: salStephan Bergmann2018-01-123-4/+4
| | | | | | | | auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I7d89b011464ba5d2dd12e04d5fc9f65cb4daebde
* Fix typosAndrea Gelmini2017-12-291-1/+1
| | | | | | | Change-Id: I0e56430afa65b6b5826d56212ac501c0244fce9b Reviewed-on: https://gerrit.libreoffice.org/47145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* Fix typosAndrea Gelmini2017-12-291-1/+1
| | | | | | | Change-Id: I90f72b6a618436d8cd2115be4e57a07bac15befc Reviewed-on: https://gerrit.libreoffice.org/47161 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* rtl: support start/stop threads around pre-initAshod Nakashian2017-12-281-4/+38
| | | | | | | | | | | | | | | This is necessary to avoid having extra threads while forking. After forking, the second stage of pre-init is started and so we start the stopped rtl threads. The comment for rtl_alloc_preInit_phase_t has more details. Change-Id: I1a3f7be74d4b04d0b2fc4a72b02124c2faa3c047 Reviewed-on: https://gerrit.libreoffice.org/47060 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
* Fix typosAndrea Gelmini2017-12-281-1/+1
| | | | | | | Change-Id: I0a8579406a70d2f63d96969c766e2a43d830ed6f Reviewed-on: https://gerrit.libreoffice.org/47114 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* sal: add pre-initialization scheme for allocations.Michael Meeks2017-12-151-0/+37
| | | | | | | This saves several megabytes of dirtied pages for each LOK client of Online. Change-Id: I425a2e7896879f0a64d71fcc0655e9e1fa1256aa
* Avoid using O[U]StringConcat lvalues containing dangling refs to temporariesStephan Bergmann2017-11-114-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | ...in code accidentally using auto like > auto const aURL = uri->getUriReference() + "/" > + INetURLObject::encode( > m_sEmbeddedName, INetURLObject::PART_FPATH, > INetURLObject::EncodeMechanism::All); > > uno::Reference<uno::XInterface> xDataSource(xDatabaseContext->getByName(aURL), uno::UNO_QUERY); in <https://gerrit.libreoffice.org/#/c/44569/1> "Properly construct vnd.sun.star.pkg URL" did (causing hard to debug test failures there). So make functions taking O[U]StringConcat take those by rvalue reference. Unfortunately, that also needed adaption of various functions that just forward their arguments. And some code in sc/qa/unit/ucalc_formula.cxx used CPPUNIT_ASSERT_EQUAL on OUStringConcat arguments in cases where that happened to actually compile (because the structure of the two OUStringConcats was identical), which needed adaption too (but which would arguably better use CPPUNIT_ASSERT_EQUAL_MESSAGE, anyway). Change-Id: I8994d932aaedb2a491c7c81c167e93379d4fb6e3 Reviewed-on: https://gerrit.libreoffice.org/44608 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* loplugin:includeform: UNO API include filesStephan Bergmann2017-10-2334-126/+126
| | | | | | | Change these back to consistently use the "..." form to include other UNO API include files, for the benefit of external users of this API. Change-Id: I9c9188e895eb3495e20a71ad44abfa2f6061fa94
* correct doxygen syntaxKorrawit Pruegsanusak2017-10-233-32/+32
| | | | | | | Change-Id: I9e0ae4f9adadf58b99228d64a316d279043151f2 Reviewed-on: https://gerrit.libreoffice.org/43638 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
* overload std::hash for OUString and OStringNoel Grandin2017-10-232-0/+42
| | | | | | | | | no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* correct wrong doxygen syntax; also comments clean-upKorrawit Pruegsanusak2017-10-172-121/+106
| | | | | | | Change-Id: I6074241dfcdcd4ca8a365ab6e03f01028d2c1a7b Reviewed-on: https://gerrit.libreoffice.org/43344 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
* sal: fix numerous doxygen warningsMichael Stahl2017-09-191-1/+1
| | | | Change-Id: I2fd3fb7b67a62d349ff917466b08c75c19dcbff6
* New rtl::isUnicodeScalarValue, rtl::isSurrogateStephan Bergmann2017-09-131-0/+27
| | | | | | | | | | | | | | | There are apparently various places that want to check for a Unicode scalar value rather than for a Unicode code point. Changed those uses of rtl::isUnicodeCodePoint where that was obvious. (For changing svtools/source/svrtf/svparser.cxx see 8e0fb74dc01927b60d8b868548ef8fe1d7a80ce3 "Revert 'svtools: HTML import: don't put lone surrogates in OUString'".) Other uses of rtl::isUnicodeCodePoint might also want to use rtl::isUnicodeScalarValue instead. As a side effect, this change also introduces rtl::isSurrogate, which is useful in a few places as well. Change-Id: I9245f4f98b83877145a4d392f0ddb7c5d824a535
* tdf#111964: only trim XML whitespaceMike Kaganski2017-08-232-2/+6
| | | | | | | | | | | | | | | | | | | OUString::trim() uses rtl_uString_newTrim, which relies upon rtl_ImplIsWhitespace. The latter treats as whitespaces not only characters with values less than or equal to 32, but also Unicode General Punctuation area Space and some Control characters. Thus, using OUString::trim() is incorrect when the goal is to trim XML whitespace, which is defined as one of 0x09, 0x0A, 0x0D, 0x20. The comments for OUString::trim() and rtl_uString_newTrim are corrected to describe which characters are considered whitespace. A unit test included. Change-Id: I45a132be923a52dcd5a4c35aeecb53d423b49fec Reviewed-on: https://gerrit.libreoffice.org/41444 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
* rtl: typo in doc commentAshod Nakashian2017-08-041-1/+1
| | | | | | | Change-Id: I068d0bce3e0122d4539d489097ef7771f910ed0e Reviewed-on: https://gerrit.libreoffice.org/40719 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
* de-hrc various thingsCaolán McNamara2017-07-211-8/+0
| | | | | | | | | | | | e.g. helpid[s].hrc -> helpids.h and insert include guards where missing move "ordinary" defines into .hxx files remove .hrc entries that are used as arguments to dialog factory when a dedicated method can be added instead Change-Id: I792fb8eb0adfaa63cf354e6e57401fc943e9196e
* RTL_UNICODETOTEXT_INFO_{DEST|SCR}BUFFERTOSMALL should use TOO, not TOChris Sherlock2017-07-171-0/+4
| | | | | | | | | I have kept the old mispelled constant for backwards compatibility Change-Id: I128a2eec76d00cc5ef058cd6a0c35a7474d2411e Reviewed-on: https://gerrit.libreoffice.org/39995 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
* Remove a bunch of comment cruft - esp. "the end." bitsChris Sherlock2017-06-164-128/+1
| | | | | | | Change-Id: I5a339a4211ec8eb547459996be69610b9f2b3766 Reviewed-on: https://gerrit.libreoffice.org/38147 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
* Remove HAVE_CXX11_REF_QUALIFIER, always true nowStephan Bergmann2017-06-162-35/+10
| | | | | | | | | | | | ...after 579497164f6bddfeb14bb6b0f4b9cd3322af1803 "Bump GCC baseline to 4.8.1" Make this a fatal configuration error for now. The check should be removed completely after LO 6.0 branch-off. Change-Id: I70cf65d6b0eb7158008f28449794c66c1b775916 Reviewed-on: https://gerrit.libreoffice.org/38869 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* tdf#108039: check for nullptr in rtl_uString and OUStringMike Kaganski2017-06-071-1/+9
| | | | | | | | | | | | | | | | | | | | | | | 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>
* add COVERITY_NOEXCEPT_FALSECaolán McNamara2017-06-061-1/+1
| | | | | | | | | | | | 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>
* HAVE_THREADSAFE_STATICS sould always be trueStephan Bergmann2017-06-011-6/+4
| | | | | | | | ...(for LIBO_INTERNAL_ONLY), now that the status of Android has been clarified, see <https://lists.freedesktop.org/archives/libreoffice/2017-June/077827.html> "Re: Some baseline thoughts" Change-Id: Ie9d5444df84c23d48c24b68d9d2ab5322c619858
* apply SAL_RETURNS_NONNULL in a couple more placesNoel Grandin2017-05-292-7/+7
| | | | | | | Change-Id: I0a57a6a5ea9372215e5f076aeafc64c896ec2312 Reviewed-on: https://gerrit.libreoffice.org/38057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* create SAL_RETURNS_NONNULL annotationNoel Grandin2017-05-264-6/+6
| | | | | | | | | and apply it to some methods in OString and OUString Change-Id: I30e91f961b6d310799d3641f68b7ed54b3080f3a Reviewed-on: https://gerrit.libreoffice.org/38020 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* make __RSC a builtin define for the RSC compilerNoel Grandin2017-04-251-3/+3
| | | | | | | | | instead of randomly defining it in only some of .src files Change-Id: Ifec3920740723d248400f451d717b5288c421b8d Reviewed-on: https://gerrit.libreoffice.org/36832 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Improved loplugin:redundantcast, static_cast on arithmetic types: salStephan Bergmann2017-04-061-1/+1
| | | | Change-Id: I7caadbc06b2266800666151de75d799c42148aca
* Finally switch MSVC to sal_Unicode = char16_t, tooStephan Bergmann2017-04-041-2/+1
| | | | | | | | | | | | | There is lots of (Windows-only) code that relied on sal_Unicode being the same as wchar_t, and the best change may be different in each case (and doing the changes may be somewhat error prone). So for now add SAL_U/SAL_W scaffolding functions to sal/types.h, remove their uses one by one again, and finally drop those functions again. Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea Reviewed-on: https://gerrit.libreoffice.org/36077 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* remove type decorations on char literalsJochen Nitschke2017-03-301-3/+3
| | | | | | | | | | they are only needed where type deduction fails. left them in defines for now. Change-Id: I7f002dd6bc7acc083c73b6c64076de6dd28d0b09 Reviewed-on: https://gerrit.libreoffice.org/35893 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Fix typosAndrea Gelmini2017-03-253-4/+4
| | | | | | | Change-Id: I998e9b2ad8ebdcc983239192cb61f6689e378ad9 Reviewed-on: https://gerrit.libreoffice.org/35633 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
* Better check for 'defined LIBO_INTERNAL_ONLY'Stephan Bergmann2017-03-241-1/+1
| | | | | | (to avoid warnings about undefined macros in external code) Change-Id: Ie1007207b22c19a3d9d96f0f94070c32d417595a
* Use rtl::isAscii* instead of ctype.h is* (and fix passing plain char)Stephan Bergmann2017-03-221-0/+23
| | | | | | and add rtl::isAsciiWhiteSpace Change-Id: Iac71975f718b9360ea9dc94485c069c5e7cb91c7
* Prevent calls to rtl/character.hxx functions with (signed) char argumentsStephan Bergmann2017-03-221-0/+76
| | | | | | | | | | ...that would implicitly be sign extended (for plain char only if it is signed), so non-ASCII char values would trigger the isUnicodeCodePoint assert. Change-Id: Iaf8024ad509e64525558e882fe3fd078cfb4ea91 Reviewed-on: https://gerrit.libreoffice.org/35523 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Mark rtl_locale_get/setDefault as deprecatedStephan Bergmann2017-03-211-10/+9
| | | | | | | unused in LO itself since 73bda5058bcef6be9a3185aa46375c7b147ffa22 "ditched rtl::OLocale" Change-Id: I6fd713f4771d7a7a397ef08002d1b9d754417f67
* Only need an OStringBuffer in number2PolyPolygonStephan Bergmann2017-03-212-0/+61
| | | | | | | | | | | ...so that later passing the OStringBuffer's aNum[i] to createSevenSegmentPolyPolygon (taking a first parameter of type char) doesn't need to implicitly convert from sal_Unicode to char. Requires addition of some missing OStringBuffer-related function variants in rtl/math.hxx and rtl/strbuf.hxx. Change-Id: I79e6b2a791abc62b6556a6668e4411cced490c11
* Remove redundant 'inline' keywordStephan Bergmann2017-03-038-64/+60
| | | | | | | | | | ...from function definitions occurring within class definitions. Done with a rewriting Clang plugin (to be pushed later). Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8 Reviewed-on: https://gerrit.libreoffice.org/34874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Fix typosAndrea Gelmini2017-03-031-1/+1
| | | | | | | Change-Id: I5e3c9683741ddc66283008c20794be5c2b2bc53f Reviewed-on: https://gerrit.libreoffice.org/34804 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Remove uses of SAL_CONSTEXPR in LIBO_INTERNAL_ONLYStephan Bergmann2017-03-032-8/+8
| | | | | | | Change-Id: I9a7dc7c83302b3361f056fcf6636bbba7672f15f Reviewed-on: https://gerrit.libreoffice.org/34840 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Remove MinGW supportStephan Bergmann2017-02-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In OOo times, there'd originally been efforts to allow building on Windows with MinGW. Later, in LO times, this has been shifted to an attempt of cross- compiling for Windows on Linux. That attempt can be considered abandoned, and the relevant code rotting. Due to this heritage, there are now three kinds of MinGW-specific code in LO: * Code from the original OOo native Windows effort that is no longer relevant for the LO cross-compilation effort, but has never been removed properly. * Code from the original OOo native Windows effort that is re-purposed for the LO cross-compilation effort. * Code that has been added specifially for the LO cross-compilation effort. All three kinds of code are removed. (An unrelated, remaining use of MinGW is for --enable-build-unowinreg, utilizing --with-mingw-cross-compiler, MINGWCXX, and MINGWSTRIP.) Change-Id: I49daad8669b4cbe49fa923050c4a4a6ff7dda568 Reviewed-on: https://gerrit.libreoffice.org/34127 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* add 'explicit operator bool' to our reference classesNoel Grandin2017-01-261-0/+8
| | | | | | | Change-Id: I91cfbe2646dcc55b98d2b809c49c9ea073f54f58 Reviewed-on: https://gerrit.libreoffice.org/33517 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* New loplugin:externvar: salStephan Bergmann2017-01-095-0/+22
| | | | Change-Id: Iefc33784f21e7a0b88c8d6308618926e38ab8554
* coverity#1371227 Missing move assignment operatorCaolán McNamara2017-01-092-0/+24
| | | | | | | Change-Id: I2de6b5e2910ff570c08e662769d5e6ee188825a7 Reviewed-on: https://gerrit.libreoffice.org/32843 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Replace side-effect--only uses of makeStringAndClear() with setLength(0)Stephan Bergmann2017-01-052-2/+2
| | | | Change-Id: Iaf8011f1bd6a10b324653899b7f51458f7d0b68a
* Make OUStringLiteral more usefulStephan Bergmann2016-12-172-6/+380
| | | | | | | | | | | | | | | | | | | | | | | | | | ...by: * making the OUStringLiteral ctor non-explicit (to be exploited in a follow-up commit) * adding (LIBO_INTERNAL_ONLY) overloads to OUString/OUStringBuffer functions that can now take OUStringLiteral in addition to taking "real" string literals (Keeping the number of overloads smaller by replacing the ConstCharArrayDetector overloads with ones taking OUStringLiteral (for LIBO_INTERNAL_ONLY, at least) and relying on the now-implicit conversion from "real" string literals to OUStringLiteral unfortunately would not work: Both OUString and OUStringLiteral argubably need implicit conversions from "real" string literals, so any function overloaded for OUString and OUStringLiteral would be ambinguous when called with a "real" string literal. And removing the OUString ctor taking a "real" string literal and relying on an implicit conversion chain from "real" string literal to OUStringLiteral to OUString doesn't work because it would involve two user- provided conversions.) Change-Id: I14433fc1605b048807f60b3a3e14f92221d3a226 Reviewed-on: https://gerrit.libreoffice.org/32097 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>