summaryrefslogtreecommitdiffstats
path: root/sal/rtl
Commit message (Collapse)AuthorAgeFilesLines
* Further clean-up related to removed library unloading featureStephan Bergmann2013-04-161-68/+8
| | | | Change-Id: I1ec2aa4d0ed0940e7c0a26a18c78f2df4693d278
* API CHANGE: remove some of useless rtl/unload.h functionalityMatúš Kukan2013-04-161-363/+1
| | | | | Change-Id: If32923e35ef97f42d5203975362e5c76948ff327 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
* Introduce characters utilities in rtl/character.hxxArnaud Versini2013-04-102-29/+10
| | | | | | | | | | Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, with slight modifications to sal/inc/rtl/character.hxx: * Replaced "#pragma once" with explicit include guard for now. * Missing includes. * Cosmetic clean-up. Change-Id: I94d01cd4e766f92c70f941839a67101fa2c97654
* WaE: unused variable 'insertion'Tor Lillqvist2013-04-081-0/+1
| | | | Change-Id: I57d39d7535d88045dcb0d7b665675074b7059d14
* Must percent-escape the APP_DATA_DIRTor Lillqvist2013-03-311-1/+1
| | | | | | | On the iOS Simulator it contains spaces, as in /Users/tml/Library/Application Support/iPhone Simulator/6.1/Applications/9A6DFE86-77AF-4B78-8FFB-93FCA6C38EE1/LibreOffice.app Change-Id: I90c76b909901c881aa51482880b1120fea19b99b
* Hopefully _BSD_SOURCE not needed anywhere for MAP_ANONStephan Bergmann2013-03-271-1/+0
| | | | | | (-Werror=unused-macros on Android) Change-Id: I393face32e7d4782b5c8037fa8ebeb21ec3c6e7a
* No need for a template hereStephan Bergmann2013-03-261-39/+31
| | | | Change-Id: I43262c984c311fcb1e1a9eca9b4dec4092351dea
* Could the failing MSVC tinderbox be due to implementation-defined /Stephan Bergmann2013-03-261-2/+22
| | | | | | ...for negative integers in < C++11? Rather unlikely, but lets see... Change-Id: I9abfcbf2c0e409fab4c77b62e5f734d3c2cc2719
* Handle oveflow in O(U)String::toInt() functionsZolnai Tamás2013-03-251-0/+8
| | | | | | | | | | | | Return 0 when overflow. The base idea in unsigned case is checking wheather (Max-nDigit)/nRadix < n But for efficency, take out nDiv = Max/nRadix from loop and corrigate it with -1 if needed. In signed case use minimum value if the number is negativ. Change-Id: I5b77580adbf12421b6c4b785ba9bc2a080accba2 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
* coverity#704247 Logically dead codeJulien Nabet2013-03-231-4/+1
| | | | | | | | Change-Id: Iaefddeb816d36d4a07234d903fafab3d6b83e1d2 Reviewed-on: https://gerrit.libreoffice.org/2952 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Reviewed-by: Thorsten Behrens <tbehrens@suse.com> Tested-by: Thorsten Behrens <tbehrens@suse.com>
* removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings declarationsThomas Arnhold2013-03-191-1/+1
| | | | | | | | | s/(OUString\s+[a-zA-Z_][A-Za-z0-9_]*\s*)\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/$1\($2\)/gms Change-Id: Iad20f242c80c4bdc69df17e2d7a69d58ea53654b Reviewed-on: https://gerrit.libreoffice.org/2835 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
* automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStringsThomas Arnhold2013-03-192-9/+5
| | | | | | | | | | | Done with a perl regex: s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec Reviewed-on: https://gerrit.libreoffice.org/2832 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
* Cleanup static and inline usage in alloc_impl.Arnaud Versini2013-03-043-119/+64
| | | | | | | Change-Id: I88170c9d033e0299c4b4462f7d0edb83152b4fbb Reviewed-on: https://gerrit.libreoffice.org/2367 Reviewed-by: Michael Meeks <michael.meeks@suse.com> Tested-by: Michael Meeks <michael.meeks@suse.com>
* Bin pointless single-child directory levelTor Lillqvist2013-02-2231-0/+0
| | | | Change-Id: I03de46fb6c095bb176fd25fc5f803be6d2d89bcf
* Fix misspellings detected by https://github.com/lyda/misspell-checkTor Lillqvist2013-02-221-1/+1
| | | | | | | Just as a test to check the usefulness of that tool. It needs some improvement before really usable. Change-Id: I875e79c1992ed5f3b695736b0d49938ad0ba2d55
* Remove mis-optimizationStephan Bergmann2013-02-161-2/+1
| | | | | | | | | Assume thread t1 creates OUString s, then spawns thread t2, then t2 acquires s, then t2 signals via a channel that does not necessarily involve memory synchronization (e.g., writes a byte into a pipe which t1 reads), then t1 releases s and can still see a refCount of 1 instead of 2. Change-Id: I31047a1a6cc8fccc401a87849f5c3cee3642d803
* Some cppcheck cleaningJulien Nabet2013-02-081-3/+1
| | | | Change-Id: I1dc8415569f7133d57c495e47f038e98d50d64d7
* Use SAL_STRINGIFYStephan Bergmann2013-02-041-6/+2
| | | | Change-Id: Ibdb7d143e02301fdd8d04cf1c59421dcd98dac2f
* add OUString::toUInt64()David Ostrovsky2013-02-041-70/+83
| | | | | | | Change-Id: I2051e161219d424d2c2b69faf6f939cfe21fa5f7 Reviewed-on: https://gerrit.libreoffice.org/1980 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
* cleanups for number() string functionLuboš Luňák2013-01-281-0/+45
| | | | | | | | | | | | | | | - add sal_uInt64 valueOf helper to handle its full value range - group deprecated valueOf() together - forward to the number() taking the largest type instead of repeating the same code every time - various doc improvements: - add missing @since - do not refer to non-existent number() overloads in docs - "use number" - "huh, of course I use a number?" - "code your own" - my own function? why? - + or += operators are not, strictly speaking, replacements for valueOf() Change-Id: Ib138a06c4ac4365cfffc534e6ab115d55180a70d
* Simplify codeStephan Bergmann2013-01-141-29/+12
| | | | Change-Id: Ib35cba4544726c1653d36072f3499dffec3cced3
* Handle APP_DATA_DIR for iOS, tooTor Lillqvist2013-01-061-0/+8
| | | | Change-Id: I7259358c917ef9e7cc93d8f6886c9a935887183b
* don't use shared empty string if extra space is to be allocatedLuboš Luňák2012-12-191-1/+1
| | | | fix crash for fdo#58306 when appending to OUStringBuffer initialised with ""
* fdo#58473 - fix transliteration crasher caused by writing const string.Michael Meeks2012-12-181-2/+2
|
* API CHANGE: Remove useless deprecated rtl/memory.hArnaud Versini2012-12-171-55/+0
| | | | | | | Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, adapted some function definitions in sal/osl/all/compat.cxx to avoid "must return a value" warnings. Change-Id: Iac156b004464018225bbfda24f0a234f9ebcb19f
* #define _BSD_SOURCE to 1 (that's what compilers set it to, at least)Luboš Luňák2012-12-101-1/+1
| | | | Change-Id: Id192488bb89d7f57dbd7ae3ddd33fb2b7569172e
* mvoe rtl_(u)string_alloc to salLuboš Luňák2012-12-061-0/+11
| | | | | | No point in hidding something useful like this in some helper lib. Change-Id: I7332d7f6bd428378cd19e7e95ad130771a541140
* acquire on the shared empty string does nothingLuboš Luňák2012-12-061-1/+0
| | | | Change-Id: I03a38c387044bda8cec6287ab41c6d202c496473
* rtl_(u)String_ensureCapacityLuboš Luňák2012-12-061-0/+23
| | | | | | | | | Ensure there will be enough extra space in a string, to be used for string appending. A bit like rtl_(u)String_newConcat(), but without the function actually appending anything. Unlike the stringbuffer variant this does not allocate any extra. Change-Id: Ic6f84bf014a713f9912c81d8f1405c593978822d
* We only support MSVC 2008 (_MSC_VER 1500) or laterTor Lillqvist2012-11-282-2/+2
| | | | | | We can drop or simplify many conditionals. Change-Id: I37e820e515cc09845c30b62c89ddb3b6ff370f97
* Add an $APP_DATA_DIR predefiend thingie in bootstrap ("rc") files for AndroidTor Lillqvist2012-11-221-0/+12
| | | | | | | | | | It expands to what lo_get_app_data_dir() returns, i.e. the activity's getApplicationInfo().dataDir. Use it in the LibreOffice4Android app's rc files instead of a hardcoded (possibly device- and/or OS version dependent) path. Change-Id: I8145f2c86eeded39232fb251a79fa64f31f77f55
* Use correct variable in the iOS and Android casesTor Lillqvist2012-11-211-4/+4
| | | | Change-Id: I759ea062c6a0cc1d9a2aafba502057f53596459c
* re-base on ALv2 code. Includes:Michael Meeks2012-11-2132-725/+464
| | | | | | | | | | | | | | | | | | | | | Patch contributed by Herbert Duerr: #i118662# remove berkeleyDB from module xmlhelp (author=orwitt) http://svn.apache.org/viewvc?view=revision&revision=1213188 #i119141# remove ISCII converter for now http://svn.apache.org/viewvc?view=revision&revision=1306246 make exceptions for cppunittester verbose http://svn.apache.org/viewvc?view=revision&revision=1174831 Patches contributed by Pedro Giffuni: Avoid some uses of non portable #!/bin/bash in shell scripts. http://svn.apache.org/viewvc?view=revision&revision=1235297 Patch contributed by Oliver-Rainer Wittmann 88652: applied patch, remove unicows deps http://svn.apache.org/viewvc?view=revision&revision=1177585 drop OS/2 code, remove in-line assembler ARM atomics, and obsolete armarch header.
* Revert "sb140: sb140: #i116981# clean up memory upon exit"Michael Meeks2012-11-211-243/+428
| | | | | | | | This reverts commit 2d5dd9a9604aeb5fd4e347d7a46acc11da9985a5. Conflicts: sal/inc/rtl/bootstrap.h sal/rtl/source/bootstrap.cxx
* Some white-space clean-upStephan Bergmann2012-11-061-10/+10
| | | | Change-Id: Ice25e13891865c2c7a223a3708d200272645140d
* More useless code, "#if 0" blocks in lingucomponent, sal, and rscMarcos Paulo de Souza2012-10-171-14/+0
| | | | | Change-Id: I1dda0f2b3bc2bb4a4a877c160026e53a90471d54 Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
* use consistently sal.osl and sal.rtl as log areasLuboš Luňák2012-10-134-19/+19
| | | | Change-Id: Ib5e606283d3d37c38e9729c79c4531807a1419d3
* mark lcl_ functions static or rename them if they are not local at allLuboš Luňák2012-10-121-3/+3
| | | | | | http://lists.freedesktop.org/archives/libreoffice/2012-October/039639.html Change-Id: I1a0e436051d48e7f6224d6f0fc602347df2d4df1
* Add a 'fromIndex' parameter to OUString::replaceAllNoel Grandin2012-10-091-1/+9
| | | | | | | This method will be needed for forthcoming String->OUStringBuffer conversions. Change-Id: I001099baaca5cd402aebcd15c031d9060286a8f9
* update string copy semantics to be undefined in a non-crashing way.Michael Meeks2012-10-021-0/+23
| | | | Change-Id: I03bb4db5931932280e368012cbaee6bef2854dd6
* Remove internal usage of rtl/memory.h in sal moduleArnaud Versini2012-10-017-13/+6
| | | | | | | Change-Id: I43650c6f4a66058e73945851a6990555e42b8ac2 Reviewed-on: https://gerrit.libreoffice.org/744 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
* sal: uri.cxx: deploy some assertsMichael Stahl2012-09-261-19/+15
| | | | Change-Id: I1d755086295f5a8cd7acf56204402b95fe228d2d
* replace remaining InterlockedCount() with inlined versionNorbert Thiebaud2012-09-252-6/+6
| | | | | | | Change-Id: Ifcfa48fc87f905a91470a5b0fd597b02f220784c Reviewed-on: https://gerrit.libreoffice.org/671 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
* deprecate oustringostreaminserter.hxxNorbert Thiebaud2012-09-181-1/+0
| | | | | | | | | | | | | | | | | | | the intent of this header has canged over time. now it is already systematically included with ustring.hxx and the operator overload it provide fit nicely there... Just to be safe, since that include as been added to the api during the 3.5 timeframe and therefore is already in 'production' the header remain and simply attempt to include ustring.hxx but a warning is issued indicating that this header should not be used anymore... in a couple of major release we will thenr emove it completely All internal users of that header are converted. Change-Id: I8934c55f089e29d78c0f5649b7c87b2ecf024bad Reviewed-on: https://gerrit.libreoffice.org/634 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
* migrate some of the biggest consumer of osl_*InterlockedCount to osl_atomicNorbert Thiebaud2012-09-172-4/+4
| | | | | | | Change-Id: I0e6992afbeffaf3b993e6630fb396d93012890e0 Reviewed-on: https://gerrit.libreoffice.org/632 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
* remove use of SAL_MIN() macroNorbert Thiebaud2012-09-142-3/+6
| | | | Change-Id: Ia91118388240c9a54d010b94aef34ad528ce5761
* remove SAL_MAX() macros and few usersNorbert Thiebaud2012-09-142-6/+25
| | | | Change-Id: I5ece116a66ab37fe64aac6c60bc38244677d499a
* Remove some dead assignements in sal/cipher.cxxOlivier Hallot2012-08-141-4/+0
| | | | | | | | Remove some dead assignements indicated by clang scan-build report. Thanks to John Smith clang investigation Patch corrected Change-Id: Icbee3a65b6753d45433f1a4ca30567675e27e6d9
* Refactor expandMacros somewhat...Stephan Bergmann2012-08-071-52/+51
| | | | | | | ...so that backward compatibility ${file::key} -> ${file:key} does not kick in for the special .link and .override cases. Change-Id: If009b8ecdbb7662c21e87e7bccb50a0ebbb0190f
* Use memset and memcpy insteadof rtl_zeroMemory and rtl_copyMemory in salArnaud Versini2012-07-278-67/+79
| | | | Change-Id: I4f9649ca61c988d425b59e41549d1c46bb808f2c