summaryrefslogtreecommitdiff
path: root/filter
AgeCommit message (Collapse)Author
2021-06-30ofz#35504 clamp input values in cgm filterCaolán McNamara
Change-Id: I96712b8dc8f8eaad3fb8fa6710d0f07fff61b592 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118137 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-30reduce cost of allocating and copying SvxNumRuleNoel Grandin
by using std::move to avoid copying unnecessarily Change-Id: I940b57c9a05c8d75b9a16291fc4f05756fdeea12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118164 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-30indexing: add indexing export as an export filter for WriterTomaž Vajngerl
Change-Id: I26157a8ffeee80b03866569d3d3cec2a34fe377d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118144 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-06-29filter: remove rReserved1 completely in WrapOle1InOle2()Miklos Vajna
The comment above already states that this the Reserved1 field in the spec, so there is no value in the additional reference. Change-Id: I48bdda04ab536461a1eb5818df6a610f41d5fe95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118078 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-06-29filter: avoid unnecessary string copyMiklos Vajna
Change-Id: Ie3083bfed3827b66c85946c060149531293bb813 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118033 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-06-28loplugin:indentation improve checks for brace alignmentNoel Grandin
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-25ofz#30930 each picture triggers accumulating codesetsCaolán McNamara
seems to make more sense on EndPicture to return to the pre-StartPicture state Change-Id: I2ac2a5585f8acd5d817d083bccfd6551fb773342 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117902 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-22no need to make copies of these map entriesNoel Grandin
Change-Id: Ie65cbacd2806a2c030b682f8cfd473676c4f95c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117605 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-19use more TellEnd()Noel Grandin
which has the potential to be more efficient than STREAM_SEEK_TO_END Change-Id: I64d84632bc4751e07309332c9dff7a02bcd507fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117496 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-17use string_view in the Translate APINoel Grandin
Change-Id: I0bb0ea9d39ed623928060ffd3f2e2bc36ba33209 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117272 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-14only one of the radiobuttons in a group should be activeCaolán McNamara
Change-Id: I7283e257e44f755e5bb3d6612be625a6f680edb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117102 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-14spurious image position of right in CheckBoxes that don't use imagesCaolán McNamara
Change-Id: Ib175c267a9d5e7dd7987e34f7f4b7477595c5adc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117100 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-14ofz#33769 Integer-overflowCaolán McNamara
Change-Id: I6b76ab866cc843f52b3c0994e9812a0f1b87270c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117098 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-11Simplify Sequence/vector initializationsJulien Nabet
Change-Id: Ib02e25b4600666185cf0f8d0cc8d5c64186789c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117064 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-06-08Simplify Sequences initializations (desktop/e*/filter/forms/formula/fpicker)Julien Nabet
includes removing of unused TOKEN_SEP Change-Id: Ic72d9d94bd8d07232699ee4d948f3b203d524491 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116833 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-06-04tdf#142483 filter: xhtml: fix substitution of fo:border attributeMichael Stahl
This worked with Saxon but not with libxslt. (regression from 9d3b39cf9fed9a305ac23d1ecaaafc8f7caaeeb0) Change-Id: I18e66e6136e4fc73718bbe9c7c4c66fb76be31c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116728 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-06-03no need to allocate these on the heapNoel Grandin
Change-Id: Ic4b16e776a731e5e9bea61e99acb7257c5220322 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116585 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-31no need to allocate SvxNumRule separately in SvxNumBulletItemNoel Grandin
Change-Id: I7903565a468fc0fbec603c88b92cca6560a86728 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116424 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-21add Toggleable as a separate thing to a ButtonCaolán McNamara
and inherit ToggleButton from both it and Button Change-Id: If0e500aca8d0ffa087cb5e2bfc1786372fbff4eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115921 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-21fix leak in XSLTFilterNoel Grandin
Change-Id: Icae17e964df944391fddb47e4b0758ca89e299eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115917 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-14Improve loplugin:stringviewStephan Bergmann
Issue the "instead of O[U]String, pass [u16]string_view" diagnostic also for operator call arguments. (The "rather than copy, pass subView()" diagnostic is already part of handleSubExprThatCouldBeView, so no need to repeat it explicitly for operator call arguments.) (And many call sites don't even require an explicit [u16]string_view, esp. with the recent ad48b2b02f83eed41fb1eb8d16de7e804156fcf1 "Optimized OString operator += overloads". Just some test code in sal/qa/ that explicitly tests the O[U]String functionality had to be excluded.) Change-Id: I8d55ba5a7fa16a563f5ffe43d245125c88c793bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115589 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-13dispose component in testNoel Grandin
probably not strictly necessary, but lets err on the side of safety Change-Id: I1b4b7381eca0af83434fdc925a0a5d09733b4ee8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115565 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-03tdf#123476: also use filter by extension when its service is the sameMike Kaganski
... as passed explicitly in the media descriptor, for 0-byte files. This makes proper handling for such files when passing module name in command line, like --writer for DOCX. Change-Id: If8fd51e65dcf8a67b2653026f5fc1d5c964074af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114924 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-05-03loplugin:stringadd improvement for appending numbersNoel Grandin
I was wrong, the Concat framework already optimised appending numbers by stack-allocating small buffers, so include them in the plugin Change-Id: I922edbdde273c89abfe21d51c5d25dc01c97db25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115037 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-03loplugin:unnecessaryparen small improvementNoel Grandin
when calling a function, and passing only one arg, but the function has defaulted args, we were ignoring this case. Change-Id: I86517f18e30531127664088ddc09ef96dbd8bdf5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115033 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-29loplugin:stringadd simplify some *StringBuffer operationsNoel Grandin
pulled from a larger patch which I created with a more permissive variant of this plugin Change-Id: I7abf1f3f09e84703b6e0e52fe9587dff691b2187 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114875 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-29remove support for BITMASK in vcl backendsNoel Grandin
Rather use a proper alpha channel if we need transparency. This is another small step towards merged alpha in our vcl layer. I suspect the intent in a lot of this code was to save memory. Which have been a thing way back then, but these days our backends mostly end up doing a copy-and-convert to a real alpha channel anyway, so the existing code is actually now a pessimisation. Change-Id: I4a2bcbb2f76b841f05bc00580f364492829c69de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114808 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-27loplugin:stringadd convert chained append to +Noel Grandin
which can use the more efficient *StringConcat Also fix a crash in stringview plugin which started happening while I working on this. Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-22no need to create temporaries when appending number to O[U]StringBufferNoel Grandin
Change-Id: I36d82423b5f75010552696a66cec7e53ee265ce4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114395 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-22no need makeStringAndClear() when appending to bufferNoel Grandin
it just creates an unnecessary temporary Change-Id: Ide3cd99b2ac4f2a621e5d55ce4bdc95d05430709 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114467 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-21loplugin:stringadd replace OUStringLiteral temporaries with OUString::ConcatNoel Grandin
Change-Id: I656f06a74d9f0180ae460264563d6a935c7d2c60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114377 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-20use OUString::Concat here, not OUStringLiteralNoel Grandin
Change-Id: Ia2172bcab60f32c9d9d4f6ca0230484343eef69b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114321 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-16SVGFilter::implGenerateMetaData check page before useSzymon Kłos
Avoid crash in online impress: 1. session A edits the textbox 2. session B removed slide which is edited by A 3. session A tries to edit another textbox on other slide Change-Id: Ic875321107baa48fd2a5b52aa2580a8fcde40823 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113077 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114203 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-04-14Fix typosAndrea Gelmini
Change-Id: I93008d534b9b677ed131e4302e5df4391db4cafd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114090 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-04-13tdf#134736 RemoveTransparenciesFromMetaFile ruins PDFExtOutDevData groupsCaolán McNamara
During pdf export PageSyncData::PushAction can be called to associate extra data with a given MetaFile MetaAction position. But RemoveTransparenciesFromMetaFile replaces that metafile with a rewriten one while the PageSyncData actions remain at the positions of the original metafile. So, if the metafile was replaced throw away the PageSyncData data as it's now useless. Maybe we should try and repair the PDFExtOutDevData by e.g. clearing the mActions and adding back the ones associated with a MetaAction that is passed through from the original to the copy ? Change-Id: Ie62e4e2d2ad29670764ce570033034724a005474 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114019 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-13no need to make copies of these objectsNoel Grandin
when querying their values. The copy triggers heap allocation, which shows up when loading lots of shapes. Change-Id: I4b70e0c64b2397a97216065bd6da61daaac7f3ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114054 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-09remove vcl/waitobj.hxxCaolán McNamara
create vcl/locktoplevels.hxx for the utility to set all toplevel windows modally locked Change-Id: I964484d238852e830e1e5c0b86b3bebb3b41a6b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113889 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-09Recheck include/ with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: Ifc253bf800bb1468b5774663a93f4fb30bec81d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113657 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-04-07Updated README.md files to represent current code / use Markdown formatHossein
Previously, all of the README files have been renamed to README.md and now, the contents of these files were changed to use Markdown format. Other than format inconsistency, some README.md files lacked information about modules, or were out of date. By using LibreOffice / OpenOffice wiki and other documentation websites, these files were updated. Now every README.md file has a title, and some description. The top-level README.md file is changed to add links to the modules. The result of processing the Markdown format README.md files can be seen at: https://docs.libreoffice.org/ Change-Id: Ic3b0c3c064a2498d6a435253b041df010cd7797a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113424 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-04-02tdf#139786 partial revert tdf#106181 XLSX export: output form controlsJustin Luth
Not every export is going to be to OOXML format, so don't just set ooxmlexport to true and remove the "if" clause (especially when leaving the comment that this is for DOCX only). This is a partial revert to 7.1 (and backported to 6.4.5) commit 577dd32b1c4eb0a4cff574fbabca987cb52b831b. Change-Id: If7ea32a236715ec779cac302773c4c9da19865a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113399 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-04-02vcl: remove GetBitCount and GetColorCount from Bitmap{Ex}Tomaž Vajngerl
We can cast the PixelFormat enum to int for the same information and we can use the enum to reduce ambiguity when possible. Change-Id: I6ea648139465568cdeb12e5f5f75c7b609365bf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113188 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-03-28drop operator bool and operator! from Bitmap and BitmapExNoel
IRC chat: <quikee[m]> noelgrandin: doesn't adding operator bool to Bitmap has the same problem as Graphic and the reason why you dropped that commit 7334034ae93b49fc93b5859a3c047a319d138282 "drop Graphic::operator bool" <noelgrandin> quikee[m], hmmm, good point <noelgrandin> maybe I should just drop both operator bool and operator! in favor of IsEmpty <quikee[m]> noelgrandin: I don't remember what the problem is I just remembered we dropped it Graphic :) sure, dropping everything for IsEmpty is probably the best Change-Id: Ieae289cda64f0b8d8fdecd5ea9e6f2bb874ff4cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113163 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-26vcl: add initializer_list constructor to BitmapPalette and use itTomaž Vajngerl
Change-Id: Ib24266e435765bd5e05193aea5cee61d7a9346b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113133 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-03-25const OUString -> const OUStringLiteralMike Kaganski
Mostly automated rewrite Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-24Using .md extension/Markdown syntax for modules READMEHossein
Renaming all README files for all top level modules to README.md, applying no content change at this stage to be able to track history of the files. These files should be edited to use correct Markdown syntax later. Change-Id: I542fa3f3d32072156f16eaad2211a397cc212665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112977 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-03-23tdf#124176 Use pragma once in f*Vincent LE GARREC
filter, forms, fpicker, framework Change-Id: I55a25ad2dc3749e63465e638e8eeea3c322eabbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112047 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-03-22Polyfill presentation_engine.js for IE11Szymon Kłos
IE11 doesn't support: Array.includes, String.startsWith and Math.trunc Change-Id: I71c5810ad9230988453f70e880f46869728f49c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112626 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2021-03-15Fix typosAndrea Gelmini
Change-Id: I03d48712252cb9f2a3e3c14d6800081ed6af84d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111911 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2021-03-10Drop 'static_cast<cppu::OWeakObject*>' syntactic noiseMike Kaganski
... where the object is created in-place, and its type is known Change-Id: Ifabfcf2f3ad0d60152f14e8d970c1faa42115288 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112256 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>