summaryrefslogtreecommitdiff
path: root/xmloff
AgeCommit message (Collapse)Author
2021-03-18xmlsecurity: replace XSecParser implementationMichael Stahl
Implement Namespaces in XML and follow xmldsig-core and XAdES schemas. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110833 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 12b15be8f4f930a04d8056b9219ac969b42a9784) xmlsecurity: move XSecParser state into contexts Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111158 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 59df9e70ce1a7ec797b836bda7f9642912febc53) xmlsecurity: move XSecParser Reference state into contexts Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111159 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit cfeb89a758b5f0ec406f0d72444e52ed2f47b85e) Change-Id: I03537b51bb757ecbfa63a826b38de543c70ba032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111907 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-18tdf#136861 ODT export: fix writing resolved state for non-ranged commentsMiklos Vajna
It was probably not intentional to write the resolved state only in case the annotation has a name. (cherry picked from commit f3b5356bdc51b03f9910ed544b8c17d6f919bc12) Change-Id: Ia3a6b2320e2288528c43c832211ebfcde492881e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109379 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109459
2020-10-30tdf#137643 alternative solution to activate embedded fonts in one batchCaolán McNamara
Change-Id: Ib5ffb2b8a31f237d5d2e465bf3f777590e0bfade Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104957 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-09-13tdf#133502 annotation has wrong positionNoel Grandin
regression from commit 20c5a2abb61c4246c6001b7b6d5bd69cd5882cfd use FastParser in DrawAnnotationContext Change-Id: Ifc4a8d6390d37edfb375f37d513418b77f38d842 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102515 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 35612c995d53d74e8b9ba44bc6e940cbb4dd0f60) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102568 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-08-27fix bug in XMLEventsImportContextNoel Grandin
ever since commit 10e08b1d398e6aa91aa4ced0ca6c966349be8b5d Date: Fri Feb 14 13:27:23 2020 +0200 convert XMLEventsImportContext to fastparser Change-Id: I3bdc514f25a38f598d2a764c536b46f6ded9d14c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101473 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit bd2d082a0c681ec7340ed01a27b7d2c7ab14549c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101454
2020-08-21tdf#135942: avoid collecting autostyles during writing themMike Kaganski
This modifies the container over which iteration is performed. Additionally, make sure that all nested table autostyles are collected on the first phase. Change-Id: I74c0bb1aaacad095226c21e6bf51cc8668133bb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101096 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit f0286ad82465152b29bba01ab2edeb97291397fa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101069 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-20tdf#103602 xmloff: ODF export of page style: don't export draw:fillMichael Stahl
... attributes on header-style and footer-style in strict ODF. Change-Id: Ic1af26b6112a5afbb70a82b29dbacd3dcec14ec3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101012 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit dd7caf3cfd3de636c8bf37c8347c1b72b3772aeb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101041 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-08-14tdf#135144 xmloff textbox: fix export style name to be consitent with importMiklos Vajna
Regression from commit 28d67b792724a23015dec32fb0278b729f676736 (tdf#107776 sw ODF shape import: make is-textbox check more strict, 2019-08-26), the problem was that in case the import side in SdXMLCustomShapeContext expects a fixed "Frame" parent style name, then the export side should go with that name as well. Fix the problem by simplifying XMLShapeExport::collectShapeAutoStyles(), which initially assumed that the string may be localized, so try to look it up: instead just use the fixed string that the import side will look for. This solves all problem which may stem from a parent style name which is non-empty, but other than Frame. (cherry picked from commit 347d05edd8910907ae185c61c1e56eee139b3c09) Change-Id: I8146440c591d3dd5a904d243d85741d704711e9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100595 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-08-07tdf#124470: Split export of table autostyles out from collection phaseMike Kaganski
This allows to call collectAutoStyles where required (e.g. when enumerating used fonts), without side effect of writing table styles XML inside the call, out of place. Change-Id: Ida05e373eb8502590c43e2b0e85c3b0c1107c551 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100153 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 35021cd56b3b4e38035804087f215c80085564be) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100221 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-08-04tdf#130707 xmloff: survive <text:database-display> in editeng textMiklos Vajna
Regression from commit 28d67b792724a23015dec32fb0278b729f676736 (tdf#107776 sw ODF shape import: make is-textbox check more strict, 2019-08-26), now that we correctly identify what shape text to import as "textbox" (Writer TextFrame) and what to import as editeng text, there are documents out there that try to import mailmerge fields into editeng-based shape text. Fix missing error handling there. Note that the error is not just silently ignored, we do insert the field result into the shape text, existing code provides this already. (cherry picked from commit fd18d12efdfbe0e26d41d733edc711d0f40a7804) Change-Id: Ibe631ac5d94c1c7795dd00bad05fdcca0e6741a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100038 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-08-04tdf#134971 Don't overwrite default styles when inserting docThorsten Behrens
Seems code never really bothered not to touch default style info, when inserting from file. Original commit is: Author: Sascha Ballach <sab@openoffice.org> Date: Wed Feb 28 08:24:41 2001 +0000 import of default styles added Change-Id: Ibb639a585bedabdcc5987900ecca1e04f4bb593a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99015 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit c84764e08da5e1c6202d300684baab0076d6b3ed) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99919 Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-07-29throw if length of keys and values are differentXisco Fauli
See https://crashreport.libreoffice.org/stats/signature/%60anonymous%20namespace'::WriteAnimateValues This is expected to start rejecting broken files, instead of accepting invalid data silently, as it did before. This is not a regression, and should be indication of corrupted generator, which is the actual cause of the bug... Change-Id: I66dbb380e8b2d313e58cddf938d952aed4a635b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99327 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit bcdcdaa5dfc5f1d50e0239055161b71e97f5f022) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99392 Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-07-22tdf#131175 oox chart import: fix char color of <dLbl>, inherited from <dLbls>Miklos Vajna
There were two problems here: 1) Our chart model expects the char formatting of a data label as direct formatting, so in case <c:dLbl> has no such formatting, but <c:dLbls> has, oox has to explicitly inherit. 2) The data label char formatting is represented using chart::FormattedString, but the char format of it is not (yet) exported to ODF. Given that the char format of the series and the individual data labels is the same, restore the same formatting on import to please rendering. With these, finally the chart labels in the bugdoc are white, not black (and have a dark background, so they are readable). (cherry picked from commit 8a43bfeffab9009c9f373e883fef87af1a7b3843) Change-Id: Iebac5ce0be31a59bafb0f9fe7636330585e33822 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99026 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-07-20Related: tdf#131175 OOXML chart: import data label fill patternGülşah Köse
(cherry picked from commit 6f752061d5153da50d6f536d506358c8f512a397) Change-Id: I2db64489c86e4381167eb13af4ab5118113960d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99024 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-06-13tdf#133459 Fix import of fields with user defined number formatsMaxim Monastirsky
commit 59ace23c367f83491a37e844d16f7d716eff6346 ("tdf#101710 Fix invalid style:data-style-name attribute") had a side effect of exporting user defined number formats under <office:styles> instead of under <office:automatic-styles> (which is valid, and what Calc does since forever). As it turned out, this didn't work well for fields: - For fields inside headers or footers, their number format wasn't imported at all. The reason here is that fields use the XMLTextImportHelper::GetDataStyleKey method to resolve data styles, and that method checks only automatic styles. Actually it resolves also styles from <office:styles>, because SvXMLImport::SetAutoStyles has a special code that merges styles from <office:styles> into automatic styles during content.xml reading. The problem is that headers and footers have their contents stored inside styles.xml, and no merging happens at this stage (unless it's a flat odf file). One way to solve this could be to explicitly check for styles from <office:styles> in XMLTextImportHelper::GetDataStyleKey (e.g. see previous gerrit patchsets, or XMLTableStyleContext::GetNumberFormat) I chose to simply modify the condition in SvXMLImport::SetAutoStyles, so that merging happens anyway. - Fields whose format resolution depends on the merging of SvXMLImport::SetAutoStyles, did import the number format itself, but not its language setting. This can be in one of three ways: (a) Fields in the document and the header, when both use the same format. In this case the format is stored once in styles.xml, so at least the consumer from content.xml depends on merging. (b) Field in the document with a user defined format - a regression of the above commit. Now stored in styles.xml under <office:styles> instead of in content.xml under <office:automatic-styles>. (c) Field in a header with a user defined format - depends on merging as a result of the above fix. The reason here is that the merging isn't done with the original SvXMLNumFormatContext objects, but with a newly created fake ones, which only have the format id correct (with the assumption that those formats already imported, and calling code could just find them by the id). The problem is that the fields code uses XMLTextImportHelper::GetDataStyleKey to get the language setting from style objects, and set the IsFixedLanguage property according to it, while we know that those fake objects don't have the language correctly set. Try to fix that problem by setting the correct language on those fake objects. Change-Id: Ibb362df019921e040708d3bda83bf155535ec7af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95612 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> (cherry picked from commit cd0dc1bc592d7952c36659da33d99ab964fe2e93) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96182
2020-06-05xmloff: ODF export: fix crash on tdf125455-2.odtMichael Stahl
FillBitmapMode is a very funny property that is stored as 2 items XFillBmpTileItem XATTR_FILLBMP_TILE and XFillBmpStretchItem XATTR_FILLBMP_STRETCH and the XPropertySet implementations for it are a bit inconsistent, e.g. sd uses .GetItem<XFillBmpStretchItem> which searches the parent and requires both items to be present, but sw uses GetItemState(XATTR_FILLBMP_STRETCH, false) which does not check the parent and one item is enough. Let's just not export the attribute in case the property isn't defined. (regression from 4d4404b79bf051de79f587bdafd82cc0addfc636) Change-Id: I13c2e91c3e4eb15ebec508f679ba49614f493a11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95501 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit c87ed105f17ce68842cfacddf96a9082feb9981c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95428 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-06-04Use "Radius" instead of "Rad" for new propertiesTomaž Vajngerl
Change-Id: Ifd232bccf1519e0ed68195cf4344893175a675e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95331 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 7313ed6a5b63e06ddd8ce90c3b5b2f168743a2c9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95322 Tested-by: Jenkins
2020-06-03tdf#133555 xmloff: ODF export: don't produce text:drop-down in ODF 1.2Michael Stahl
This was added in ODF 1.3 as OFFICE-3881, but it's actually ancient and was written by OOo 2 already, just somehow forgotten to add it to ODF. Change-Id: I322fac471c940334f886a7c61769922ae03ee89b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95359 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit d5b290dea1c8a8088b654ba8364906922b4c3a43) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95321 Tested-by: Michael Stahl <michael.stahl@cib.de>
2020-06-03tdf#133501 xmloff: ODF export: export annotation only if extendedMichael Stahl
(regression from 7c20c3c2a9fc85c66dad9d09908b257beeedd78d which forgot to adapt this under the erroneous assumption that the feature did make it into ODF 1.3) Change-Id: Idfe37444b8287edd063fa9576e6d76a332552754 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95355 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit bb95d189653d73911c187227ace682ba2b98172c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95320
2020-05-30tdf#103602 xmloff: ODF export of page style: don't export draw:fillMichael Stahl
... attributes on page-layout-properties in strict ODF. Change-Id: Id7c440bf86f78f5f8bb95b9463874787372d5ae8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95053 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit b078679450a6653f69f32390ef2cc5b551f120b2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95111
2020-05-29tdf#103602 xmloff: ODF export: draw:background-size attributeMichael Stahl
... on drawing-page style; no import because Writer doesn't have the property anyway. It looks like Writer paints color, gradient, hatch and bitmap with "repeat" on the entire page, and bitmap "scaled" or "no-repeat" within the borders. Change-Id: Ia32c800a6cb537bf9df57c6a6a77a5c1dcf52aa8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95040 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 4d4404b79bf051de79f587bdafd82cc0addfc636) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95089
2020-05-27Remove some unused includesMiklos Vajna
Change-Id: Id5a31185faf2a3a13b6ea266e058a7df41d44423 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94890 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-05-26Fix loplugin:simplifypointertobool for libstdc++ std::shared_ptrStephan Bergmann
...where the get member function is defined on a std::__shared_ptr base class, so loplugin:simplifypointertobool used to miss those until now. (While e.g. using libc++ on macOS found those cases.) 366d08f2f6d4de922f6099c62bb81b49d89e0a68 "new loplugin:simplifypointertobool" was mistaken in breaking isSmartPointerType(const clang::Type* t) out of isSmartPointerType(const Expr* e); c874294ad9fb178df47c66875bfbdec466e39763 "Fix detection of std::unique_ptr/shared_ptr in loplugin:redundantpointerops" had introduced that indivisible two-step algorithm on purpose. The amount of additional hits (on Linux) apparently asked for turning loplugin:simplifypointertobool into a rewriting plugin. Which in turn showed that the naive adivce to just "drop the get()" is not sufficient in places that are not contextually converted to bool, as those places need to be wrapped in a bool(...) functional cast now. If the expression was already wrapped in parentheses, those could be reused as part of the functional cast, but implementing that showed that such cases are not yet found at all by the existing loplugin:simplifypointertobool. Lets leave that TODO for another commit. Besides the changes to compilerplugins/ itself, this change has been generated fully automatically with the rewriting plugin on Linux. Change-Id: I83107d6f634fc9ac232986f49044d7017df83e2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94888 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2020-05-24tdf#101181: drop useless "GlowEffect" boolean propertyMike Kaganski
Just use GlowEffectRad to indicate effect presense: radius of 0 means effect is disabled. Change-Id: Ic06bba34f5a851f120d3d00cb7e20c429ead9ee1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94732 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-22[API CHANGE] officecfg,xmloff: remove SaveBackwardCompatibleODFMichael Stahl
org.openoffice.Office.Common.Save.Document.SaveBackwardCompatibleODF was added in 2007 and apparently enables storing invalid ODF (or OOoXML) to workaround bugs in OOo <= 2.3; nobody should need it in this day and age, and the OOoXML export has been removed anyway. bce5e157785745a6729db62b15fb98bc396cddee 2007 c7a3859693971bf7103bfb0d05d64712e724fa37 2007 7477a65e09b20917adf025550c550f8822b508ee 2007 77baabe992c77018a0467ffec8f9482f8d76b66b 2007 575222083e058a740f5ad69e14e18622c3d4f7af 2007 66b908b45cde78af020b35e817e67bc40b8493f0 2007 Change-Id: Ib3f730c7c9ac6fbbbbae9fb4a42c1bd65f6c93df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94571 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-22xmloff: create XMLMetaExportOOO instances with an uno constructorMiklos Vajna
See tdf#74608 for motivation. Change-Id: Ie3bed67b736ea3a3c8071336594bcbe54c6618a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94651 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-05-21use for-range on Sequence in testtools..xmloffNoel Grandin
Change-Id: I05b02a2f8b4b9091c7de0f7e98409d5b608ed250 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94610 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-20meta:non-whitespace-character-count attribute is knownhimajin100000
also, fixed a typo and re-positioned the item to the correct index. Change-Id: Ibac232a9e6851a0c59884bc82ead5de36ac2e391 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94454 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-20tdf#130479 FODG import: fix handling of <draw:fill-image> in stylesMiklos Vajna
Regression from the image handling rework, the problem was that the old, URL-based code had explicit handling of mxBase64Stream, while the new, XGraphic-based code assumed that by the time we reach the end of of the bitmap style element, maAny already contains the graphic. Fix the problem by improving XMLBitmapStyleContext::EndElement(), so it loads the graphic from the base64 stream if we don't have a graphic already. Change-Id: I6d90f1470a5b797fb51789901081ccd7a6fd29e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94548 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-05-19tdf#89475 xmloff: ODF import/export: continue fixing draw:angleMichael Stahl
Continue what commit aadda5d17f6e422da143ea774f759bfc5f629c5b started wrt. unit-less draw:angle attributes in ODF >= 1.2: * ODF 1.3 files don't ever have unit-less draw:angle interpreted as 10th of degree * import unit-less draw:angle as degree, except if it's ODF 1.0/1.1 or it's ODF 1.2 written by OOo/LO < 7.0, then 10th of degree * export draw:angle with "deg", which LO 4.4 and newer can read; except if exporting ODF 1.0/1.1 or ODF 1.2 Extended (compatibility mode), then 10th of degree (unit-less) The only problem with this is that if you store a file as ODF 1.2 Extended (compatibility mode) and load it with LO 7.0 it will interpret the angle wrong, but nothing's perfect... Change-Id: I3771e6571afd40e44b6f7890dacf18c28841610f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94443 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-19xmloff,filter: Flat ODF import: import BuildId from meta:generatorMichael Stahl
The problem is that SvXMLMetaDocumentContext::endFastElement() works to init BuildId property for ODF packages but not for flat ODF files because the entire content of the document is inside that element. So init BuildId when the office:meta element ends. Also, add the missing "BuildId" property in XmlFilterAdaptor. This allows the CppunitTest_sd_import_tests testGradientAngle to work in the subsequent commit. Change-Id: I916a9288631078c1552cd8673e41fa9a9679f574 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94499 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-19xmloff: ODF import: Silence "unknown LO version: 7000"Tomoyuki Kubota
Change-Id: I56cf3b03274cc24f66bbfc9d3615fa57521a6cd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94368 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-19tdf#106780 xmloff: ODF export: only write invalid text:style-name...Michael Stahl
... in case of ODF 1.2 Extended (compatibility mode), which is intended for workarounds for old OOo/LO versions. Change-Id: Ib0411c09d795383a481be8b4661dc71b02b0181b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94442 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-19Fix typoAndrea Gelmini
Change-Id: I72d95721c6af63706cc6e2c39b12d4af858cc045 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94492 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-19tdf#103602 xmloff,sw: ODF 1.3 export: PageStyle with drawing-page styleMichael Stahl
Associate a style of family "drawing-page" with a style:master-page. This fixes the small part of the draw:fill attribute problem that is covered by OFFICE-3937 in ODF 1.3. Exporting the "drawing-page" style is only allowed in ODF 1.3; all property map entries have ODFSVER_ODF013 and this causes no style to be exported for earlier versions. Continue to export the invalid draw:fill attributes on the style:page-layout for now, until the import of this is more widely deployed. This only works with Writer, because Calc doesn't implement FillStyle properties on its page styles. Change-Id: I4b24ae3eaf332723e24671e594eca5e36d48f525 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93671 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-19tdf#103602 xmloff,sw: ODF 1.3 import: PageStyle with drawing-page styleMichael Stahl
Associate a style of family "drawing-page" with a style:master-page. This fixes the small part of the draw:fill attribute problem that is covered by OFFICE-3937 in ODF 1.3. This is the import part. Change-Id: I4c86fa24c36407b64ce33f0890e5da8c26c5292a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93670 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-19tdf#97630 xmloff: ODF export: fix draw:fit-to-size mess, step 2Michael Stahl
Restrict the export of draw:fit-to-size to only the standard values "true"/"false". Keep the broken export for ODFVER_012_EXT_COMPAT, since it's easy to do. Change-Id: Ieaab3b635a116a1d0b6155115f8f7f74935a125a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93226 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-19tdf#91306 xmloff: ODF export: allow style:page-number="0" in ODF 1.3Michael Stahl
See OFFICE-3923. Change-Id: I619d9efe3eb17feaf84f7dd21f5b2197c30bc6aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93225 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-19xmloff: ODF export: additional ODF 1.3 chart featuresMichael Stahl
* OFFICE-3662 chart:interpolation additional values * OFFICE-3958 chart regression curve: polynomial * OFFICE-3959 chart regression curve: moving-average None of these are exported in ODF 1.2 extended because they require additional values for standard attributes, which isn't valid. Change-Id: I920cc44dbde46687b570c1296c7d8926f0a1a9c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94064 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-15replace hard-coded "1.2" ODF version stringsMichael Stahl
Most of these are calls to DocumentDigitalSignatures::createWithVersion(), where it doesn't make a difference if "1.2" or "1.3" is passed in but maybe it will be different with "1.4". There is another ctor createDefault() which looks appropriate for non-ODF contexts and can also be used when no actual signing or verifying is done. In cases where there's an actual document its Storage has the version. Change-Id: Id636bbf965d9f96c7ed5f50774c509032525b2b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93091 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-15xmloff: remove unused SvXMLExport::getDefaultVersion()Michael Stahl
Change-Id: I52e904ca32f46ec50c3045260be7824aa782cc9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93090 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-15xmloff: ODF export: produce office:version="1.3"Michael Stahl
Change-Id: I422743c6eacf112046141e017d42d78165c36cf2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93089 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-15xmloff: create SchXMLExport_Content instances with an uno constructorMiklos Vajna
See tdf#74608 for motivation. Change-Id: I49f00c08635e571d75e5190d55cbe1f279566797 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94255 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-05-12xmloff: ODF export: adapt to ODF 1.3Michael Stahl
* OFFICE-3883 legend svg:width/svg:height * OFFICE-3928 chart:coordinate-region * OFFICE-3943 draw:mime-type * OFFICE-3765 number:fill-character, number:text * OFFICE-3860 number:min-decimal-places, number:forced-exponent-sign * OFFICE-1828 number:exponent-interval * OFFICE-3695 number:max-denominator-value * OFFICE-3941 text:index-entry-link-start/text:index-entry-link-end * OFFICE-3776 meta:creator-initials * OFFICE-3789 style:header-first/style:footer-first Change-Id: I78c79231c0708c3ae9943097d162898fab71988f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92873 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-11tdf#49247: no need in extra boolean property, radius is enoughMike Kaganski
When soft edge has radius 0, the effect is disabled. Change-Id: I7d66ea7b87e0ed59129a83885d52906b8edf75f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93971 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-11Document relation between three lists that must be in syncMike Kaganski
Change-Id: I9fc44b6878450d147d21f77ff4daa6939edfa0c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93837 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-11tdf#49247: implement soft edges document model and import/exportMike Kaganski
... for ODF and OOXML. Two object properties added: SoftEdge (boolean, effect enabled/disabled) SoftEdgeRad (sal_Int32, effect radius in 100ths of mm) Two corresponding ODF attributes added: loext:softedge ("visible"/"hidden") loext:softedge-radius (metric) Change-Id: I0dc4d7fc3e5b0c2c36092d430568ebcfd3a68c9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93833 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-10compact namespace in xmlhelp..xmlsecurityNoel Grandin
Change-Id: I54f0a47a4b7a1f85481fd1e643ac55459d0383ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-10new loplugin:simplifypointertoboolNoel Grandin
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-09xmloff: ODF export: adapt all checks of ODFSVER_012 etc.Michael Stahl
Most of these actually want to check ODFSVER_EXTENDED because the extension didn't get into ODF 1.3. Change-Id: I1b625a329f7a3d146c616c62c15b56e2c314c2c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92872 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins