summaryrefslogtreecommitdiff
path: root/comphelper
AgeCommit message (Collapse)AuthorFilesLines
2021-05-26comphelper: fix the "console" use-case of ProfileZoneMiklos Vajna1-2/+5
m_nCreateTime was changed to NS, nEndTime was still MS, comparing the two is not a great idea. Change-Id: I102990838d1e3d543a356b5ad2d3f68ce1d20623 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116210 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-05-03loplugin:stringadd improvement for appending numbersNoel Grandin1-1/+1
I was wrong, the Concat framework already optimised appending numbers by stack-allocating small buffers, so include them in the plugin Change-Id: I922edbdde273c89abfe21d51c5d25dc01c97db25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115037 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann10-40/+40
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-29Add SAL_WARN in case ProfileZones are overlapping and not hierarchicalTor Lillqvist1-0/+7
Change-Id: Id09904db762b6d931ab23cce16e55d5213079516 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114834 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-04-29Make the nested AsyncEvent work more reliablyTor Lillqvist1-61/+75
We must take into consideration that somebody might hold on to a hard reference to such an object. Thus it is not enough to drop the references to it from its parent, that is not necessarily enough to make it destruct. Instead have the parent explicitly cann a function on the children than generates their end events. Also add some documentation. Change-Id: I38180c85072c76af8964c48fa19132b8e1178ee1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114813 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-04-29Add AsyncEvent::finish() to end a nested AsyncEvent before its parent endsTor Lillqvist1-33/+60
Add unit testing of that, too. Change-Id: Iae5fb6da0b7fcabe8f555d800f065b6f5b4b9982 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114771 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-04-29Fix syntax error in generated JSONTor Lillqvist1-6/+6
Change-Id: I035a86aa587302985416e65dc6063090f99b49b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114770 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-04-29Introduce Async trace events and a unit testTor Lillqvist3-17/+136
Async events are ones that emit separate 'b' (begin) and 'e' (end) traces. (Compare to the Complete event that emit a single 'X' trace that contains both the start timstamp and the duration.) There are two kinds of Async events: Freestanding ones that are not related to other events at all, and nested ones that have to be nested between the 'b' and 'e' events of a parent Async event. Still needs some work, at least a way to end a nested AsyncEvent (cause it to emit the 'e' event) before it gets destructed thanks to the parent being destructed. Change-Id: I3721fa701ad32639b1edc1cfa8db7acde5caf9b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114756 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-04-28Introduce a new class NamedEvent to be used by the upcoming AsyncEvent, tooTor Lillqvist1-4/+4
Don't use the term "profile id" as what we mean is the event *name* (as used in the Chrome Trace Event format). Change-Id: Id58a10f4c5f8a095ae75b9bf74131b70659ee701 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114755 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-04-28Enable turning on trace event recording in a dbgutil build with an env varTor Lillqvist1-1/+4
Change-Id: Ie0efdd2d5da0a45ba5e82be455d36dc777b5efb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114736 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-04-28Re-think what the nesting means in ProfileZonesTor Lillqvist1-2/+1
The "Complete" type of Trace Events should be properly nested. Use the nesting counter to verify that. Add a nesting level indication to the ProfileZone object. Assert that it is used properly. Change-Id: I3a1f0e55ea6054dab9baf8550097446f07b0fbf3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114735 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-04-28Make the console logging in ProfileZone work more sanelyTor Lillqvist1-2/+0
Do not re-assing a value to the m_nCreateTime if bConsole is true. Just use the same code that sets it in the constructor as in the case when recording is on. Change-Id: I1ca3c5aa00e2f8f0faa7ca3433e1eb066413c2a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114734 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-04-28Move some static functions from ProfileZone to TraceEvent where they belongTor Lillqvist1-18/+18
Change-Id: I35f3d5d8c0a69a224cf7d3a2decba9c8e13c7dc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114698 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-04-28Extend the trace event API with instant eventsTor Lillqvist3-96/+135
Change-Id: I3a93c79f46ffc5768ddaf338789fe2daa225ef4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114696 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-04-28g_nStartTime was unusedTor Lillqvist1-4/+0
Change-Id: I2f4371825f7c528a081e42ee157b21b7fd73b2f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114660 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114672 Tested-by: Tor Lillqvist <tml@collabora.com>
2021-04-27loplugin:stringadd convert chained append to +Noel Grandin1-1/+1
which can use the more efficient *StringConcat Also fix a crash in stringview plugin which started happening while I working on this. Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-27Add also the comma separator between Event Trace eventsTor Lillqvist1-1/+1
Change-Id: I13221b9e6437789a72b6d759de4dd0f4434e0fd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114160 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114558 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114655 Tested-by: Jenkins
2021-04-27Drop the leftover "sum time" thing from the Event TraceTor Lillqvist1-5/+0
Change-Id: I222da50f3ad113bf3204b4d21df52c9e55cf7cf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114159 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114557 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114654 Tested-by: Jenkins
2021-04-27Refactor ProfileZone and create Chrome Trace Event Format dataTor Lillqvist1-56/+43
Instead of separate B ("begin") and E ("end") duration events, generate X ("complete") events. Only the event JSON objects are generated, not the surrounding array or object. See https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#heading=h.lc5airzennvk Online now needs work so that the events are written out to a separate file instead of being in the common log file. Change-Id: Ie9363b4cfda862a70e1928ed16350e50a6fee9a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114142 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114556 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114653 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-04-27Clarify the ProfileRecording APITor Lillqvist1-12/+15
Instead of a startRecording(bool) function that is used to also stop recording, have separate startRecording() and stopRecording() functions that do what they say. Change-Id: Ifa9ea0e530d5d38baa52f685fc1dc0029d30d023 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114081 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114652
2021-04-22no need to create temporaries when appending number to O[U]StringBufferNoel Grandin1-1/+1
Change-Id: I36d82423b5f75010552696a66cec7e53ee265ce4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114395 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-21Fix templates to use correct typedefsMike Kaganski1-4/+4
... even if they happen to be the same underlying type Change-Id: Ie048479316c67d8f45c5b2b51bb1e3ea5d16aac8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114412 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-04-21loplugin:stringadd replace OUStringLiteral temporaries with OUString::ConcatNoel Grandin1-1/+1
Change-Id: I656f06a74d9f0180ae460264563d6a935c7d2c60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114377 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-19use more string_view in comphelper::stringNoel Grandin2-50/+52
Change-Id: I5d27824694e38de540e5f1fcd8704f8777f65140 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114261 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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>