summaryrefslogtreecommitdiff
path: root/sal/inc/rtl
AgeCommit message (Collapse)AuthorFilesLines
2013-04-24move URE headers to include/David Tardon37-17213/+0
Change-Id: Ib48a12e902f2311c295b2007f08f44dee28f431d Reviewed-on: https://gerrit.libreoffice.org/3499 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2013-04-22Avoid warnings from compilerplugins/clang/sallogareas.cxxStephan Bergmann1-19/+6
Change-Id: Icce3ffd29398a3488e7704562a4e9064f106b393
2013-04-22Move to MPLv2 license headers, with ESC decision and author's permission.Michael Meeks1-23/+4
2013-04-22Revert "fdo#62096: Replaced some compareTo with =="Fridrich Štrba1-4/+4
This reverts commit dd47994722eaead16099145e593fbf878072d52b.
2013-04-22fdo#62096: Replaced some compareTo with ==Sameer Deshmukh1-4/+4
Change-Id: I1151dafcef91abdb2ce08abe3547a49fe3f4a67c Reviewed-on: https://gerrit.libreoffice.org/3509 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-04-19better use SAL_LOG_INFO as triggerBjoern Michaelsen1-1/+1
Change-Id: I37635f9bd86d194b303705a58d81502d7d586692
2013-04-18forward RTL_CONTEXT_foo logging to SAL_INFO in default debuggingBjoern Michaelsen1-3/+21
* RTL_CONTEXT_foo is originally intended to be used for performance measurement, but mostly unused right now * however its macros are sprinkled all over the codebase and might provide good help for ad-hoc debugging, and prevent SAL_INFO duplication * if there is no performance logging, these macros are now forwarded to SAL_INFO with logarea "logfile" or "$AREA.logfile" Change-Id: I495c8924e5b55124f7eac68eccda074d0740c117 Reviewed-on: https://gerrit.libreoffice.org/3421 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2013-04-16Further clean-up related to removed library unloading featureStephan Bergmann1-44/+22
Change-Id: I1ec2aa4d0ed0940e7c0a26a18c78f2df4693d278
2013-04-16API CHANGE: remove some of useless rtl/unload.h functionalityMatúš Kukan1-197/+0
Change-Id: If32923e35ef97f42d5203975362e5c76948ff327 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-04-15fdo#60724 correct spellingThomas Arnhold1-1/+1
Change-Id: Ieb653adbd0cb4371ec5db57e70bcc551872f647f
2013-04-15fdo#60724 informations -> informationThomas Arnhold1-1/+1
Change-Id: Ifd34ebfc7fe01b4a470eb072597dd3ec97c97863
2013-04-10Clean up documentationStephan Bergmann1-8/+8
Change-Id: Icc53c25400acb46070fead08f7602295599fc6c8
2013-04-10Introduce characters utilities in rtl/character.hxxArnaud Versini1-0/+144
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
2013-04-04remove HAVE_SFINAE_ANONYMOUS_BROKENLuboš Luňák5-116/+1
Since we no longer support the old Apple SDK using gcc-4.0.1, we can remove the cruft to work around its problems. Woohoo. Change-Id: Idf275e76449443f1f0314e75dab993f213a77eb7
2013-04-03Asserting rtl::O[U]StringBuffer::operator [] preconditionsStephan Bergmann2-2/+10
...and fixing two call-sites. Change-Id: I8ed8cb189bd5034130b49b2f57156568e6b24716
2013-03-28Half-assed attempt at enforcing operator [] preconditionsStephan Bergmann2-2/+16
...inspired by comments to <https://gerrit.libreoffice.org/#/c/3068/> "String::AppendAscii cleanup in dbaccess," but it quickly becomes apparent that lots of code rely on s[s.getLength()] == 0, so live with a weakened precondition check for now. Change-Id: Ifad96c706b14433df4a084ab8054b32433b8b5b6
2013-03-25remove external include guardsThomas Arnhold1-2/+0
Change-Id: If5758e02baa8e019923355b6c97043b306223fdd
2013-03-25Add test case for toInt overflow detectionStephan Bergmann2-6/+12
Change-Id: I1c5b66888baac8aa1bc99c06579e0ef3638a4877
2013-03-25Clean up new toUInt64Stephan Bergmann4-6/+47
Change-Id: Ic908cb5cc9169ab1baae2c1c52070adfb9afba39
2013-03-22For convenience, include config_global.h in sal/config.hStephan Bergmann3-11/+3
...which must be included first thing everywhere anyway. Change-Id: Idbbf941b526f48a89d6398e19404b1ff0e23a6b4
2013-03-20Deprecate confusing rtl::OUString::compareToAscii(asciiStr, maxLength)Stephan Bergmann1-0/+7
Change-Id: I3a41036ec03cdaefea94b19dbedf59e5a5e37dc8
2013-03-20use #if instead of #ifdef for testing config_xxx.hxx macrosLuboš Luňák7-14/+14
http://lists.freedesktop.org/archives/libreoffice/2013-March/047769.html Change-Id: I81ed4500878ff3193e028410a1f0205e28d17fc3
2013-03-18cleanup doxygen warningsPeter Foley13-82/+106
Change-Id: I9181cad5bfa93f9e8b3d944b2b50a3ccc0b42595
2013-03-12janitorial: typo in commentLionel Elie Mamane1-1/+1
Change-Id: Idd62c2768a03f7aab8ff11165425f8c383653f38
2013-03-08Assert OUStringBuffer::copy preconditionsStephan Bergmann1-0/+4
Change-Id: I46ccba35be6695dba14721303b5eb52f69fc3dfa
2013-03-07add copy() to OUStringBufferChr. Rossmanith1-0/+40
Change-Id: Ibac7f624f1a1dcce653dff4bec573be457d70075 Reviewed-on: https://gerrit.libreoffice.org/2125 Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com> Tested-by: Muthu Subramanian K <muthusuba@gmail.com>
2013-03-02Removing useless STLPort specific codeArnaud Versini1-13/+0
Change-Id: Id4c5907b2431130018bff434049d9e85ae689793 Reviewed-on: https://gerrit.libreoffice.org/2365 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Niko Rönkkö <ronkko@iki.fi> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2013-02-26SAL_WARN_UNUSED_RESULT OString copyEike Rathke1-2/+2
Change-Id: Iba2ee6f72c5d3fe35a22a6b2a6b42866fd8fb6fd
2013-02-26SAL_WARN_UNUSED_RESULT OUString copyEike Rathke1-2/+2
Change-Id: Ic511a4a399ae2d75de6050ac8e3f77ee13ec8275
2013-02-25fdo#60724 - change 'charcter' to 'character'sadam365-5/+5
Changed all occurrences of 'charcter' found by git grep. All of them were used in comments only, so it should not break anything. Change-Id: Ief2c00d929ae7972c55a4920fc0eaa8d6b18ab82 Reviewed-on: https://gerrit.libreoffice.org/2372 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2013-02-14rhbz#908674: Adapt rtl::Allocator::construct to C++11Stephan Bergmann1-0/+12
...otherwise, at least with some --with-system-boost versions and C++11 compilers, like with Fedora's boost-1.50.0-4.fc18.x86_64 and gcc-c++-4.7.2-8.fc18.x86_64, using this to copy-construct an instance of boost::unordered::detail::ptr_node<std::pair<rtl::OUString,Bootstrap_Impl*>> in the call to p_bootstrap_map->insert(...) in rtl_bootstrap_args_open (sal/rtl/source/bootstrap.cxx) would memcopy the ptr_node and fail to call rtl_uString_acquire, leading to memory corruption later on when rtl_uString_release is called one time too often. It is not entirely clear to me whether this is a shortcoming of the given Boost version, but this patch solves the problem and brings rtl::Allocator::construct in line with the (changed) Allocator requirements of C++11 anyway. The problem potentially lurks with every use of rtl::Allocator, but only showed now begining with LO 4.0 where e5111574fd904b38a3980ca4ea3d21cfcb22dea6 "Revert 'sb140: sb140: #i116981# clean up memory upon exit'" re-introduced code into rtl_bootstrap_args_open that inserts into a boost::unordered_map that uses rtl::Allocator. Change-Id: I3be22f59a8eb49d31458480c27f3ce15803c7fd4
2013-02-07improve comments of isEmpty()Chr. Rossmanith4-7/+20
Change-Id: I6542470c2d4b27de25e263651e25baf85c7d018d
2013-02-06O(U)String::valueOf don't duplicate codeDavid Ostrovsky2-8/+2
Change-Id: I586fca181f63999a8f2d19d600b69f6788fd61d9 Reviewed-on: https://gerrit.libreoffice.org/1992 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-02-06add method isEmpty() to OUStringBufferChr. Rossmanith1-0/+13
Change-Id: Ia11d97eebbb08e8058a5f919ed3db3029ce39a78 Reviewed-on: https://gerrit.libreoffice.org/2017 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2013-02-04remove sal_Bool from boolean() docs tooLuboš Luňák2-4/+4
2013-02-04OK for boolean() to take true bool argumentStephan Bergmann2-4/+4
...instead of sal_Bool; this would cause C4800 performance warnings with MSVC, but we disable them anyway. Also, added unit tests that are actually executed. Change-Id: Ib405132565918be72d93b3fc24180edcb6e565c7
2013-02-04Strings: boolean() as a replacement for valueOf(sal_Bool)David Ostrovsky2-4/+36
valueOf(?) has been superseded by number(?). O(U)String::valueOf(sal_Bool) has been deprecated without providing an alternative method. Use boolean() method as a replacement for it. Change-Id: I7eb74574fa8f1a3cf007cb0cbc32e681007ffb92 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-02-04add OUString::toUInt64()David Ostrovsky2-0/+33
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>
2013-01-28cleanups for number() string functionLuboš Luňák4-245/+201
- 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
2013-01-21Revert "avoid -Wsign-promo warnings"Stephan Bergmann2-48/+0
This reverts commit 1efe9a15f86a7a9dc08b57fd1dd12336522ba515, which is obsoleted by 488823a140217e393298bc83e75084041a85ed45 "Remove -Wsign-promo."
2013-01-19microoptimization for "" OUString ctorLuboš Luňák2-4/+16
Now 'OUString()' and '""' should be exactly the same, and thus the latter better :). Change-Id: If42b2ca5889967aaa8ccdaf531b45c75c12d54fd
2013-01-18avoid warning about a comparison being always trueLuboš Luňák2-0/+4
Change-Id: Ie0bd47a16af56b7d3ae070d5b82ec46ed21834c0
2013-01-18avoid -Wsign-promo warningsLuboš Luňák2-0/+48
I actually find the warning to be obsolete nonsense (the manpage talks about cfront), but at least for now. Change-Id: I4390b1779f6f8de062afd441f6855cb760adf93d
2013-01-18long and long long can be the same size (and thus also sal_Int64)Luboš Luňák2-0/+2
Change-Id: I3961ec27d23915b038c3a803dc71e7d937ca331c
2013-01-18Create OUString and OString number(*) methods.Noel Grandin2-12/+264
API CHANGE: Adds new methods (several overloads) OString::number() OUString::number() and marks all of the existing fromValue() methods as deprecated. The purpose of this change is to clean up call sites by hiding the necessary casts. The casts are necessary because of overload resolution rules which are somewhat vague about which methods to choose when using integer types. See mailing list discussion here: http://nabble.documentfoundation.org/replacing-OUString-valueOf-static-cast-lt-sal-Int32-gt-td4027989.html Subject: "replacing OUString::valueOf(static_cast<sal_Int32>) ??" Change-Id: Id3d150a6525eb0334e41e2ec6640bb06cd790b43 Reviewed-on: https://gerrit.libreoffice.org/1625 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
2012-12-19Revert "fix crash for fdo#58306 when appending to OUStringBuffer initialised ↵Luboš Luňák1-1/+1
with """ newFromLiteral doesn't cheat, it's broken This reverts commit 8b9b779e9fc1de7186217b7be75ef02bb66e2da9.
2012-12-19fix crash for fdo#58306 when appending to OUStringBuffer initialised with ""Noel Power1-1/+1
don't call rtl_uString_newFromLiteral when literal has zero length as that cheats and doesn't assign a buffer. what we really want to do is assign a buffer with initial capacity ( but no content ) Change-Id: I9d642c453dee747aca6365abb15408c05f86bb52
2012-12-18fdo#58473 - fix transliteration crasher caused by writing const string.Michael Meeks2-2/+5
2012-12-17API CHANGE: Remove useless deprecated rtl/memory.hArnaud Versini1-53/+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
2012-12-17OUString::reverseCompareTo() string literal overload to match the AsciiL oneLuboš Luňák1-0/+13
Change-Id: Id5ca706aa3fd1831990db2310933c6b94ca376cb