summaryrefslogtreecommitdiff
path: root/filter/source
AgeCommit message (Collapse)AuthorFilesLines
19 hourstdf#141340 PDF export: fix hyperlinks on the wrong page with page num rangeMiklos Vajna1-1/+11
Regression from commit 01dbb38680aa39a4d3bc7afd05d44a4b2c9bc6ab (tdf#61274 sd PDF export: fix links ending up on wrong pages with hidden slides, 2020-03-10), the problem was that the sd/ code that mapped page numbers between the model and the PDF output only handled hidden slides, but not partial exports. Fix this by revisiting the decision to handle hidden slides in sd/, the filter/ code at the end does have enough information to correctly do this mapping at the end, and this way both tdf#61274 and tdf#141340 can work at the same time. Change-Id: I5679743ca67fab562e14c73e32f1a06ead8e7a31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128643 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
4 daysSVG export: fix missing custom bulletsMiklos Vajna4-5/+37
It seems this was broken since b76628acb1ae4fc06f8c1b70ec2e0cf39356deef (text export support for bullets and hyperlinks, 2012-08-11), the problem is that SVGFilter::implEmbedBulletGlyphs() has a fixed list of characters that are typically used as bullets, but e.g. "-" is missing from that list. Fix this by improving SVGTextWriter::implWriteBulletChars() to continue working from those shared glyph paths when the glyph is in the fixed list, but otherwise call GetTextOutline() to look up the path for the custom bullet. Change-Id: I3de8fab8dc6c78e273629d13566d1f9f289eb752 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128495 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
4 daysRecheck modules [e-f]* with IWYUGabor Kelemen13-18/+5
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>
8 daystdf#145538 - Use range based for loopsdtm1-4/+3
Change-Id: Ib16c742b39af62694ef591dcdaa975b9a720b4a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127203 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
14 daysremove E3D_INVENTOR_FLAG and convert SdrObjKind to scoped enumNoel Grandin2-32/+33
We don't need E3D_INVENTOR_FLAG, we can just check if the SdrObjKind is in the right range. Which exposes some dodgy code in DrawViewShell::GetMenuStateSel SfxItemState::DEFAULT == rSet.GetItemState( OBJ_TITLETEXT ) || SfxItemState::DEFAULT == rSet.GetItemState( OBJ_OUTLINETEXT ) || which has been there ever since commit f47a9d9db3d06927380bb79b04bb6d4721a92d2b Date: Mon Sep 18 16:07:07 2000 +0000 initial import just remove that. In SwFEShell::ImpEndCreate() move some logic around to avoid using an out-of-range SdrObjKind value Change-Id: I4620bfe61aca8f7415503debe3c84bfe5f4368a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127763 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-06ofz#42785 TimeoutCaolán McNamara1-21/+14
Stream::Seek (like istream::seekg) clears any eofbit Change-Id: I90253e69a52c4099aa2971294a215dff37e8a246 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127975 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-05vcl: migrate AddGradientActions() from OutputDevice to GradientChris Sherlock1-1/+7
Change-Id: I815fb3ce366c93b81f60d19eeed906dc7288708a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127030 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-03tdf#146264: Add a somewhat questionable hack to fix the issueTor Lillqvist1-4/+15
Seems to work but probably has unintended side-effects. Change-Id: I33c6c78757d84fbb59176788a28645691f87b781 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127683 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-12-26Avoid OUStringBuffer::toString where possibleMike Kaganski1-2/+2
Change-Id: I99abbe97a48b2077e28d6221fb70036e5e412657 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127479 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-23Split BasePrimitive2D UNO interface into separate objectNoel Grandin2-10/+10
Rather than make all the BasePrimitive2D classes bear the cost of being an UNO object, we just wrap the top level BasePrimitive2D in this class when we need to pass them over UNO. This reduces the locking overhead when doing normal drawinglayer operations, and reduces the size of drawinglayer objects and the cost of initialising them, which shaves 5% off the load/display time of a large barchart. Add new drawinglayer::convertPrimitive2DContainerToBitmapEx utility method to avoid needing to convert to Sequence<XPrimitive2D> Change-Id: I553eaa4c16ba016b098cb21f6c55f5008f0d9b53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126487 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-21loplugin:flatten in filter..frameworkNoel Grandin6-396/+388
Change-Id: I15a577b3c6da03001bbbf2c2b43b29b41c4007c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127234 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-21filter: try to detect 0-byte DOC files based on extensionMiklos Vajna1-1/+5
Commit ae1f51b4888a3aa14837ac6e4083f33b2176ca45 (tdf#123476 filter: try to detect 0-byte files based on extension, 2020-10-28), already implemented this UNO-based import filters, do the same for built-in filters as well. Another problem in filter/ was to pick the WW6 filter for .doc -- require export+preferred support in the filter to get WW8 instead. An additional filter that may kick in is MS Word 2003 XML: this is avoided by requiring "preferred". Change-Id: I46e280beb5341213b0fe7a09a549b52c0c1ea3f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127219 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-12-20tdf#104823: support for sdt plain text fieldsVasily Melenchuk2-3/+26
This is a squashed commit containing set of changes: * Create a input field from sdt text block. * Advanced support for reading field data from data bindings which can point to custom xml or properties xml. For this XOOXMLDocumentPropertiesImporter idl interface was extrended with extra getterrs to get properties as xml dom elements. * Support for exporting of this feature back to docx. For this some extra parameters for sdt block are kept in newly introduced grabbag for input fields. If field does not contain grabbag it being exported as before (FILLIN or whatsoever), otherwise sdt block is counstructed based on data from grabbag. * Basic support for updating custom xml values back into custom xmls with usage of xslt transformations. To achieve this extra parameters were introduced to XXSLTTransformer: now it is able to support in-memory transformation stylesheets. Some unittests were corrected: since sdt plain text edit area is a field located inside paragraph in outout corresponding sdt is also located inside paragraph (instead of Word's approach with paragraph inside sdt). Seems this is not critical. Change-Id: I1a73ef300db3619804f7adf18579bea708764c14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127015 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-12-19use more cppu::BaseMutexNoel Grandin13-87/+72
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 Gelmini1-1/+1
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-12-16Fix typosAndrea Gelmini1-1/+1
Change-Id: I66feced8bed05c7859e36a6d2f746a7faf30c7a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126915 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-12-16Fix typosTor Lillqvist1-3/+3
Change-Id: I837a135f6c94c9dbdd91c5642b92aa48800118f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126909 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-12-15s/2DO/TODO/Tor Lillqvist1-10/+10
Also s/4now/for now/ . Change-Id: I170c912e09435fb33532eb51ee0c15e6a0e85460 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126854 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-12-15tdf#145904,tdf#145956 improve extrusion of custom shapesRegina Henschel2-4/+6
The patch addressed these errors: The property Origin is relative to the bounding rectangle of the shape not to the snap rectangle. That error is visible e.g. for a block arc. Rotation center x- and y- values are relative to the snap rectangle and not absolute. Rotation center z-value is in Hmm and needs conversion to Twips in Writer. Rotation is around rotation center, which might be different from shape center. That has been ignored. I have moved calculation of the 2D logic rectangle of the scene to main method to be able to reuse the transformation and other values. I consider using a special local class as unneeded overhead. I have reordered some parts to bring geometry relevant parts together. Change-Id: I35ad0721091b365ae99cd3d7b2afb0ad7efe47fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126847 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-12-14Stream::Tell returns sal_uInt64Noel Grandin1-4/+4
Change-Id: I02e49d4f59c17a9868c4111ac91b5dd2715e689c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126630 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-07loplugin:unusedfieldsNoel Grandin2-20/+18
Change-Id: Id39c3f484a364fb5163444febe99aee79daf1a76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126418 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-30ofz#41510 make sure BackgroundColoredObjects doesn't contain dead objectsCaolán McNamara1-3/+5
Change-Id: I42a96a998736b9921c6416eb76b39029279c8bca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126107 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-26tdf#145831: fix typo in PNGAndrea Gelmini8-8/+8
Change-Id: I206ac72d56409b3516f49798fb7f10b3a4c3d721 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125680 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-25remove unused defines and convert some to OUStringLiteralNoel Grandin1-1/+0
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 Grandin2-67/+67
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-24loplugin:stringliteraldefine in comphelperNoel Grandin1-26/+26
Change-Id: I60ccd6049db65fef2397798ab916b0d1e24c0fdc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125531 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-22Use less DegreeN::get()Mike Kaganski1-10/+7
Change-Id: I97b8d6282c72307cc29a913af221d283523f2fae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125653 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-22Generalize DegreeNMike Kaganski1-1/+1
This potentially allows to introduce other degree fractions easily, like Degree<sal_Int64, 60000>, with automatically defined conversion functions. Change-Id: Id1c32d9e029943844bdc833178c1f99387ff87fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-19Drop F_PI1800/F_PI18000, and unify deg2rad/rad2deg conversionsMike Kaganski3-10/+9
Change-Id: Ib89b00c3dc8cd440e8a88906eea133becd1cef64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125509 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2021-11-16Use basegfx::deg2rad instead of *0.01745329251994Hossein1-1/+1
* Replaced multiplying by magic number 0.01745329251994 with basegfx::deg2rad() which is equal to M_PI/180.0 * Instances of this could be found using: git grep 0.01745329251994 *.cxx *.hxx Change-Id: Ib813251f6223e4218fe977c0211732c22199295d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125294 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-15use OUStringLiteral in SVGFilterNoel Grandin1-4/+4
Change-Id: Ib01737e8d679ae69612e6612cc39337681953fee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125250 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-15Use basegfx::rad2deg() instead of *57.29577951308Hossein3-12/+12
* Replaced multiplying by magic number 57.29577951308 with basegfx::rad2deg() which is equal to 180.0/M_PI * Instances of this could be found using: git grep 57.29577951308 *.cxx *.hxx Change-Id: I0ae99a5d63d104b79c6df2dc88e9dda6973a1d3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124226 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2021-11-13Use o3tl::convertMike Kaganski2-10/+7
Change-Id: I78db3001d602ec1a0847785b3c127b9d345f5af7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125173 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-12coverity: annotate with markup so they will stay silencedCaolán McNamara1-0/+1
Change-Id: I8ac0ae4cd64d8171eebd98d89d1fe954280987b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125072 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-08use more OUStringLiteral in MediaDescriptorNoel Grandin5-55/+55
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-07use a std::vectorCaolán McNamara1-9/+10
Change-Id: I186f34025863882951aaa70f94ea21b8ac556dab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124821 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-07ofz: Use-of-uninitialized-valueCaolán McNamara1-1/+4
Change-Id: Ic96e20570f0aae9a7fab66fd39d0fadc0b72d3f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124820 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-07these are the only calls to memset that explicitly ignore its returnCaolán McNamara1-16/+16
it seems hardly necessary to be weird here memcpy likewise Change-Id: I57df9ffd92b4e1d1ebff281498832250f4e1caf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124819 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-04elide unnecessary UNO_QUERY_THROW callsNoel Grandin1-1/+1
Change-Id: I0d0fc57f352e9717e721416c8941cfcf48af24c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124650 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-31add o3tl::span ctor from std::vectorLuboš Luňák1-1/+1
Makes code simpler, and std::span can be constructed from std::vector too. Change-Id: Iae26b53c52148c19d9068a63126a7393d098d654 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124507 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
2021-10-30tools::Long->sal_Int32 in the DX arraysNoel Grandin2-7/+7
Change-Id: I36ddc11b39763dc77086591fe9bb756195b4294f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124459 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-30Prepare for removal of non-const operator[] from Sequence in filterMike Kaganski20-253/+183
Change-Id: I3296bf6dbacfc47a7e51afe88082c4801ea28ea8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124365 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-30tdf#145361 fix XSLT for older libxsltNoel Grandin1-1/+1
regression from commit 3eb870f0843a00042ca7dd89837fbe0cc6f918c2 Author: Noel <noel.grandin@collabora.co.uk> Date: Fri Feb 26 12:45:19 2021 +0200 fix xhtml list export in other locales where I used 'replace' which is not available on older libxslt, so switch to 'translate' which works just as well here, and is available Change-Id: Idd1224e23c0d48956d94b6fc2c2a7b1afa05fa0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124435 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-29pass DX array around using o3tl::span instead of pointerNoel Grandin2-10/+10
so we get bounds checking in debug mode Note that I cannot just pass around the std::vectors involved because there is a place in editeng which calls with a subset of a vector. Change-Id: I5088a139593c27bf9cbe5d843ab4b0048ac6d508 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124330 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-25Converting pointer to reference in svgwriterHossein3-23/+26
Previously, pElementId (old name) was either nullptr or a pointer to OUString created from sPlaceholderTag literal. In the methods that consumed it, it was checked for being nullptr. Now, this is checked with if the aElementId (new name) is empty or not. If the variable is an empty string, it implies that it should not be used. Change-Id: I560fd479f428341c834ee99b0f8a34e95862e3e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123439 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-22Use size_t instead of sal_uLong in filter/source/svgJulien Nabet4-18/+18
Change-Id: I741307bdecbb6e5104a8fcdf892ea609671ae6fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124032 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-20loplugin:indentation check for indent inside blockNoel Grandin1-2/+2
look for places where the statements inside a block are not indented Change-Id: I0cbfa7e0b6fb194b2aff6fa7e070fb907d70ca2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123885 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-16Simplify vector initialization in filterJulien Nabet2-13/+20
Change-Id: I78653b32a5418e44733e3d2740a9a7dd784f17ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123686 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-15Remove non-const Sequence::begin()/end() in internal codeMike Kaganski1-1/+1
... to avoid hidden cost of multiple COW checks, because they call getArray() internally. This obsoletes [loplugin:sequenceloop]. Also rename toNonConstRange to asNonConstRange, to reflect that the result is a view of the sequence, not an independent object. TODO: also drop non-const operator[], but introduce operator[] in SequenceRange. Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-14use std::vector::insert instead of push_backNoel Grandin1-7/+2
because it will pre-allocate space and often is optimised to memcpy Change-Id: I03ed7915f2762d3d27e378638052a47a28bbf096 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123588 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>