summaryrefslogtreecommitdiff
path: root/filter
AgeCommit message (Collapse)Author
2022-03-11new loplugin:trivialdestructorNoel Grandin
look for potentially trivial destructors that can then be elided Change-Id: I435c251bd4291b5864c20d68f88676faac7c43fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131318 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-08Fix a DPI-dependent testMike Kaganski
It fails locally on Windows using 150% scaling with - Expected: 9419 - Actual : 9437 The original size of page in the PDF is 267.507 x 85.627 pt. Converting that on 96 DPI gives 356.68 x 114.17 pixels. Without rounding, that translated to 356 x 114 in vcl::RenderPDFBitmaps. This adds rounding when calculating bitmap size, giving smaller error (9446 hmm wide, less than 10 hmm from ideal 9437 mm/100, compared to almost 20 hmm error before). Also it adds tolerance to the unit test. Change-Id: I3cd8f6c0e1235adf2fe1c17f4c56f3667f0132bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131110 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-07do not pass XComponentContext to officecfg::...::get() callsLuboš Luňák
It's used only for the ConfigurationWrapper singleton, so it's used only the first time and then ignored. It also causes calls to comphelper::getProcessComponentContext() for every single invocation despite the value not being needed, and the calls may not be cheap (it's ~5% CPU during ODS save because relatively frequent calls to officecfg::Office::Common::Save::ODF::DefaultVersion::get()). Change-Id: I02c17a1a9cb498aeef220ddd5a0bde5523cb0ffb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131056 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-06os thrown -> is thrownCaolán McNamara
Change-Id: I114bb29c59ad9a4b20ca3f34b057b02d439fbd77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131067 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-03-01use SfxItemSet::GetItemIfSet in desktop..reportdesignNoel Grandin
Change-Id: Iaa0ddf4e97866d537a478e668e3c651a9eabc465 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-28Fix the tests failing when invalid certificate is in cert storeMike Kaganski
Change-Id: I72055c814a11a76c4934610bcad9c24aae21164e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130690 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-23SdrLayerID must be based on sal_Int16Mike Kaganski
... which is the type corresponding to the related published property "LayerID" of com.sun.star.drawing.Shape service. Without this, the code asserts on values passed to the published API from external sources to be in the 8-bit limits, which is incorrect. Change-Id: I0449a7dd313f7e6c4adbc1c1f7b8c50b6a51434e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121760 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-23cid#1500622 Dereference before null checkCaolán McNamara
Change-Id: Id19f46ff51759c8346915852bfcb2cec66962c5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130420 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-17tdf#145700 Improve lighting in extruded custom shapesRegina Henschel
The fix tries to make rendering similar to MS Office. The ODF standard follows closely the extrusion in RTF and MS binary format. Rendering uses the 3D scene engine. The main problem was, that the z-component of the direction was interpreted with opposite sign. As result the maximum of a light was at false position. Especially a direction from the observer to the object has produced a light behind the shape and so looks as if light was off. The wrong z-direction has produced lighting, which was less intensive than in MS Office. To compensate that, a third light source was added as workaround. That part is removed. Second problem was wrong use of 3D-scene D3DMaterialSpecularIntensity and D3DMaterialSpecular (= UI Specular color). That was not only wrong in OOo but in my previous patch too. D3DMaterialSpecularIntensity corresponds to MS property 'c3DShininess'. Relationship is Intensity = 2^c3DShininess. D3DMaterialSpecular is calculated from MS property c3DSpecularAmt and and c3DKeyIntensity. The light source was missing, but needs to be included, because c3DSpecularAmt is 'the ratio of incident to specular light that is reflected on a shape'. The old unit tests are adapted to this change. MS gives no information how it softens a light in case of harsh=false. ODF specifies it as 'implementation-defined'. The patch uses four additional lights, which have directions in 60° angle to the original light. The light intensity is distributed. That comes near to rendering in MS Office. Changing our 3D engine to provide 'soft' lights was not doable for me. The way MS Office renders a 'metal' surface is different from ODF specification. To distinguish the kinds, I have introduced a new property MetalType. I have discussed it with the ODF TC (see minutes from 2022-02-07) and got the advise to use namespaced values. Therefore the datatype is not boolean. The 'Surface' drop-down in the extrusion bar is changed to make the two kinds of rendering 'Metal' available to the user. If a user sets surface 'Metal' in the UI of MS Office, it sets not only fc3DMetallic but reduces the value of c3DDiffuseAmt in addition. Our 3D-scene engine has the corresponding ODF attribute dr3d:diffuse-color not implemented. To get a similar rendering I change the material color of the 3D-objects as workaround. Change-Id: Ia986b9c318b4c79688e0c0e2d858215b9d612fdc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128449 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2022-02-15svg filter: google chrome doesn't render white spaces correctlyMarco Cecchetti
In Google Chrome white spaces at the beginning of a text line are not rendered at all. Change-Id: Idd3b1bc5a383b21a54cc1629173bbe26a6da83bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129918 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 5eec28d86a5953de3aa0d5f0c424e92334860270) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129939 Tested-by: Jenkins Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
2022-02-09related tdf#79186 filter: value is more than just LayoutInCellJustin Luth
nGroupShapeBooleanProperties contains 16 shape properties and 16 flags to indicate whether they are to be used or not. Up till now, only fLayoutInCell has been used by LO, but it handles far more than that, so lets change the code (now that we have the documentation for it) to make it clear that this could be useful for further compatibility fixes. There is no need to determine whether the setting has been provided or not - since a zero default indicates everything in this bit-set should be ignored. The naming and the if clause in ww8graf.cxx suggests that reverse engineering didn't really grasp how this worked, so I took the liberty of removing all of that awkwardness, and verified that at least several associated document from the OOo Apache bugtracker still worked. =============================================================== https://docs.microsoft.com/en-us/openspecs/office_file_formats /ms-odraw/a0ae6aa5-16e4-4550-87a2-b8ca180c7fd7 fLayoutInCell (1 bit): A bit that specifies whether this shape is displayed inside a table cell. If fUsefLayoutInCell equals 0x0, this value MUST be ignored. The default value for this property is 0x1. Change-Id: I82f80123a7419a83737b796f253406576732b6c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129657 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2022-02-08sw: fix size of inserted PDF imageMiklos Vajna
We used to multiply the pixel size with the DPI, which resulted in some large enough mm100 width that the inserted image was as wide as the body frame allowed it. Change-Id: I97b81f23166889006363b9241a572f6afde99ee3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129640 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-02-07filter: avoid 'using namespace' in pdfexport.hxxMiklos Vajna
Helps to see if we have an rtl::Reference or an uno::Reference here. Change-Id: I5b8c42fbf01a026d637b1aaec299cae51673188a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129585 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-02-06Fix typoAndrea Gelmini
Change-Id: I7ce6c8dec7cc6b441e2767911b6da99fa348926c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129537 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-02-06Missing initialization of SVGActionWriter::mbIsPreviewStephan Bergmann
...introduced with f609a16a52f1ac37f1edd297cf1d9e5f2a294724 "lok: render image preview with lower resolution", > /filter/source/svg/svgwriter.cxx:2949:9: runtime error: load of value 190, which is not a valid value for type 'bool' > #0 0x2b2ee3c573d5 in SVGActionWriter::ImplWriteBmp(BitmapEx const&, Point const&, Size const&, Point const&, Size const&, com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const*) /filter/source/svg/svgwriter.cxx:2949:9 > #1 0x2b2ee3c3b670 in SVGActionWriter::ImplWriteActions(GDIMetaFile const&, unsigned int, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const*, GDIMetaFile const*) /filter/source/svg/svgwriter.cxx:3782:25 > #2 0x2b2ee3c5b3a8 in SVGActionWriter::WriteMetaFile(Point const&, Size const&, GDIMetaFile const&, unsigned int, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const*, GDIMetaFile const*) /filter/source/svg/svgwriter.cxx:4015:5 > #3 0x2b2ee3a86ae2 in SVGFilter::implExportShape(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&, bool) /filter/source/svg/svgexport.cxx:2227:42 > #4 0x2b2ee3a7e1e2 in SVGFilter::implExportShapes(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, bool) /filter/source/svg/svgexport.cxx:2050:20 during CppunitTest_sd_svg_export_tests (<https://ci.libreoffice.org/job/lo_ubsan/2291/>) Change-Id: Ied5a2cc8599466949f57caae05f9fb90c92266b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129582 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-05lok: render image preview with lower resolutionSzymon Kłos
renderShapeSelection callback is used to render image previews which are later used during eg. rotation. Do not render preview with original size which slows down app a lot. Use 1280x720 max. Change-Id: Ia8365a67d87cea869ef74cb70ce4830439a523b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129376 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129497 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-02-04add toId/fromId to tidy up some ugly castingCaolán McNamara
Change-Id: I70f34ac5e9b5d2f2d6c0375e823908eaa2e540b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129487 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-03filter: allow PDF export to sign from the cmdlineMiklos Vajna
Sample soffice invocation: soffice --convert-to 'pdf:draw_pdf_Export:{"SignPDF":{"type":"boolean","value":"true"},"SignCertificateSubjectName":{"type":"string","value":"CN=..."}}' test.odg You can copy the subject name from the PDF export dialog. This works only in case the signing certificate already appears in the certificate list. Change-Id: I8670f9a410c6e80497a4d6223d1438938bc949e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129387 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-02-02Fix typosAndrea Gelmini
Change-Id: Ifac9aedb4972323da8b70d0a8f6f663513d2fbdb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129310 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-02-01vba: fix registering shortcuts keys defined by the vba macrosTomaž Vajngerl
On issue with registering was that the registering happened when the macro source was in the process to be read into the library, which is just a bit too early, because the macro wasn't found and not registered. Another issue was with searching for the macro method (hasMacro), which doesn't search the same when the module name is known and when it isn't. This was changed so we just iterate through the modules and call the same "FindMethod" method without any extra restrictions. Change-Id: I811cfcaca58e8dfa8bef6cf983a8aff2b60eba35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129196 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-31Unit test for 0-byte ods detectionSzymon Kłos
Fixed by commit: d9a4e323555d01202dd15e71a3a32294bfd568cc Open empty (0 bytes) ods as spreadsheet Change-Id: I9b7220f46f5d00f6e4a73d6325dca51d7ea5b656 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129166 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-01-31Open empty (0 bytes) ods as spreadsheetSzymon Kłos
Before this patch we opened it with Writer UI because we didn't detect any filter with PREFFERED annotation Change-Id: I6262fb695b5fe20a377120f298f144e2cafbadc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128015 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129165 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-01-31support for the WebP image format (tdf#114532)Luboš Luňák
This commit implements a WebP reader and writer for both lossless and lossy WebP, export dialog options for selecting lossless/lossy and quality for lossy, and various internal support for the format. Since writing WebP to e.g. ODT documents would make those images unreadable by previous versions with no WebP support, support for that is explicitly disabled in GraphicFilter, to be enabled somewhen later. Change-Id: I9b10f6da6faa78a0bb74415a92e9f163c14685f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128920 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-26this should be a normal dialog typeCaolán McNamara
Change-Id: I1c8c180b521c3cd2def35fca93b3f299ca437dd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128996 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-26resave with latest gladeCaolán McNamara
Change-Id: I10ebd53c21670242c49332068a1d5b04e6f58fc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128995 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-26Fix typoAndrea Gelmini
Change-Id: I82c9da0e6ce73cc73a1edaf2d7d9559c5086fde9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128993 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-26svgexport: fix: attribute id redefinedRash419
If there is a id for empty paragraph exist we need to create a empty text paragraph to accomodate the id if we don't do that then we get multiple id attribute on same element for example: <tspan id="id14" id="id15" id="id17" class="TextParagraph"> Change-Id: I41c21dc94deef93e423aaff2248f6931fa6ca8de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128856 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128924 Tested-by: Jenkins
2022-01-25Related: tdf#146971 remove %PRODUCTNAME from accessible-descriptionCaolán McNamara
Change-Id: I83ff18c8b5e95fa172de950eb351cbfd855c9d5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128919 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-24PDF export: allow setting filter data keys from the cmdlineMiklos Vajna
Follow-up improvement to commit 3eb9eb9906c9 (lok: add pdf version option for export, 2021-11-15), possibilities are endless. For example, to skip the first page of a Draw document: soffice --convert-to 'pdf:draw_pdf_Export:{"PageRange":{"type":"string","value":"2-"}}' test.odg Add watermark: soffice --convert-to 'pdf:draw_pdf_Export:{"TiledWatermark":{"type":"string","value":"draft"}}' test.odg Encrypt: soffice --convert-to 'pdf:draw_pdf_Export:{"EncryptFile":{"type":"boolean","value":"true"},"DocumentOpenPassword":{"type":"string","value":"secret"}}' test.odg Version 1.5 (instead of the default 1.6): soffice --convert-to 'pdf:draw_pdf_Export:{"SelectPdfVersion":{"type":"long","value":"15"}}' test.odg The cost of the verbose syntax is probably smaller than the benefit of having this 1:1 mapping from string to PropertyValues. Change-Id: I2093a3a787a9578dd02a154593b7a020f4a0ba31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128849 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-01-20tdf#141340 PDF export: fix hyperlinks on the wrong page with page num rangeMiklos Vajna
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
2022-01-17SVG export: fix missing custom bulletsMiklos Vajna
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
2022-01-17Recheck modules [e-f]* with IWYUGabor Kelemen
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>
2022-01-12tdf#145538 - Use range based for loopsdtm
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>
2022-01-07remove E3D_INVENTOR_FLAG and convert SdrObjKind to scoped enumNoel Grandin
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 McNamara
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 Sherlock
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 Lillqvist
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 Kaganski
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 Grandin
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-22Separate core drawinglayer func. into drawinglayercore libraryTomaž Vajngerl
This separates the drawinglayer core functionallity into a separate library, to keep a strict separation what is backend dependent and what is not. More strict separation can be done at a later date. This will make it possible to push part of drawinglayer (part of processor2d) directly into VCL. Change-Id: Ibc26580067e50bf20d7cdd37fa0e44eb10200878 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127286 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-21loplugin:flatten in filter..frameworkNoel Grandin
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 Vajna
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 Melenchuk
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 Grandin
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 Gelmini
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 Gelmini
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 Lillqvist
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 Lillqvist
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 Henschel
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 Grandin
Change-Id: I02e49d4f59c17a9868c4111ac91b5dd2715e689c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126630 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>