Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
Change-Id: I4709a2fb0bbb0fcc4c7d57dad53c899e7ba79cb4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150971
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
==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>
|
|
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>
|
|
Change-Id: I93775299aa340e2e645a04be5d0bc36a9caea103
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149773
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: If93883ba9feb22e6da2d56af4ebb2f4eafe58de1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149162
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I38e76440606afb65a8c1ce419c446e234a513659
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148550
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
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>
|
|
Change-Id: I4c48c988667ffd9221a0e226ab9c35e1e857e9d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148489
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Change-Id: I458cab160f337019402659b5fb738ba85f73ea1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147190
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ibe6a2f662f5721c594d28a8e0d7340d0f3cffe95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147075
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
|
|
Change-Id: I0c49ebcb0ed16ab5b90c0cfa1417f002b5dad7b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145632
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I4ecfbb0e90cca7e81556fb27fd552669bed0405c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145631
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
Change-Id: Ie2435701078b0e111c1b04b77c857fd1923f2d59
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145430
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I1f8c864a939dff1252ba15f517f63b62d1a1e1fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145393
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I5b4edc5417e5bb5e082688df616e1d5735717d92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142357
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I726b8b9dee3a424f731078cd6b10027423454bee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143086
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: If8ecad4501d6c555791eae0ae113a34e05f9436f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141670
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
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>
|
|
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>
|
|
Change-Id: Ia38b2784222701d669f244523ce9a27c4068c5ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140639
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...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>
|
|
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>
|
|
...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>
|
|
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>
|
|
Change-Id: Id12d7b38d278c9fb18b30c6d921713a53168b048
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136337
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
Change-Id: Idcb296980ea498373a0fb4f8c0c584eef2c5c9f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134922
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
Change-Id: Iadd73477bf3b0edaa0fb7db10f9ffca88fe737e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134476
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
Change-Id: I4d7764f00b7d05ba5d43a3fb35596f5ec4653da3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134302
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I098b017d22b7a4502998a0901ddcfca08a57ee43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134115
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
Change-Id: I527024f34b88ec764488a3766872f1941f8dbb4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133794
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
found by examining uses of OUString::copy() for likely places
Change-Id: I6ff20e7b273ad6005410b82719183c1122f8c018
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133617
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...where a signed and an unsigned value are compared, and the signed value has
just been proven to be non-negative here
Change-Id: I9665e6c2c4c5557f2d4cf1bb646f9fffc7bd7d30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133442
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I336fd329b577b6fa141265d8bc7ce67784bd7306
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133210
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
Change-Id: I4f8777462d0bb8cb9f1a6065a548a794d842d815
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131678
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|