summaryrefslogtreecommitdiff
path: root/package
AgeCommit message (Collapse)Author
2023-11-18c++20: use std::erase(_if) instead of std::remove(_if)+erase (part 6)Julien Nabet
Change-Id: Ic073d7444e968e90068aa60847bc9211167f6278 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159626 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
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-20Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: packageStephan Bergmann
Change-Id: I5d70d9291a64139bc2dc60c63173fef862a00f2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158207 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-08-28incorrect usage of erase..remove idionNoel Grandin
since commit c95221f151fbaab5f181bb5f8a5428a380d4d1bf Author: Julien Nabet <serval2412@yahoo.fr> Date: Mon Oct 9 21:19:43 2017 +0200 Replace list by vector InputStreamsList_Impl (package) Change-Id: Icd35f74863e68315c7fa580a1009743cc957192a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156184 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-26new loplugin:constexprliteralNoel Grandin
OUStringLiteral should be declared constexpr, to enforce that it is initialised at compile-time and not runtime. This seems to make a different at least on Visual Studio Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-18Use getXWeak in packageMike Kaganski
Change-Id: I838b7c0e45a2a701d400fb7189c5396ed4525a70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150860 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-05-31do not throw DisposedException when inside a dispose() methodNoel Grandin
There is no need to do this, as the documentation of css.lang.XComponent::dispose at udkapi/com/sun/star/lang/XComponent.idl states: After this method has been called, the object should behave as passive as possible, thus it should ignore all calls Otherwise, the effect of throwing here is mostly to disturb the flow of logic in caller code, preventing other parts of teardown from proceeding smoothly. Change-Id: I30e6d1b35f85b727debf4405a995fdc0a4fccde6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152450 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-20loplugin:unusedmethodsNoel Grandin
Change-Id: Ief95f111350808f010539bb733a553007d30a9df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152006 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-25expose recovering zips for testingCaolán McNamara
Change-Id: I4709a2fb0bbb0fcc4c7d57dad53c899e7ba79cb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150971 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-25Resolves: tdf#155005 use of uninitialised valueCaolán McNamara
==2515797== Conditional jump or move depends on uninitialised value(s) ==2515797== at 0x33FAB399: ZipFile::recover() (ZipFile.cxx:1090) ==2515797== by 0x33FA4D32: ZipFile::ZipFile(rtl::Reference<comphelper::RefCountedMutex>, com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>, bool, bool) (ZipFile.cxx:111) ==2515797== by 0x33FEF134: void std::_Construct<ZipFile, rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool, bool&>(ZipFile*, rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool&&, bool&) (stl_construct.h:119) ==2515797== by 0x33FED528: void std::_Optional_payload_base<ZipFile>::_M_construct<rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool, bool&>(rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool&&, bool&) (optional:278) ==2515797== by 0x33FEB73B: void std::_Optional_base_impl<ZipFile, std::_Optional_base<ZipFile, false, false> >::_M_construct<rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool, bool&>(rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool&&, bool&) (optional:457) ==2515797== by 0x33FE77DB: std::enable_if<is_constructible_v<ZipFile, rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool, bool&>, ZipFile&>::type std::optional<ZipFile>::emplace<rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool, bool&>(rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool&&, bool&) (optional:918) ==2515797== by 0x33FD61FD: ZipPackage::initialize(com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) (ZipPackage.cxx:760) ==2515797== by 0x64DE1EC: cppuhelper::ServiceManager::Data::Implementation::doCreateInstanceWithArguments(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) (servicemanager.cxx:732) ==2515797== by 0x64DDF19: cppuhelper::ServiceManager::Data::Implementation::createInstanceWithArguments(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) (servicemanager.cxx:694) ==2515797== by 0x64E0E8F: cppuhelper::ServiceManager::createInstanceWithArgumentsAndContext(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (servicemanager.cxx:1018) ==2515797== by 0x34A3B25F: OStorage_Impl::OpenOwnPackage() (xstorage.cxx:435) ==2515797== by 0x34A3C16C: OStorage_Impl::ReadContents() (xstorage.cxx:541) ==2515797== Uninitialised value was created by a stack allocation ==2515797== at 0x33FAB02C: ZipFile::recover() (ZipFile.cxx:1034) since: commit abda72eeac19b18c22f57d5443c3955a463605d7 Date: Mon Feb 20 00:32:22 2023 +0100 tdf#82984 tdf#94915 zip64 support (import + export) where - aEntry.nCompressedSize = nCompressedSize; - aEntry.nSize = nSize; was removed before the subsequent use of aEntry.nCompressedSize/aEntry.nSize change things (git show -w for clarity) to check bounds first just for the range the extra fields might be in and read those, and then follow up with the original check that the newly discovered aEntry.nCompressedSize/aEntry.nSize are within the bounds of the overall file Change-Id: Iad4ce8297109b06bc5baf77df4f3e86659cbb4cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150969 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-25tdf#155005 fail gracefully on encountering a negative compression valueCaolán McNamara
we are using sal_Int64 for this so a large enough value can be interpreted as negative here Change-Id: Id547a24591aca4b6ed7b7955621641a0666b0bd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150968 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-30ofz#57529 Integer-overflowCaolán McNamara
Change-Id: I93775299aa340e2e645a04be5d0bc36a9caea103 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149773 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-20Missing includes (for std::exception_ptr)Stephan Bergmann
Change-Id: If93883ba9feb22e6da2d56af4ebb2f4eafe58de1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149162 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-09cid#1521901 Pointer to local outside scopeCaolán McNamara
Change-Id: I38e76440606afb65a8c1ce419c446e234a513659 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148550 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-09ofz#56826 Heap-use-after-freeCaolán McNamara
since: commit abda72eeac19b18c22f57d5443c3955a463605d7 Date: Mon Feb 20 00:32:22 2023 +0100 tdf#82984 tdf#94915 zip64 support (import + export) Change-Id: Iffc1c54b3ccc5464e217d7f94ecc34b57ec1afb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148526 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-09Fix typoAndrea Gelmini
Change-Id: I4c48c988667ffd9221a0e226ab9c35e1e857e9d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148489 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-03-08tdf#82984 tdf#94915 zip64 support (import + export)Attila Szűcs
Implemented import + export for "Zip64 Extended Information Extra Field", (in "Local file header" and "Central directory file header") and for Data descriptor. Focused only to be able to handle files with over 4GB uncompressed size, in the zip archive. The 64k filecount, and the 4GB compressed size limit is probably still present Tried to follow pkware .ZIP File Format Specification, Some cases were not clear to me and/or some zip compressing tool may not perfectly follow the standard, like 'extra field' should be 28 bytes long, but its reader now can read shorter (or longer) 'extra field'. Replaced some 32bit codes with 64bit codes, in stream handling, in deflater. Tested with an ods file that contained a content.xml that bigger then 4BG+ (import + export + reimport) on windows. I think 4GB+ files import/export would be too slow fot unittest. So, for unit test, used the small but zip64 format files, that was attached to the bugzilla tickets Note: It helps with Bug 128244 too (1 of the unittest tests it), but that ods file missing manifest.xml, so LO won't be able to import it. Change-Id: Idfeb90594388fd34ae719677f5d268ca9a484fb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147306 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2023-03-01assert that Mutex exists at ctor timeCaolán McNamara
and drop the never can be hit throw Change-Id: I74c92f1ff50ef0f3f6f78a53057f121a3665ec3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148072 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-01cid#1521559 pass arg as ref to prove no Dereference before null checkCaolán McNamara
and cid#1521561 Dereference before null check and drop pointless null check Change-Id: I2e99733eb5f1861bb02f6d8ec7a44ace4ded16cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148070 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-28flatten OWriteStreamNoel Grandin
no need to use pimpl pattern here Change-Id: Iebc412aaad83c2f1fc149cc320729ce25030cbc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147949 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-28no need to allocate OTypeCollection separately in OStorageNoel Grandin
it is only one pointer big Change-Id: I4af56814be106026515aee6c09caa14e0f3eb09a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-28no need to allocate OTypeCollection separately in WSInternalData_ImplNoel Grandin
it is only one pointer big Change-Id: I291b1c0aaba2f46aebabefa0341a9e24cf20eeff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147947 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-17osl::Mutex->std::mutex in OHierarchyElement_ImplNoel Grandin
Change-Id: I458cab160f337019402659b5fb738ba85f73ea1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147190 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-15Drop 'using namespace ::std' in dirs [e-p]*Gabor Kelemen
Change-Id: Ibe6a2f662f5721c594d28a8e0d7340d0f3cffe95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147075 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2023-01-17XUnoTunnel->dynamic_cast in ZipPackageEntryNoel Grandin
Change-Id: I0c49ebcb0ed16ab5b90c0cfa1417f002b5dad7b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145632 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-17XUnoTunnel->dynamic_cast in ZipPackageNoel Grandin
Change-Id: I4ecfbb0e90cca7e81556fb27fd552669bed0405c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145631 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-15Merge SvXMLAttributeList to comphelper::AttributeListMike Kaganski
And simplify the latter, to always use "CDATA" type (as the former did). "CDATA" was used in all cases but one, where an empty string was used. Change-Id: I1b3bfae40e29628e4094d9a6e58a69a66865874c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145526 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-13Simplify a bitMike Kaganski
Change-Id: Ie2435701078b0e111c1b04b77c857fd1923f2d59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145430 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-13XUnoTunnel->dynamic_cast in comphelper::ByteReader and comphelper::ByteWriterNoel Grandin
Change-Id: I1f8c864a939dff1252ba15f517f63b62d1a1e1fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145393 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-09use std::this_thread::sleep_for instead of osl equivalentArnaud VERSINI
Change-Id: I5b4edc5417e5bb5e082688df616e1d5735717d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142357 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-22loplugin:unusedfieldsNoel Grandin
Change-Id: I726b8b9dee3a424f731078cd6b10027423454bee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143086 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-27cid#1242675 Untrusted value as argumentCaolán McNamara
Change-Id: If8ecad4501d6c555791eae0ae113a34e05f9436f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141670 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-21tdf#133767 new service TempFileFastServiceNoel Grandin
to use in places where we know we can use the TempFileFast mechanism. Speeds up export to EPUB from 43s to 17s on my windows machine. This is essentially a copy of OTempFileService, but it does not implement XTempFile (because these temp files have no name on Windows). Also remove a couple of calls to Flush() (which is not necessary now), and TellEnd(), which is a little slow on Windows. Change-Id: Iced300bf8121eae08c7a011d62ec68b93330d84c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141598 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-29split utl::TempFile into fast and named variantsNoel Grandin
which makes it easier to know what each variant requires to stay on it's happy path Change-Id: I3275a2543573367714bc78092e882f6535507285 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140469 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-27use more string_view in packageNoel Grandin
Change-Id: Ia38b2784222701d669f244523ce9a27c4068c5ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140639 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-08-17cid#1500507 silence Resource leakCaolán McNamara
Change-Id: I738600ee653d68e80dc8a18970e759d97da08970 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138392 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-07-18comphelper::ByteWriter::writeSomeBytes always writes all bytesStephan Bergmann
...so rename it to writeBytes for clarity, and drop the redundant return value. Also clarify that it has a narrow interface and requires nBytesToWrite to be non-negative. Change-Id: I76dee83fecd6350f473f55dcffb950c16aa22d93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137169 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-28use utl::TempFile directly in packageNoel Grandin
so we can (a) control the lifetime of the temp file properly and (b) we don't need to use file URLs which means we stay on the efficient path on Windows Change-Id: I2b1eed5f5afc8f89f53bde35ebb44e9922889817 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136557 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-23clang-tidy modernize-pass-by-value in packageNoel Grandin
Change-Id: Id12d7b38d278c9fb18b30c6d921713a53168b048 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136337 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-02Use more appropriate return type for ThreadPool::getPreferredConcurrencyStephan Bergmann
All call sites already effectively asked for an unsigned return type, including: * The ThreadPool ctor took an nWorkers argument of type sal_Int32, but internally stores that as std::size_t mnMaxWorkers. * ZipOutputStream::reduceScheduledThreadTasksToGivenNumberOrLess apparently benefits from an unsigned nThreadTasks parameter, getting rid of various casts in its implementation that were necessary to silence signed vs. unsigned comparison warnings. The only drawback is that comphelper::ThreadPool::getPreferredConcurrency() * 4 in package/source/zippackage/ZipPackageStream.cxx would now silently wrap around instead of causing UB on overflow (which could be detected with appropriate tools). Ideally, it would use some o3tl::saturating_mul if we had that, so add a TODO comment for now. While std::thread::hardware_concurrency returns unsigned, it looked more natural to go with std::size_t here, as some call sites already used that (see above), so the implementation of ThreadPool::getPreferredConcurrency is a natural place to hide clamping std::thread::hardware_concurrency() to std::size_t (in the unlikely case that std::size_t is of smaller rank than unsigned). This required addition of o3tl::clamp_to_unsigned in o3tl/safeint.hxx. Change-Id: I0a04a8b32e63ebfeb39f924c4b38520455a6fb38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135309 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
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-24use comphelper::ByteReader in XBufferedStreamNoel Grandin
to avoid an intermediary buffer Change-Id: Ic59e701491ac041022ca3e328741f170bb5b7ab6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134842 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-20fix OWriteStream implementing XUnoTunnelNoel Grandin
doh, forgot to return it in the queryInterface in commit 62531ec1091c7b3f6a3577889a18234790ec716d add ByteWriter to reduce memory copying when writing data Change-Id: I460388b55ca38962bf60ef6be6a2b108deee6d73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134678 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-19add ByteWriter to reduce memory copying when writing dataNoel Grandin
similarly to ByteReader move both of them down to comphelper, since we want to use it from comphelper, and comphelper is "below" unotools in the module dependency graph Change-Id: Ic98fa2268e125fd8e4378fb899ad5f97de721713 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134645 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-17elide some OUString allocationNoel Grandin
Change-Id: Iadd73477bf3b0edaa0fb7db10f9ffca88fe737e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134476 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-14reserve space in map in ZipFile::readCENNoel Grandin
Change-Id: I4d7764f00b7d05ba5d43a3fb35596f5ec4653da3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-11avoid some OUString construction on some hot pathsNoel Grandin
Change-Id: I098b017d22b7a4502998a0901ddcfca08a57ee43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134115 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-06tdf#121740 reduce cost of OStorage_Impl::GetElementNamesNoel Grandin
which shows up on the profile Change-Id: I7e4ef9d71d06562dc1c574fe41d616947e3d67e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133926 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>