summaryrefslogtreecommitdiff
path: root/xmloff
AgeCommit message (Collapse)Author
2021-02-24restore namespace unwinding in SvXMLImportNoel
accidentally lost during the fastparser conversion Change-Id: I7d53e9f32dd8cff650b9ffb6dae493419ce8461f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110813 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-22tdf#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>
2021-02-22svx: fix unexpected large bezier shapes when created via the UNO APIMiklos Vajna
Regression from commit bc886f523872d4f9845c188c7d525d72a1a60946 (tdf#98584 Correct import draw:transform values skewY and matrix, 2020-01-02), then problem is was that now we handle the transform matrix for path objects the way ODF likes it, but this breaks UNO API clients with existing code. In an attempt to make everyone happy, revert the default to ignore scaling from the transform matrix, but add a way so that xmloff/ can opt in to handle it. This way the ODF import result doesn't regression and UNO API compatibility is not broken, either. Change-Id: I8d525e56954bf68c42d3629eca87fe9b513de507 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111340 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-22[API CHANGE] tdf#133423 Implement chart:regression-moving-typeSamuel Mehrbrodt
Change-Id: Icb967367fbf12e5a1566b7f18ebe5e3d8a3534f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110748 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-02-19update pchesCaolán McNamara
Change-Id: Ic4586057346b6de700c1bb6ff4cd759a11bb3e4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111231 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-19loplugin:refcounting in xmloffNoel
Change-Id: I739aa5914359edc4fdfdc341b09718ddbb7c04e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111121 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-18tdf#140486 forms "empty string is null" setting not loadedNoel Grandin
regression from commit 3de38e95561ab7ca114d9f3307702ba89c4e3e9a Date: Tue Nov 10 19:20:06 2020 +0200 use fastparser in forms Change-Id: I1e679bdca17185f20c1f755da16f02aa5661e22f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111123 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-18tdf#140198 Base text field will not retain multi-line settingNoel Grandin
regression due to a combination of commit 3de38e95561ab7ca114d9f3307702ba89c4e3e9a Date: Tue Nov 10 19:20:06 2020 +0200 use fastparser in forms and commit 3d0084770923ed8c17e496965abae862a4796e63 Date: Fri Dec 4 16:14:16 2020 +0200 fastparser in a couple of random places The first one introduced the bug, due to the fallback paths from fast to slowparser, things kept working, until the second one removed the fallback. Change-Id: I1aaae902eda2aaf8f5151404ddb3577f4582757d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111101 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-17loplugin:referencecasting in xmloffNoel
Change-Id: Ib601b7045d773ab612569a8fd00d76545dea13af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111055 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-11tdf#136011 convert numbers in categories to string during chart exportOuyang Leyan
When converting a Calc chart to a chart with an internal data source, multi-level categories consisting only in numbers are exported as double and not string. However, labels could only be generated from string values so the labels were lost in the converted chart. This commit allows labels to be generated from double values. Change-Id: I1cc1059f5157b782beb3eefccda5257b1bc2ca29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107858 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-10loplugin:refcounting also check OWeakObject subclassesNoel
Change-Id: I2d89085a22d7424c6f8f7662307433ce50fc61d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-09loplugin:referencecasting check for Reference::queryNoel
Change-Id: I008d16d933c70df132699872ac4c39a5c1f87b34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110592 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-08tdf#94235 Only write data-label-series attr to ODF 1.3 docsSamuel Mehrbrodt
Change-Id: I63cb49a29486f9ae64c7fe8af5c65be52683993f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110583 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-02-08update pchesCaolán McNamara
Change-Id: Icf55ddda055d11b649e7607c2cdd8b6d6ddfefbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110483 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-08tdf#94235 Add support for series name in data series labelsSamuel Mehrbrodt
including ODF/OOXML import/export (and test) Change-Id: Id5a5194630a67476f7c5390294400a00ea3ad42d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110338 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-02-07Remove unneeded breaks on xmloff/Andrea Gelmini
Extending this: https://gerrit.libreoffice.org/c/core/+/110512 I add a simple check about the subject. Change-Id: Iec63299f5c0a03f2ddd0e06549ddc9dba0fb28fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110514 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-05Make sanitiseMm100ToTwip simpler and more correctMike Kaganski
The result's absolute value is always smaller than n. Returning an uncorrected value taken from reversing multiplication and division order when intermediate value would overflow is better than arbitrary constant. Also further deduplicate Twips <-> 100th-mm conversion, and make sure they all are in a single header. Using conversion implementation that handles negatives correctly improves accuracy, as seen in unit tests; e.g. in testPictureEffectPreservation (the original doc had "dir" equal to "8100000", while we tested that it was "8076614" after roundtrip). Change-Id: Icd027af6238a9f45f916f53f8684506cc959e696 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110433 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-03tdf#91920 sw page gutter margin: add ODF filterMiklos Vajna
Note that the context filter is not set, since fo:margin affects left margin, but should not affect the gutter margin. Also put the new entry at the end, but before the header and footer sections, so the attribute is written to the correct XML element. Change-Id: I3588d4e76cd713efed168eb93b9456bba96727fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110375 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-01-29loplugin:stringviewparam extend to new..Noel
O[U]StringBuffer methods Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-28simplify code, use more subView()Noel
Change-Id: I569c7f34acbdf8451cd5c9acf1abd334637072d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110051 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-28add string_view variants of methods to O[U]StringBufferNoel
and update the stringview loplugin to detect cases where we can use these new methods. Change-Id: I998efe02e35c8efcb3abfb4d7186165bbe6dfb2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110046 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-17duplicate break (xmloff/txtimp)Julien Nabet
Change-Id: I17c63ec5d8accf6f9d2f33ef92cfa63acbd02f3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109473 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-01-17use ::Color in ColorPropertySet constructorNoel Grandin
Change-Id: I5649b39999de50d9f1fc33e2aef405be43069096 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109451 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-16make the Color constructors explicitly specify transparencyNoel
to reduce the churn, we leave the existing constructor in place, and add a clang plugin to detect when the value passed to the existing constructor may contain transparency/alpha data. i.e. we leave expressions like Color(0xffffff) alone, but warn about any non-constant expression, and any expression like Color(0xff000000) Change-Id: Id2ce58e08882d9b7bd0b9f88eca97359dcdbcc8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109362 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-15tdf#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. Change-Id: Ia3a6b2320e2288528c43c832211ebfcde492881e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109354 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-01-12tdf#42982: Improve UNO API error reportingBayram Çiçek
Change-Id: I78c6fed4e94f1ebfc772db4dec9955da7230bc3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109071 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2021-01-11xmloff: "form:datasource" vs. "db:data-source"Michael Stahl
Recently xmloff started to use XML_DATASOURCE for "form:datasource" but it actually means "data-source". Add XML_DATA_SOURCE and use it for "db:data-source". (regression from 3de38e95561ab7ca114d9f3307702ba89c4e3e9a) Change-Id: I893efd3fb0fb7c19ae998442459bf36cb1da0b20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109019 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-01-10fix coverity parse errorsCaolán McNamara
Change-Id: I4884bfb67a061b865e8cf38b2fea6de0cb1bc3d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109057 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-09fix coverity parse errorsCaolán McNamara
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-07Use o3tl::temporary in calls to OUString::iterateCodePointsStephan Bergmann
...that are not interested in the updated *indexUtf16 value Change-Id: Iaaa0fe45dcb54c4a8a347bcdb6fca6041218d009 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108941 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-04loplugin:stringviewparam: operator +=Stephan Bergmann
Change-Id: I30ce1b5bd8fb168da7067c1967c5af2569df2653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108512 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-31loplugin:loopvartoosmall fix buildCaolán McNamara
Change-Id: I2f9aa75f8e4f0577261fb84a9629c183d3a72b70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108534 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-31remove unnecessary list member counterJochen Nitschke
std::list::size() has constant complexity since C++11 Change-Id: I97c4b0a2d4fe899bcdf5fd2492fed69ed26c20e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108342 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-27Simplify loplugin:stringviewparam comparison operator handlingStephan Bergmann
In practice, it works fine to look at all of them, regardless of actual argument types. Change-Id: Ifc49cbcd6003c8837c1b3f81d432c59fb0657bf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108366 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-26vcl: use Color:IsTransparent() where appropriateChris Sherlock
Change-Id: I37bbab5f22f91faad65be8ef79734ce1ee6355d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108249 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-26New loplugin:stringliteralvarStephan Bergmann
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for details. (Turned some affected variables in included files into inline variables, to avoid GCC warnings about unused variables.) Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-26Improve handle of custom XML entitiesdante
Since 7.1 hasn't been released yet there's still time to change it before having to be scared about backguards compatibility. This way: - It is more efficient than passing two arguments - On definition it is simpler since both are declarated on same point. So it is simpler to not loose sync between lists. - Code is less long. - Thanks to an idea proposed by Stephan Bergmann on other commit. Change-Id: I16305a304c98eb8d4e11507c7938002da546778b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108028 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-23Directly create strings in *::MapTokenToServiceNameStephan Bergmann
...and pass them into XMLTextFieldImportContext and derived ctors. The assert in the XMLTextFieldImportContext ctor is moved up to the two MapTokenToServiceName functions. Change-Id: I75c76cd6129e79ad54ea87e7d3419ca49679875d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108235 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-23Fix dubious OUStringLiteral with automatic storage durationStephan Bergmann
Change-Id: I0c80ce6efbbc950ce975e55663a5643ea8fb37f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108215 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-22use string_view in ProcessAttributeNoel
Change-Id: I81feb01bf6823d1d8fb5a7da08490959484ef533 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108095 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-21use std::u16string_view in SvXMLTokenEnumeratorNoel
Change-Id: I1194441063047637adc20c8e37bb717fdb787714 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108073 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-19make *String(string_view) constructors explicitNoel Grandin
to make it more obvious when we are constructing heap OUStrings code and potentially inadvertently throwing away performance. And fix a handful of places so revealed. Change-Id: I0cf390f78026f8a670aaab53424cd31510633051 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107923 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-18use more string_view in IsXMLTokenNoel
Change-Id: Ib84e2e7db4b4e6e2486dd024d60057d9d42ff4b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107932 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-18use more string_view in convertEnumNoel
Change-Id: I859de4b908672722e1873c5b41cb456b42258ddd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107885 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-17use more string_view in SvXMLUnitConverterNoel
Change-Id: Id40a071e1abf0bf2e13217e8745fdf266010c1c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-17use views to parseNoel
Change-Id: I5fe1b6523a3d0b0d42c3ab5b7d0db3e30082efcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107762 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-17use views to parseNoel
Change-Id: I1e6678e18e5ef298021c818036b44c5b71b180fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107760 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-17use views to parseNoel
Change-Id: I6c396d37df3c0c823e9cf61738825a126e1a2cb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107763 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-17use views to parseNoel
Change-Id: I9c0b89c9463065323b1a86aee21163c97b75bb25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107761 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>