summaryrefslogtreecommitdiff
path: root/include/xmloff
AgeCommit message (Collapse)AuthorFilesLines
2020-07-26sc: create instances with uno constructorsNoel Grandin1-1/+5
See tdf#74608 for motivation. Change-Id: Id4bf552c6a2580742bf46ccf6cdd2e09b0dbdebc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99455 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-01reorder parameters of SvXMLExport::SvXMLExportNoel Grandin1-1/+1
so they all have similar order Change-Id: Id8baef058d52f6cce9d9be41b0341eec8ad648b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97628 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-29OOXML/ODF Support for Shadow blur radiusA_GAN1-0/+1
Adding export support for OOXML. Adding import/export support for ODF Changing some values in test cases as convertEMUtoHmm round the fraction. Add two test functions for OOXML and ODF export. Change-Id: Ie5d862b46b5264ead4954f407fee2837b5151cd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96907 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-11tdf#133459 Fix import of fields with user defined number formatsMaxim Monastirsky1-0/+2
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>
2020-05-29tdf#103602 xmloff: ODF export: draw:background-size attributeMichael Stahl1-0/+1
... 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>
2020-05-29improve pahole script and pack a few classesNoel Grandin2-4/+19
(*) fix: I was substracting the padding space instead of adding it when calculating how much free space we had to improve. (*) sort input data, so we process structs located in the same DSO together, which reduces GDB's memory usage (*) handle another error condition, where gdbs output is sufficiently mixed up that we miss the end of commands terminator Change-Id: Ic4bb92b736f38a2b3d90e4a14485152b7f869b43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95041 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-24tdf#101181: drop useless "GlowEffect" boolean propertyMike Kaganski1-1/+0
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 Stahl1-3/+2
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-20meta:non-whitespace-character-count attribute is knownhimajin1000001-1/+2
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-19xmloff,filter: Flat ODF import: import BuildId from meta:generatorMichael Stahl1-0/+2
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 Kubota1-0/+1
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#103602 xmloff,sw: ODF 1.3 export: PageStyle with drawing-page styleMichael Stahl1-2/+4
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 Stahl4-1/+55
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#91306 xmloff: ODF export: allow style:page-number="0" in ODF 1.3Michael Stahl1-0/+1
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-15xmloff: remove unused SvXMLExport::getDefaultVersion()Michael Stahl1-3/+0
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 Stahl1-0/+3
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-11tdf#49247: no need in extra boolean property, radius is enoughMike Kaganski1-1/+0
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 Kaganski1-0/+2
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 Kaganski1-0/+2
... 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-08xmloff: ODF export: rework version checks in SvXMLExportPropertyMapperMichael Stahl2-2/+7
There's some issues with the version checks here: * The requirement is to retain support for ODF 1.2 extended, but some attributes are in ODF 1.3, while others require ODF 1.3 extended, so a single version number can't be used to compare * A recurring problem is that new extension attributes are erroneously exported to standard namespaces; there is the pre-existing buggy case of style:hyperlink to consider... * Currently it's possible to distinguish multiple extended version but the only minimum version that's actually used is the minimum one ODFSVER_012_EXT_COMPAT Rework this to use a different check, by: * distinguishing extension attributes from standard attributes via their namespace, to avoid such bugs by construction * interpreting the version number always as a standard ODF version number: if the attribute is in extension namespace: if the minimum standard version is met, ignore else: if the minimum standard version is met, export * adapting all XMLPropertyMapEntry to use ODFSVER_FUTURE_EXTENDED for extension attributes (TODO: check which of these should be ODFSVER_013) This should have an effect on the drawext:fontwork* attributes, which need ODFSVER_FUTURE_EXTENDED to be exported now. Change-Id: I986c8064e578a61d69ed5fdb261f23e7582a7d75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92856 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
2020-05-08xmloff: GetEarliestODFVersionForExport(-1) is impossibleMichael Stahl1-2/+1
Remove defensive programming nonsense to deal with situation that has apparently never been possible in git history. Change-Id: I3788cdcec5e1b4afa27e294ed91825bb33e8e633 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92729 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
2020-05-08replace ODFDefaultVersion usage with ODFSaneDefaultVersion...Michael Stahl2-2/+4
... in SvXMLExportPropertyMapper. The condition nCurrentVersion == SvtSaveOptions::ODFVER_UNKNOWN is impossible since d571a509aa324db9a425110a67ea142d157256b2. ODFVER_UNKNOWN isn't a value of ODFSaneDefaultVersion so use std::optional to handle the remaining usage. Change-Id: I1e33cb707c289224664a385b4e4425e6788b2943 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92728 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
2020-05-07xmloff: rearrange XML_NAMESPACE_* and add some commentsMichael Stahl1-27/+33
Change-Id: I65165da851ce7b6ef779163b5ac5346ee46a1ebb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92987 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-06sw from-bottom relative orientation: add ODF filterMiklos Vajna1-0/+2
Map between RelOrientation::PAGE_PRINT_AREA_BOTTOM and loext:vertical-rel="page-content-bottom". Change-Id: I1d614bf7c82a76285f4268b8008e08c25ef9b7f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93120 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-05-06tdf#101181: support for transparency attribute of glow effectMike Kaganski1-0/+1
Read/write support for ODF and OOXML (in ODF, loext:glow-transparency attribute of style:graphic-properties has been added). Added UI on glow sidebar panel. Not used in actual painting yet. Change-Id: I21b25d9c52c8611cd796f056374377ebf13cc2f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93565 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-04tdf#131175 Import data label solid fill and color.Gülşah Köse1-0/+2
Change-Id: I8a3ef6e60d4f2a13310bb9a8fc4eb873df3f9b4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93407 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2020-05-03use more compact namespace syntax in /includeNoel Grandin51-182/+179
excluding the UDK headers of course Change-Id: Iac7ab83d60265f7d362c860776f1de9d5e444ec0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93268 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-30Revert "Convert TokenContext to fastparser APIs"Noel Grandin1-1/+4
This reverts commit b7bfe6ae08f5b214f2d03d70a40b66c894c0b659. Reason for revert: I missed some call-sites which means this is not going to work properly, which also means we don't have any tests for this functionality :-( Change-Id: Ie340a5e2331609258e79176c3dd12249ad46ba7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93134 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-29Convert TokenContext to fastparser APIsNoel Grandin1-4/+1
Change-Id: Ib40e2f3d37c52b03f2ecbd67aaeed9605e644fea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93163 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-29simplify handling of comparing XML_NAMESPACE valuesNoel Grandin1-15/+26
Change-Id: I18bbf1ee206285842250891ce556d523489855b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-22tdf#42949 Simplify use of rtl::math::approxEqual in include/basegfx/Gabor Kelemen1-0/+1
Turns out we can save about 500Mb of preprocessor input if we use rtl_math_approxEqual from rtl/math.h instead of its C++ wrapper rtl::math::approxEqual from rtl/math.hxx and manage the fallout accordingly. Before: bin/includebloat.awk | head sum total bytes included (excluding system headers): 19017296671 After: $ bin/includebloat.awk | head sum total bytes included (excluding system headers): 18535432672 Change-Id: I1691171f3a309405a7099882ad9989d147f59118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92508 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-04-17tdf#131979 Chart ODF import-export of Link to source formatBalazs Varga1-0/+2
setting also into data point styles, fixing lost numbering style of custom data points. (Only export into the data series style was supported previously.) Also fix tdf#131115 - FILEOPEN: Incorrect format of single data label Regression from commit: e57d90cd4e51a1353eafc87bb29cfe6076704a7c (tdf#129173 tdf#129175 Fix number format of data labels) Data point styles in older ODF files do not contain the 'link-data-style-to-source' property, so they used the data series style property during the import previously. Now we set the default false value, if the data point style contains a 'data-style-name' (number format). Change-Id: I4786e62ca75770ed632463bcf1275ece7ea793f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91967 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-04-09tdf#127792 implement UNO chart attribute MajorOriginTünde Tóth1-0/+1
based on the specification in OFFICE-3936 for ODF 1.4: https://issues.oasis-open.org/browse/OFFICE-3936 Note: import of the embedded chart of the DOCX unit test document uses also ODF format in the background, testing also the extension of the native file format. Follow-up of commit 830e539547c463b932ce643517f880789185032d (tdf#127393 OOXML chart import: fix X axis position setting "CrossBetween"). See also commits with "ShiftedCategoryPosition" in their descriptions. Change-Id: I9cd278ac0172c0fab7c51d585a65c34a0ad60b82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90081 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-04-03loplugin:constantparamNoel Grandin1-4/+2
Change-Id: I9cdd15185cfa8347a08402da956eab7cbdd63de6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91609 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-29tdf#131632 animation effects are missing featuresNoel Grandin1-0/+2
regression from commit 5352d45dd4a04f8f02cf7f6ad4169126d3b3586a Date: Tue Feb 18 15:45:08 2020 +0200 convert AnimationImport to fast-parser APIs Change-Id: I7227b122213c877b8ea5db25239eae8151597a8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91320 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-23make more classes private in mergedlibs modeNoel Grandin5-10/+15
Change-Id: I486922d0652f26fa7ee56f5fe308e19fe5ff137e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90856 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-16Revert "loplugin:constfields in xmloff"Noel Grandin22-33/+33
This reverts commit 0302c9b192c3b7ba10daabed61d6864c24c14070. Change-Id: Ib919429e22ad039d6a82fe081f4e5421fe08905d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90549 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-06loplugin:unusedmethodsNoel Grandin1-4/+0
Change-Id: I698981490eb1391930cdd06821a80a5f770e000e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90109 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-06use more FastParser in ScXMLContentValidationContextNoel Grandin1-0/+2
Change-Id: I958d2ad1a8dc6c2a3da1c1a4fc6bd4f0011367fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90055 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-05tdf#75330 chart: implement ODF import/export of legend overlay featureTünde Tóth1-0/+1
Follow-up of commit 9fab1ba8ddc59924c633aa17c65f7330a4762726 (tdf#75330 add a new overlay/no-overlay feature for the legend). Change-Id: I7781fd8b926d4add56f3db0d56dceab8e27e5f85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89836 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-03-03tdf#101181 Implement glow effect on shapesTamas Bunth1-0/+3
Glow effect is a color-blurred outline outside of the shape. In ooxml document it is specified with the <a:glow> element. The commit contains the following: - Add support for importing and exporting <a:glow> from ooxml documents. - Assign new properties to XShape which stores glow-related attributes. - A new 2D primitive is introduced in module 'drawinglayer' which is responsible for representing the glow primitive which is to be rendered. + A glow primitive is a clone of the original shape which has been scaled up slightly and a new color has been assigned to it. The radius of the glow effect and the color is defined in the <a:glow> element being imported. - A blur algorithm is introduced in module 'vcl', which is called during rendering the primitive. + The blur algorithm works on a bitmap. + Since the algorithm is CPU-intensive, the result is cached in the processor and it is recalculated only if needed. - Add support for importing and exporting glow effect to ODF format. For that, new attributes of element <style:graphic-properties> has been added: + loext:glow, which can have the values "visible" or "hidden" + loext:glow-radius: which holds the radius of the glow effect in cm. + loext:glow-color: holds the color of the glow effect - Tests have been added to assert properties after pptx import and export. Change-Id: I836aeb5e0f24e2c8d5725834c8c0f98083bc82e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89125 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2020-03-03move some headers inside their moduleNoel Grandin1-32/+0
Change-Id: I026f920d475c4ce56a12d6b29a702673e8bd7a1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89866 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-02don't rely on parser ::characters callback only firing onceNoel Grandin1-1/+1
which is true for the old parser, but not always so for the FastParser. So pre-emptively fix some stuff Change-Id: I405834f1dfd28c98cae87b6de38d238f723edafd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89712 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-01use the SetAttribute override in SvXMLStyleContext subclasses consistentlyNoel Grandin1-1/+1
Change-Id: Ibdbf73c5e54fbbb051e4898fd8b3a7a155647b15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89702 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-27tdf#101710 Fix invalid style:data-style-name attributeMaxim Monastirsky2-0/+9
There were two problems with this attribute: 1. It was written in style:table-cell-properties instead of in style:style. 2. It was referencing a number format id, instead of a style name. Moreover, the data style wasn't even exported as part of office:styles (if at all). Both import and export were affected. For export, it was easily possible to reuse some related stuff from Calc, so that stuff was moved into xmloff and used from there (there are no logic changes for Calc). For import, loading of the invalid attribute was kept for compat reasons. Although it's only useful for automatic number formats, as the data styles weren't exported properly anyway (e.g. see the document attached in bugzilla). Change-Id: I8b70ad205972fada6f3845837d6ed5928d7d6406 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89551 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-27convert AnimationImport to fast-parser APIsNoel Grandin3-15/+16
And... (*) space out the namespace constant values so I dont keep forgetting and making them overlap. (*) Remove CreateDocumentContext from SvXMLImport since it is now unused. Change-Id: I30f54bfc1389e91b18e4fee8b83e1b297419899b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88938 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-27remove duplicate tokens from xmloffNoel Grandin1-35/+4
Which causes trouble when converting stuff to use FastParser APIs. I see we used to use dummy entries to avoid perfhash complaining, which is fine for exporting, but doesn't work when we use these constants for fast-parser importing, because the imported element/attribute ends up mapped to what looks like the "wrong" constant. So let's just make the constants match their textual representation. Change-Id: I173d4b1e5fedede18375a6f7c15b1f36a48e4063 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89627 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-27tdf#108110 ODF chart: import/export of custom position of data point labelsBalazs Varga1-0/+2
using new attributes loext:custom-label-pos-x and loext:custom-label-pos-y of chart:data-point. This fixes also *import* of DOCX documents with embedded charts, related to the ODF usage in the background. Follow-up of commit 4223ff2be69f03e571464b0b09ad0d278918631b (tdf#48436 Chart: add CustomLabelPosition UNO API property) Change-Id: I985ce27cb6ce988948258d9eab0de13d01c72b97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89446 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-02-27tdf#130908 Chapter Numbering can't load custom styleNoel Grandin1-0/+1
regression from commit 83e97fef3fa4de900eda35d02168fcae01c85eed convert ImportStoredChapterNumberingRules to XFastParser and add some more debugging trace Change-Id: I224b9c442369a4c6a7746d7ff419f069d3430513 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89633 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-26new loplugin:xmlimportNoel Grandin1-0/+3
to help me maintain the invariants when updating code to use the FastParser APIs. One weird invariant is that you need to override startFastElement or the createFastChildContext will not get called. Not all of these changes are probably necessary - some of the classes are never constructured themselves, only their subclasses are constructed, and their subclasses maintain the invariants, but it is just easier to scatter a few more startFastElement around Change-Id: I3f70fb5a1e44c311cf4926fa7b0fcda605709eac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89473 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>