summaryrefslogtreecommitdiff
path: root/comphelper
AgeCommit message (Collapse)AuthorFilesLines
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>
2017-07-28loplugin:constparams handle constructorsNoel Grandin1-2/+2
had to change the structure of the plugin considerably, was too messy to structure it to do the calculations on a per-function basis Change-Id: I4edee7735f726101105c607368124a08dba21086 Reviewed-on: https://gerrit.libreoffice.org/40516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-25use more comphelper::InitAnyPropertySequenceNoel Grandin1-6/+5
Found with: git grep -n -A10 'Sequence.*Any' -- *.cxx | grep -B5 -w PropertyValueProvider and: git grep -n 'Sequence.*Any.*( *&' Change-Id: Icb18c98bdd3f8352817e443ff78de5df042859ad Reviewed-on: https://gerrit.libreoffice.org/40389 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-23remove now unnecessary comphelper::OModuleClient stuffNoel Grandin1-20/+1
after the great gettext migration of 2017 Change-Id: I704389b1ae1fb34dae0429c98cbfc89c2d3b8e27 Reviewed-on: https://gerrit.libreoffice.org/40322 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-22loplugin:unusedfields in basctl..connectivityNoel Grandin1-6/+0
Change-Id: I2f10daadb84e48eaf96f6cc63899b2f4fce7326e Reviewed-on: https://gerrit.libreoffice.org/40295 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21migrate to boost::gettextCaolán McNamara2-209/+0
* 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-17loplugin:constparams in comphelper,unoidlNoel Grandin3-11/+11
Change-Id: I411d431bd6620c594c5dafd42af6c2a8ac285f3f Reviewed-on: https://gerrit.libreoffice.org/40042 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-17extend loplugin useuniqueptr to OUString pointersNoel Grandin2-6/+5
Change-Id: Ieb5bab3895e1edaff497c4a1a88303ccac097edc Reviewed-on: https://gerrit.libreoffice.org/39948 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-16comphelper: move base64 encode/decode helpers from saxAshod Nakashian2-0/+217
Change-Id: I02e33793736003f36976bc8b518c389a31082dbe Reviewed-on: https://gerrit.libreoffice.org/39991 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-07-13use more OUString::operator== comphelper..cuiNoel Grandin7-8/+8
Change-Id: Ib5f3037249152be2b66acf347d1a0c236dc7adfa Reviewed-on: https://gerrit.libreoffice.org/39888 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-12strip some linefeeds from the end of debug outputNoel Grandin1-3/+3
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-10simplify some OUString compareTo callsNoel Grandin2-8/+5
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 Grandin1-1/+1
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-10Remove useless method OCommonAccessibleText::getTextArnaud Versini1-7/+1
Change-Id: I4ee2df05ffceaea9d22ec7e2f78dc6e13061b5ef Reviewed-on: https://gerrit.libreoffice.org/39714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07remove nullptr checks on STL search result iteratorsJochen Nitschke1-2/+2
results are in the range of first_iterator to last_iterator. If one of those is nullptr the algorithm would fail anyway. This removes some impossible checks in sw/source/core/unocore/unochart.cxx: SwChartDataProvider::detectArguments. A sorted range still holds the same values and has the same length as the original range. Replacing raw pointers eases reading this code. Change-Id: If96bd11e9167488346a57e9e08507ac42338d3cd Reviewed-on: https://gerrit.libreoffice.org/39683 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 Nitschke2-3/+2
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 more begin()/end() for SequenceNoel Grandin2-27/+21
Change-Id: I399be6b6ef7a6ce01e883569a177c0969bc29c69
2017-07-03use begin()/end() when working with SequenceNoel Grandin1-6/+6
Change-Id: Icf9da6a24d72c073338f6fbb513d7250b3898015 Reviewed-on: https://gerrit.libreoffice.org/39469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03C++11 remove std::unary_function bases from functorsJochen Nitschke5-9/+7
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-02loplugin:casttovoid: comphelperStephan Bergmann2-7/+3
Change-Id: I28752323d31320141a537c0e108c911cef09c10a
2017-06-23simplify some string handling in tracing callsNoel Grandin1-10/+2
Change-Id: I0fb76562429e691400a02216019c7f96791cf9b3 Reviewed-on: https://gerrit.libreoffice.org/39159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23loplugin:unusedfields in accessibility..comphelperNoel Grandin1-4/+1
Change-Id: Ifb68d65fc3e48dd80e3ff2b7a4124468fdda1695 Reviewed-on: https://gerrit.libreoffice.org/39137 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-20create comphelper::RefCountedMutexNoel Grandin1-0/+5
and merge the two existing implementations of the idea - SotMutexHolder from package and RefCountedMutex from connectivity Change-Id: I87f09f359ac798cf934381a2c75225dab71dd43e Reviewed-on: https://gerrit.libreoffice.org/38972 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-20loplugin:oncevar in codemaker..connectivityNoel Grandin5-11/+5
Change-Id: Ia479d9d3d459a699dfc5c1148d01c35e8bc973bd Reviewed-on: https://gerrit.libreoffice.org/39000 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-15comphelper: add a profiling APILászló Németh2-0/+106
Using the guard style ProfileZone aZone("foo"). Test macro: Sub TimeLog toolkit = createUnoService("com.sun.star.awt.Toolkit") toolkit.startRecording() toolkit.processEventsToIdle() toolkit.stopRecording() a = toolkit.getRecordingAndClear() s = "" For Each i in a s = s + i + ", " Next i Print s End Sub Change-Id: Iceaf9143d0387c87e7936dc67eecbbf71ee8d74a Reviewed-on: https://gerrit.libreoffice.org/38786 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-06-15Missing includeStephan Bergmann1-0/+1
Change-Id: I3345d989dc279f080d26c60888daa67154b3c0e9
2017-06-15use more SAL_N_ELEMENTS part 3Noel Grandin1-2/+2
Change-Id: I82e366fefd2e31928b99840fe76649cc3521e623 Reviewed-on: https://gerrit.libreoffice.org/38789 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-13use local statics for getUnoTunnelImplementationIdJochen Nitschke1-5/+3
replace uses of double checked locking pattern and rtl::Static Change-Id: I479d9d94f652b4fb4c67388405823a5f4e2b6ed4 Reviewed-on: https://gerrit.libreoffice.org/38690 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12Setting Buffered(threaded)Stream as default:Mohammed Abdul Azeem1-18/+2
Also cleaning up bUseBufferedStream parameter. Change-Id: Ibf9c9fcefbdcd229ffaa1d3b169ff87f00e91ceb Reviewed-on: https://gerrit.libreoffice.org/38661 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-06-12Remove VCLExternalSolarLock and IMutex.Arnaud Versini4-41/+11
Next step is to remove OContextEntryGuard. Change-Id: I9460fb67fba6f3bfb3c809b730c33f38d225a64e Reviewed-on: https://gerrit.libreoffice.org/38411 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12pass comphelper::PropertySetInfo around using rtl::ReferenceNoel Grandin1-14/+6
and remove some manual ref counting Change-Id: Ib78122fbbf914e87e0aef1f8fffe3952639e5b22 Reviewed-on: https://gerrit.libreoffice.org/38607 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-11allow build without tls and ssljan Iversen1-0/+5
support for using --disable-openssl AND --without-tls (needed if you want to avoid including crypto code). Change-Id: I77650e9db679ddf1690560eda069d8645acacfc4 Reviewed-on: https://gerrit.libreoffice.org/38604 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@libreoffice.org>
2017-06-05clang-tidy performance-unnecessary-value-paramNoel Grandin1-2/+2
Change-Id: I6ed8c54c7c45931d91709cc818f2483c70197192 Reviewed-on: https://gerrit.libreoffice.org/38400 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-31Remove some unnecessary scaffolding around SAL_WARN callsStephan Bergmann1-1/+0
Change-Id: Iaec105d85a283ad15fdca6ffc5cf3d2ec5acac18
2017-05-30teach redundantcast plugin about functional castsNoel Grandin2-3/+3
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0 Reviewed-on: https://gerrit.libreoffice.org/37910 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>