summaryrefslogtreecommitdiff
path: root/comphelper
AgeCommit message (Collapse)AuthorFilesLines
2017-11-13Fix typosAndrea Gelmini2-2/+2
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91 Reviewed-on: https://gerrit.libreoffice.org/44654 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-13Remove OAccessibleTextHelper::getCharacter and getTextRangeArnaud Versini1-28/+7
Change-Id: Ib32e3ca6ba55ab99820a54023041247cea96ab0c Reviewed-on: https://gerrit.libreoffice.org/44652 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-13Remove OCommonAccessibleText::getText and getCharacterCount.Arnaud Versini1-22/+0
No need to create helper for those methods. Change-Id: I0505fe8141b1bad852b7f30aeb69628fb6a90071 Reviewed-on: https://gerrit.libreoffice.org/44649 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-10No need to blacklist this loplugin:unnecessaryoverrideStephan Bergmann1-7/+0
...a using declaration should fix it just fine Change-Id: I0279994c155775e9a58e93aef8da4522d4fd93fd Reviewed-on: https://gerrit.libreoffice.org/44590 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-09loplugin:finalclasses in comphelperNoel Grandin2-17/+2
convert ServiceInfoHelper to a namespace, since the only usage is to call it's static method Change-Id: I908bdbc06cbdb6b72ee1ae469ff207b2fca69963 Reviewed-on: https://gerrit.libreoffice.org/44533 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-09use rtl::Reference for SlaveDataNoel Grandin1-15/+14
Change-Id: I0cc0455a97be2e0cd84ccadba1f3745b584e1f33 Reviewed-on: https://gerrit.libreoffice.org/44461 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-04Make Windows error reporting more robustMike Kaganski1-1/+1
https://msdn.microsoft.com/en-us/library/ms679351 describes that "it is unsafe to take an arbitrary system error code returned from an API and use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS" Previously in case when an error string would contain inserts, function returned error, so the error message wasn't shown (at least it didn't crash, thanks to nullptr as the function's last argument). As the function may fail, we now pre-nullify the buffer pointer to avoid dereferencing uninitialized pointer later (though at least for some Windows versions, the function nullifies the pointer in case of FORMAT_MESSAGE_ALLOCATE_BUFFER, but there's no explicit guarantee of this). Also release of allocated buffer is changed to recommended use of HeapFree. The code that doesn't make use of OUString is left directly calling FormatMessage, to avoid introducing new dependencies. Where it makes sense, we now use WindowsErrorString from <comphelper/windowserrorstring.hxx> Change-Id: I834c08eb6d92987e7d3d01e2c36ec55e42aea848 Reviewed-on: https://gerrit.libreoffice.org/44206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-30clang-tidy modernize-use-equals-default in comphelperJochen Nitschke1-13/+0
Change-Id: I24a3ecd2ea9fe7e08c92b95aac57a58b922616b2 Reviewed-on: https://gerrit.libreoffice.org/44054 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-27fix memory leakCaolán McNamara1-0/+2
Change-Id: I6683ab0d39dbbb5c0ba0958d72f0a1bbfab47164 Reviewed-on: https://gerrit.libreoffice.org/43954 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-25loplugin:constmethod in comphelper,ucbhelperNoel Grandin5-10/+10
Change-Id: I27a860fbbedd2174c60c199af18cae76e02abc25 Reviewed-on: https://gerrit.libreoffice.org/43759 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: comphelperStephan Bergmann11-31/+31
Change-Id: I9297bd0449633d1055125e7c2f2f6d215a22ae7d
2017-10-23overload std::hash for OUString and OStringNoel Grandin3-3/+3
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-05TSCP: include certificate usage in paragraph signaturesAshod Nakashian1-1/+1
Change-Id: I6f4b891a016c67051efd9033329065d7e3c8a06b Reviewed-on: https://gerrit.libreoffice.org/43022 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin6-19/+17
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-03LOK: getSpellLanguages() is not necessary in comphelper in the end.Jan Holesovsky1-15/+0
Change-Id: If81cd3d4508ba3f44304a9ec9b643bf771e8930c
2017-10-03lok: use getCommandValues to obtain a list of languagesHenry Castro1-0/+15
Change-Id: I4a1f04b9dfe9e3ebbc174380db93c332e958ccfa Reviewed-on: https://gerrit.libreoffice.org/43060 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
2017-10-02lokdialog: Dialog invalidation supportPranav Kant1-0/+12
For now, just invalidate the whole dialog whenever any of the controls in the dialog get invalidated. Since during dialog painting, many such invalidations are triggered, don't listen to them when we are painting. Change-Id: Ia8fc12cf9469691d60e91ef770d687e5ff01a7ef
2017-10-01throw more useful uno::Exception'sNoel Grandin1-1/+1
if we're going to throw the base class of the exception hierarchy, we can at least put a useful message in there to make the source a little bit easier to locate. Change-Id: I2f3106c99ba25125eacef8fa77e2f3a2c89f2566 Reviewed-on: https://gerrit.libreoffice.org/42968 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-27tdf#75757 comphelper: avoid STL inheritance in SequenceAsHashMapMiklos Vajna1-1/+0
Change-Id: I5c7d107a05deb06749b4d04246ba183adfafb14d Reviewed-on: https://gerrit.libreoffice.org/42829 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-09-25Fix typosAndrea Gelmini1-1/+1
Change-Id: I879a52820d78d9151ef64dd21612379f617f66e2 Reviewed-on: https://gerrit.libreoffice.org/42726 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-09-23new loplugin unnecessarycatchthrowNoel Grandin1-78/+70
Change-Id: Iabab71ee076227bc38447ec109afaea1e53a86a6 Reviewed-on: https://gerrit.libreoffice.org/42643 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-22Fresh run of bin/update_pch.shMike Kaganski1-6/+18
Change-Id: I69d4157aaf6570cecd51ea59df20556914942e06 Reviewed-on: https://gerrit.libreoffice.org/42565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-22IndexedPropertyValuesContainer: remove iterators stupidityMike Kaganski1-48/+3
It uses random-access iterators, so just use O(1) increments Change-Id: I9f80789d0bc03184d346c6814fd015bc06876acd Reviewed-on: https://gerrit.libreoffice.org/42606 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-21loplugin:flatten in basctl..configmgrNoel Grandin5-88/+70
Change-Id: I674cad57ce30a885e126d3bcc921f8fcb53dc36d Reviewed-on: https://gerrit.libreoffice.org/42577 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-19Unify SolarMutex implementationsJan-Marek Glogowski1-1/+65
All backends implement the SolarMutex in mostly the same way. So this consolidates this code into a GenericSolarMutex. We still need the abstract SolarMutex class for the fake AKA fascade implementation in dbaccess. The patch also replaces various places of direct mutex usage with either SolarMutexGuard or SolarMutexReleaser objects. Change-Id: Ia0146dd6c51a3b9a513cc6af34a66def58aad831 Reviewed-on: https://gerrit.libreoffice.org/42325 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-19Put back one more #includeStephan Bergmann1-0/+2
...like 74cd94a17b3922bdcd44ab6460232297fbf665d0 "Put back some #include (needed for e.g. --disable-pch)" (this one having caused loplugin:unreffun with clang-cl) Change-Id: I1a888ca754365232663fed0b99535d91fded040a
2017-09-15windows_process: don't use 8-bit string functionsMike Kaganski1-14/+11
Change-Id: Ie309f907220ffb69585442a1ae456623debf6654 Reviewed-on: https://gerrit.libreoffice.org/42303 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-11clang-tidy modernize-use-emplace in c*Noel Grandin8-26/+22
Change-Id: I419d1f67ba301050d05981db2a3d6178878684a9 Reviewed-on: https://gerrit.libreoffice.org/42110 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-05Drop lazywrite property, which is silently ignored by configmgr anywayStephan Bergmann1-6/+0
...at least ever since the "new" configmgr reimplementation, 6b849a6aeeb9ea8b1e25e28d5a8be390e425f84e "#i101955# initial work in progress of a configmgr reimplementation (for now in an extra module 'configmgr2')" et al Change-Id: I43430d991647fb2e26762463d51175247db0604b
2017-09-04We can use thread_local on Windows, tooTor Lillqvist1-3/+3
(In some DBG_UTIL code.) Change-Id: I2f09c46186154551bfed5f711bd3b03efbf81053 Reviewed-on: https://gerrit.libreoffice.org/41909 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-09-03gpg4libre: Recycle certificate selection dialog for encryptionKatarina Behrens1-1/+1
Change-Id: I699ecff1f62b3dae7ac275823c6721810589c4cf Reviewed-on: https://gerrit.libreoffice.org/41507 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-08-31gpg4libre/comphelper: add storage helper for GPG encryption dataThorsten Behrens1-0/+51
Change-Id: Idba9ad7a821cb33070cf5e5a0f79ae55db99b276 Reviewed-on: https://gerrit.libreoffice.org/41504 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-08-28Log also the elapsed time of each zone, in millisecondsTor Lillqvist1-1/+2
Why not let the computer do it, instead of having to do it by eyeball? It is not fun to look at numbers like 1503910660.06171 and 1503910665.5169 and try to see whether their difference is larger than that of 1503910824.20391 and 1503910828.43125. Change-Id: If20882e97959e65b8518b66c4ae965e1b3cc3b51
2017-08-27If called on an empty collection, don't let OEnumerationByIndex.nextElement()Damjan Jovanovic1-7/+6
call XIndexAccess.getByIndex() with an invalid index, just like OEnumerationByName.nextElement() doesn't. Patch by: me (cherry picked from commit efa52a41051df84e03fc38aaeae0f6312eb2df4c) Change-Id: Id49e45c18ed00de499cfd93e0945cecaed788ae4 Reviewed-on: https://gerrit.libreoffice.org/41574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-23Don't crash if aProfileId is nullTor Lillqvist1-0/+2
Change-Id: I1505469200c4bcc82f07eae325882fd6454ebcc5
2017-08-18loplugin:unreffun (clang-cl)Stephan Bergmann1-11/+2
Change-Id: I6e5789982789adc68a2e003aa6acff57639d5b5d
2017-08-18loplugin:cstylecast (clang-cl)Stephan Bergmann1-2/+2
Change-Id: Id3f66842829a4b86f7980f0c1cbfe6e56e958e9c
2017-08-18-Werror,-Wmissing-field-initializers (clang-cl)Stephan Bergmann1-2/+5
Change-Id: I77b6fb2b9fe8e93f279f29a19f67079f5f81d1b7
2017-08-18-Werror,-Wwritable-strings (clang-cl)Stephan Bergmann1-1/+1
Change-Id: Ic3a23c8290021b4bffe770651269ccf792b7c632
2017-08-17remove unnecessary use of OUString::getStrNoel Grandin2-6/+3
Change-Id: I3d13e1c0bb6aa4a7aacc463198747c1368ebc9b4 Reviewed-on: https://gerrit.libreoffice.org/38114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17remove UL/L suffixes from integer constants in initialiser/call expressionsNoel Grandin1-1/+1
Change-Id: Iae081567c4fa5b88edbd12cf2fbafd2b8f31b300 Reviewed-on: https://gerrit.libreoffice.org/41214 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-14new loplugin:droplongNoel Grandin1-4/+4
The types 'long' and 'unsigned long' are different sizes on different platforms, making them wholy unsuitable for portable code. And when I mean different sizes, I mean 64bit Linux and 64bit Windows have different bit sizes. Change-Id: Id4d8cd709bf71a3f85ed6515fae2b0a21ae8c25d Reviewed-on: https://gerrit.libreoffice.org/41130 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-13updater: fix crash on windows while creating the updater command lineMarkus Mohrhard1-2/+2
Change-Id: I606f5ede0fe70af4b30c68a10b7c400612fddaee Reviewed-on: https://gerrit.libreoffice.org/41115 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-08-13Revert "cppcheck: variableScope"Markus Mohrhard1-5/+7
This reverts the updater related code changes. I still might need to merge Mozilla changes into the code once more which becomes much more difficult with unrelated changes. Only helpful fixes for now please. Change-Id: I67b386d12d03250323cce21f4f65b262ce4abcf9
2017-08-13cppcheck: variableScopeJochen Nitschke1-7/+5
Change-Id: I4dfbd80cf06acb4968556a78d3eaf394757073dc Reviewed-on: https://gerrit.libreoffice.org/41110 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11convert std::map::insert to std::map::emplace IINoel Grandin1-2/+1
Change-Id: Ief8bd59c903625ba65b75114b7b52c3b7ecbd331 Reviewed-on: https://gerrit.libreoffice.org/41019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11convert std::map::insert to std::map::emplaceNoel Grandin4-5/+5
which is considerably less verbose Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b Reviewed-on: https://gerrit.libreoffice.org/40978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-08updater: move the windows process starting code to comphelperMarkus Mohrhard3-0/+296
Change-Id: I1a499f57d01ee28afdb2c4f85dc976f2e6837dfd Reviewed-on: https://gerrit.libreoffice.org/40837 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-08-02remove unnecessary use of 'this->'Noel Grandin2-10/+10
Change-Id: I5c115389af7d24c18ddaf5fbec8c00f35017a5b4 Reviewed-on: https://gerrit.libreoffice.org/40671 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31loplugin:oncevarNoel Grandin1-1/+1
extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>