summaryrefslogtreecommitdiff
path: root/filter/source/config/cache
AgeCommit message (Collapse)Author
2024-06-17tdf#161573: Do not show unrelated messages during broken ZIP detectionMike Kaganski
Change-Id: Iab7f4bb492e24eb2ca6448f3540d219a18c15d79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168869 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 278008f76835a128025b2a37ba8c9a7613284b6d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168883 Reviewed-by: Justin Luth <jluth@mail.com> (cherry picked from commit 0612048edb676d2c4f2e7dbefa0fcb464c25f016) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168884
2024-02-06tdf#159461 deadlock in Dialog "XML Filter Settings"Noel Grandin
revert commit 15405dc68b2e88b53585578567da13e3e99962db Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Mon Feb 20 15:43:41 2023 +0200 osl::Mutex->std::mutex in FilterCache There is much recursive behaviour going on here, via the configmgr and the listeners that FilterCache has. Change-Id: Ice003404dffad9e5e63bcff30c2ceede4f52cab8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162930 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit b23aec2266da4cc2b3f4a34037d3a073a36d3d83) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162905 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-12-01Related: tdf#96401 Check ZIP magic number, to avoid false detectionsMike Kaganski
Change-Id: Ice077f35293a3d0f37c74911d5a6db7ccab5fb31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160168 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-29Extended loplugin:ostr: filterStephan Bergmann
Change-Id: I900c7e070f9830b3da1dbcce75d418a75652d1ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160121 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-11-28lok: don't use template flag in more placesMike Kaganski
Similar to commit e2ee3dd61ab8ea5d970d8da5df3233e7bba5909e (lok: add broken package interaction handler, 2023-10-02), all places of broken package handling should allow replacing the original document. Change-Id: I8450dfc0ab60444fa08014cc952ac857998d35ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160009 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-27Related: tdf#96401 Set PROP_ASTEMPLATE for broken ZIP packageMike Kaganski
Same as in StorageFilterDetect::detect. It would prompt user on save to provide a new file name, instead of silently rewriting (possibly recovered with errors) document. Change-Id: I8ede6d01e2d482f409e8b3f7452deb1e4bd02a85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159985 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-26tdf#96401: allow to detect a broken ZIP packageMike Kaganski
In deep detection, first check if it's a broken ZIP package. If it is, set the RepairPackage media descriptor property to true. Pass the RepairPackage value to the OOXML filter detection. Change-Id: Ic958283f3cce92ac29ce93ac330cc9e409e3eb78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159976 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-18c++20: use std::erase(_if) instead of std::remove(_if)+erase (part 4)Julien Nabet
Change-Id: I6af5501e3fde07024dcc74f00c8fd69bd369d8d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159613 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-10-25Support conditional loading of Apache Parquet files into CalcKohei Yoshida
Also, use orcus::create_filter() and simplify the logic a bit. This requires orcus 0.19.1 or newer. Note that this change makes it possible to load Apache Parquet files if and only if orcus has been built with the parquet import filter enabled. Using orcus without the parquet import filter enabled will not break the build or run-time behavior; you just can't load parquet files. Change-Id: I9f8820998b7b0667d1e7cd532c32b1c7e55ca999 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158411 Tested-by: Jenkins Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2023-10-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-18Clean up the remaining uses of OUStringConstExpr, and drop itStephan Bergmann
Change-Id: I30b2ac77b58e2ae1d1e997a0c830c513542b973d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158101 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-11Drop o3tl::span, can use C++20 std::span directly nowStephan Bergmann
Change-Id: Ic21ff7bf48f07f7277979d52e99d2c5c268de83f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157825 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-03Simplify long if statementsHannah Meeks
Change-Id: I379fb5809e5e00788445bcf9cebdcaba563b1af4 Use structured binding, fixup Change-Id: Ibd52ff1313336aa8a082477dee3ea7fce0f1d3f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157492 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-04Use getXWeak in filterMike Kaganski
Change-Id: I9854e28a4c577fae71bfc7e4bbaaadbdbce08684 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150850 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-14NamedValue needs to be a complete type here nowStephan Bergmann
...at least with VS 2022 Preview 17.6.0 Preview 3.0 and --with-latest-c++, > C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1436~1.323\Include\span(78): error C2036: 'const com::sun::star::beans::NamedValue *': unknown size > C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1436~1.323\Include\span(73): note: while compiling class template member function 'std::_Span_iterator<_Ty> &std::_Span_iterator<_Ty>::operator --(void) noexcept' > with > [ > _Ty=const com::sun::star::beans::NamedValue > ] > C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1436~1.323\Include\xutility(1414): note: see the first reference to 'std::_Span_iterator<_Ty>::operator --' in 'std::iter_move' > with > [ > _Ty=const com::sun::star::beans::NamedValue > ] > C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1436~1.323\Include\xutility(474): note: see the first reference to 'std::iter_move' in 'std::ranges::_Iter_move::_Cpo::operator ()' > C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1436~1.323\Include\__msvc_iter_core.hpp(392): note: see reference to class template instantiation 'std::_Span_iterator<_Ty>' being compiled > with > [ > _Ty=const com::sun::star::beans::NamedValue > ] > C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1436~1.323\Include\xutility(602): note: see reference to variable template 'bool input_or_output_iterator<std::_Span_iterator<com::sun::star::beans::NamedValue const > >' being compiled > C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1436~1.323\Include\xutility(1778): note: see reference to variable template 'bool input_iterator<std::_Span_iterator<com::sun::star::beans::NamedValue const > >' being compiled > filter\source\config\cache\filtercache.hxx(368): note: see reference to class template instantiation 'std::span<const com::sun::star::beans::NamedValue,18446744073709551615>' being compiled Change-Id: Ibff530be810f56a1f33bf78f0d2e3b76c64b08cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150385 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-09remove some unnecessary locking in TypeDetectionNoel Grandin
the FilterCache class is already internally thread-safe Change-Id: Ic869bda1257cc61fc69557624c8d6e169645b23a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148538 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-22BaseMutex->std::mutex in ConfigFlushNoel Grandin
Change-Id: Ia8c5d5cc6ea52ed385ae4ea3e860f2cc88d06377 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147456 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-22LOAD_IMPLICIT has been activeNoel Grandin
since commit c847b9430e26f98664f42c8fd4c28dc0433174b2 Author: Oliver Bolte <obo@openoffice.org> Date: Thu Apr 29 12:38:50 2004 +0000 Change-Id: I496e5d52fae29274e4782f700dc391a86a50eb72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147403 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-22osl::Mutex->std::mutex in BaseContainerNoel Grandin
Change-Id: I66fcebb897446a5839ebde03e8e0a91d75a5e57c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147402 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-20osl::Mutex->std::mutex in FilterCacheNoel Grandin
Change-Id: I5cdfe5397235eef276fdf77a4bf83bebdc96438b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147338 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-18tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macroOmkarAcharekar
Change-Id: I35c883a1b05a797e83a41698fa205796e681d7c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141482 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-09-20use more string_view in unotoolsNoel Grandin
Change-Id: Iaf91f9c63a0a666250e92a5ba7bebdb06dffb258 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140233 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-01clang-tidy modernize-pass-by-value in filterNoel Grandin
Change-Id: Id55c90665eaa29ee2ece07606429411549e06b8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135242 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-25elide some OUString allocationNoel Grandin
Change-Id: Idcb296980ea498373a0fb4f8c0c584eef2c5c9f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134922 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-25allow comphelper::OEnumerationByName to use a vector too for namesNoel Grandin
so we can skip some allocation. Use a std::variant to preserve existing functionality Change-Id: If01ebb04f7895fd52fa3f5d90648868fd38dc39e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134929 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-24ConfigFlush can be directly instantiated hereNoel Grandin
Change-Id: I97934ecf7aafbeec3db9e7149e149a468ae21374 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134854 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-24m_xRefreshBroadcaster in BaseContainer is dead codeNoel Grandin
because we are assigning a newly created object to a weak reference, which means the newly created object is destroyed just after it is created (verified in a debugger). This was introduced in commit e03dd544aec890a6fdf4638380c95104430752a3 Date: Wed Jul 20 08:27:45 2005 +0000 INTEGRATION: CWS fwk18 (1.5.224); FILE MERGED 2005/07/06 09:29:56 as 1.5.224.1: #123808# update sfx filter cache at runtime and commit 49a28fd6309011ba71c8efe1c37c4a585b06f20f Date: Wed Jul 20 08:27:31 2005 +0000 INTEGRATION: CWS fwk18 (1.4.224); FILE MERGED 2005/07/14 12:22:13 as 1.4.224.2: #123808# listen on config to be informed about changes 2005/07/06 09:29:56 as 1.4.224.1: #123808# update sfx filter cache at runtime Change-Id: Ic27cae4a499439009e89b003635067df440d4cf2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134853 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-23elide allocation of CacheItem when enumerating filtersNoel Grandin
Change-Id: I44f83485b984548118364dc58cbc3939001506d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134805 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-19reserve vector in FilterCache::getMatchingItemsByPropsNoel Grandin
Change-Id: Ic996b2d2e72c4aebc889d8c2a921b77c7c492276 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134644 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-17simplify CacheItem::updateNoel Grandin
both branches of the if can be easily accomplished with the same code Change-Id: Iadef72b1e125a11fc27f628a26900ae30dc98220 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134479 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-16tdf#121740 elide temporary CacheItem object in BaseContainer::getByNameNoel Grandin
shaves 2% off load time Change-Id: I91cc04916d77bc7ece1561462403067478a74bca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134345 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-14tdf#121740 cache hashcode in SequenceAsHashMapNoel Grandin
shaves 2% off load time Change-Id: I5bd4eabf61205df21a27d2822acd2676a7732a3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134315 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-14cheaper to let Any do the comparison in isSubSetNoel Grandin
rather than constructing temporary OUStrings Change-Id: Ibb083e3fab8a465ae5288359424b297faac83617 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134317 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-14use comphelper::WeakComponentImplHelper for TerminateDetectionNoel Grandin
Change-Id: I6184bdef7b487f71549cd50c96c764a93ef791de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134274 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-07osl::Mutex->std::mutex in filter::config::CacheUpdateListenerNoel Grandin
Change-Id: Ib791be8495f2ad2855cceb94d45f2bd0995e3710 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133975 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-06remove unnecessary sequenceToContainerNoel Grandin
If we are not going to manipulate the resulting vector, then it is actually slower, since we have to allocate more storage for the vector Change-Id: I6d5f5b0150cea9e8a0663ccb1398b0237f3fca9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133943 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-04Just use Any ctor instead of makeAny in filterStephan Bergmann
Change-Id: I68bbbc2cc80ac5efde78e10706b488bf78c058bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133816 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-03add o3tl::equalsAsciiNoel Grandin
Change-Id: I042b8dcadbf7581de325c161763fe35aecde5ca2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13loplugin:stringviewparam whitelist some more functionsNoel Grandin
for which we have o3tl:: equivalents Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-07do not pass XComponentContext to officecfg::...::get() callsLuboš Luňák
It's used only for the ConfigurationWrapper singleton, so it's used only the first time and then ignored. It also causes calls to comphelper::getProcessComponentContext() for every single invocation despite the value not being needed, and the calls may not be cheap (it's ~5% CPU during ODS save because relatively frequent calls to officecfg::Office::Common::Save::ODF::DefaultVersion::get()). Change-Id: I02c17a1a9cb498aeef220ddd5a0bde5523cb0ffb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131056 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-06os thrown -> is thrownCaolán McNamara
Change-Id: I114bb29c59ad9a4b20ca3f34b057b02d439fbd77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131067 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-31support for the WebP image format (tdf#114532)Luboš Luňák
This commit implements a WebP reader and writer for both lossless and lossy WebP, export dialog options for selecting lossless/lossy and quality for lossy, and various internal support for the format. Since writing WebP to e.g. ODT documents would make those images unreadable by previous versions with no WebP support, support for that is explicitly disabled in GraphicFilter, to be enabled somewhen later. Change-Id: I9b10f6da6faa78a0bb74415a92e9f163c14685f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128920 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-17Recheck modules [e-f]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I49a3ce10dee4b03f99156f5b641f69448e1d5617 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128479 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-12-19use 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>
2021-12-17Fix typosAndrea Gelmini
Change-Id: I7f1636226c4fbe29d9d2ef850318a9d57f1b5450 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127009 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-25remove unused defines and convert some to OUStringLiteralNoel Grandin
Also remove the associated links.txt entries Change-Id: I5028fab2feb828875a0b772418fc29cbdfe4ce72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125773 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-24loplugin:stringliteraldefine in filterNoel Grandin
Change-Id: I5c38448a9ec9d21bb2b012dd9d85facd759ac447 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125761 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-08use more OUStringLiteral in MediaDescriptorNoel Grandin
Change-Id: I0567d103db8db401c737fed98483912a39352929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-04elide unnecessary UNO_QUERY_THROW callsNoel Grandin
Change-Id: I0d0fc57f352e9717e721416c8941cfcf48af24c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124650 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>