summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)Author
2017-07-24fix use after delete in osl::Pipe dtorCaolán McNamara
drop down the the c api so we can truly pass ownership of the handle to xNoAcquirePipe Change-Id: I12acbec81726ae4a451b501bea5492a5865c0cc4
2017-07-23coverity#1415617 Resource leakCaolán McNamara
Change-Id: Ib23bbd9403f44fd7aa3635a3febb6533b1f9edad
2017-07-23rtl: cleanup equality conditions in uuid.cxxChris Sherlock
Change-Id: I8918cd97f9ab89f0a2f7f95cd59b706ca5a55e2b
2017-07-23rtl: cleanup uri.cxxChris Sherlock
Change-Id: Ic9ddcaa7c699830216e157bd9dfc09d30b50b3e6
2017-07-23rtl: cleanup rtl_process.cxxChris Sherlock
Change-Id: I8640da0d5f44d69b9b628ac2076aec50b8e62ceb
2017-07-23rtl: remove comments, cleanup equality conditions in random.cxxChris Sherlock
Change-Id: I915aafe5a0df39b19e1f5bdc701cb9175dabb5ed
2017-07-22osl: Windows pipe converted from OSL_ASSERT to assert/SAL_WARNsChris Sherlock
Explanation for each conversion: - osl_acceptPipe() - don't worry about an invalid oslPipe sent as function parameter, we check for the error returned by ConnectNamedPipe(), and without a valid pipe we just need to return nullptr - warn if INVALID_HANDLE_VALUE for the file handle, should be handled by ConnectNamedPipe() - createPipeImpl() allocates and initializes memory for the oslPipeImpl structure, if it can't do this then something has been done wrongly - osl_receivePipe() - invalid pipe needs to assert because ResetEvent needs valid pPipe->m_ReadEvent - osl_sendPipe() - invalid pipe needs to assert because ResetEvent needs valid pPipe->m_ReadEvent - osl_writePipe() - really just a thin wrapper around osl_sendPipe() - osl_readPipe() - really just a thin wrapper around osl_receivePipe() Change-Id: I581f8aa996375a8691eafaa384d3f63f0c92b0a2 Reviewed-on: https://gerrit.libreoffice.org/40262 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-07-23rtl: cleanup equality conditions in math.cxxChris Sherlock
Change-Id: I13d898479d883f7905d834c82dc778a9e4078375
2017-07-23rtl: cleanup equality conditions in locale.cxxChris Sherlock
Change-Id: I25833b65f89cc24ec2b62d4836f6c7c230c418aa
2017-07-23rtl: remove comment cruft from locale.cxxChris Sherlock
Change-Id: I0db5f31a85e03a0f262f22977dfd7a98090839c7
2017-07-23rtl: cleanup equality conditions in hash.cxxChris Sherlock
Change-Id: I163e1018009d4da49a15457e2cd2f433fd069a73
2017-07-23rtl: fix equality conditions in crc.cxx and digest.cxxChris Sherlock
Change-Id: I3408c2800a5cc41026e5fec8ef99c408e64d69ea
2017-07-23rtl: cleanup cipher.cxx equality conditionsChris Sherlock
Change-Id: I0b8084adea65f8c6a6e5e46b6628297fbd9eda9b
2017-07-23rtl: remove comment cruft from cipher.cxxChris Sherlock
Change-Id: I65d394d2947246b9919e072b06888dd744ef13f0
2017-07-23followup b714ba73c - remove excessive bracesChris Sherlock
Change-Id: I59fe131c6d14d9058fedaf89a2e9d5ceca444aa5
2017-07-22osl: (Win32) check allocated pipe succeeded, otherwise needs to failChris Sherlock
Change-Id: I0e508de4215d92700a9134e422a7b9370f387aea Reviewed-on: https://gerrit.libreoffice.org/40300 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-07-22rtl: fix bootstrap formatting, comparison to nullptrChris Sherlock
Change-Id: I8d00e616a56cc3edac6ba2149fd6f9ae44c23a95
2017-07-22rtl: remove comparisons against nullptr from RTL mem filesChris Sherlock
Change-Id: Ic0ae0378d5b46b3d11c99aef2e845796ad0a9c71
2017-07-22rtl: remove comment cruft from alloc filesChris Sherlock
Change-Id: Ibac120af6879739091aacefef5c773649e222f85
2017-07-22osl: get rid of comment cruft in w32/time.cxxChris Sherlock
Change-Id: Ief31a90cb0d14ac396be4d11719f8deb136b081d
2017-07-22osl: get rid of comment cruft in w32/sockimpl.hxxChris Sherlock
Change-Id: Iab2ac765435113b8776be6b6a632e21385b02fae
2017-07-22osl: get rid of comment cruft in w32/socket.cxxChris Sherlock
Change-Id: Ide9debe3e1029646b01ba7698e2c613ba0040bed
2017-07-22osl: get rid of comment cruft in w32/security.cxxChris Sherlock
Change-Id: Ifd3ba56ad420985e646162041682e4872a13258d
2017-07-22osl: remove sig in commentChris Sherlock
Change-Id: I7e02e463105cf65fcc47ce5e3d5f9476ff778cce
2017-07-22osl: remove dead code from w32/salinit.cxxChris Sherlock
Change-Id: I895c0bb5f9d2d072ab6aa7a6aabb22449287283a
2017-07-22osl: get rid of comment cruft in w32 profile.cxxChris Sherlock
Change-Id: If85f1a6d436e894b27a2fcb10a8d44e56e193fff
2017-07-22osl: small cosmetic change to make comment more readableChris Sherlock
Change-Id: I5be685355b0c3180bbf23a421c66c086f05834fa
2017-07-22osl: get rid of comment cruft in w32 path_helper.hxxChris Sherlock
Change-Id: Iaa6160c21281153041fda38ed99f94419f1e9e0d
2017-07-22osl: get rid of comment cruft in w32 path_helper.cxxChris Sherlock
Change-Id: I111c8b4e39fc9f1dd894979ff6fb5e98659182d1
2017-07-22osl: get rid of comment cruft in w32 nlsupport.cxxChris Sherlock
Change-Id: I530537cb897c21ad4c219a3125d97b97429584a8
2017-07-22osl: get rid of comment cruft in w32 mutex.cxxChris Sherlock
Change-Id: I8ca5a16d0d7bdedf8a8c5685e088043566bab8eb
2017-07-22osl: get rid of comment cruft in w32 module.cxxChris Sherlock
Change-Id: I7cbad67d06942257800403d2d5530e272d33ebb9
2017-07-22osl: minor whitespace fixup from automated changeChris Sherlock
Change-Id: I93186466ba800f46c263bc49f51604a1d014a52f
2017-07-22osl: remove extraneous comments from w32/file_dirvold.cxxChris Sherlock
Change-Id: I21a0ce806f64582a62b9ff0e30a2299d1f478ffc
2017-07-22osl: fix w32/backtrace.cxx commentChris Sherlock
Change-Id: Id6f941a9ef62827d7e4aa1d8ad4af0494470ea8e
2017-07-22osl: get rid of comment cruft in w32 conditn.cxxChris Sherlock
Change-Id: I4ef57b561813c28dfbb2e930e4d972953b94f5ba
2017-07-22osl: give condition tests more descriptive namesChris Sherlock
Change-Id: Iac83de722e5c3ee350e1588940567fc67a79e045
2017-07-22osl: condition qa remove extraneous commentsChris Sherlock
Change-Id: I2db888e3260543563d8c6ea5b0575e46e98df9d7
2017-07-21migrate to boost::gettextCaolán McNamara
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-21osl: Unix pipe converted from OSL_ASSERT to assert/SAL_WARNsChris Sherlock
Explanation for each conversion: - osl_acceptPipe() - don't worry about an invalid oslPipe sent as function parameter an error gets flagged in Unix normally, so it might not be a programming error - definitely assert on an empty name, that's a definite programming error and should never, ever occur - createPipeImpl() allocates and initializes memory for the oslPipeImpl structure, if it can't do this then something has been done wrongly - osl_receivePipe() - invalid oslPipe sent as function parameter might not be a programming error, give a warning but don't assert - osl_sendPipe() - invalid oslPipe sent as function parameter might not be a programming error, give a warning but don't assert - osl_writePipe() - really just a thin wrapper around osl_sendPipe(), which detects and handles invalid pipes - osl_readPipe() - really just a thin wrapper around osl_receivePipe(), which detects and handles invalid pipes Change-Id: I4923265b4c648852743c406b682d43ffb9ac6537 Reviewed-on: https://gerrit.libreoffice.org/40003 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-07-21osl: fix Pipe noacquire/acquire testsChris Sherlock
There is an incomplete test of ::osl::Pipe::Pipe(oslPipe, __sal_NoAcquire), but the comments show that the tester wasn't able to figure out a way to test the noacquire variant of this constructor. However, they seem to have not just given up but copied and pasted the acquire and no acquire tests - the error codes for the acquire test talk about non-acquisition and don't actually see if the handle is the same or not. I have fixed this test. To test if the noacquire is working or not then you merely have to: 1. create a new Pipe instance 2. create a new Pipe non-acquired instance copy of the first instance 3. delete the non-acquired instance copy 4. try to send a single character to the original Pipe instance, which should return an error (negative return result) because at this point there is no valid pipe to operate on as the pipe should have been destroyed when you deleted the copy. If the send() succeeds, then this is a test failure. For the acquire test, it didn't actually test if the handles are the same - I have corrected this now. Change-Id: If868746233d3a222cc6f9e7cd0d453e70ef6c7cc Reviewed-on: https://gerrit.libreoffice.org/40102 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-07-19osl: fix a number of doxygen comments in unx/file_path_helper.hxxChris Sherlock
Change-Id: Icd5553505e48b650103597e40311ac11ba388259
2017-07-19osl: fix file_path_header.cxx commentChris Sherlock
Change-Id: I671ba9d48d327ccabc8851bee596831e04a6f62a
2017-07-19osl: fix header commentChris Sherlock
Change-Id: I06829e4ad0efc78244083e48bf9cd10422ff5e2e
2017-07-19Followup to 56638d1a6d9ba - fValid -> bValidChris Sherlock
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 Sherlock
Change-Id: I0ee075cadb26eb0ceedec1dd047fc157f3929dad
2017-07-18osl: update named pipe handle test namesChris Sherlock
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 Sherlock
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 Sherlock
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 Bergmann
Change-Id: Ide9611be8c24437e034460898443aca7ed299d39