summaryrefslogtreecommitdiff
path: root/comphelper
AgeCommit message (Collapse)Author
2021-09-20Drop unused osl_FileStatus_Mask_FileURLStephan Bergmann
...in code that never called aStatus.getFileURL(), ever since the code's introduction in 4a25fb867f7cc0a0fc21c4079c84fadec6647ad1 "Make TempFile destructor remove temp directory recursively" Change-Id: I998ca23089125706b2377f192ace702a0ce804ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122350 Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2021-09-19Fix moving temp file in tryDisableHWAcceleration on WindowsMike Kaganski
In my debug build, using safe mode dialog, Disable hardware acceleration setting does not apply. In BackupFileHelper::tryDisableHWAcceleration, osl::File::move fails with osl_File_E_ACCES, and internally GetLastError after MoveFileExW reports ERROR_SHARING_VIOLATION. The problem is that the tempfile is still in use by xTempFile. Closing it, and making sure that the file doesn't get removed in the dtor, fixes the problem. In case something goes wrong, the tempfile would get removed in app cleanup anyway, when session temp directory gets removed. Change-Id: I4568f60b2b50a4038cba2e7a65033cb57e8b6edb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122274 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-18URI-encode DirectoryHelper::scanDirsAndFiles resultJan-Marek Glogowski
All code assumes the result is usable as URI segments. This fails DirectoryHelper::deleteDirRecursively with files like org.openoffice.da.hunspell.dictionaries%2Fpage1.xhp, resulting in an unlimited startup loop after creating a new user profile via: $ soffice -env:UserInstallation=file:///tmp/test --safe-mode $ soffice -env:UserInstallation=file:///tmp/test So just URI encode all files and directories returned. This doesn't fix the general problem handling "regular" DirectoryHelper::deleteDirRecursively failures on startup. Change-Id: I48aa9816118e19302eb93387bdd741bf27fa7236 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122292 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-09-16tdf#115933 XLSX import: fix permission for editingTünde Tóth
The passwords for editing in XLSX documents created with Excel weren't asked and verified. Note: LibreOffice supports only a subset of the hashing algorithms specified in MS-OE376, according to DocPasswordHelper::GetOoxHashAsVector() and https://docs.microsoft.com/en-us/openspecs/office_standards/ms-oe376/f70a4140-340b-4e94-a604-dff25b9846b1. Also the documents encrypted with unsupported algorithms got edit protection now, but it's not possible to add permission to edit them (copy of these documents are still editable). Change-Id: Iabc90f6bba4ed071dd2c60e9dea905481816964b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121497 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 4Mike Kaganski
- Change implementations of getSomething to use getSomethingImpl Or where that's impossible, use getSomething_cast to unify this and reduce number of places where we reinterpret_cast. All static methods getting tunnel ids were renamed to getUnoTunnelId, to comply with the convention used in <comphelper/servicehelper.hxx>. TODO (in separate commits): - Revise uses of getSomething to use getFromUnoTunnel Change-Id: Ifde9e214b52e5df678de71fcc32d2199c82e85cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122100 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 3 [API CHANGE]Mike Kaganski
- Replace all uses of OImplementationId in core with UnoIdInit - Deprecate OImplementationId in <cppuhelper/typeprovider.hxx> OImplementationId uses broken double checked locking; additionally, it uses it at the first call to getImplementationId, not when the object is constructed. This implementation can't be changed, cince it's part of published API; it can't rely on C++11, which would be required for use of thread-safe statics and move the initialization to ctor. The class has obsolete _bUseEthernetAddress member, that is unused and ignored since 4e9fa7e339a1cd6cb2fec643715991bcf5057cec. No need to implement it when replacing its uses to UnoIdInit. The deprecation is the API CHANGE. No published API is introduced to replace it; 3rd-party code should seek alternative solutions, or just keep using the deprecated functionality. TODO (in separate commits): - Change implementations of getSomething to use getSomethingImpl - Revise uses of getSomething to use getFromUnoTunnel Change-Id: I8b6e684e5389bc0d5bb3b7f21f72a4c8f684107d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122077 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 1Mike Kaganski
The header got some changes: 1. Move UnoTunnelIdInit and isUnoTunnelId into 'comphelper' namespace 2. Rename UnoTunnelIdInit to UnoIdInit, as a precondition to replace of uses of OImplementationId with it, including in XTypeProvider 3. Introduce convenience functions 'getSomething_cast' to cast between sal_Int64 and object pointers uniformly. 4. Rename getUnoTunnelImplementation to getFromUnoTunnel, both to make it a bit shorter, and to reflect its function better. Templatize it to take also css::uno::Any for convenience. 5. Introduce getSomethingImpl, inspired by sw::UnoTunnelImpl; allow it handle cases both with and without fallback to parent. 6. Adjust UNO3_GETIMPLEMENTATION_* macros TODO (in separate commits): - Drop sw::UnoTunnelImpl and sw::UnoTunnelGetImplementation - Replace all uses of OImplementationId in core with UnoIdInit - Deprecate OImplementationId in <cppuhelper/typeprovider.hxx> - Change implementations of getSomething to use getSomethingImpl - Revise uses of getSomething to use getFromUnoTunnel Change-Id: If4a3cb024130f1f552f988f0479589da1cd066e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122022 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-12Simplify OAccessibleImplementationAccess' XUnoTunnel implementationMike Kaganski
Change-Id: Iad82fe1e0e524d2c33ab2165bd08353c4967c57f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121976 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-28clang-tidy:readability-redundant-member-initNoel Grandin
Change-Id: I48e6fb31df732805423b89ed91b6e4363a69b668 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121150 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-27loplugin:nullptr (macOS)Stephan Bergmann
Change-Id: I5fc54c9005fbada4184c520d447276be2df16f0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121142 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-24osl::Mutex->std::mutex in OInstanceLockerNoel Grandin
Change-Id: Ia92632beccac90e60bceb305a736e93ffb37d356 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-24Simplify caching in ConfigurationWrapperMike Kaganski
A follow-up to 48c2f0b4b157e133605c99549893521775ede4da This allows to not call createInstanceWithArguments repeatedly. Change-Id: I1893b9b1b0f952ae7c650bab4fb0dfe2f331a129 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120883 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2021-08-24cache access in ConfigurationWrapper (tdf#105575)Noel Grandin
If we repeatedly hit a config item like this: officecfg::Office::Common::Drawinglayer::MaximumPaperWidth::get() the stuff in configmgr because quite a bottleneck. So cache the access objects in ConfigurationWrapper. This change only affects the auto-generated code we use for the C++ officecfg:: configuration API Change-Id: Ie2adefc2319dfb362f1ef814690120e13abae6fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120866 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-23comphelper : remove useless OContextHelper_ImplArnaud Versini
Change-Id: I41fc571695a64b432d6abf4979b99ef141a12b28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120842 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-23osl::Mutex->std::mutex in AccessibleEventNotifierNoel Grandin
which means we need a new interface container to handle std::mutex. Take the opportunity to move most of the locking outside the InterfaceContainer class to make it easier for other osl::Mutex->std::mutex conversions. Change-Id: I5dbd84aa9b7fd9c5e6058d23b993b732f61fbd20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120846 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-22osl::Mutex->std::mutexNoel Grandin
Change-Id: Id3c0660dae6dd5c6c026a26ec2ca39ccd6db210f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120845 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-22make isDebuggerAttached() work on MacLuboš Luňák
Change-Id: I1c7c2b58686e7cbb0f8f11327df7ae951226586f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120803 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-08-21rtl::Static to thread-safe staticNoel Grandin
Change-Id: Id63bc7dada4ba09389f5a1ebd83c00c8e55faf7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120795 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-20New loplugin:unusedcapturedefaultStephan Bergmann
In sc/qa/unit/ucalc_formula.cxx, dropping the capture-default from the lExpectedinF lambda revealed that MSVC in C++17 mode (i.e., when building without --with-latest-c++) requires ROW_RANGE (a local const int variable from the enclosing TestFormula::testTdf97369) to be captured, even though all uses of that variable within the lambda body are constant expressions. That is still true at least for the latest Visual Studio 2019 version 16.11.1. (This is not an issue for the lExpectedinH and lExpectedinI lambdas a few lines further down, as they, in addition to using that ROW_RANGE, also use the local const double variables SHIFT1 and SHIFT2, whose uses are not constant expressions, so they are implicitly captured and loplugin:unusedcapturedefault does not suggest dropping those lambdas' capture-defaults in the first place.) Change-Id: Iee7efb485187cbe8eba6a2d470afca4993eb1816 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120693 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-20tdf#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 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-08-18loplugin:passstuffbyrefNoel Grandin
Change-Id: I4f01eb3842ef198f02af274f54afb2760c820a4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120655 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-18improve SvxShapeCollection::getByIndexNoel Grandin
Change-Id: I4cca7c0b6344241256d038902069a20ece314358 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-18avoid constructing OUString on hot path (tdf#105575)Noel Grandin
Change-Id: I7c9925fc7f68cdc9bd1a9c1834daabff09c8cf6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120604 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-16LOK: introduced Freemium LOK APIPranam Lashkari
also block the uno commands from deny list Change-Id: Iee994411891b73b865e6496403682f996d5e9321 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116384 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120482 Tested-by: Jenkins
2021-08-15rtl::Static -> thread-safe static localNoel Grandin
Change-Id: Iac0501e6aa35cc3d8e62f6b6e68b76cf70233aae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120459 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-11no need to allocate KeyedValues separatelyNoel Grandin
Change-Id: If28471436d224e88dfee07f3b8465648867197fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120291 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-10flatten PropertySetInfo a littleNoel Grandin
Change-Id: I46bc0dc2da9b52d5a2cb1e415328ab1f13a96ff3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120216 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-09Guard read of rCont_.bIsList with rCont_.rMutexStephan Bergmann
...as had been the case prior to 12dce07aec980562fa449fa1884e0e8379d680fb "loplugin:unusedfields - look for fields that can be const, in comphelper" (which this commit partly reverts; the const'ness of OInterfaceIteratorHelper2::bIsList had already been reverted, but for no apparent reason, in 31b0be0f21479323408e128f2e8a1a795e037e74 "improve pahole script and pack a few classes"). That may or may not have been the cause of the apparently-sporadic UITest_sw_table failure at <https://ci.libreoffice.org//job/lo_ubsan/2096/>, > /comphelper/source/container/interfacecontainer2.cxx:54:29: runtime error: member call on address 0x606000ed5d20 which does not point to an object of type 'com::sun::star::uno::XInterface' > 0x606000ed5d20: note: object has invalid vptr > 22 04 00 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 be be be be b0 11 46 00 > ^~~~~~~~~~~~~~~~~~~~~~~ > invalid vptr > #0 0x2ab564a71e15 in comphelper::OInterfaceIteratorHelper2::OInterfaceIteratorHelper2(comphelper::OInterfaceContainerHelper2&) /comphelper/source/container/interfacecontainer2.cxx:54:29 > #1 0x2ab57614588f in void comphelper::OInterfaceContainerHelper2::forEach<com::sun::star::document::XDocumentEventListener, comphelper::OInterfaceContainerHelper2::NotifySingleListener<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent> >(comphelper::OInterfaceContainerHelper2::NotifySingleListener<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent> const&) /include/comphelper/interfacecontainer2.hxx:261:31 > #2 0x2ab576144a95 in void comphelper::OInterfaceContainerHelper2::notifyEach<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent>(void (com::sun::star::document::XDocumentEventListener::*)(com::sun::star::document::DocumentEvent const&), com::sun::star::document::DocumentEvent const&) /include/comphelper/interfacecontainer2.hxx:279:5 > #3 0x2ab57613b277 in (anonymous namespace)::SfxGlobalEvents_Impl::implts_notifyListener(com::sun::star::document::DocumentEvent const&) /sfx2/source/notify/globalevents.cxx:505:26 > #4 0x2ab576131faa in (anonymous namespace)::SfxGlobalEvents_Impl::documentEventOccured(com::sun::star::document::DocumentEvent const&) /sfx2/source/notify/globalevents.cxx:256:5 > #5 0x2ab575f4abfc in (anonymous namespace)::NotifySingleListenerIgnoreRE<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent>::operator()(com::sun::star::uno::Reference<com::sun::star::document::XDocumentEventListener> const&) const /sfx2/source/doc/sfxbasemodel.cxx:3200:13 > #6 0x2ab575f002ec in void cppu::OInterfaceContainerHelper::forEach<com::sun::star::document::XDocumentEventListener, (anonymous namespace)::NotifySingleListenerIgnoreRE<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent> >((anonymous namespace)::NotifySingleListenerIgnoreRE<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent> const&) /include/cppuhelper/interfacecontainer.h:292:17 > #7 0x2ab575efdd37 in SfxBaseModel::postEvent_Impl(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::frame::XController2> const&) /sfx2/source/doc/sfxbasemodel.cxx:3234:14 > #8 0x2ab575efa257 in SfxBaseModel::Notify(SfxBroadcaster&, SfxHint const&) /sfx2/source/doc/sfxbasemodel.cxx:2883:9 > #9 0x2ab57a796d83 in SfxBroadcaster::Broadcast(SfxHint const&) /svl/source/notify/SfxBroadcaster.cxx:39:24 > #10 0x2ab6010f0e1f in SwLayIdle::SwLayIdle(SwRootFrame*, SwViewShellImp*) /sw/source/core/layout/layact.cxx:2375:24 > #11 0x2ab60385d4e2 in SwViewShell::LayoutIdle() /sw/source/core/view/viewsh.cxx:723:19 > #12 0x2ab5ff549ffa in sw::DocumentTimerManager::DoIdleJobs(Timer*) /sw/source/core/doc/DocumentTimerManager.cxx:177:42 > #13 0x2ab5ff54552a in sw::DocumentTimerManager::LinkStubDoIdleJobs(void*, Timer*) /sw/source/core/doc/DocumentTimerManager.cxx:157:1 > #14 0x2ab599cf5f41 in Link<Timer*, void>::Call(Timer*) const /include/tools/link.hxx:111:45 > #15 0x2ab599cf5498 in Timer::Invoke() /vcl/source/app/timer.cxx:75:21 > #16 0x2ab599b388ea in Scheduler::CallbackTaskScheduling() /vcl/source/app/scheduler.cxx:471:20 > #17 0x2ab59ad34490 in SalTimer::CallCallback() /vcl/inc/saltimer.hxx:54:13 > #18 0x2ab59ad2785c in SvpSalInstance::CheckTimeout(bool) /vcl/headless/svpinst.cxx:215:53 > #19 0x2ab59ad2e67c in SvpSalInstance::DoYield(bool, bool) /vcl/headless/svpinst.cxx:460:21 > #20 0x2ab599c35aa9 in ImplYield(bool, bool) /vcl/source/app/svapp.cxx:465:48 > #21 0x2ab599c34c67 in Application::Yield() /vcl/source/app/svapp.cxx:532:5 > #22 0x2ab599c348ae in Application::Execute() /vcl/source/app/svapp.cxx:444:9 > #23 0x2ab55d699b4b in desktop::Desktop::Main() /desktop/source/app/app.cxx:1603:13 > #24 0x2ab599cde4e9 in ImplSVMain() /vcl/source/app/svmain.cxx:199:35 > #25 0x2ab599ce7510 in SVMain() /vcl/source/app/svmain.cxx:231:12 > #26 0x2ab55d890775 in soffice_main /desktop/source/app/sofficemain.cxx:98:12 > #27 0x4efc6c in sal_main /desktop/source/app/main.c:49:15 > #28 0x4efc46 in main /desktop/source/app/main.c:47:1 > #29 0x2ab55f48e554 in __libc_start_main (/lib64/libc.so.6+0x22554) > #30 0x41b5c1 in _start (/instdir/program/soffice.bin+0x41b5c1) Change-Id: Iaa930f1612a3bb6ad0bcad12f3995b7dbb2e5fa7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120205 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2021-08-08create comphelper:OMultiTypeInterfaceContainerHelperVar2 and use itNoel Grandin
based on OInterfaceContainerHelper2 which is considerably faster than the original OInterfaceContainerHelper Change-Id: Ia8cdbc5ef877a7af3d9193e1bb2faf1595c15470 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120165 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-07create comphelper::OMultiTypeInterfaceContainerHelper2 and use itNoel Grandin
based on OInterfaceContainerHelper2 which is considerably faster than the original OInterfaceContainerHelper Change-Id: I9c8b6d0e5382018824bf7188a26343703abf2d51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120161 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-03Consolidate on C++17 std::scoped_lock instead of std::lock_guardNoel Grandin
as in commit 9376f65a26240441bf9dd6ae1f69886dc9fa60fa Change-Id: I3ad9afd4d113582a214a4a4bc7eea55e38cd6ff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119927 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-30Fix Nesting Level Bug in ProfileZoneGopi Krishna Menon
Moves the profile zone global nesting variable into the source from header and makes it threadlocal Change-Id: I97751f5c532d8e0e36adb7d9d383bd88f752953f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119662 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-07-30tsan:data race in ThreadPoolTest::testWorkerUsageNoel Grandin
Change-Id: Id63b9f1dd7ed163236837258e8dbad2feb9f1c5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119695 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-30osl::Mutex->std::mutx in OSequenceOutputStreamNoel Grandin
Change-Id: I1924cc0910c5dfb431b676a0f50f922779920594 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119697 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-30osl::Mutex->std::mutex in SequenceInputStreamNoel Grandin
also (*) check params before taking mutex to minimise the time holding the mutex (*) some methods were missing a lock_guard Change-Id: Iac35328e67f81b38c896f7c1e2a3514b813656c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119696 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-30osl::Mutex->std::mutex in OAccessibleKeyBindingHelperNoel Grandin
Change-Id: Ib308ede9561a3ff26cfc43bee202f3151fa07392 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-29osl::Mutex->std::mutex in OSLInputStreamWrapperNoel Grandin
Change-Id: Id67cf7989a47f73b62e48b88c3e6f51efc2ccc46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119674 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-29osl::Mutex->std::mutex in OSeekableInputWrapperNoel Grandin
Change-Id: Ib6cc0a6b1fcc4685f2ac8c120c86ce79f3036535 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119673 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-23osl::Mutex->std::mutex in AsyncEventNotifierNoel Grandin
and use a vector instead of a deque, becuase then a std::swap makes a nice way of ping-ponging a data buffer back and forth between the producer and consumer sides Change-Id: I11f491b9fde87f0a495df05d306ccee57dcfc6da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119345 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-18osl::Mutex->std::mutex in NameContainerNoel Grandin
Change-Id: I4d4e8eab2fb281c5ca330c82f2f5fa5d5e18463a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119123 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-18osl::Mutex->std::mutex in SequenceInputStreamServiceNoel Grandin
Change-Id: I3f47f4fbe6d2d65728af7d4715ae8f91c86c5532 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119122 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-17osl::Mutex->std::mutex in SequenceOutputStreamServiceNoel Grandin
Change-Id: I1aaa9ebd76e2376be82b25f2659d4b0f22dc14e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119113 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-15lok: include the label of the status indicatorHenry Castro
Change-Id: Ib2714e3d2b6add54ffba753d3519aeba7a3f1959 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118658 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2021-06-29Enable flushing accumulated Trace Events when their number reaches a limitTor Lillqvist
Change-Id: I99ecf56b0faa5c444dbe9e22b8cce035f240c35c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118088 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-06-23The Chrome Trace Event viewer doesn't support nested async eventsTor Lillqvist
Instead of nestable b(egin) and e(nd) events, generate the allegedly deprecated S(tart)' and F(inish) events. Makes the code simpler. (And AsyncEvent is still unused. Unclear whether adding it was based on a misunderstanding.) Change-Id: Ic029b67e0951dda775c0d0af009f2e431ae55e53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117700 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-06-17Drop the "console" functionality of ProfileZoneTor Lillqvist
It was not used anywhere and had not been cherry-picked to the relevant vendor production branches so apparently it was just some temporary experimentation? It is good to reduce complexity and increase code similarity between branches. Change-Id: Ib6717063f96d901d65ec36d65f3683af31065f2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117364 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-06-16Adapt implicit OString return value construction to C++23 P2266R1Stephan Bergmann
With the recent implementation of <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2266r1.html> "P2266R1: Simpler implicit move" in Clang 13 trunk as <https://github.com/llvm/llvm-project/commit/bf20631782183cd19e0bb7219e908c2bbb01a75f> "[clang] Implement P2266 Simpler implicit move", a --with-latest-c++ build started to fail with > comphelper/source/xml/xmltools.cxx:103:20: error: no viable conversion from returned value of type 'char [39]' to function return type 'rtl::OString' > return str; > ^~~ [...] > include/rtl/string.hxx:277:5: note: candidate constructor [with T = char [39]] not viable: expects an lvalue for 1st argument > OString( T& value, typename libreoffice_internal::NonConstCharArrayDetector< T, libreoffice_internal::Dummy >::Type = libreoffice_internal::Dummy() ) > ^ [...] etc. Change-Id: If34f143a1855fdd7cd22ea3d7594f9381d50a7ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117336 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
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>