summaryrefslogtreecommitdiff
path: root/package
AgeCommit message (Collapse)AuthorFilesLines
2018-03-07oox: preserve the ContentType of custom filesAshod Nakashian1-4/+8
Generic logic to preserve custom files with their correct ContentType. Standard default file extensions with respective ContentType preserved in [Content_Types].xml. Change-Id: I651ed691e9a4745cd2cb4b3c4d4c5fd7287b66c2 Reviewed-on: https://gerrit.libreoffice.org/50896 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-03-06forcepoint #5 check for short readCaolán McNamara1-2/+5
a zip file within a structured storage stream. underlying storage stream claims larger size that it can satisfy on read Change-Id: I8516b12df33ad78b2525192826f5e3aef2622eb8 Reviewed-on: https://gerrit.libreoffice.org/50240 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 942e23ac0cf885c8d26884fa1fb17d430f42a5f5)
2018-03-06MemoryByteGrabber sequence has to exist for Grabber lifetimeCaolán McNamara1-3/+5
it just takes a c++ ref, so a temp is an unsuitable arg Change-Id: I40490e94d977df91b985bc4ae458b68ee85d5dfe Reviewed-on: https://gerrit.libreoffice.org/49323 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit a224d33cbf098c361a7244569d5088044561f3ee)
2018-02-21ofopxml: always generate default application/xmlAshod Nakashian1-7/+14
MS Office always sets the application/xml entry but LO doesn't preserve unknown entries. Since this is a standard and always-set entry LO should always stamp it as well. Change-Id: I28b47634f2aa1fec233c9184deb65fd43f2f3ae8 Reviewed-on: https://gerrit.libreoffice.org/48724 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 00492aff753510bcb4fab81c5258584f3cda2d17) Reviewed-on: https://gerrit.libreoffice.org/50044 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-01-18ODT export: handle NoFileSync store optionMiklos Vajna4-2/+14
SfxMedium already had a m_bDisableFileSync member; if the medium has a storage, then forward this flag to it, so at the end SwitchablePersistenceStream::waitForCompletion() (and the called fileaccess::XStream_impl::waitForCompletion()) does not call osl_syncFile(), either. Times for 100 hello world inputs: 12594 -> 5281 ms is spent in XHTML-load + ODT export + close (42% of original). (cherry picked from commit 16a522361698ea53ab253d67e31cb51802210d71) Conflicts: package/inc/ZipPackage.hxx package/source/xstor/xstorage.cxx Change-Id: I2aab6c9e6baf133b211620004dcea66bd41ffc6f Reviewed-on: https://gerrit.libreoffice.org/47979 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-12-05Fix typosAndrea Gelmini1-1/+1
Reviewed-on: https://gerrit.libreoffice.org/42726 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit e44c188a7353cc183fac8ece0cbf3611d842835e) Change-Id: I879a52820d78d9151ef64dd21612379f617f66e2 Reviewed-on: https://gerrit.libreoffice.org/45454 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 50e37a41acae8597fdb097715f8b76b16bce9f31)
2017-09-12tdf#108572 let remove storage elementSzymon Kłos1-0/+2
void OStorage_Impl::RemoveElement( SotElement_Impl* pElement ) expects that m_pAntiImpl will be nullptr, if not throws an exception. This caused that in case of deleting embedded database used for mail merge it wasn't fully removed and it was impossible to import the same datasource second time. Change-Id: I0310fde2ad819c96474a857f37ee42d052fad266 Reviewed-on: https://gerrit.libreoffice.org/42028 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/42043 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2017-05-07tdf#105942 Don't hang when file is protected and compressedXisco Fauli1-1/+1
Change-Id: I762e6e6d457ea3f5a1f1fd706268b832a71ee550 Reviewed-on: https://gerrit.libreoffice.org/36672 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> (cherry picked from commit f8fdc6417b4d023b7c75485754a0ab1b164a69d6) Reviewed-on: https://gerrit.libreoffice.org/37071 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 31e22b4bd961ed946bf8f0f4ccb330c699292ddb)
2017-01-16tdf#97597: Ensure that each parsing thread has its own buffer.Kohei Yoshida5-10/+126
(cherry picked from commit 4ae705d02df0ddf75b97d0e94add6994626f487e) Change-Id: I93077f954a49b3922930e4fc86c80228be0f4dd2 Reviewed-on: https://gerrit.libreoffice.org/33069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Reviewed-on: https://gerrit.libreoffice.org/33176 Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2016-11-13drop extra semicolonsDavid Tardon1-1/+1
Change-Id: Ie6713d1bdf0010e5bc0bb70ca995c4dd36408673
2016-11-09package: ODF: bump PBKDF2 iteration countsMichael Stahl1-2/+2
Given recent elections we need to build a higher wall to keep the government out of our documents, and we will make the government pay for it. These iteration counts were considered appropriate a decade ago. http://security.stackexchange.com/questions/3959/recommended-of-iterations-when-using-pkbdf2-sha256 We get similar numbers on SandyBridge-E desktop and Haswell i7-4600U laptop: * with 10k iterations ~20 msec per derivation * with 100k iterations ~195 msec per derivation * with 150k iterations ~290 msec per derivation We can't go too high though because in ODF every package stream gets its own derived key with a different salt, so a document with embedded images may need a lot of these. Change-Id: I6894e71ed399f8c340eff97a9191c8d8419789a6
2016-11-08loplugin:expandablemethods in lotuswordpro..packageNoel Grandin4-25/+12
Change-Id: Ic9827c998f4f78775fdf5c1eaf9d4749d4986102 Reviewed-on: https://gerrit.libreoffice.org/30682 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-07style fix for cppcheck redundantConditionJochen Nitschke1-1/+1
Change-Id: I5d02c6f4c6b411c23a6de43374884a76e1c408fe Reviewed-on: https://gerrit.libreoffice.org/30667 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-01style fixes for cppcheck noExplicitConstructorJochen Nitschke1-1/+1
Change-Id: I2a690caea7656f2a18beb6d09f53154178a30f34 Reviewed-on: https://gerrit.libreoffice.org/30460 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-19loplugin:expandablemethodds in lotuswordpro..packageNoel Grandin2-2/+1
Change-Id: Id33d88edc4be00f4238792d885e392cc08e72386 Reviewed-on: https://gerrit.libreoffice.org/30017 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-19replace <<= with assign for <<= with rhs AnyJochen Nitschke3-11/+11
queryAggregation and queryInterface return Any Change-Id: Ib8e3e742bd66f7419cad583988b247bb628f7b4a Reviewed-on: https://gerrit.libreoffice.org/29912 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann23-23/+23
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-12loplugin:constantparam in package..stocNoel Grandin8-14/+14
Change-Id: I04b6d14d3dd8d55ccc4d4eb9313bc37959690672 Reviewed-on: https://gerrit.libreoffice.org/28824 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-30loplugin:stringconstant: adapt to improved OUStringLiteral1 (package)Stephan Bergmann1-1/+1
Change-Id: I359fcf33039b406d614bf71361a7882a101667d2
2016-08-18coverity#1371440 Uncaught exceptionCaolán McNamara2-2/+2
Change-Id: Ia9ce56ecbaecd6e63b3ec7086d3a677a7816c924
2016-08-12loplugin:unusedenumconstants in package..svtoolsNoel Grandin1-7/+0
Change-Id: I8136b93b9303ebecafd791159e813c335b1bc172 Reviewed-on: https://gerrit.libreoffice.org/28052 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-08OFFICE-3708: package: recognize correct SHA256 URLMichael Stahl4-3/+9
ODF 1.2 uses an incorrect URL to refer to SHA256, add support for the correct W3C URL on import but continue to export the incorrect URL for now. Change-Id: I3135bcf989070d20f85f14702db07595f304e706
2016-08-05loplugin:countusersofdefaultparams in oox..sdNoel Grandin1-1/+1
Change-Id: I4504939a3957606979c6ac36af6611e1fe072d01 Reviewed-on: https://gerrit.libreoffice.org/27902 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-29Fix typo: completelly -> completelyTakeshi Abe2-2/+2
Change-Id: I566c5554bf32ea18121c5a186365b97c91667c5d
2016-07-27improve passstuffbyref return analysisNoel Grandin4-8/+8
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-18add tagging to ThreadTasks so we don't need more one poolNoel Grandin3-7/+10
If more than one place in the code submits tasks to the shared pool, then waitTillDone() becomes unreliable. Add a tagging mechanism, so different callsites can wait on different sets of tasks. Also try to protect our worker threads against exceptions from the thread tasks code. Change-Id: Idde664ab50008d31a2dd73910bb22f50e62ae22f Reviewed-on: https://gerrit.libreoffice.org/27042 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-07loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann16-40/+40
Change-Id: Ie05f9427dcd88d3b64cfe02c2ece5c0cf40be547
2016-06-28loplugin:singlevalfields in variousNoel Grandin3-4/+1
Change-Id: Ia0d8f463a4dba9ec63aa0159441e3e607dd3bf5e Reviewed-on: https://gerrit.libreoffice.org/26738 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-23sfx2: exception on storage commit is an error (related: tdf#91807)Michael Stahl1-5/+5
For no good or obvious reason, SfxMedium::StorageCommit_Impl() swallows embed::UseBackupException if there is a pTempFile, which (as the comment claims) is "always now". This results in the temp file actually being copied to the user-visible file and the SaveAs "succeeding", when it clearly did not. Also move the exception throwing to the end of ZipOutputStream::finish() to avoid more memory leaks. Change-Id: I448cc43291754ef20adfa6b65916282fcc365a11
2016-06-23package: fix exception handling in DeflateThread (related tdf#91807)Michael Stahl3-1/+23
In the bugdoc of tdf#91807 there are at least 49 corrupt zip streams that raise exceptions in the DeflateThreads. Because the maximum allowed number of threads happens to be 48, this results in an infinite loop in ZipOutputStream::reduceScheduledThreadsToGivenNumberOrLess(). (regression from 7e2ea27e5d56f5cf767a6718a0f5edc28e24af14) In case an exception is thrown, don't re-throw it immediately, which might cause trouble such as leaking all of the ZipOutputEntry instances in m_aEntries. Change-Id: Ia74ab8e46fa1349c049d05dbec3454bfbe7d61d9
2016-06-15tdf#98955 hardware_concurrency not ideal for thread poolsAshod Nakashian1-1/+1
A new static member getPreferredConcurrency added to comphelper::ThreadPool to return a configurable max number of threads. By default the new function returns the hardware_concurrency value provided by std::thread. When MAX_CONCURRENCY envar is defined, the return value is limited to whatever is set there. Three call-sites that used std::thread::hardware_concurrency have been replaced with getPreferredConcurrency. Unittests added to cover the functionality of the new member. Unittests are capped to 4 threads. Change-Id: I3332e393a88a5ed436316fa712ed920a4b37f4af Reviewed-on: https://gerrit.libreoffice.org/26254 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-09tdf#94698 cleanup Makefiles. Get rid of udkapi and offapiGleb Mishchenko1-4/+1
This patch changes occurences in makefiles from $(eval $(call gb_CppunitTest_use_api,comphelper_test_config, \ udkapi \ offapi \ )) to $(eval $(call gb_CppunitTest_use_sdk_api,comphelper_test_config)) (corrected instead of abandon, jani) Change-Id: Ic96ec65d82d7452e288f05a8b6d576ef543b068e Reviewed-on: https://gerrit.libreoffice.org/23426 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-05-25Fix typosAndrea Gelmini1-1/+1
Change-Id: I860cc4aa04b4e5cd1437b2f24176ee2ccdec3266 Reviewed-on: https://gerrit.libreoffice.org/25420 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-19loplugin:unusedmethods in package to rscNoel Grandin1-3/+0
Change-Id: I61c6f56a69891d656a41d3617d0ce2b34d848c84 Reviewed-on: https://gerrit.libreoffice.org/25108 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-16Fix typosAndrea Gelmini1-1/+1
Change-Id: If7262e114b5b4cd40e9c0a8929940199ea747595 Reviewed-on: https://gerrit.libreoffice.org/25025 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-05-10Add SAL_FALLTHROUGH, where apparently appropriateStephan Bergmann2-0/+2
Change-Id: Ieee43fce49b7f07d6b356e8c2e34e9e92b605957
2016-05-05clang-tidy modernize-loop-convert in oox to saxNoel Grandin2-5/+5
Change-Id: If0d87b6679765fc6d1f9300c6972845cf3742b9c Reviewed-on: https://gerrit.libreoffice.org/24674 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-04use Any constructor instead of temporariesNoel Grandin2-33/+15
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
2016-04-21Fix typosAndrea Gelmini1-1/+1
Change-Id: Ic4fbc8e7220eb4641f67ef4f85d4853608a369f4 Reviewed-on: https://gerrit.libreoffice.org/24257 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann5-34/+34
Change-Id: I1879dece7dfb206dd55b13ca5572b962e20d37f5
2016-04-18clean-up: unused using declarations and includesJochen Nitschke1-1/+0
Searched source for using declarations. Checked if those symbols reappear in the source file, even in comments or dead code but not in #include statements. If they don't reappear, remove the declaration. Remove includes whose symbol got removed. Change-Id: Ibb77163f63c1120070e9518e3dc0a78c6c59fab0 Reviewed-on: https://gerrit.libreoffice.org/24148 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-14clang-tidy performance-unnecessary-value-param in variousNoel Grandin8-10/+10
Change-Id: I7168d44dab8e6a8e37bb7920d744ff32f5e52907 Reviewed-on: https://gerrit.libreoffice.org/24019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-14loplugin:passstuffbyref in variousNoel Grandin4-4/+4
Change-Id: I80070c83204e531c2f599f8a56193d6ffe0e5022
2016-04-05Missing includeStephan Bergmann1-0/+2
Change-Id: I094b4a1c89676426b286f72a2f510e48fed98b3b
2016-03-22tdf#93553 limit parallelism at zip save time to useful amountArmin Le Grand5-29/+106
At ODT export time writing and zipping comtained data packages is nicely parallelized, but not limited to an upper bounds of threads to use. Together with memory consumption this makes ressource usage and runtime behaviour bad to crashing (mostly on 32bit). I have now limited the processing dependent on the number of available cores to get a good processing/ressource ratio. The result uses much less memory, is faster and runs on 32bit systems. Change-Id: I8bd516a9a0cefd644f5d7001214bc717f29770ab Reviewed-on: https://gerrit.libreoffice.org/23305 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-18loplugin:constantparam in packageNoel Grandin4-9/+9
Change-Id: Ifd9bb81ff9ccfaf5093c04024d7ea93946b00e66 Reviewed-on: https://gerrit.libreoffice.org/23329 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-10Extract Directories from BootstrapFixtureBaseStephan Bergmann1-1/+1
(as some tests derive from the latter only for the Directories part, not for the setUp/tearDown overrides: those tests will be cleaned up next) Change-Id: Ib6b78eea868b8bc21d4cc6e8fd9e1d025deca05f Reviewed-on: https://gerrit.libreoffice.org/23078 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-07improve defaultparams lopluginNoel Grandin1-2/+1
to catch calling params with defaults like "= OUSString()" Change-Id: Iad060e318ed492c22f8be44e326174fe6d28fff9 Reviewed-on: https://gerrit.libreoffice.org/22932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-23Use passed-in context instead of comphelper::getProcessComponentContext()Stephan Bergmann2-17/+13
(and the passed-in context is required to always be non-null) Change-Id: I1197a2bafba8cb645e15df4310c1c5767b648670
2016-02-09Remove excess newlinesChris Sherlock1-1/+0
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>