summaryrefslogtreecommitdiff
path: root/comphelper
AgeCommit message (Collapse)Author
2024-09-05tdf#162772 Crash in "Target in Document" in Hyperlink dialogNoel Grandin
regression from commit a6ad198d097fb4a503c8d5831d484ff46721134b Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Sat Aug 17 13:19:54 2024 +0200 tdf#158556 use more comphelper::ByteReader Change-Id: I7343159d5e3ec7619ba95a98417fd3b4e25dbf6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172906 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-27tdf#158556 use more comphelper::ByteReaderNoel Grandin
which avoids a ton of temporary uno::Sequence being created Change-Id: I237bb69395f692bb0272ca0daec05b81af828e01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171968 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-08-23make joinThreadsIfIdle return false if it cannot joinCaolán McNamara
Change-Id: I52e22bf5e68809d6787d2d135b6a35384cf79391 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168785 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit c7ff8768db58aaee5ce0acbabe97faeaf450f017) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172329 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-08-21use less exception throwing for flow controlNoel Grandin
Change-Id: Iaf273c1f54977d4b422a327ffbc1086da991cc4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172212 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-19cid#1557694 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1557162 COPY_INSTEAD_OF_MOVE cid#1556896 COPY_INSTEAD_OF_MOVE cid#1556893 COPY_INSTEAD_OF_MOVE cid#1556873 COPY_INSTEAD_OF_MOVE cid#1556872 COPY_INSTEAD_OF_MOVE cid#1556789 COPY_INSTEAD_OF_MOVE cid#1556570 COPY_INSTEAD_OF_MOVE cid#1556519 COPY_INSTEAD_OF_MOVE cid#1556516 COPY_INSTEAD_OF_MOVE cid#1556451 COPY_INSTEAD_OF_MOVE cid#1556396 COPY_INSTEAD_OF_MOVE cid#1556237 COPY_INSTEAD_OF_MOVE cid#1556113 COPY_INSTEAD_OF_MOVE cid#1556094 COPY_INSTEAD_OF_MOVE cid#1555991 COPY_INSTEAD_OF_MOVE cid#1555982 COPY_INSTEAD_OF_MOVE cid#1555885 COPY_INSTEAD_OF_MOVE cid#1555702 COPY_INSTEAD_OF_MOVE cid#1555610 COPY_INSTEAD_OF_MOVE cid#1555450 COPY_INSTEAD_OF_MOVE cid#1555327 COPY_INSTEAD_OF_MOVE cid#1555145 COPY_INSTEAD_OF_MOVE Change-Id: I38cc1a38e8cb2c33f33e0fc3afd34a0fb39e5ec1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172028 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-16sfx2: fix crash in SfxObjectShell::IsHelpDocument()Miklos Vajna
Seen while running the online.git unit-quarantine testcase: #0 std::__uniq_ptr_impl<SfxMedium_Impl, std::default_delete<SfxMedium_Impl> >::_M_ptr() const (this=0x10) at /usr/include/c++/12/bits/unique_ptr.h:191 #1 0x00007f2f25fa398a in std::unique_ptr<SfxMedium_Impl, std::default_delete<SfxMedium_Impl> >::get() const (this=0x10) at /usr/include/c++/12/bits/unique_ptr.h:462 #2 0x00007f2f25f9fae2 in std::unique_ptr<SfxMedium_Impl, std::default_delete<SfxMedium_Impl> >::operator->() const (this=0x10) at /usr/include/c++/12/bits/unique_ptr.h:455 #3 0x00007f2f25f8bbd2 in SfxMedium::GetFilter() const (this=0x0) at sfx2/source/doc/docfile.cxx:3272 #4 0x00007f2f260067ce in SfxObjectShell::IsHelpDocument() const (this=0x5c6adc0) at sfx2/source/doc/objcont.cxx:589 #5 0x00007f2f0f6991c1 in SwLayIdle::isJobEnabled(IdleJobType, SwViewShell const*) (eJob=IdleJobType::SMART_TAGS, pViewShell=0x5a573f0) at sw/source/core/layout/layact.cxx:2218 #6 0x00007f2f0f69926d in SwLayIdle::DoIdleJob(IdleJobType, IdleJobArea) (this=0x7ffc9daf4180, eJob=IdleJobType::SMART_TAGS, eJobArea=IdleJobArea::VISIBLE) at sw/source/core/layout/layact.cxx:2234 #7 0x00007f2f0f699d81 in SwLayIdle::SwLayIdle(SwRootFrame*, SwViewShellImp*) (this=0x7ffc9daf4180, pRt=0x5a8fad0, pI=0x5a58860) at sw/source/core/layout/layact.cxx:2355 #8 0x00007f2f0fdccf21 in SwViewShell::LayoutIdle() (this=0x5a573f0) at sw/source/core/view/viewsh.cxx:826 Assume that in case the object shell has no underlying medium, then that's not a help document. Also fix the higher level problem that the LOK AnyInput callback should not be invoked while doing a LOK background save, as the object shell in the forked process has no underlying medium. That fixes the failure seen while running the online.git unit-save-torture test. Change-Id: Idcdd62cc177ac4b7edfbcef8906da2e42610ee98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171950 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-08-16cid#1557618 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1557535 COPY_INSTEAD_OF_MOVE cid#1557520 COPY_INSTEAD_OF_MOVE cid#1557513 COPY_INSTEAD_OF_MOVE cid#1557503 COPY_INSTEAD_OF_MOVE cid#1557487 COPY_INSTEAD_OF_MOVE cid#1557483 COPY_INSTEAD_OF_MOVE cid#1557479 COPY_INSTEAD_OF_MOVE cid#1557474 COPY_INSTEAD_OF_MOVE cid#1557461 COPY_INSTEAD_OF_MOVE cid#1557446 COPY_INSTEAD_OF_MOVE cid#1557445 COPY_INSTEAD_OF_MOVE cid#1557441 COPY_INSTEAD_OF_MOVE cid#1557435 COPY_INSTEAD_OF_MOVE cid#1557433 COPY_INSTEAD_OF_MOVE cid#1557429 COPY_INSTEAD_OF_MOVE cid#1557375 COPY_INSTEAD_OF_MOVE cid#1557372 COPY_INSTEAD_OF_MOVE cid#1557356 COPY_INSTEAD_OF_MOVE cid#1557350 COPY_INSTEAD_OF_MOVE cid#1557344 COPY_INSTEAD_OF_MOVE cid#1557339 COPY_INSTEAD_OF_MOVE cid#1557332 COPY_INSTEAD_OF_MOVE cid#1557330 COPY_INSTEAD_OF_MOVE cid#1557328 COPY_INSTEAD_OF_MOVE cid#1557323 COPY_INSTEAD_OF_MOVE cid#1557315 COPY_INSTEAD_OF_MOVE cid#1557313 COPY_INSTEAD_OF_MOVE cid#1557304 COPY_INSTEAD_OF_MOVE cid#1557297 COPY_INSTEAD_OF_MOVE cid#1557291 COPY_INSTEAD_OF_MOVE cid#1557290 COPY_INSTEAD_OF_MOVE cid#1557271 COPY_INSTEAD_OF_MOVE cid#1557266 COPY_INSTEAD_OF_MOVE cid#1557262 COPY_INSTEAD_OF_MOVE cid#1557259 COPY_INSTEAD_OF_MOVE cid#1557246 COPY_INSTEAD_OF_MOVE cid#1557242 COPY_INSTEAD_OF_MOVE cid#1557241 COPY_INSTEAD_OF_MOVE cid#1557236 COPY_INSTEAD_OF_MOVE cid#1557228 COPY_INSTEAD_OF_MOVE cid#1557225 COPY_INSTEAD_OF_MOVE cid#1557221 COPY_INSTEAD_OF_MOVE cid#1557217 COPY_INSTEAD_OF_MOVE cid#1557213 COPY_INSTEAD_OF_MOVE cid#1557211 COPY_INSTEAD_OF_MOVE cid#1557209 COPY_INSTEAD_OF_MOVE cid#1557205 COPY_INSTEAD_OF_MOVE cid#1557204 COPY_INSTEAD_OF_MOVE cid#1557193 COPY_INSTEAD_OF_MOVE cid#1556082 COPY_INSTEAD_OF_MOVE Change-Id: I07f195a79a69d4bac0d14317854efc88d6fe94d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171927 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-16cid#1616498 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1616499 COPY_INSTEAD_OF_MOVE Change-Id: I21b089cab036902a7ba5b725a6eae0f1212f2b31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171923 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-14Related: cool#9735 vcl lok: add an AnyInput() callbackMiklos Vajna
Open the 300 pages bugdoc, paste a oneliner plain text content in a paragraph which is part of a numbered list, observe a 274 ms hang till layout is done for all pages, then we get an updated tile. This could be better, there is no such hang in the desktop case. What happens is that 1) vcl doesn't try to invoke the poll callback of the LOK client when there was a processed timer and 2) Writer layout doesn't try to split its work into pieces because the LOK client has no way to inform vcl that it has pending input events. Fix the first problem in this commit: add a new API that allows a LOK client to inform vcl that it has pending input events and use that SvpSalInstance::ImplYield(): if a LOK client has pending input events, then invoke the poll callback after each processed timer. For example, this allows the LOK client to process emitted callbacks between two idle layout jobs, word counting, etc. The second problem around Writer to use comphelper::LibreOfficeKit::anyInput() is not yet fixed. Change-Id: I2e39253bfc4d1b5546bc60eef9ff05ccdc0868b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171846 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-08-14Related: tdf#42982 replace IllegalTypeException with RuntimeExceptionHakimOttey
Change-Id: Ibe6004e43a7553c6694d7938603023a9f95535a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170035 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins
2024-08-13tdf#161909: make showing GPG keys only an explicit functionalityMoritz Duge
Before this change, selecting only GPG keys for ODF encrpytion relied on the fact, that all X.509 implementations (nss+mscrypt) implement listing public keys (getAllCertificates) as a stub. See previous change Ia6b8ecb9 Change-Id: Icb36a4cefd60b94407129ff73fe62f9250bfbee5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171639 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-08-05tdf#159040 tdf#162206: better the user key selection and test sign with defaultSarper Akdemir
fix GPG CertificateImpl::getSHA1Thumbprint not returning a sequence of bytes as the thumbprint. (that is what the documented API states, and what all of the code assumed.) now /org.openoffice.UserProfile/Data/signingkey and encryptionkey stores the key's SHA1Thumbprint for better identification of keys. Previously on the key name was being used. fix annoying NSS Certificate Database password prompt appearing on Tools->Options if the certificate database is password protected. improve Tools->Options->UserData user key selection and display of information. add a ui test for "Sign with default certificate" interaction in the save dialog. Change-Id: I1036856003f58f494838e0f81ca0fe18e821f528 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171395 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-07-27comphelper, msicreator, odk: fix issues found by Ruff linterIlmari Lauhakangas
Change-Id: I5ef65baeb0100b9d70b5c59c1d5f6f43ab951a22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171092 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-07-25O[U]String overloads that return view for rest parameterNoel Grandin
Add new overloads to OUString methods that have a "OUString* rest" style parameter. Instead return a view, which does not require allocation. To avoid overload ambiguity, split the methods into different variants that do not use default parameters. Change-Id: I1aa366115750f1f7ea4fe665804195f59f7c4b69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167632 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-07-24tdf#159040: add sign with default certificate to save dialogSarper Akdemir
Include X.509 certificates under Tools->Options->UserData among the keys for signing. Add a new checkbox to Save file dialog, to sign with that selected key easily. The checkbox is disabled if there's no matching key found. Change-Id: I9fc16790c479819cd1f35bcad040d0ebc7c4bdef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170619 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-07-20Remove now unneeded osl/diagnose.hGabor Kelemen
followup to commit 57c228803e55ed343c6693de7d0857ad7d3cd9e3 Change-Id: Iebfb23bb65e2bf898bf27f367cc9641f47a14cf3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167998 Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> Tested-by: Jenkins
2024-07-19make pop-up on Encrypt With GPG Key modalSarper Akdemir
Not setting any parent window for XDocumentDigitalSignatures causes the key selection window to be non-modal, letting the user keep editing the document without completing the encryption interaction. Change-Id: Ic7e66cb43606355beaffc720b7c23cdf4f81d934 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170630 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-07-16cid#1554709 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1554745 COPY_INSTEAD_OF_MOVE cid#1554758 COPY_INSTEAD_OF_MOVE cid#1554766 COPY_INSTEAD_OF_MOVE cid#1554771 COPY_INSTEAD_OF_MOVE cid#1554787 COPY_INSTEAD_OF_MOVE cid#1554802 COPY_INSTEAD_OF_MOVE cid#1554820 COPY_INSTEAD_OF_MOVE cid#1554828 COPY_INSTEAD_OF_MOVE cid#1554829 COPY_INSTEAD_OF_MOVE cid#1554832 COPY_INSTEAD_OF_MOVE cid#1554842 COPY_INSTEAD_OF_MOVE cid#1554885 COPY_INSTEAD_OF_MOVE Change-Id: I43ec20250a04dc087f3d7fdeafc75f0c1dd0de25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170542 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-14cid#1555652 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1555655 COPY_INSTEAD_OF_MOVE cid#1555658 COPY_INSTEAD_OF_MOVE cid#1555665 COPY_INSTEAD_OF_MOVE cid#1555667 COPY_INSTEAD_OF_MOVE cid#1555670 COPY_INSTEAD_OF_MOVE cid#1555675 COPY_INSTEAD_OF_MOVE cid#1555684 COPY_INSTEAD_OF_MOVE cid#1555687 COPY_INSTEAD_OF_MOVE cid#1556539 COPY_INSTEAD_OF_MOVE cid#1556542 COPY_INSTEAD_OF_MOVE cid#1557448 COPY_INSTEAD_OF_MOVE cid#1557449 COPY_INSTEAD_OF_MOVE Change-Id: I3567528e559bca0031c4f5b46801e3130073633b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170448 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-04comphelper: treat zip file path segments '.' and '..' as invalidMichael Stahl
This will prevent also opening with RepairPackage, would need to adapt ZipPackage::getZipFileContents() a bit, but let's hope nobody acutally has such files. Also treat path that starts with "/" as invalid, presumably it's not allowed by APPNOTE.TXT: "The name of the file, with optional relative path." Change-Id: Ic694ea2fb34f5de1d490a9a251cf56e4004e9673 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169994 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2024-07-02tdf#42982 Improve UNO API error reportingBeeram_12
Change-Id: Ia581b91ce0b08ff1117daba691197be555951992 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166971 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-07-02tdf#42982 Use IllegalTypeException Error with messageHakimOttey
within impl_initValues_throw Change-Id: I03942ac2e3478e57b7d94b77b6f100367a53f7ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166648 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins
2024-05-20loplugin:ostr in variousNoel Grandin
Change-Id: I9f399b3752da9df930e0647536ffcd4e82beb1ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167856 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-15tdf#158337 Use C++20 std::erase instead of std::remove followed by eraseAmandaQuaresmaCoutinho
Change-Id: Ia75e19d21f0566ba589974bc2bad6da77c6252e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165925 Reviewed-by: Hossein <hossein@libreoffice.org> Tested-by: Hossein <hossein@libreoffice.org>
2024-05-08drop requirement for rtl_random_getBytes to have "Pool" argCaolán McNamara
Seeing as since: commit e9531b792ddf0cfc2db11713b574c5fc7ae09e2c Date: Tue Feb 6 14:39:47 2024 +0100 sal: rtlRandomPool: require OS random device, abort if not present Both rtl_random_createPool() and rtl_random_getBytes() first try to get random data from the OS, via /dev/urandom or rand_s() (documented to call RtlGenRandom(), see [1]). we don't use the initial arg to rtl_random_getBytes anymore, drop the requirement to have one. Then simplify our usages of that, and addtionally deprecate rtl_random_createPool and rtl_random_destroyPool. Change-Id: I13dcc067714a8a741a4e8f2bfcf2006373f832c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167067 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-05-07lok: reseed comphelper's random number generator on fork.Michael Meeks
Also avoid std::random_device it doesn't work in a COOL kit process. Change-Id: Ie2d063611a73e734afd92d6fd779f34a2f316230 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167070 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2024-05-04Fix typoAndrea Gelmini
Change-Id: I0db9bdf1d16baf52ad12591634a236e1aeab4e9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167115 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-05-03try to work around clang compiler crash on macosNoel Grandin
clang::CodeGen::CodeGenFunction::EmitAggregateStore(llvm::Value*, clang::CodeGen::Address, bool) (anonymous namespace)::AggExprEmitter::VisitConstantExpr(clang::ConstantExpr*) (anonymous namespace)::AggExprEmitter::VisitCastExpr(clang::CastExpr*) clang::CodeGen::CodeGenFunction::EmitAggExpr(clang::Expr const*, clang::CodeGen::AggValueSlot) clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) Change-Id: I96ef1d95a46542d2dfa85f5c6dbfa2ec05b41302 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167045 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-03tdf#160915: make own OLE objects obey AddReplacementImages settingMike Kaganski
Change-Id: I25ce3c920dc8ba25d0ac14310ff9cba8a4c23c6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167026 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-05-02elide some OUString creation in GetContentPartNoel Grandin
Change-Id: I2a9a8e7713cb4efbc7bf3401cbbe31640098cb1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166980 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-30loplugin:ostr in comphelperNoel Grandin
Change-Id: Ide07689bf1a68973cb176554e44e9a809d633def Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166851 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-28Simplify a bitMike Kaganski
Change-Id: I1db779648b273d0c732683042c74bd29666f1b10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166785 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-04-22loplugin:constantparamNoel Grandin
Change-Id: I42e35e3474a222d57cb0b911060710c0c49d0b0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166420 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-12tdf#146266 Move WeakBag test to gbuild systemRMZeroFour
As part of the efforts in tdf#146266 to move parts of the codebase from the older makefile.mk build system to the newer gbuild system, this commit migrates the WeakBag test, and cleans it up a little. The test can now be invoked using this command: $ make CppunitTest_comphelper_weakbag Change-Id: I4ac3771fa23e28abd38a2dab84cacd1ae57fb70f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165591 Tested-by: Hossein <hossein@libreoffice.org> Reviewed-by: Hossein <hossein@libreoffice.org>
2024-04-07ofz#67491 avoid direct nss use to support --enable-tls-opensshCaolán McNamara
Change-Id: I337fa47faecbd5059fa02a7d24b70dd9c2da0fdb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165861 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-30tdf#42982 Add error messages to thrown exceptionsRMZeroFour
As part of the efforts in #42982 to improve the UNO API error reporting, this commit adds error messages in several files to help improve debugging experience. Change-Id: I7a51d4fd1e3a57798d70bc3464b034649948a287 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165253 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-03-30tdf#146619 Drop unused 'using namespace' in: comphelper/Gabor Kelemen
Change-Id: I96982faf40e7654b0f8f26b666a17cbd057886a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165516 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-03-28Add comphelper::WeakImplHelperBaseNoel Grandin
in the same way I added WeakComponentImplHelperBase Change-Id: I26d93004c3ddf716063cfb2ded1bbda1b76c2a98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165449 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-28lok: add isForkedChild method.Michael Meeks
This can be used to tag short-lived transient 'save' processes to encourage them not to mutate eg. filesystem state that is shared with the parent process. Change-Id: I027d18cbe4ce519b31c4fc1d3ac46b916d1efc87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165407 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit 9dab5edb90d14ad6f71cc2ac96cc504c1e8c290b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165427 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2024-03-26convert ODatabaseMetaDataResultSet to comphelper::WeakComponentImplHelperNoel Grandin
Which means making a copy of comphelper::PropertyContainer Change-Id: I14a61fa40e2c1dfc66833e00817025397584b3ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165345 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-26Fix typoAndrea Gelmini
Change-Id: Iabc9a271c0c7d2c11da1db629335dcf7c73fff52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165331 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-03-26tdf#160184 ask user if they want to trust an untrusted certificatePatrick Luby
gpgme contexts uses the "auto" trust model by default which only allows encrypting with keys that have their trust level set to "Ultimate". The gpg command, however, gives the user the option to encrypt with a certificate that has a lower trust level so emulate that bahavior by asking the user if they want to trust the certificate for just this operation only. Also, abort saving if no certificates are selected which is an indication that the user cancelled the Select Certificate dialog. Change-Id: I20951b1e31b2dcf8adb82243742f8c00fbaca8c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165260 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-03-09Support o3tl::iterateCodePoints with both sal_Int32 and std::size_tStephan Bergmann
...and clean up the most gross casting offenses Change-Id: If0d646fb3e73e71a9a2735569395034973563a1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164602 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-03-08use more string_viewNoel Grandin
found by tweaking the stringview loplugin Change-Id: I92203ba99642bef7951ffa146184c5562cb31d09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-06Use less boost_headers in low level librariesGabor Kelemen
Most of these don't use boost themselves, nor do they need it transitively since the use of boost::optional was removed Change-Id: Ic9dee1c4e160b313ec5b91677b02ffdea6c5779d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164440 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-02-27tdf#42982 Improve UNO API error reportingAhmedHamed
Change-Id: Ia27365b3e5539cdf0f96f01a96bbe58653eb46c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163788 Reviewed-by: Hossein <hossein@libreoffice.org> Tested-by: Jenkins
2024-02-23Fix warning C4477 when building with MSVC without -Wv:18Mike Kaganski
Discovered by https://gerrit.libreoffice.org/c/core/+/163717 Like these: C:/lo/core/comphelper/source/windows/windows_process.cxx(254): warning C4477: 'wprintf' : format string '%s' requires an argument of type 'wchar_t *', but variadic argument 1 has type 'const void *' Change-Id: Ia804bad18366d4f9422d72f3061c83cb07e92073 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163783 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-22tdf#159519 comphelper,package: do not store document without SHA256Michael Stahl
The problem is that on Windows 7 the password-encrypted documents are stored unencrypted, without any error message. This is due to defensive programming in OStorageHelper::CreatePackageEncryptionData(), which happily continues if creating the SHA256 hash fails, which is the one required for storing anything newer than ODF 1.1. Also, the poorly named ZipPackage::GetEncryptionKey() should check for consistency, the expectation is that either there's no encryption key (empty sequence), or the expected one is in the sequence. Creating the SHA256 uses the crypto::NSSInitializer component, which is in xsec_xmlsec.dll, which is linked to libxmlsec-mscng.dll, which is linked to Win32 bcrypt.dll, which doesn't have BCryptKeyDerivation on Windows 7; to reproduce elsewhere, rm instdir/program/libxsec_xmlsec.so (regression from commit 26bf26272bf525b59b4a4ce18b3ce14c1febfd7b and (due to revert) commit bfd479abf0d1d8ce36c3b0dcc6c824216f88a95b) Change-Id: I0b22e20f6d4d0b1a12ed7d99fac7b5243910f9ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163708 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-02-13tdf#158237 comphelper: Use C++20 contains() instead of find() and end()AkshayWarrier
Change-Id: I99c27c2269051c6c145dbfd2ec12790d4bb1d5e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162338 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2024-02-13fix windows --enable-mergelibs buildNoel Grandin
after commit b663d94cf67a5af4fd89c1ac8bdffd6059f6bf85 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Mon Feb 5 08:50:24 2024 +0200 create --enable-mergelibs=more Change-Id: Ib9f0b3b28df70a9bab10d9bb0aa77a2b2decc616 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163308 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>