summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)AuthorFilesLines
2017-07-19osl: fix a number of doxygen comments in unx/file_path_helper.hxxChris Sherlock1-109/+58
Change-Id: Icd5553505e48b650103597e40311ac11ba388259
2017-07-19osl: fix file_path_header.cxx commentChris Sherlock1-5/+2
Change-Id: I671ba9d48d327ccabc8851bee596831e04a6f62a
2017-07-19osl: fix header commentChris Sherlock1-18/+11
Change-Id: I06829e4ad0efc78244083e48bf9cd10422ff5e2e
2017-07-19Followup to 56638d1a6d9ba - fValid -> bValidChris Sherlock1-23/+23
In 56638d1a6d9baebfe27cbf82ccf0376926c6a530 we renamed to BOOL to bool, but we also need to change from fValid to bValid. Change-Id: I6a2c2931d8872ee2cfefa43c3f06fff5d5ce0629 Reviewed-on: https://gerrit.libreoffice.org/40115 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-07-18Followup to final followup 647382f52351a75 of my followupChris Sherlock2-5/+5
Change-Id: I0ee075cadb26eb0ceedec1dd047fc157f3929dad
2017-07-18osl: update named pipe handle test namesChris Sherlock1-4/+4
Change-Id: I7c4da48b372c70cea51d8318aba384b9c605c5e1 Reviewed-on: https://gerrit.libreoffice.org/40113 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-07-18osl: pipe test remove unnecessary comment cruftChris Sherlock1-11/+11
Change-Id: I3bbf7cd131804e6788f91ec7418644cb73c62458 Reviewed-on: https://gerrit.libreoffice.org/40107 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-07-17RTL_UNICODETOTEXT_INFO_{DEST|SCR}BUFFERTOSMALL should use TOO, not TOChris Sherlock18-64/+64
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>
2017-07-17loplugin:unnecessaryparen: sal (clang-cl)Stephan Bergmann3-4/+4
Change-Id: Ide9611be8c24437e034460898443aca7ed299d39
2017-07-16Avoid crash when rSignal.Handler is SIG_DFL etc.Stephan Bergmann1-16/+1
Change-Id: I20bccf4f6d52986334725cf72909730fcfc5109b
2017-07-13use more OUString::operator== in forms..salNoel Grandin5-9/+8
Change-Id: I70d7e50f8c1e019524ccad915f0cca912c5035dc Reviewed-on: https://gerrit.libreoffice.org/39899 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-13These arguments can apparently never be nullStephan Bergmann2-10/+8
Fixing 7b4f4f15971047664fa278fff96b959d53b272b3 "osl: followup to 7c6ccc42 for w32/unx file.cxx" for good... Change-Id: Icedaaa0b0f909d802dbdcf4fdaa40fd338bcbf11 Reviewed-on: https://gerrit.libreoffice.org/39892 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-12strip some linefeeds from the end of debug outputNoel Grandin1-1/+1
Change-Id: I2821969d86b7f8cee53404e6a0acfbebbe53b3ac Reviewed-on: https://gerrit.libreoffice.org/39824 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11osl: unx file.cxx nullptr testing cleanupChris Sherlock1-4/+4
Change-Id: Id265092c1cbf09f8c29c77c048edbf14f15070eb Reviewed-on: https://gerrit.libreoffice.org/39515 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-07-10simplify some OUString compareTo callsNoel Grandin1-4/+4
to either startsWith or == or != Change-Id: Ie4b4662f5b8e4532cbc1ab36910389e0b3d41ef0 Reviewed-on: https://gerrit.libreoffice.org/39750 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10teach unnecessaryparen loplugin about identifiersNoel Grandin5-10/+10
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10osl: w32/pipe.cxx fPipeAvailable -> bPipeAvailableChris Sherlock1-4/+4
Change-Id: I2e57e9413f98de9a6d240c3c61c85fd7bd435498
2017-07-10osl: followup - m_NamedObject never INVALID_HANDLE_VALUEChris Sherlock1-1/+1
Change-Id: Ia4517b01a39c02619ccae73e4c182ac8d7e6e22c
2017-07-10Followup: m_NamedObject never INVALID_HANDLE_VALUE, must be nullptrChris Sherlock1-2/+2
Change-Id: I6837937945749a0f44e4e50aae1267edb37921d7
2017-07-10osl: CreateMutexW returns NULL on failure, not INVALID_HANDLE_VALUEChris Sherlock1-12/+14
Fun fact - CreateFileW returns INVALID_HANDLE_VALUE (-1_) because the 16-bit functions OPenFile, _lopen and _lcreat return -1, so the Win32 API function CreateFile function also returned INVALID_HANDLE_VALUE to ease porting Win16 code to Win32. CreateMutexW, on the other hand, had no corresponding function in 16-bit Windows so it returns NULL on failure. cf. https://blogs.msdn.microsoft.com/oldnewthing/20040302-00/?p=40443 Raymond Chen is a gem who explains clearly why Win32 code is so idiosyncratic. Change-Id: I7888d46b048e5674ad776c8ac8070a1e57aa37a6
2017-07-08osl: followup to 7c6ccc42 for w32/unx file.cxxChris Sherlock2-4/+0
As pointed out by sberg, either the issue is a programming error that needs an assert, or the issue is unusual and should just generated a warning, but never both. Change-Id: I07ae1e99597cd6c342791aa268b2240db987ae91 Reviewed-on: https://gerrit.libreoffice.org/39514 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-07-07tdf#43157 - osl: convert OSL_ASSERT in unx/file_misc.cxxChris Sherlock1-14/+18
Change-Id: I99e3f1e1fe2f51c6c3891a6e508b468ec068cae0 Reviewed-on: https://gerrit.libreoffice.org/39539 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-07-07osl: unx osl_getDirectoryItem() cleanupChris Sherlock1-4/+4
Whitespacing made consistent in function, and switch to more conventional nullptr testing style. Change-Id: I70921e9f79e8e0ebf4a74b84f73313aed033ec5b Reviewed-on: https://gerrit.libreoffice.org/39538 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-07osl: unx osl_getNextDirectoryItem() cleanupChris Sherlock1-23/+24
I could not easily tell on first reading this function if Directory was a pointer or not (it is), so changed name to pDirectory). The signature was too long, so fixed this, whitespacing was inconsistent so small change there. Also converted to more contentional testing of nullptr. Change-Id: Ia8b1d33a4a4fbe3e050d63116997ef57a28d73b3 Reviewed-on: https://gerrit.libreoffice.org/39537 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-07osl: osl_closeDirectory cleanupChris Sherlock1-9/+9
When I was reading this code, it wasn't entirely clear to me without looking at the typedef of oslDirectory whether I was dealing with a variable or a pointer, so I have changed this to pDirectory. I also made a small tweak to the whitespace to help readability. I also changed from explicit comparison to nullptr to the more conventional style. Change-Id: I4e9a69575733ab71a175d14a30c1976e6771ed5b Reviewed-on: https://gerrit.libreoffice.org/39536 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-07loplugin:unnecessaryparen handle parens inside call exprNoel Grandin2-2/+2
stick to single-arg function calls, sometimes parens in multi-arg calls might be there for clarity Change-Id: Ib80190c571ce65b5d219a88056687042de749e74 Reviewed-on: https://gerrit.libreoffice.org/39676 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07C++11 remove std::binary_function bases from functorsJochen Nitschke1-2/+1
std::binary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::binary_function base class was used by deprecated std::bind2nd, this was solved in individual commits. The members first_argument_type and second_argument_type were used in chart2/source/controller/dialogs/DataBrowserModel.cxx: DataBrowserModel::implColumnLess and are inlined in this commit. Change-Id: I60ded60a8d4afd59e15ac15a58e18d2498c9be5a Reviewed-on: https://gerrit.libreoffice.org/39659 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06use OString::operator== in preference to ::equalsNoel Grandin4-9/+9
Change-Id: Ib291521963a791a9c6175964571e9d9895072acf Reviewed-on: https://gerrit.libreoffice.org/39646 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06tdf#43157 - osl: convert OSL_ASSERT in unx & w32 tempfile.cxxChris Sherlock2-3/+7
Change-Id: I243a5dc4061844af95eae83347ddb15ea7134c0c Reviewed-on: https://gerrit.libreoffice.org/39542 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-07-06teach unnecessaryparen plugin about other kinds of statementsNoel Grandin1-1/+1
i.e. do / while / switch Change-Id: Id0985015cc425557f9984734701d56466f8a6088 Reviewed-on: https://gerrit.libreoffice.org/39601 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06loplugin unnecessaryparan improvementsNoel Grandin1-1/+1
Change-Id: I73e945d6ec53537a0da45f6b6291018c7f251a7e Reviewed-on: https://gerrit.libreoffice.org/39587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05tdf#59424 unset open flag O_EXCL if O_CREAT is not setTomaž Vajngerl1-0/+4
If O_EXCL is set and O_CREAT is not, then the behaviour is undefined. See open(3) man page. Change-Id: If61aaf0a0e46babae7df7e17ffbdcb4c81ab6a3c Reviewed-on: https://gerrit.libreoffice.org/38978 Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2017-07-05new loplugin unnecessaryparenNoel Grandin3-10/+10
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05loplugin:casttovoid (clang-cl): salStephan Bergmann1-3/+1
Change-Id: I03e22f73404e1e52761bce1757b224cf6368bd61
2017-07-03loplugin:oncevar (clang-cl): salStephan Bergmann6-14/+9
Change-Id: Ib43dd6f8c96274d251bbf5935888789964ba3f9b
2017-07-03Rather translate "Sonderzeichen" as "special characters"Stephan Bergmann1-7/+7
...as had been done in sal/textenc/tcvtlat1.tab, in 5034e8217c9844293dc94e5dff0bdc865ad7a91a "Translate German comments and debug strings (leftovers in dirs sal to sc)". What those comments actually want to say is that, despite being the ASCII control character region, those encodings contain some graphic characters there. Change-Id: Iefad9c45341891c3e91e6b9fb265d3070d1220ad
2017-07-03C++11 remove std::unary_function bases from functorsJochen Nitschke1-1/+1
std::unary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::unary_function base class was used in 3 places: * chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole is used in a std::not1 function helper who uses the members return_type and argument_type. - replace deprecated std::not1 with a lambda * chart2/source/tools/ModifyListenerHelper.cxx: lcl_weakReferenceToSame used the argument_type member in the operator() parameter. - inline the parameter type. * xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement used result_type and argument_type in operator(). - inline the types Also fix compile error with gcc about finding std::for_each. Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f Reviewed-on: https://gerrit.libreoffice.org/39358 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-03Translate German comments and debug strings (leftovers in dirs sal to sc)Johnny_M4-55/+55
Translates leftovers found using a custom regex and manually checking the rest of the affected file. Additionally: - A few spelling fixes Change-Id: I2b83bd11adf520b90bb29c8ea624990759dad3c6 Reviewed-on: https://gerrit.libreoffice.org/39427 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-07-02loplugin:casttovoid: salStephan Bergmann7-82/+13
Change-Id: I70cf54799f08e3bc586d42d6c634eb02a049ea0f
2017-06-27-Werror=catch-value= (GCC 8)Stephan Bergmann1-1/+1
("error: catching polymorphic type ‘class std::length_error’ by value") Change-Id: I56398642709f5f14c17b0b2928ae06d8fea0a13b
2017-06-26s/catched/caughtNoel Grandin1-1/+1
Change-Id: I7ea6977a9749e86f8058b78cdb91cd2c62da8264 Reviewed-on: https://gerrit.libreoffice.org/39164 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-26loplugin:oncevar in oox..saxNoel Grandin5-10/+5
Change-Id: I0fee8bcddaeea48335e3be05761d2ad2c45020e2 Reviewed-on: https://gerrit.libreoffice.org/39238 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-26osl: w32/pipe.cxx typo should have been caught, not cachedChris Sherlock1-1/+1
Change-Id: Iacdf76eec11aedc8a3308897edfda400790bdc19 Reviewed-on: https://gerrit.libreoffice.org/39245 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-25osl: socket.cxx nullptr comparison cleanupsChris Sherlock2-21/+19
Change-Id: Ie0339482bf3a9b108e26008526bc5e73b761d27b Reviewed-on: https://gerrit.libreoffice.org/39223 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-25osl: for should be a whileChris Sherlock1-1/+1
Change-Id: Id4e92f0c7927bbc767061461361936dbad8da778 Reviewed-on: https://gerrit.libreoffice.org/39204 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-25osl: test condition fixes in unx/file.cxxChris Sherlock1-31/+30
Change-Id: I8debaa590c570ea7a6447668b053a2d4c507edf0 Reviewed-on: https://gerrit.libreoffice.org/39203 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-25osl: whitespace cleanup of unx/file.cxxChris Sherlock1-228/+286
Change-Id: I10c9a8d1474920afb7f6afc4d7d34172c398ab4d Reviewed-on: https://gerrit.libreoffice.org/39201 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-25osl: doxygen comments in unx/file.cxxChris Sherlock1-12/+10
Change-Id: I26d8b665e8940fd3821d29ced0046c2d1dd5a59c Reviewed-on: https://gerrit.libreoffice.org/39200 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-25osl: cleanup headers of unx/file.cxxChris Sherlock1-8/+5
Change-Id: Ic1d171cf11cf36058f6d1f40c9ca041012e1b0e1 Reviewed-on: https://gerrit.libreoffice.org/39198 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-25tdf#43157 - osl: convert OSL_PRECONDs in w32 & unx file.cxxChris Sherlock2-14/+19
Change-Id: Ic914d9240e6b06b7e6550fe311fd69e310254bd5 Reviewed-on: https://gerrit.libreoffice.org/39197 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>