summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)Author
2014-03-19loplugin:passstringbyrefStephan Bergmann
Change-Id: I461db4b173dcdc812d3ccc5e3eef8a3dad93b0b0
2014-03-19coverity#984119 Uninitialized pointer fieldCaolán McNamara
Change-Id: I6bbb181b892f22d05be76fc75506d94543eb7ee7
2014-03-17sal,toolkit,unotools: prefer passing OUString by referenceNoel Grandin
Change-Id: Ie62a59fd9ff3d6f6a34240fd562fbc91a143bf3a
2014-03-11"overflow" is one wordTor Lillqvist
Change-Id: Ib36c2c5d55f86aff27081a0da554f6e8a81474ee
2014-03-10coverity#1079286 Uninitialized pointer fieldCaolán McNamara
Change-Id: Iaaab025a97d01b248f4478989d6cdfdc8664ba79
2014-03-07coverity#705404: Argument cannot be negativeNorbert Thiebaud
Change-Id: I235a5323ee0fd60aee03c691c0c7fdf6e6e4c08b
2014-03-07coverity#705824 Dereference before null checkCaolán McNamara
Change-Id: Iaf867d92adcc90d90a03dd8b7a353609934d9115
2014-03-07coverity#982463 Dereference after null checkCaolán McNamara
Change-Id: I46cbcb4091428557c8f9516e15c9be0eb4db27b2
2014-03-06Bin unused macxp_OSXConvertCFEncodingToIANACharSetName()Tor Lillqvist
Change-Id: I506940fd1b101d2c3f334e8d6608602c259b0a56
2014-03-06coverity#1190345 log failure to set CLOEXEC flagStephan Bergmann
Change-Id: Ia1678200393db0165711d4027f92a8be6b7f4ca5
2014-03-06coverity#1190347 check rename(3) return valueStephan Bergmann
Change-Id: Iebd3b0e1b52a01e14e01c6db1ca158ada91e8613
2014-03-05Bin unused global variableTor Lillqvist
Change-Id: I9bd4ea90638df91122b96f1fb86043c2d770417d
2014-03-05Use the AppleLanguages preference instead of AppleLocale on OS X and iOSTor Lillqvist
AppleLocale is for things like date formats, it seems, while the first entry in AppleLanguages contains the user's preferred UI language. I think that is closer to what we want here. Note that in AppleLanguages, the country (where present) is separated from the language with a hyphen, while in AppleLocale an underscore is used. Change-Id: I6d8a728d53ca6b46e8fcf0e333a6d0aa34abff1d
2014-03-04coverity#706154 is about call to strcpy, not osl_ProfileGenerateExtensionStephan Bergmann
...and the call to strcpy isn't even necessary. This includes a revert of 430237b3fa16bda228ff82b93228f28894568671 "coverity#706154: Dest buffer too small." Change-Id: I51186da6e7d80438b01d49e24a1fa47877078516
2014-03-04Fix CppunitTest_sal_osl_profileStephan Bergmann
Change-Id: Ie66636881a2e4c754bd95f9d1d72e0b4fc2828df
2014-03-04sal/osl/unx: profile.c -> profile.cxx (to facilitate further fixes)Stephan Bergmann
Change-Id: I3de66f499d20e7765b530890f746ccfe322252ac
2014-03-04Add mode linesTakeshi Abe
Change-Id: Iae71a0779839015b7c853f93703fe263f84a591a
2014-03-03coverity#706154: Dest buffer too smallNorbert Thiebaud
Change-Id: Ib80ed6bbacad9fdbe7a8fbafdd71bb11037e38cb
2014-03-03fdo#72468 Remove memory overflow on static memory.Arnaud Versini
Change-Id: Id294931921499bacb4590c82a5824d3b26d61171 Reviewed-on: https://gerrit.libreoffice.org/7087 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2014-03-01Adapt rtl_uriConvertRelToAbs to RFC 3986Stephan Bergmann
...which updates RFC 2396, removes the requirement that the base URI's path starts with a slash, and clarifies how to treat excess "." and ".." segments. This nicely allows handling of those odd vnd.sun.star.Package URLs as intended now, so that making <foo> absolute relative to base URL <vnd.sun.star.Package:Pictures/bar> yields <vnd.sun.star.Package:Pictures/foo> instead of provoking a MalformedUriException. Change-Id: Ice84303a57698a2c05d3a45541fe78b67450fa3c
2014-03-01Fix construction of non-ASCII test stringStephan Bergmann
Change-Id: I495ba4e2394bf0fd09b4d0f0111f9b8531674733
2014-03-01fdo#71043 - Use STACK lint tool to clean codeJosé Guilherme Vanz
The code is using a pointer without check if it is not null. Change-Id: Icb2dcf8d41a35514e18a5881f59399951b3e0493 Reviewed-on: https://gerrit.libreoffice.org/6529 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2014-03-01Remove visual noise from salAlexander Wilms
Change-Id: Idf07c7d31c0a523f929aded9ff3183a3f01b16b9 Reviewed-on: https://gerrit.libreoffice.org/8297 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-28Simplify string constructionStephan Bergmann
Change-Id: Ib46a64d8438dcaba37a234460d1a4113707e8c43
2014-02-28Missing @since tags, and adapt to semantics of posix_memalignStephan Bergmann
Change-Id: I677d973fbcf118111b5fc93b09143c66b0afb0d9
2014-02-28Android does not have posix_memalign()Tor Lillqvist
Change-Id: I4cd2f1e41b3bcab0d87a7b353d63c04b20aad492
2014-02-28Fix typo: s/Alined/AlignedTor Lillqvist
Change-Id: I248d002d2ed0e61f97a35ea0d329c64832252ad7
2014-02-27Ensure that numeric array storage is aligned to 256-byte boundary.Kohei Yoshida
OpenCL devices require this else we would get a performance hit. Change-Id: I6b1db6320fa84f933b6446022a0fd02ba267bf21
2014-02-24Use "deprecated" API for OS X alias resolving on X 10.5Douglas Mencken
Change-Id: I68a49b95c9b4f4d1d0472a298f8b29d83435c88e Reviewed-on: https://gerrit.libreoffice.org/8195 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-02-23Remove unneccessary commentsAlexander Wilms
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb Reviewed-on: https://gerrit.libreoffice.org/8182 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-21loplugin:literaltoboolconversionStephan Bergmann
Change-Id: I5796e8b4c156b13c5cab42bc0012d241efb1c4d9
2014-02-21Replace deprecated std::auto_ptr with boost::scoped_ptrTakeshi Abe
Change-Id: I674b7ee507258555b667657a13db6fda9b8d8372
2014-02-18Stick to a single O[U]String hash functionStephan Bergmann
8f8bc0dcf3bc253ae49159d52db049767f476ced "Move string hash function into String class" had introduced a new getHash64 that, besides returning sal_uInt64 instead of just sal_Int32, didn't do sampling of only a handful of characters, but always computed the hash over all characters (as the usage in SfxItemSet and SdPage appears to require for either performance or approximated correctness). However, it would be advantageous to keep the stable URE interface as small as possible. Now, O(1) sampling was apparently considered state of the art when the rtl string classes were first created, closely copying java.lang.String, which at that time demanded sampling for hashCode(), too---but never sampling more than 15 characters, with the obvious (in hindsight, at least) performance catastrophes, so they changed it to O(n) somewhere along the way. Based on that, this commit changes the existing hash functions to not do sampling any more, and removes the newly introduced -64 variants again. (Where the extended value range of sal_uInt64 compared to sal_Int32 was hopefully not vital to the existing uses.) The old implementation used sampling only for strings of length >= 256, so I did a "make check" build with an instrumented hash function that flagged all uses with inputs of length >= 256, and grepped workdir/{Cppunit,Junit,Python}Test for hits. Of the 2849 hits encountered, 2845 where in the range from 256 to 295 characters, and only the remaining four where of 2472 characters. Those four were from CppunitTest_sc_subsequent_filters_test, importing long text into a cell, causing ScDocumentImport::setStringCell to call svl::SharedStringPool::intern, which internally uses an unordered_set. These results appear to justify the change. Change-Id: I78fcc3b0f07389bdf36a21701b95a1ff0a0d970f
2014-02-18C++03 fixupStephan Bergmann
Change-Id: I2a8b33adbc3844347e78738fbbf5a336af543e8a
2014-02-17coverity#984129 Uninitialized scalar fieldNorbert Thiebaud
Change-Id: Ia7b1a6aa15dd2438ebb39739535c4dfe0836e785
2014-02-17coverity#984130 Uninitialized scalar fieldNorbert Thiebaud
Change-Id: I6ebb1078c44b5fc0140ee59dc16a2bd7c7188453
2014-02-17sal: sal_Bool -> boolStephan Bergmann
Change-Id: I071a931660dafc1ee5950da527b042fb175255b8
2014-02-17String cleanups.Muthu Subramanian
Change-Id: Ibebf394d69ed4845d91176727f291187ba35ed34
2014-02-13Revert "sal: fix some clang warning about implicit bool conversion"Stephan Bergmann
This reverts commit 56ff07a795aca516106bfde80cb32860065690a6, the correct fix is d19598b56c8bec688d1944cd167f32a369344100 "Adapt ImplicitBoolConversion to 32-bit builds (where sal_Int32 is long)."
2014-02-13Move string hash function into String class.Muthu Subramanian
hashCode() seems to do sampling while creating the hash. hashCode64() will not. Change-Id: Id30f5a2a774cf5244dbc00da9649e95a532484be
2014-02-12sal: fix some clang warning about implicit bool conversionMichael Stahl
Change-Id: I5ecaf73922c6a30add6e270b8abdfdb5c28fe4a5
2014-02-10Do not do RTL_LOG_STRING_NEW on null pointerStephan Bergmann
Change-Id: Ie972599650620324fa7af5ed2b2843bfc1f34c43
2014-02-06typo fixes in commentsAndras Timar
Change-Id: Idd49478d59cd062118fbf8e99d1c8bc5250013fc
2014-02-06Typo: seam(s) -> seem(s)Julien Nabet
Change-Id: I840d120644760b61a39ad88b4095056f0f753bb7
2014-02-06coverity#705403 Argument cannot be negativeCaolán McNamara
Change-Id: I0cf67a4bd5ec95e135511611c236350d4347895e
2014-01-28bool improvementsStephan Bergmann
Change-Id: I7ae2b02e435d21390843c6c56877a8ce3a73f9f2
2014-01-28Apparently missing "== nError1"Stephan Bergmann
Change-Id: I9096e00db4c94b318406b022f675bb866f568d7e
2014-01-28coverity#440521 Dereference before null checkCaolán McNamara
Change-Id: I653b78d9404764d1c89d11154fd8e6a767df9cb0
2014-01-28coverity#440520 Dereference before null checkCaolán McNamara
Change-Id: Id0e2c8e5579ae81c368cf886e52c8306f271c067
2014-01-28coverity#440519 Dereference before null checkCaolán McNamara
Change-Id: I78cfe1a807e59d63dc22fbec8bcadfa7596d5a96