summaryrefslogtreecommitdiff
path: root/comphelper
AgeCommit message (Collapse)AuthorFilesLines
2021-04-08update PCHsLuboš Luňák1-1/+2
Change-Id: Ia9d04447f927e270a55500e7f35723a729bc01dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113801 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-04-07Updated README.md files to represent current code / use Markdown formatHossein1-3/+3
Previously, all of the README files have been renamed to README.md and now, the contents of these files were changed to use Markdown format. Other than format inconsistency, some README.md files lacked information about modules, or were out of date. By using LibreOffice / OpenOffice wiki and other documentation websites, these files were updated. Now every README.md file has a title, and some description. The top-level README.md file is changed to add links to the modules. The result of processing the Markdown format README.md files can be seen at: https://docs.libreoffice.org/ Change-Id: Ic3b0c3c064a2498d6a435253b041df010cd7797a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113424 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-04-02Simplify some static variable initializationsMike Kaganski1-8/+6
Change-Id: I6cdd44aa66b9597ccc51fc3fd69b57485ccb3230 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113515 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-26loplugin:flattenNoel1-9/+8
Change-Id: Ib7a895fba66f8dc9b6501e61631c02694053b7fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113157 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-25const OUString -> const OUStringLiteralMike Kaganski1-3/+3
Mostly automated rewrite Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-24Using .md extension/Markdown syntax for modules READMEHossein1-0/+0
Renaming all README files for all top level modules to README.md, applying no content change at this stage to be able to track history of the files. These files should be edited to use correct Markdown syntax later. Change-Id: I542fa3f3d32072156f16eaad2211a397cc212665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112977 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-03-23use single-use attribute for OfficeInstallationDirectoriesNoel Grandin2-21/+4
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: If6b0a41d0a8a20ea4989771d83833288c6bd3234 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112926 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-23use single-use attribute for OOfficeRestartManagerNoel Grandin2-20/+3
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: I71d8bd457687537e620a420c3cbf633f7a0b3f97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112927 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-21update pchesCaolán McNamara1-1/+2
Change-Id: I60e61133c305673bb305e41957f5414820c7c358 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112790 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-17tdf#124909: Use the myspell dictionary for Swiss German on iOSTor Lillqvist1-1/+1
The iOS system German dictionary is not good for Swiss German. (And it doesn't even claim to be, it says it is for de_DE.) The system German dictionary accepts 'ß' but that is not used in Swiss German, 'ss' is always used instead. Build the spell library for iOS, too, and don't assume that the system de_DE dictionary would be usable for de_CH and de_LI. Copy those dictionaries for inclusion in the iOS app bundle. Change-Id: I0f8020812221024756c792bddc16a707de35b827 Signed-off-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112603 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112635
2021-03-11remove intermediate containers in sidebarsCaolán McNamara1-0/+1
tested extension sidebars of: a) Wollmux extension sidebars b) Analog Clock Extension demo https://wiki.openoffice.org/wiki/Sidebar_for_Developers#Example:_Analog_Clock_Extension Change-Id: If9729e20526681928137989f01a8ae733a9b0cb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112035 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-09Make sal/config.h the first in pchMike Kaganski1-2/+2
By convention, it should be the first include in C/CXX files; so use of pch should not break that. Change-Id: Ic329c5f39e8f48ad1778724368e262e48972342b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112123 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-27loplugin:refcounting in accessibilityNoel1-1/+1
Change-Id: I0a17e149487cf05fb5e6d004a6402a2a5215a79b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111632 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-23loplugin:refcounting in comphelperNoel3-23/+16
Change-Id: Ie3e1fcdbdbd01448a9eea23a899a924e6b626257 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111354 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-21fix variable name in SAL_INFOAndras Timar1-1/+1
Change-Id: Ie6da9b1677e60b4e9dfe507e1571cc68610a6cf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111188 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2021-02-17loplugin:referencecasting in comphelperNoel5-6/+6
Change-Id: If826cd7c6818d9cc0662321ff31e0594fe6d48e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111003 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-12Fix threadpool test for --enable-debugMike Kaganski1-2/+2
NDEBUG is obviously defined then, and doWork does not use mThreadId and mCheckEqual, resulting in errors like "private field 'mThread' is not used". Change-Id: Ie429a6584ee5a335dbc9b29fae202727d9daa720 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110777 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-10Remove unneeded breaksAndrea Gelmini1-14/+0
Extending this: https://gerrit.libreoffice.org/c/core/+/110512 Change-Id: If7e6f9c4079c2e0b48e642aa0b140fb4e03996bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110520 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-08update pchesCaolán McNamara1-1/+2
Change-Id: Icf55ddda055d11b649e7607c2cdd8b6d6ddfefbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110483 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-05Revert "Fix typo in code"Stephan Bergmann2-7/+7
This reverts commit 3ed9bba283a6a67864c0928186e277240be0d9ba. osl_Pos_Absolut (include/osl/file.h) is part of the stable URE interface; it must not be changed. Change-Id: I1f49923a9351e4be5aee39b10720d38b424feb9b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110435 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-04Fix typo in codeAndrea Gelmini2-7/+7
Change-Id: Ib8b306a27d25a34e784aeeb72708b0d5d1511f3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110394 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-01-29loplugin:stringviewparam extend to new..Noel1-1/+1
O[U]StringBuffer methods Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-28simplify code, use more subView()Noel1-1/+1
Change-Id: I569c7f34acbdf8451cd5c9acf1abd334637072d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110051 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-24Use ContainerType().swap and avoid local variablesMike Kaganski1-4/+2
Change-Id: I773555180758a97aff37f9bc27de83c355d71521 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109761 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-20improve some IllegalArgumentException messagesNoel11-20/+21
Change-Id: Id88f2a82bf2651e8b5895aa330f32b71ff5b0e48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109546 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-09fix coverity parse errorsCaolán McNamara1-1/+1
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann5-55/+66
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-27Simplify loplugin:stringviewparam comparison operator handlingStephan Bergmann1-1/+1
In practice, it works fine to look at all of them, regardless of actual argument types. Change-Id: Ifc49cbcd6003c8837c1b3f81d432c59fb0657bf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108366 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-26New loplugin:stringliteralvarStephan Bergmann1-1/+1
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for details. (Turned some affected variables in included files into inline variables, to avoid GCC warnings about unused variables.) Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-13cid#1470590 silence bogus Out-of-bounds accessCaolán McNamara1-0/+1
Change-Id: Ia0b68dccad1dc4e5dcd3ce8994b5812b5f091b7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107640 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-11Adapt the remaining OUString functions to std string_viewStephan Bergmann3-13/+14
...for LIBO_INTERNAL_ONLY. These had been missed by 1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take std::u16string_view parameters" because they did not match the multi-overload pattern that was addressed there, but they nevertheless benefit from being changed just as well (witness e.g. the various resulting changes from copy() to subView()). This showed a conversion from OStringChar to std::string_view to be missing (while the corresponding conversion form OUStringChar to std::u16string_view was already present). The improvement to loplugin:stringadd became necessary to fix > [CPT] compilerplugins/clang/test/stringadd.cxx > error: 'error' diagnostics expected but not seen: > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd] > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd] > 2 errors generated. Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-09remove isVCLOpenGLEnabled() settings, add DisableOpenGL optionLuboš Luňák1-4/+2
The VCL OpenGL backend code has been removed, so the settings for it no longer make sense. But there's still the code for detecting if OpenGL is broken, and that one makes sense to keep. It turns out other OpenGL code (such as slideshows) doesn't even use that, so turn this into a new DisableOpenGL option, make OpenGL-related failsafe code set and use that, and OpenGL code should use OpenGLHelper::supportsOpenGL() to make sure OpenGL use is not blocked. Change-Id: Iec83f204e89bfb0b6eea13be77da8f0f4727a074 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107398 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-12-04update pchesCaolán McNamara1-2/+5
Change-Id: I3e22c2000da03f6f3345353846213203993aa865 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107192 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-30add ThreadPool::isIdle() to avoid incorrect detection of "no tasks"Luboš Luňák3-9/+76
Tasks that are being worked on but are not yet finished are removed from maTasks, so maTasks.empty() does not mean "idle". I fixed one case already in 2ad4e77a0f266ae6e6fccaebb1d080d2880bdac3, this one fixes joinAll() which has a similar problem and triggers https://gerrit.libreoffice.org/c/core/+/69473/3/sc/source/core/data/documen2.cxx#312 Also rename joinAll() to joinThreadsIfIdle(), as that's what it really is. Change-Id: I8129cfadb81be968575ea8718de9ae997b877a4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106701 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-11-30handle a possible (unlikely?) deadlock in threadpool cleanupLuboš Luňák1-0/+7
Change-Id: I4886989816662bad50db145fd1ff1466e8a3a140 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106700 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-11-30loplugin:stringviewparam include comparisons with string literalsNoel2-8/+8
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel1-4/+4
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-16replace std::min(std::max()) with std::clampNoel1-1/+1
Change-Id: I76e34e8020d98292e8ffde387542b7029f85a42d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-13tdf#123936 Formatting files in module comphelper with clang-formatPhilipp Hofer6-68/+52
Change-Id: I01cf258f8fedb4d98f64d2a18735764463f1b2af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105653 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-12New loplugin:stringviewparamStephan Bergmann1-3/+3
...to "Find functions that take rtl::O[U]String parameters that can be generalized to take std::[u16]string_view instead." (Which in turn can avoid costly O[U]String constructions, see e.g. loplugin:stringview and subView.) Some of those functions' call sites, passing plain char string literals, needed to be adapted when converting them. Change-Id: I644ab546d7a0ce9e470ab9b3196e3e60d1e812bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105622 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-11tdf#138113: Base SQL syntax colouring issue with operators "/", "-"Julien Nabet1-0/+4
Change-Id: If268d7731642a6503418ca187b4fe85a889d1d2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105581 Reviewed-by: Lionel Mamane <lionel@mamane.lu> Tested-by: Jenkins
2020-11-11loplugin:stringviewNoel1-1/+1
Add new methods "subView" to O(U)String to return substring views of the underlying data. Add a clang plugin to warn when replacing existing calls to copy() would be better to use subView(). Change-Id: I03a5732431ce60808946f2ce2c923b22845689ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105420 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-06tdf#42949 Fix new IWYU warnings in directories c*Gabor Kelemen13-14/+15
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Iac1e7802dbe1efa01c2befdd10406231788d4fc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105315 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-04remove pimpl from PropertySetHelperNoel Grandin1-48/+30
Change-Id: I20e72b5927d64a69aacd3d4de117a7736d53eea4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105275 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-04remove pimpl from NamedValueCollectionNoel Grandin1-81/+27
Change-Id: I134e5fd78a3861e0067b749d93643960205daf69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105277 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-04remove pimpl in PropertyBagNoel Grandin1-18/+10
Change-Id: Ibf34c0d9a3090c190a63f63ba9bd661263aebae6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105276 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-30TNumberedItemHash NumberedCollection::m_lComponents is indexed on pointers...Stephan Bergmann1-2/+1
...reinterpret_cast'ed to sal_IntPtr, so consistently use sal_IntPtr throughout here Change-Id: If0085c2ac7e0e2c755ec034766095baa11a1b08c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105071 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-28Extend loplugin:elidestringvar to OStringStephan Bergmann1-8/+4
(In VisitVarDecl, filtering out AbstractConditionalOperator avoids an unhelpful > ~/lo/core/vcl/source/pdf/XmpMetadata.cxx:63:32: error: replace single use of literal 'rtl::OString' variable with a literal [loplugin:elidestringvar] > aXmlWriter.content(sPdfConformance); > ^~~~~~~~~~~~~~~ > ~/lo/core/vcl/source/pdf/XmpMetadata.cxx:52:21: note: literal 'rtl::OString' variable defined here [loplugin:elidestringvar] > OString sPdfConformance = (mnPDF_A == 1) ? "A" : "B"; > ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) Change-Id: I7d0410f04827d79b4b526752917c37d33cad2671 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104911 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-28std::set->o3tl::sorted_vector in OPropertyArrayAggregationHelperNoel Grandin1-3/+2
Change-Id: Iec4935af8946e453b39221dcb982059c806f62a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-21use tools::Long in comphelper..cuiNoel2-3/+4
Change-Id: I65167999c6049038f8f5d530a0c5cb0552ab0e06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104609 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>