summaryrefslogtreecommitdiff
path: root/xmloff
AgeCommit message (Collapse)AuthorFilesLines
2020-09-15tdf#135942: avoid collecting autostyles during writing themMike Kaganski1-0/+2
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/+/102700 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-09-15tdf#124470: Split export of table autostyles out from collection phaseMike Kaganski1-0/+4
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. 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 Change-Id: Ida05e373eb8502590c43e2b0e85c3b0c1107c551 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102699 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-08-06tdf#130707 xmloff: survive <text:database-display> in editeng textMiklos Vajna5-16/+130
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 790ab54d7232d232ba84f17f285d4639ddba80d5) Change-Id: Ibe631ac5d94c1c7795dd00bad05fdcca0e6741a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100198 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-07-15tdf#131175 oox chart import: fix char color of <dLbl>, inherited from <dLbls>Miklos Vajna1-0/+20
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/+/98810 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-07-15Related: tdf#131175 OOXML chart: import data label fill patternGülşah Köse2-1/+4
(cherry picked from commit 6f752061d5153da50d6f536d506358c8f512a397) Conflicts: oox/source/drawingml/chart/seriesconverter.cxx Change-Id: I2db64489c86e4381167eb13af4ab5118113960d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98808 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-07-15tdf#131175 Import data label solid fill and color.Gülşah Köse4-0/+18
(cherry picked from commit 603df08a1e0211099ce2cf258cfe64a74ed6ded9) Conflicts: oox/source/drawingml/chart/seriesconverter.cxx Change-Id: I8a3ef6e60d4f2a13310bb9a8fc4eb873df3f9b4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98807 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-06-16disable spurious SAL_WARNNoel Grandin1-6/+9
in the FastParser case, those name/prefix fields in context are not initialised, so don't warn for that case Change-Id: I485dd1b86d81ea2b6f03fa6a8ecf5fb23d46a8e1 Reviewed-on: https://gerrit.libreoffice.org/83153 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96433 Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-06-15tdf#133459 Fix import of fields with user defined number formatsMaxim Monastirsky2-4/+17
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-06-15Add more debug to try to catch a slew of unhelpful messages.Michael Meeks1-1/+2
Change-Id: I905d54ade7fdce992b0ff6e81d51915b43acd2ed
2020-05-24tdf#103602 xmloff,sw: ODF 1.3 import: PageStyle with drawing-page styleMichael Stahl13-60/+182
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-24tdf#130479 FODG import: fix handling of <draw:fill-image> in stylesMiklos Vajna5-0/+362
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-23meta:non-whitespace-character-count attribute is knownhimajin1000002-2/+4
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-17Remove some redundantly user-declared copy ctors and assignment opsStephan Bergmann2-23/+0
...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-05-08xmloff: add ODF import/export for semi-transparent shape textMiklos Vajna1-0/+4
Test this from sd, so that SdModelTestBase::saveAndReload() calls BootstrapFixture::validate() for us. Change-Id: I6c90a3a71a5603604e69f9b45137bc8e4388dc0f Reviewed-on: https://gerrit.libreoffice.org/83371 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins (cherry picked from commit 4dbb33a1c21948bebcf890c2f8ceb56b15a87936)
2020-05-06sw from-bottom relative orientation: add ODF filterMiklos Vajna5-2/+22
Map between RelOrientation::PAGE_PRINT_AREA_BOTTOM and loext:vertical-rel="page-content-bottom". Conflicts: sw/qa/extras/odfexport/odfexport.cxx Change-Id: I1d614bf7c82a76285f4268b8008e08c25ef9b7f0
2020-04-28tdf#131979 Chart ODF import-export of Link to source formatBalazs Varga2-0/+24
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 Nabet1-1/+3
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 Monastirsky3-3/+80
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 Varga1-2/+0
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 Mehrbrodt1-6/+6
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 Grandin1-0/+5
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 Nabet1-2/+4
"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 Bunth1-0/+2
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 Bunth9-46/+185
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 Stahl1-0/+9
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 Mehrbrodt3-0/+3
* 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 Bunth6-9/+81
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 Zolnai1-24/+22
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 McNamara5-36/+38
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 McNamara3-29/+49
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 McNamara1-31/+52
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 McNamara1-7/+1
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 Grandin1-1/+1
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 Grandin1-2/+2
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 Bergmann1-1/+2
...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 Grandin1-12/+8
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 McNamara1-3/+5
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 McNamara1-1/+7
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 Grandin1-2/+28
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 Grandin2-0/+24
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 Grandin2-23/+24
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 Grandin2-31/+35
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 Grandin2-5/+5
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 Bergmann2-3/+3
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 Grandin2-7/+14
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 Bergmann4-10/+5
...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 Grandin2-4/+5
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 Varga1-0/+19
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 Grandin2-4/+3
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 Behrens1-0/+37
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>