summaryrefslogtreecommitdiff
path: root/xmloff
AgeCommit message (Collapse)Author
2021-08-23tdf#140437 ODF import: fix for broken documents with field code as typeMichael Stahl
Not sure how old the bug that caused this and which filter it was originally but currently the Word import filters don't do that any more. This causes an exception since commit dd24e21bb4f183048a738314934fc3f02ec093f1 so try to fix it up. Change-Id: I087586054ebd5698ed8e8a4054869df202226e92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111345 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit d62c93a831080ef332e416dc78f5600c2c5b9850) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111318 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 3a1c4dc5887eee7313fe3f6cb20202df89ac5457)
2020-09-23tdf#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> (cherry picked from commit 0273675e7dde577077ccca17571846a0942f2630) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102311 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-09-10tdf#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> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100274
2020-08-05tdf#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) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100038 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit fec8b842d701cca0b79af9ea9f6192a8cf7610b0) Change-Id: Ibe631ac5d94c1c7795dd00bad05fdcca0e6741a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100055 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-06-14tdf#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. Conflicts: sw/qa/extras/odfimport/odfimport.cxx 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/+/96267 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-05-23tdf#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> (cherry picked from commit 4e98ba4ba5c17ab8ae1170662af645b9d2bfde84) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94587 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-23tdf#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. (cherry picked from commit 96baf8c69330d50af7d31ab9838bcd0ec7c8c50b) Change-Id: I6d90f1470a5b797fb51789901081ccd7a6fd29e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94459 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-22meta: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> (cherry picked from commit acfd959f0b4069b74e76213e4118af9827005fff) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94460
2020-05-15Remove some redundantly user-declared copy ctors and assignment opsStephan Bergmann
...that trigger -Werror,-Wdeprecated-copy ("definition of implicit copy {constructor, assignment operator} for ... is deprecated beause it has a user-declared copy {assignment operator, constructor}") new in recent Clang 10 trunk (and which apparently warns about more cases then its GCC counterpart, for which we already adapted the code in the past, see e.g. the various "-Werror=deprecated-copy (GCC trunk towards GCC 9)" commits) Change-Id: Ie37bd820e6c0c05c74e1a862bb1d4ead5fb7cc9c Reviewed-on: https://gerrit.libreoffice.org/83698 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93694 Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-04-28tdf#131979 Chart ODF import-export of Link to source formatBalazs Varga
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> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92653 Tested-by: Jenkins
2020-04-10tdf#131966: chart legend attribs width and height unknown for ODF 1.2 (strict)Julien Nabet
Change-Id: Ie4cb7d2c9e5fb7bca88287fcaff03d5c9ca04b8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91899 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-03-03tdf#101710 Fix invalid style:data-style-name attributeMaxim Monastirsky
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). Conflicts: sw/qa/extras/odfexport/odfexport.cxx sw/source/filter/xml/xmlfmt.cxx xmloff/source/table/XMLTableExport.cxx Change-Id: I8b70ad205972fada6f3845837d6ed5928d7d6406 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89551 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 59ace23c367f83491a37e844d16f7d716eff6346) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89774
2020-03-02tdf#130955 chart export: fix repeated custom labelsBalazs Varga
Do not add mCustomLabelText to aDataPointVector when we write leading empty data points, it is enough to add them, when we write data-point with style. Note: this fixes also DOCX import, when the embedded charts are imported by using ODF export in the background. Regression from commit: 7d2c7e7af04d9604d86d2d605ef95b9abb10966c (tdf#123206 Store custom label as chart:data-label) Change-Id: Ib3b370236323a57ac6800035d71321f7ee5dbe41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89504 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89818 Tested-by: Jenkins
2020-02-28tdf#130917 Invalid document after odt->docx with signaturelineSamuel Mehrbrodt
Change-Id: Idf80c41f1315e0690dabd5e8566b62fc64c3ee1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89672 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
2020-02-27tdf#130908 Chapter Numbering can't load custom styleNoel Grandin
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> (cherry picked from commit 5320fccc290f338d344c5d3c75101c98057788cd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89583 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-23tdf#130133: fix wrong values for attribute chart:regression-type in ODF 1.2Julien Nabet
"polynomial" and "moving-average" Change-Id: I5d07d0315555e8b72ea721a35a2205a8223ed294 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87226 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 84c2b1ab7a8cf5d7f568ef05d4b2b25e783382b6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87253 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-01-08tdf#123206 Add test: import custom-label-fieldTamas Bunth
Add test for deprecated custom-label-field attribute of the data-point element. Change-Id: I9a7619898fa72900323e5b41728d2146c14203e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86103 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86123 Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-01-08tdf#123206 Store custom label as chart:data-labelTamas Bunth
Use the chart:data-label element instead of using the loext:custom-label-field attribute. chart:data-label stores can be a child of chart:data-point and it may contain a text:o element for holding one or more paragraphs of custom label text. This commit aims to export and import chart:data-label with paragraphs put into different text:span elements. These span elements may hold a text:style-name attribute in order to achieve formatted text. This structure is already in the ODF format. Change-Id: I0bea7ce1a16af9c47b33555e18545bdaae7e95ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85659 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86122 Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-12-29tdf#129520 xmloff: fix ODF import of multi-paragraph fieldmarkMichael Stahl
The problem is that inserting PARAGRAPH_BREAK also calls AppendTextNode() internally, not SplitNode(). (regression from 6eb1c2304d257d16858b7b51cad63f1dc2bde88b) Change-Id: I2d33819a973c956ea04925458c904ce36ccb55a3 Reviewed-on: https://gerrit.libreoffice.org/85627 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 027a7c8e02c6b023dcf9e26b68c0f339bd4c74c6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85749 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-12-07tdf#121658 Add option to not hyphenate words in CAPSSamuel Mehrbrodt
* Add checkbox to pagraph dialog * Store property in paragraph model * Move docx import/export from grabbag to paragraph model * Add ODF import/export * Add ODF unit test * Add layout test Change-Id: Id4e7c5a0ad145c042f862995d227c31ae2aa0abd Reviewed-on: https://gerrit.libreoffice.org/83979 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 72bd0df107ee47c4d54fa88b4960d32ea03e9f69) Reviewed-on: https://gerrit.libreoffice.org/84620
2019-12-02tdf#123206 Import/Export chart custom label textTamas Bunth
OOX import supports custom label texts in chart diagrams (produced by e.g. double clicking on a data label, and write custom text), but - since embedded objects are exported and imported to odf right after migration - it is not displayed in case of a Writer document. In order to make it work, we have to support custom label text in the odf structure. This commit only allows the import/export of pure text, it should be improved to store and load formatted string. A new XML token is added, which currently refers to an attribute of the chart:data-point tag. If we want to store formatted string, something more clever has to be done. Change-Id: I80c4a3a0dbcf59f1dc732d795fb716da318411cb Reviewed-on: https://gerrit.libreoffice.org/80156 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/84076
2019-11-28tdf#128985: ODP: Style text directions revert to RTL on save and re-openTamás Zolnai
First we need to check duplicate writing modes and then ignore the defult LR_TB writing mode. Change-Id: I166141abd6286fc48c095ef92751e420fb197b3e Reviewed-on: https://gerrit.libreoffice.org/83785 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 6f62a5c4ee2c1b7654c7fcaa618fb495e0d32f0a) Reviewed-on: https://gerrit.libreoffice.org/83896 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-11-12rename now it does more than just sortCaolán McNamara
Change-Id: Ia0adffc592105efeeebfeb8fc67570d3f6d844f1 Reviewed-on: https://gerrit.libreoffice.org/82544 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-12tdf#127791 defer import of group shape events until the group is poppedCaolán McNamara
otherwise the group shape import applies the events over the children it has when it reads the events which is 0. We already push and pop groups for sorting so reuse that to store and apply the events to groups Change-Id: I3f31796f9e8d3d11df6f3ba12a32be920a228155 Reviewed-on: https://gerrit.libreoffice.org/82516 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-12refactor SdXMLEventContext to make a separate SdXMLEventContextDataCaolán McNamara
Change-Id: I5614be3bf99ce3529c4a1ef5a0b5d0d7417b1e46 Reviewed-on: https://gerrit.libreoffice.org/82515 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-12revert: tdf#127791 write events at the end of groups instead of the startCaolán McNamara
i.e. commit 1b2146431a583be27518536bed19ef01861b42a0 Author: Caolán McNamara <caolanm@redhat.com> Date: Wed Nov 6 16:31:00 2019 +0000 tdf#127791 write events at the end of groups instead of the start because the group shape import applies the events over the children it has when it reads the events, so putting it before exportShapes means it get applied over 0 children works in practice but not in theory e with '#' will be ignored, and an empty message aborts the commit. Change-Id: Iab4ac31297bbe4d6c4133766c79247d70c036f6d Reviewed-on: https://gerrit.libreoffice.org/82514 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-12use std::move when popping stuff off stacksNoel Grandin
Change-Id: I6ba0ee8afee1a9579045643cd0118cf19599d5b9 Reviewed-on: https://gerrit.libreoffice.org/82497 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-11reduce some ref-countingNoel Grandin
Change-Id: I7b372237c21c469f78be281eedbbdda217fd12c8 Reviewed-on: https://gerrit.libreoffice.org/82442 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-11Fix SvXMLImportContext::queryInterface for nowStephan Bergmann
...introduced with <https://gerrit.libreoffice.org/#/c/82139/> "tdf#125688 removing XWeak support from SvXMLImportContext", even if that whole commit is likely to be redone differently again (see Gerrit comments there) Change-Id: I5b88400181efd76a896d07676230b0e7cb75f1f0 Reviewed-on: https://gerrit.libreoffice.org/82417 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-09micro-optimisationNoel Grandin
Change-Id: I392b897be4f78bf368149ac47646c3d79790fd96 Reviewed-on: https://gerrit.libreoffice.org/82342 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-07fetch the values just onceCaolán McNamara
Change-Id: I915dbba18f560cedf4dc719b25c889e8b02aa0c2 Reviewed-on: https://gerrit.libreoffice.org/82212 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-06tdf#127791 write events at the end of groups instead of the startCaolán McNamara
because the group shape import applies the events over the children it has when it reads the events, so putting it before exportShapes means it get applied over 0 children Change-Id: If7d09865a7a34d8d13440eb559ec97580792bd4e Reviewed-on: https://gerrit.libreoffice.org/82160 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-06tdf#125688 removing XWeak support from SvXMLImportContextNoel Grandin
shaves 2% off the load time Change-Id: Icac00389dfcc3339fe4faf1731e9eeb3ff8d0f0c Reviewed-on: https://gerrit.libreoffice.org/82139 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-06convert ImportStoredChapterNumberingRules to XFastParserNoel Grandin
Change-Id: I80ceed4bf2e767b86aedd1dd7bf4f892e3077138 Reviewed-on: https://gerrit.libreoffice.org/82132 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-06loplugin:indentation find broken if statementsNoel Grandin
so I don't read the "then" block as being a sequential statements Change-Id: Ib2004acd3518bd4ebd2246f02a26c2c0a8bbab4c Reviewed-on: https://gerrit.libreoffice.org/82069 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-03size some stringbuffer to prevent re-allocNoel Grandin
I started with 32 and kept doubling the size until the site did not need re-alloc, but clamped it at 512. Change-Id: I55fe36b31cd3d40f86e5729337a927cf920f2af6 Reviewed-on: https://gerrit.libreoffice.org/81960 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-03loplugin:stringaddNoel Grandin
tweak the plugin to be more permissive, then validate by hand afterwards Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654 Reviewed-on: https://gerrit.libreoffice.org/81942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-02New loplugin:conditionalstringStephan Bergmann
Change-Id: I2eab990c15f845b44a3b598571aca361dadf9ff3 Reviewed-on: https://gerrit.libreoffice.org/81946 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-31tdf#125688, cache token names as OUStringNoel Grandin
to avoid construction cost, shaves 2% off load time Change-Id: I37a70a6e989f53d67911a6cb217d07e2db55cb44 Reviewed-on: https://gerrit.libreoffice.org/81841 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-31Fix StringAdd::isCompileTimeConstantStephan Bergmann
...to find StringLiteral on the RHS of +=. Which revealed that the VisitCompoundStmt/checkForCompoundAssign logic needed to be fixed, too, so that s += side_effect(); s += "literal"; s += side_effect(); only gets combined to s += side_effect() + "literal"; s += side_effect(); and not all the way to s += side_effect() + "literal" + side_effect(); Change-Id: I432e3458b933a7d0ad6141c747b675cc8b0f0ba4 Reviewed-on: https://gerrit.libreoffice.org/81804 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-31tdf#125688 speed up load of change-tracking ODSNoel Grandin
by 10%, by avoiding an OUString construction in a hot path through XMLTextColumnContext_Impl::XMLTextColumnContext_Impl -> sax::Convert::convertNumber Also changed XMLTextAnimationStepPropertyHdl::importXML to take advantage of the modified convertNumber passing convention. Change-Id: I4e5503dbb094c88a09af8b6dc8c22b6c53f9eb75 Reviewed-on: https://gerrit.libreoffice.org/81726 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-30tdf#128432 OOXML chart import: fix x axis scale regression of 3D chartsBalazs Varga
Set 3D charts ShiftedCategoryPosition value to default true in case of BarDiagram and StockDiagram. Regression from commit: 111c260ab2883b7906f1a66e222dbf4dc3c58c4f tdf#127777 OOXML chart export: fix "CrossBetween" for not imported charts Change-Id: I5bf0e6f6e7ad96e6c96c01ab18d74d51419f5e3c Reviewed-on: https://gerrit.libreoffice.org/81695 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-10-28loplugin:stringadd improve detectionNoel Grandin
if one side of the expression is a compile-time-constant, we don't need to worry about side-effects on the other side Change-Id: Iee71ea51b327ef244bf39f128f921ac325d74e2b Reviewed-on: https://gerrit.libreoffice.org/81589 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-25speed-up shape import if shapes need z-order rearrangingKatarina Behrens
setting z-order individually on each shape and broadcasting is O(n^2) (remaining shapes also need reordering) and this is bad bad bad for performance Change-Id: Ic9c9137a097f6ff524192693910f221885f77cc4 Reviewed-on: https://gerrit.libreoffice.org/75055 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-25xmloff: create XMLDrawMetaExportOasis instances with an uno constructorMiklos Vajna
See tdf#74608 for motivation. Change-Id: I6dc4fcd75517c137c1bd4de766f67b73eaff1788 Reviewed-on: https://gerrit.libreoffice.org/81480 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-23xmloff: ODF import: reimplement fieldmark-start/fieldmark-endMichael Stahl
This needs to work in a similar way to writerfilter, because it has the same problem: fieldmark has 3 positions but attach() only recieves 2 positions. Insert the fieldmark at the fieldmark-start and move the cursor before the CH_TXT_ATR_FIELDEND character, and when the fieldmark-end arrives, move the cursor forward again. This will slightly change the import of invalid documents, e.g. when a fieldmark-end is missing, but that seems not so important and without a name attribute on the fieldmark-end we can't do any better. Change-Id: I3f0bd738277f56a999e79e4def911101b64b07e7 Reviewed-on: https://gerrit.libreoffice.org/81082 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-23size some stringbuffer to prevent re-allocNoel Grandin
Change-Id: I385587a922c555c320a45dcc6d644315b72510e9 Reviewed-on: https://gerrit.libreoffice.org/81278 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21size some stringbuffer to prevent re-allocNoel Grandin
found by the simple expidient of putting asserts in the resize routine. Where an explicit const size is used, I started with 32 and kept doubling until that site did not need resizing anymore. Change-Id: I998787edc940d0a3ba23b5ac37131ab9ecd300f4 Reviewed-on: https://gerrit.libreoffice.org/81138 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-20loplugin:virtualdead unused param in RedlineAdjustStartNodeCursorNoel Grandin
Change-Id: Ic8eaad705b0cf8289035f7eee3ad01439fc24ee7 Reviewed-on: https://gerrit.libreoffice.org/81155 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-20loplugin:virtualdead unused param in XMLEventContextFactory::CreateContextNoel Grandin
Change-Id: I6fda2e04724d69fd218ffc85f9881b429714e63b Reviewed-on: https://gerrit.libreoffice.org/81154 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>