summaryrefslogtreecommitdiff
path: root/comphelper
AgeCommit message (Collapse)Author
2021-10-16comphelper: fix bad error handling in CreatePackageEncryptionData()Michael Stahl
Not sure if rtl_digest_SHA1 can realistically return an error but avoid out-of-bounds write in this case. (regression from commit 9188ea83c346fdc2f668178ae7538665a1b09c02) Change-Id: If5f134cbcd9236338d1938242a469d7c79e87f06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123649 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 62128c09237152d9e0585abe2fc88f0a13274b34) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123629 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-25tdf#141097 Revert "Veto process exit while an OLE client is connected"Michael Warner
This reverts changes that were made to prevent process exit when an OLE client is connected. These commits had the side effect of preventing the use case of creating a document via OLE, and then allowing the user to view/edit and ultimately quit from the GUI. Revert "More hacks for quit requests from an OLE Automation client" This reverts commit 05e03911cd1f8a355b6410d3997cffc2c794a1e9. Revert "Veto process exit while an OLE client is connected" This reverts commit 89f883bd90a50587868a57397b6350ed9559a20f. Change-Id: I29a1e42a830815bc8d1ff0056c22d86b8f98cc1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118596 (cherry picked from commit 080e4550257a90597c241f83fd766b99c83ba6e8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120877 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-09Fix syntax error in the "arguments" of a TraceEventTor Lillqvist
Change-Id: I68f94311d3e0527955b6ad8d5b49e4e564329e1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116054 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116848 Tested-by: Tor Lillqvist <tml@collabora.com>
2021-06-09Add the possibility to include a set of arguments in Trace EventsTor Lillqvist
Change-Id: I55720baf64bd9b719026c94e4373b6368a1a7106 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116847 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-06-08Simplify Sequences initializations (comphelper+connectivity)Julien Nabet
Change-Id: I8a91f4bd2a1117acb571f1058af18071bc058c9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116815 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-05-28no need to allocate these on the heapNoel Grandin
Change-Id: Ic1a1577ed837d3fa2b7b99474f4cee30300628f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116290 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-26comphelper: fix the "console" use-case of ProfileZoneMiklos Vajna
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 Grandin
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 Bergmann
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 Lillqvist
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 Lillqvist
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 Lillqvist
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 Lillqvist
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 Lillqvist
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 Lillqvist
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 Lillqvist
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 Lillqvist
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 Lillqvist
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 Lillqvist
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 Lillqvist
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 Lillqvist
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 Grandin
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 Lillqvist
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 Lillqvist
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 Lillqvist
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 Lillqvist
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 Grandin
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 Kaganski
... 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 Grandin
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 Grandin
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ňák
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 formatHossein
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 Kaganski
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:flattenNoel
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 Kaganski
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 READMEHossein
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 Grandin
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 Grandin
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 McNamara
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 Lillqvist
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 McNamara
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 Kaganski
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 accessibilityNoel
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 comphelperNoel
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 Timar
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 comphelperNoel
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 Kaganski
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 Gelmini
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 McNamara
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 Bergmann
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>