summaryrefslogtreecommitdiff
path: root/package
AgeCommit message (Collapse)Author
2020-10-02Use the new single-instance="true" attribute in packageStephan Bergmann
Change-Id: I3effdd2500de6accaa075cfc80bdd2654dc13801 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103849 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-09-28struct OHierarchyElement_Impl was apparently meant to be a classStephan Bergmann
Change-Id: Id95a70b38fae40a83f21df56f13b48b2dd0f7001 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103526 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-09-27Replace list by vector in package/ohierarchyholderJulien Nabet
+ rename OWeakStorRefList_Impl to OWeakStorRefVector_Impl to make it more explicit Change-Id: I231c9e582cbfb4670835fe1ef0ce41692ad8dcb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103501 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-27Remove unused std::list in package/xstorageJulien Nabet
Change-Id: I4ac4176d60c29645bd8bc5922154cd3b83dac73e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103500 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-27improve some exception messagesNoel Grandin
Change-Id: Ifc5d940fbf77ae13071c299fb6168bdc55dc5c95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103493 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-26Fix typo in codeAndrea Gelmini
It passed "make check" on Linux Change-Id: Ib1b92b38f3eeb37d659b79572cafc1e3b79fcf29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103458 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-22OUStringLiteral/OStringLiteral coverity PARSE_ERROR workaroundCaolán McNamara
do more like commit 121771e37f7e2de41cd5643475861062bf25627b Date: Mon Sep 21 09:17:54 2020 +0200 Make some OUStringLiteral vars constexpr cause coverity can live with that Change-Id: I9efd7f848289c4865997a44c6780373068422227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103147 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-28Change OUStringLiteral from char[] to char16_t[]Stephan Bergmann
This is a prerequisite for making conversion from OUStringLiteral to OUString more efficient at least for C++20 (by replacing its internals with a constexpr- generated sal_uString-compatible layout with a SAL_STRING_STATIC_FLAG refCount, conditionally for C++20 for now). For a configure-wise bare-bones build on Linux, size reported by `du -bs instdir` grew by 118792 bytes from 1155636636 to 1155755428. In most places just a u"..." string literal prefix had to be added. In some places char const a[] = "..."; variables have been changed to char16_t, and a few places required even further changes to code (which prompted the addition of include/o3tl/string_view.hxx helper function o3tl::equalsIgnoreAsciiCase and the additional OUString::createFromAscii overload). For all uses of macros expanding to string literals, the relevant uses have been rewritten as u"" MACRO instead of changing the macro definitions. It should be possible to change at least some of those macro definitions (and drop the u"" from their call sites) in follow-up commits. Change-Id: Iec4ef1a057d412d22443312d40c6a8a290dc6144 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101483 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-19Restore "bff: terminate on SAXException on malformed input"Caolán McNamara
This reverts commit 50fd69dfe25d14c75f0dae7fa1bf276ea6deefd3. now that... commit 986bd28388df745dd969e7be7c3bda36b2b2cb0e Date: Thu Aug 6 10:50:47 2020 +0100 ofz#24641 libc++abi __cxa_exception has grown another member solved the substantial problem Change-Id: I38734d99a2c8d9e272547ea657555eb4b59a5052 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100974 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-13loplugin:stringstatic also look for local staticsNoel Grandin
Add some API to O*StringLiteral, to make it easier to use in some places that were using O*String Change-Id: I1fb93bd47ac2065c9220d509aad3f4320326d99e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-12SvTreeListBox can move into toolkit headers nowCaolán McNamara
Change-Id: I6b3b6ef1530a192f4b6bf87aa9688687063683ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100591 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-04loplugin:simplifybool a little more aggressiveNoel Grandin
with expressions like !(a && b) Change-Id: Id2acec2a8d0eaaa8e5e37dbd2cae7281be36572e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100040 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-31ofz#23241 Revert "bff: terminate on SAXException on malformed input"Caolán McNamara
This reverts commit 58a96d3ccedbade4f1a8bfbbc4b7d8f1615cfc69. Change-Id: I9d0459c10ece1d4a8e9efeae611cf29d15ca0885 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99893 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-26package/xstor: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation. Change-Id: If1512d63fd1089f6f8486e32106c68f495a1f3df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99424 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-17package: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation. Change-Id: I17627bdd2f4f595343ad9bf524dc57cd03170b2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98921 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-16properly finish encrypting when parallel zip saving (tdf#134796)Luboš Luňák
More fixing of 353d4528b8ad8ab, that I didn't get quite right in 08161f853571e3. There must be one final processDeflated() call that has isDeflaterFinished() return true, so that encrypting is finalized properly. Change-Id: Id15190cc467a801ccc57e1efe802cdd8fc618a71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98878 Tested-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-07-14fix encrypted parallel zip saving (tdf#134332)Luboš Luňák
ZipOutputEntryBase::processDeflated() was calling isDeflaterFinished() to find out whether to finalize and dispose m_xCipherContext. With ZipOutputEntryParallel this was always true, so the context was disposed after the first call. That was originally correct, because originally processDeflated() was called just once at the very end, but 353d4528b8ad8abca9a13f3016632e42bab7afde changed to calling it several times. Change-Id: I1e4a0c887e4ba7ac7b20fa315169eaa911335fde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98625 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-07-12update pchesCaolán McNamara
Change-Id: I75602277a5a26b012a12f2c4f4b7ff5bb663b0b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98474 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-01Upcoming improved loplugin:staticanonymous -> redundantstatic: packageStephan Bergmann
Change-Id: Ie183cb0d374e8d9a02891a765f46583f7cc1c345 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97618 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-24use more std::container::insert instead of std::copyNoel Grandin
which is both more compact code, and more efficient, since the insert method can do smarter resizing Change-Id: I17f226660f87cdf002edccc29b4af8fd59a25f91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-04Upcoming loplugin:elidestringvar: packageStephan Bergmann
Change-Id: I10f55bff4619fe7c1cab378aa00d96cf31d0fcd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95511 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-25package: ignore unknown encryption parameters.Vasily Melenchuk
Do not throw an exception if there are encryption parameters, but they are not supported in current output format. Invalid or unsupported encryption then fails higher up the stack. Change-Id: I21e4cf2f73d7c218ab5444b2016e838695163ca3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84435 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-24inline some use-once typedefsNoel Grandin
Change-Id: Idddba2f3fd05265b08dbc88edb6152d34a166052 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-18package: ODF export: fix position of manifest:start-key-generation childMichael Stahl
META-INF/manifest.xml[8,137]: Error: element "manifest:start-key-generation" was found where no element may occur The problem is that in the schema, manifest:start-key-generation precedes key-derivation but LO writes it in swapped order. This is apparently a workaround for a bug in OOo < 3.2 ODF import and specific to ODF >= 1.2 because the element didn't exist in ODF 1.1; as it turns out we don't care about OOo < 3.4 being able to load encrypted ODF 1.2 documents anway since commit 0b7c3b7d9fa71f59eed75c3e80e5e12245c5e1c5 "tdf#114939 officecfg,sfx2: always use AES/SHA256 in ODF 1.2". Change-Id: I3b62e3eba719f13e39fb24bf9792f764b24ccaeb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94413 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-15package: OFFICE-3940 ODF 1.3 export of OpenPGP encryptionMichael Stahl
Import was implemented with a7bf6488ebb544e1efaed0a1e53073df9cc2064d but it doesn't correspond to the schema so see previous commit. Change-Id: Ic19db07da20e88d6533509217a70983938e61beb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93088 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-15package: OFFICE-3940 ODF 1.3 import of OpenPGP encryptionMichael Stahl
This was supposed to be implemented by commit a7bf6488ebb544e1efaed0a1e53073df9cc2064d "ODF1.3: import new OpenPGP encryption markup" but it turns out that the ODF 1.3 cs01 schema differs from the implementation: in ODF 1.3 cs01 we have <manifest:encrypted-key> <manifest:encryption-method .../> <manifest:keyinfo> <manifest:PGPData> </manifest:PGPData> </manifest:keyinfo> <manifest:CipherData> </manifest:CipherData> </manifest:encrypted-key> whereas the implementation expects <manifest:keyinfo> <manifest:encrypted-key> <manifest:encryption-method .../> <manifest:PGPData> </manifest:PGPData> <manifest:CipherData> </manifest:CipherData> </manifest:encrypted-key> </manifest:keyinfo> Ideally the inner manifest:keyinfo should be manifest:KeyInfo but not sure if that really matters. Change-Id: I407321c857e7b3ed9f4d04568ca2ea116764b3da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94309 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-10new loplugin:simplifypointertoboolNoel Grandin
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-09compact namespace in packageNoel Grandin
Change-Id: I9956f715e00a0c2814b79617f37dd0c09f049ad0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93858 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-26update pchesCaolán McNamara
Change-Id: I83a61da7dda6c72552eecd377f1c3744c92a797e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92909 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-15loplugin:buriedassign in l,o,p*Noel Grandin
Change-Id: Ib2dd157d43c4387eda009475311761fe2eb627cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92241 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-03loplugin:flatten in packageNoel Grandin
Change-Id: I4d81c7c1d241e51565d7cbc6549ac586136f0c86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91616 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-25Remove unused using declarations in oox...xmlsecurityGabor Kelemen
Found by: run-clang-tidy-10 -checks=-*,misc-unused-using-decls Change-Id: I3e95791e223ef01e140a6217e29a9efae428a784 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90876 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-03-12Revert "loplugin:constfields in package..registry"Noel Grandin
This reverts commit 31138ff7729cbf179079a5e635d3a823e2971f08. Now that we know that making fields has negative side effects like disabling assignment operator generation. Change-Id: I3f1ae65532f441c8be5ebca5866b8a1e1c69318c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90363 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-01make update_pch also consider files in <module>/src/**/incLuboš Luňák
With --enable-pch=full there's not much difference between a "public" header in <module>/inc and a private one in <module>/src/somewhere/inc . And since the script searches recursively, this apparently helps to find even more headers for lower pch levels. Change-Id: I8483d0aa5b4fea5a59107c20a8aa5f1ef694af0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87799 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-01-28tdf#88205: Adapt uses of css::uno::Sequence to use initializer_list ctorOnur Yilmaz
Change-Id: Ie5a381fc5e5b73490ab8b2036ef2a1164e475e8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87557 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-28remove some unused local varsNoel Grandin
found by my new loplugin:unusedvariableplus Change-Id: Ic3f55f492d43a53d8850a97d44059ff127fd69a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87573 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-26tdf#124176: Use pragma once instead of include guardsBurak Bala
Change-Id: Ib2465f040f12413560b2cec1c742cf3558461309 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87404 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-26remove some unused local varsNoel Grandin
found by a more aggressive variant of loplugin:unusedvariables. This is my first pass, committing the simplest and most obviously unnecessary vars Change-Id: I9676a6e39a101937097788548764506c93811c57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87414 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-26rename some local variablesNoel Grandin
mostly to make the job of my very aggressive unused local vars plugin easier Change-Id: Ifc21a920841f8589f8b7e10de39dba6622a5d501 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87399 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-13loplugin:finalclasses in package..sfx2Noel Grandin
Change-Id: I2908abc13f16b0011fcb326e8405080cc30df74a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86684 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-13tdf#125662: do parallel-zip in batchesDennis Francis
In this approach the input stream is read one batch (of constant size) at a time and each batch is compressed by ThreadedDeflater. After we are done with a batch, the deflated buffer is processed straightaway (directed to file backed storage). Change-Id: I2d42f86cf5898e4d746836d94bf6009a8d3b0230 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86596 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-01-13Revert "tdf#125662: disable parallel-zip if the memory..."Dennis Francis
This reverts commit 0b8ae8725083eb0526a262d434cc06fb3f3e7336. A better fix will follow this patch. Change-Id: I4ff8d71bf2401bae2e2071c369e3746b8b7c72bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86595 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-01-13tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorMesut Çifci
Change-Id: I1c1e7b42211c51f572698efd3135e388f8fb2979 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86648 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-12tdf88205 Adapt uses of css::uno::Sequence to use initializer_list ctorYusuf Keten
Change-Id: I5eb9c58f511a6ded473eb3fb998fd21584c227d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86607 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-04tdf#125662: disable parallel-zip if the memory...Dennis Francis
required to carry it out will cause a breach of addressable memory limit. This can happen in 32bit OSes, where the physical memory limit is more than the process addressable memory limit. For example in Win32, a process can address only upto 2GB. More specifically, avoid using ZipOutputEntryParallel which rougly needs twice the memory compared to its counterparts. Change-Id: I4d1abbf75e928188bcf806fcf1e5872b1e51b502 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84394 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-01-04tdf#93389: keep encryption information for autorecovered MS formatsMike Kaganski
The autorecovery data is stored in ODF, regardless of the original document format. When restoring, type detection generates ODF data, which is stored in the media descriptor attached to document, even after real filter was restored (see AutoRecovery::implts_openDocs). If real filter is not ODF, then at the save time, it doesn't find necessary information in encryption data, and makes not encrypted package. This patch adds both MS binary data, and OOXML data, to existing ODF data for recovered password-protected documents (regardless of their real filter). TODO: only add required information to encryption data: pass real filter name to DocPasswordHelper::requestAndVerifyDocPassword from AutoRecovery::implts_openDocs. Change-Id: I4749c5ec028ca61bddf7cd77bc5969a97b1de199 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86201 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-12-19sal_Char->char in oox..registryNoel Grandin
Change-Id: Icc7f2a32696c30317c1ee77ef39d682d5f5a80b9 Reviewed-on: https://gerrit.libreoffice.org/85512 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-28check crcs when fuzzing after allCaolán McNamara
I end up with something that fails in the fuzzing setup but which cannot be used as a testcase in a normal build Change-Id: I20c73aa009fdc289d95d34a8adf8ddd5882f6694 Reviewed-on: https://gerrit.libreoffice.org/84013 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-25Remove some redundantly user-declared copy ctors and assignment opsStephan Bergmann
...that trigger -Werror,-Wdeprecated-copy ("definition of implicit copy {constructor, assignment operator} for ... is deprecated beause it has a user-declared copy {assignment operator, constructor}") new in recent Clang 10 trunk (and which apparently warns about more cases then its GCC counterpart, for which we already adapted the code in the past, see e.g. the various "-Werror=deprecated-copy (GCC trunk towards GCC 9)" commits) Change-Id: Ie37bd820e6c0c05c74e1a862bb1d4ead5fb7cc9c Reviewed-on: https://gerrit.libreoffice.org/83698 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-24cppcheck: performing init in init list (oox, package, sal, sax)Julien Nabet
Change-Id: I77e28f02516ab25ff6680970dc13d52cfa90eac1 Reviewed-on: https://gerrit.libreoffice.org/83620 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>