summaryrefslogtreecommitdiff
path: root/comphelper
AgeCommit message (Collapse)Author
2022-06-05Only dereference iterators after checking themMike Kaganski
Was this way since commit edf11d28fafac50b6380c9372d0e6cf07a355616 Author Vladimir Glazounov <vg@openoffice.org> Date Thu Apr 24 16:27:52 2003 +0000 INTEGRATION: CWS uaa02 (1.3.44); FILE MERGED Surfaced after commit b1148c31ed2786396f0b018a988fce8288f1797d Author Noel Grandin <noel.grandin@collabora.co.uk> Date Wed Apr 27 16:47:53 2022 +0200 use more string_view in comphelper where the pointers were changed to iterators, which are checked in debug builds, failing an assertion. Change-Id: I87fce562aef8f50b94fb52ad6c2a79d2e84d6424 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133934 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135407 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-04-12add tools::Guid class to generate, parse GUID valuesTomaž Vajngerl
Change-Id: Ie4d8fad4d8f22c8277c22c21b7a9eb3e7c9e4f1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132513 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit cf4d5ed026c8799a70432a832a8a707c2e316216) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132845 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2022-02-18tdf#147086 OOXML export: don't save the empty editing passwordTünde Tóth
Saving with opening password, but without editing password resulted read-only documents (only on their original path: saving, i.e. copying the file in a different path was a workaround for the lost permission). Regression from commit 1b53c1dfc76f08ca7df40a0673aa50eca700d072 (tdf#144374 DOCX: export the password for editing). Change-Id: I2759dc876ee7668d00eee0aa81490c9d1e0c272b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129593 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130060 Tested-by: Jenkins
2022-02-14comphelper: move JsonToPropertyValues() from desktop/Miklos Vajna
Because filter/ code will need this in a bit, and that can't depend on desktop/. Change-Id: I07f0f8ef30942a2d11388c6721c7f277e117bfba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128709 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-02-14use more cppu::BaseMutexNoel Grandin
Change-Id: Iddd7438161ead93b27cf8e8058ca5b1eae3d8001 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-21comphelper: fix UAF in SequenceOutputStreamService dtorMichael Stahl
Change-Id: I91f77ee9ab4d509ebee3d04f94a3c63986de0ef1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128657 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 03e8e1a408eef3c8acc5545416eda9d0938e21f7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128669 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-12-28tdf#145090 LO Calc Crash with drop-down-menuNoel Grandin
avoid attempting to call into widgets while in the middle of dispose regression from commit 8d485ec0cd35ee1ae7684f2b6ca96c0f0c6f9dac IsDisposed->isDisposed in vcl/../window Change-Id: If346dc9dc8547f8da28d091bfa20eff39162a0b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127437 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 3454055d4da3326540905fc69626b934d5aa0744) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127483 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-11-23O[U]String::replaceAt overloads that take string_viewNoel Grandin
which results in lots of nice string_view improvements picked up by the plugins Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-22osl::Mutex->std::mutex in MimeConfigurationHelperNoel Grandin
Change-Id: Ib9a628d42448aea858271094ef5bdaac022b0f21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125633 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-21osl::Mutex->std::mutex in OLockListenerNoel Grandin
Change-Id: I391de15296932ea65f2335b0df7a76e2f77a1a50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125602 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-09rtl::Static to thread-safe staticNoel Grandin
Change-Id: I35e2a252708228bdbeaee557ef35763c64608653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124884 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-04comphelper : use std::mutex in enumhelperArnaud Versini
Change-Id: I871c406e8ff94e646545cb82e0d1e2e2ec80c6e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-01comphelper: fix SequenceOutputStreamService::getWrittenBytes()Michael Stahl
With com.sun.star.io.Pipe, you must call closeOutput() or reading from the other end will block forever. If you use com.sun.star.io.SequenceOutputStream, you can't read the output after calling closeOutput() on it because for no good reason it throws a NotConnectedException. Let's just fix it so that a sequence of closeOutput() then getWrittenBytes() returns the finished buffer. Change-Id: Ia6ce28ec05e00e5f1c703dea8669e0271c0b9c20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123057 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-10-29Prepare for removal of non-const operator[] from Sequence in comphelperMike Kaganski
Change-Id: Ie4f3675adc888ecf175c5342c87d416f34f8dce1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124351 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-26tdf#144374 DOCX: export the password for editingTünde Tóth
The password for editing wasn't exported in DOCX, resulting unprotected documents in Writer and in MSO 2019 or newer. Change-Id: Ieb8a339795635bc1c4223ccbe2a40ea85222cc2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123543 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-10-22LOK: maintain blocked command list per viewPranam Lashkari
Conflicts: include/LibreOfficeKit/LibreOfficeKitEnums.h include/sfx2/viewsh.hxx libreofficekit/source/gtk/lokdocview.cxx sfx2/source/view/viewsh.cxx Change-Id: I7c621accd84f49447ab3e08a4bb662a9b91b834a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124049 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-10-22LOK: unify freemium APIs and uno command restriction APIsPranam Lashkari
Conflicts: include/LibreOfficeKit/LibreOfficeKit.hxx sfx2/source/control/unoctitm.cxx Change-Id: I3badb038822331ab5cb30df6a66ce9a0640cf340 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124047 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-10-22LOK: introduce way to restrict uno commandsPranam Lashkari
With this new API we can define which uno commands to restrict their functionality Conflicts: desktop/qa/desktop_lib/test_desktop_lib.cxx include/LibreOfficeKit/LibreOfficeKit.h include/LibreOfficeKit/LibreOfficeKit.hxx include/sfx2/viewsh.hxx Change-Id: I9f3fd659d373e56542c5323922a53564f1cfb27b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124046 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-10-19Remove a std::remove_reference_tStephan Bergmann
...which is unnecessary (short of dubious explicit invocations like `makePropertyValue<int const &>(i)`) as T can never be deduced to be a reference type there. And add some test code (that also tests the bit-field scenario mentioned in the commit message of 23cded985ba0131f85ee445492c04871fbfb6351 "Specialize comphelper::makePropertyValue for arithmetic types"). Change-Id: If41ce20ab643041dd9721d05373eeb32fd099ead Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123805 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-18make RR easier to useNoel Grandin
breaks easily without the RNG being repeatable Change-Id: Ia464a04f0623668088564c7121f39f04aa68b2ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123740 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-15Simplify vector initialization in comphelperJulien Nabet
Change-Id: Ibcf65cbbf5c0619813bd87a6deb4b75fe524986e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123661 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-15comphelper: 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>
2021-10-15Remove non-const Sequence::begin()/end() in internal codeMike Kaganski
... to avoid hidden cost of multiple COW checks, because they call getArray() internally. This obsoletes [loplugin:sequenceloop]. Also rename toNonConstRange to asNonConstRange, to reflect that the result is a view of the sequence, not an independent object. TODO: also drop non-const operator[], but introduce operator[] in SequenceRange. Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-14Avoid COW overhead using css::uno::SequenceMike Kaganski
The scenarios are: 1. Calling sequence's begin() and end() in pairs to pass to algorithms (both calls use getArray(), which does the COW checks) 2. In addition to #1, calling end() again when checking result of find algorithms, and/or begin() to calculate result's distance 3. Using non-const sequences in range-based for loops, which internally do #1 4. Assigning sequence to another sequence variable, and then modifying one of them In many cases, the sequences could be made const, or treated as const for the purposes of the algorithms (using std::as_const, std::cbegin, and std::cend). Where algorithm modifies the sequence, it was changed to only call getArray() once. For that, css::uno::toNonConstRange was introduced, which returns a struct (sublclass of std::pair) with two iterators [begin, end], that are calculated using one call to begin() and one call to getLength(). To handle #4, css::uno::Sequence::swap was introduced, that swaps the internal pointer to uno_Sequence. So when a local Sequence variable should be assigned to another variable, and the latter will be modified further, it's now possible to use swap instead, so the two sequences are kept independent. The modified places were found by temporarily removing non-const end(). Change-Id: I8fe2787f200eecb70744e8b77fbdf7a49653f628 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123542 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-10loplugin:moveparam in comphelperNoel Grandin
Change-Id: I109d8507890460c5a479af2a5b94f905197b08d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123335 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-06comphelper: remove unnecessary using namespace vclChris Sherlock
Change-Id: I7f49f23bcfeceb01ea470287705199fc846d1cb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122817 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-06loplugin:moveparam in connectivityNoel Grandin
Change-Id: Iaf3a64effb69fd82c6303d8fa75723ccc5ced543 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123183 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-30loplugin:constmethod handle more casesNoel Grandin
remove some of the naming limitations, and handle pointer parameters better. I only let the plugin run up till vcl/ Change-Id: Ice916e0157031ab531c47f10778f406b07966251 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-30loplugin:constparams improve handling of pointer paramsNoel Grandin
Change-Id: I4c0002e72703eded435bfe4985f5b0121bf8524b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122843 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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>