summaryrefslogtreecommitdiff
path: root/sal/rtl/source
AgeCommit message (Collapse)Author
2013-01-14Simplify codeStephan Bergmann
Change-Id: Ib35cba4544726c1653d36072f3499dffec3cced3
2013-01-06Handle APP_DATA_DIR for iOS, tooTor Lillqvist
Change-Id: I7259358c917ef9e7cc93d8f6886c9a935887183b
2012-12-19don't use shared empty string if extra space is to be allocatedLuboš Luňák
fix crash for fdo#58306 when appending to OUStringBuffer initialised with ""
2012-12-18fdo#58473 - fix transliteration crasher caused by writing const string.Michael Meeks
2012-12-17API CHANGE: Remove useless deprecated rtl/memory.hArnaud Versini
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
2012-12-10#define _BSD_SOURCE to 1 (that's what compilers set it to, at least)Luboš Luňák
Change-Id: Id192488bb89d7f57dbd7ae3ddd33fb2b7569172e
2012-12-06mvoe rtl_(u)string_alloc to salLuboš Luňák
No point in hidding something useful like this in some helper lib. Change-Id: I7332d7f6bd428378cd19e7e95ad130771a541140
2012-12-06acquire on the shared empty string does nothingLuboš Luňák
Change-Id: I03a38c387044bda8cec6287ab41c6d202c496473
2012-12-06rtl_(u)String_ensureCapacityLuboš Luňák
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
2012-11-28We only support MSVC 2008 (_MSC_VER 1500) or laterTor Lillqvist
We can drop or simplify many conditionals. Change-Id: I37e820e515cc09845c30b62c89ddb3b6ff370f97
2012-11-22Add an $APP_DATA_DIR predefiend thingie in bootstrap ("rc") files for AndroidTor Lillqvist
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
2012-11-21Use correct variable in the iOS and Android casesTor Lillqvist
Change-Id: I759ea062c6a0cc1d9a2aafba502057f53596459c
2012-11-21re-base on ALv2 code. Includes:Michael Meeks
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.
2012-11-21Revert "sb140: sb140: #i116981# clean up memory upon exit"Michael Meeks
This reverts commit 2d5dd9a9604aeb5fd4e347d7a46acc11da9985a5. Conflicts: sal/inc/rtl/bootstrap.h sal/rtl/source/bootstrap.cxx
2012-11-06Some white-space clean-upStephan Bergmann
Change-Id: Ice25e13891865c2c7a223a3708d200272645140d
2012-10-17More useless code, "#if 0" blocks in lingucomponent, sal, and rscMarcos Paulo de Souza
Change-Id: I1dda0f2b3bc2bb4a4a877c160026e53a90471d54 Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2012-10-13use consistently sal.osl and sal.rtl as log areasLuboš Luňák
Change-Id: Ib5e606283d3d37c38e9729c79c4531807a1419d3
2012-10-12mark lcl_ functions static or rename them if they are not local at allLuboš Luňák
http://lists.freedesktop.org/archives/libreoffice/2012-October/039639.html Change-Id: I1a0e436051d48e7f6224d6f0fc602347df2d4df1
2012-10-09Add a 'fromIndex' parameter to OUString::replaceAllNoel Grandin
This method will be needed for forthcoming String->OUStringBuffer conversions. Change-Id: I001099baaca5cd402aebcd15c031d9060286a8f9
2012-10-02update string copy semantics to be undefined in a non-crashing way.Michael Meeks
Change-Id: I03bb4db5931932280e368012cbaee6bef2854dd6
2012-10-01Remove internal usage of rtl/memory.h in sal moduleArnaud Versini
Change-Id: I43650c6f4a66058e73945851a6990555e42b8ac2 Reviewed-on: https://gerrit.libreoffice.org/744 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2012-09-26sal: uri.cxx: deploy some assertsMichael Stahl
Change-Id: I1d755086295f5a8cd7acf56204402b95fe228d2d
2012-09-25replace remaining InterlockedCount() with inlined versionNorbert Thiebaud
Change-Id: Ifcfa48fc87f905a91470a5b0fd597b02f220784c Reviewed-on: https://gerrit.libreoffice.org/671 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-09-18deprecate oustringostreaminserter.hxxNorbert Thiebaud
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>
2012-09-17migrate some of the biggest consumer of osl_*InterlockedCount to osl_atomicNorbert Thiebaud
Change-Id: I0e6992afbeffaf3b993e6630fb396d93012890e0 Reviewed-on: https://gerrit.libreoffice.org/632 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-09-14remove use of SAL_MIN() macroNorbert Thiebaud
Change-Id: Ia91118388240c9a54d010b94aef34ad528ce5761
2012-09-14remove SAL_MAX() macros and few usersNorbert Thiebaud
Change-Id: I5ece116a66ab37fe64aac6c60bc38244677d499a
2012-08-14Remove some dead assignements in sal/cipher.cxxOlivier Hallot
Remove some dead assignements indicated by clang scan-build report. Thanks to John Smith clang investigation Patch corrected Change-Id: Icbee3a65b6753d45433f1a4ca30567675e27e6d9
2012-08-07Refactor expandMacros somewhat...Stephan Bergmann
...so that backward compatibility ${file::key} -> ${file:key} does not kick in for the special .link and .override cases. Change-Id: If009b8ecdbb7662c21e87e7bccb50a0ebbb0190f
2012-07-27Use memset and memcpy insteadof rtl_zeroMemory and rtl_copyMemory in salArnaud Versini
Change-Id: I4f9649ca61c988d425b59e41549d1c46bb808f2c
2012-06-29Remove include guardsThomas Arnhold
Change-Id: Ib4ba76d0083e5bd75cc589a55318089c004f591f
2012-06-29Remove some unused defines and controlsThomas Arnhold
Change-Id: I96f76ed6b33f5c786d1e3ab3981a535037a9c1b5
2012-05-24fdo#50162 merge rtlbootstrap.mk into configure.inDavid Ostrovsky
Change-Id: I241be2704a069ec1f6be5861084039569673cc12
2012-05-23removed unused temporary rtl::OUStringTakeshi Abe
Change-Id: I9d118a5fbe2306465d8bcdb9ddd0596588137e5e
2012-04-06Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operatorSzabolcs Dezsi
2012-04-06Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operatorSzabolcs Dezsi
Pattern used: find . -name "*.cxx" -exec sed -i 's/\( *\)\(else if\|if\) *( *\([^!()|&]*\)\.equalsAsciiL( *RTL_CONSTASCII_STRINGPARAM *( *\([^)]*\)) *) *) *{$/\1\2 ( \3 == \4 ) {/' \{\} \;
2012-04-06string literal O(U)StringBuffer ctors too, after allLuboš Luňák
2012-04-02warn on \0 embedded in string literals, after allLuboš Luňák
Seeing 791f27683311e487947b0464a0cb132b19fd0e12 I've changed my mind, some embedded \0 can be actually well hidden: struct foo { const char txt[3]; }; const foos[] = { { "a" }, { "bb" }}; If somebody wants an embedded \0 in a string literal, they need to say it explicitly by specifying the size.
2012-04-02sal: reduce allocation thrash in URI encode / decodeMichael Meeks
This saves 1% of string allocation / destruction on startup.
2012-04-02sal: expose more stringbuffer related instrumentation pointsMichael Meeks
Avoid ref/unref pair in makeStringAndClear, hook into the stringbuffer-like 'String' class to expose it's conversion to immutable strings, and fixup misc. missing instrumentation.
2012-03-30no bad_alloc throwing in string literal O(U)String functionsLuboš Luňák
String literals should be reasonably short, and if memory is so low that they trigger allocation failure, something else would would trip over very soon anyway.
2012-03-30sal: add a more permanant set of annotations for lifetime tracking.Michael Meeks
Having done this on a temporary basis a couple of times before, it'd be good to avoid having to do the instrumentation again.
2012-03-28these VALGRIND allocator annotations never worked for me, just busted memcheckCaolán McNamara
2012-03-26Hardcode default inifile as /assets/rc on AndroidTor Lillqvist
2012-03-23removed duplicate includes in salTakeshi Abe
2012-03-21More hacking on static linking (iOS) supportTor Lillqvist
2012-03-21Need the weird vnd.sun.star.pathname: prefixTor Lillqvist
2012-03-21Simply hardcode the inifile as "rc" in the app bundle directory on iOSTor Lillqvist
2012-03-21Clean up OSL_TRACE output a little bitTor Lillqvist
2012-03-13make OString work even with old gcc that has SFINAE brokenLuboš Luňák
Since OString already has a ctor accepting const char*, I cannot find out a way to distinguish string literals other than using a template, otherwise const char* somehow takes precedence (all of gcc, clang, msvc). But the template requires the Substitution Is Not A Failure Idiom to actually create only wanted instances. And the compiler can try evaluate the OString ctor as a possibility when comparing an int to an anonymous enum, and anonymous enum as a type without linkage cannot be a template argument before C++11. SFINAE should still work, but not with gcc older than 4.0.2 (which we right now use only on macs). So for that case disable the string literal ctors, which means macs will have one extra strlen call, and also that embedded \0's in string literals will be inconsistent. The tiny performance problem shouldn't matter that much and will eventually go away, the \0 problem should not matter, since before string literal ctors were introduced \0's had not been included anyway unless RTL_CONSTASCII_STRINGPARAM was used. So we should be safe and when removing the CONSTASCII macros \0 cases should be handled by explicitly mentioning the length.