summaryrefslogtreecommitdiff
path: root/xmloff/source/style/xmlexppr.cxx
AgeCommit message (Collapse)Author
2022-08-28tdf#150407 do not use loext in save in ODF strictRegina Henschel
The 'bt-lr' attribute value of 'writing-mode' attribute and the 'page-content-bottom' and 'page-content-top' values of 'vertical-rel' attribute are not part of ODF 1.3. Therefore they need to be saved in 'loext' extended namespace. Error was, that this was done too, if the current ODF version is strict. That results in an invalid file in a productive build and a failed assert in SvXMLNamespaceMap::GetQNameByKey() in a debug build. Change-Id: Ie9ba99fdd02de21a2467b236409daa951933f011 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138595 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> (cherry picked from commit 64be7052ba7e02e248412222098e07a5f4106456) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138541 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 34edaf8249107c4216fdaffe450d287a1908a0de) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138547
2021-09-03clang-tidy:readability-redundant-member-initNoel Grandin
Change-Id: Iede70151af052505b780c6ce708aa74d97da5c75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121545 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-25use officecfg to retrieve OdfDefaultVersionNoel Grandin
Change-Id: Id54b98d978965e7ce304b83d5eff7d6c844a41d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119474 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-20no need to allocate Sequence separately in FilterPropertiesInfo_ImplNoel Grandin
Change-Id: I8a10d2c0a31624cfefa485ae1a7d080f96d2b83e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119218 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-10tdf#138209 ODF export: work around forms problem in LO < 7.0Michael Stahl
LO without commit 519d96fd8b83ef4c61576d87b58f97b7e6e6e3c6 makes a mess when storing form documents it has loaded from ODF 1.3 documents: the XML parts are stored as ODF 1.2, but the storage (and therefore manifest entry) keeps version 1.3. To avoid this, store form documents as ODF 1.2 extended by default. Unfortunately a bunch of ODF export code accesses the global SvtSaveOptions variable; with this version override, only SvXMLExport::getSaneDefaultVersion() must be used. Change-Id: I5fa8e286f5103c578ed0d93da07a8a6cbe2f0ddd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115357 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-05-01remove superfluous loop variableJochen Nitschke
Change-Id: I418ea4b1770b82541bae8901d8d1b78d36cfb5d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114920 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-27loplugin:stringadd convert chained append to +Noel Grandin
which can use the more efficient *StringConcat Also fix a crash in stringview plugin which started happening while I working on this. Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568 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>
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-10-29tdf#137627 sw top page border orientation: add ODFSzabolcs Toth
Map between RelOrientation::PAGE_PRINT_AREA_TOP and loext:vertical-rel="page-content-top". Follow-up of commit 1c593e1916c9164c7db71da2017cfc26972f8e9f (tdf#133045 sw: add shape alignment to the top page border). See also commit 65b7873aab5deec7157328047e869a6385e0a74a (sw from-bottom relative orientation: add ODF filter). Change-Id: I9bff7a9507152262dda7d126fa3e7e1bee6a8276 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104554 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-09-11optimisation: use o3tl::sorted_vector in XMLPropertyStates_ImplNoel Grandin
Change-Id: I9774e0d3f29decedd910fafe3c3174bab930f521 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102438 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-11optimisation: used std::vector for list of integersNoel Grandin
Change-Id: I98b211d632f0282faeaa30e971841faae89bfeff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102440 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-18Fix typosAndrea Gelmini
Change-Id: I85a91d24943430b42217ac91611f182059d8ec69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100919 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-14rename xmlnmspe -> xmlnamespaceNoel Grandin
Change-Id: I8fdf9833dede6f4c9ba4bbb76b9ab9b6b419f155 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100722 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-14rename nmspmap.hxx -> namespacemap.hxxNoel Grandin
we're not in DOS anymore, Dorothy Change-Id: I79926e0d694163940ba7ebf20419724dd0a486f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100721 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-24use more std::container::insert instead of std::copyNoel Grandin
which is both more compact code, and more efficient, since the insert method can do smarter resizing Change-Id: I17f226660f87cdf002edccc29b4af8fd59a25f91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-09xmloff: ODF export: adapt all checks of ODFSVER_012 etc.Michael Stahl
Most of these actually want to check ODFSVER_EXTENDED because the extension didn't get into ODF 1.3. Change-Id: I1b625a329f7a3d146c616c62c15b56e2c314c2c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92872 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
2020-05-08xmloff: ODF export: rework version checks in SvXMLExportPropertyMapperMichael Stahl
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 Stahl
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 Stahl
... 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-07replace ODFDefaultVersion usage with ODFSaneDefaultVersionMichael Stahl
Compare with ODFSVER_012 mostly works the same, except for places where namespaces are defined where the ODFSVER_EXTENDED bit should be checked. Change-Id: I86469b763bc2f903632976bc9d6ec04d543d705e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92727 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-06sw from-bottom relative orientation: add ODF filterMiklos Vajna
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-03-16Revert "loplugin:constfields in xmloff"Noel Grandin
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>
2019-08-16loplugin:sequenceloop in xmloffNoel Grandin
Change-Id: I1fde11da5f6e97255a9140f11c298d6d525f7230 Reviewed-on: https://gerrit.libreoffice.org/77543 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-11Simplify Sequence iterations in xmloff/source/{style..xforms}Arkadiy Illarionov
Use range-based loops or replace with comphelper or STL functions Change-Id: Ie268d80b9c01d38c745c14a81c219d9930860562 Reviewed-on: https://gerrit.libreoffice.org/72189 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-13tdf#107592 Impress PPS save to ODP slowNoel Grandin
Takes the time from 20s to 5s on my PC. Change-Id: Iea7a94ee9fbe068b69a770fd9201e73646be59b9 Reviewed-on: https://gerrit.libreoffice.org/72140 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-30sw btlr writing mode: implement ODF filter for textframesMiklos Vajna
Layout is still not yet correct right after the import, though. Change-Id: Icdba2e8d608f35b6b5b43b88ffb223f779af1b89 Reviewed-on: https://gerrit.libreoffice.org/71552 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-22tdf#42949 Fix IWYU warnings in include/xmloff/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Id20e0bc42e39f868a7c5d49d756f2ad5e14a86c0 Reviewed-on: https://gerrit.libreoffice.org/66637 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-11Replace OUStringBuffer::appendCopy with append(std::u16string_view)Stephan Bergmann
...which is more general Change-Id: I94f28f8eda887120cf5f143b4549e0339b60e6a7 Reviewed-on: https://gerrit.libreoffice.org/66155 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-20use unique_ptr in xmloffNoel Grandin
Change-Id: I98fc0630308e51fcc5eb0224af77881eebf0ff0f Reviewed-on: https://gerrit.libreoffice.org/65443 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-26remove some unused enum values in xmloffNoel Grandin
(*) also make it more obvious what XMLShapeExportFlags::SIZE represents Change-Id: Ie63edf0f2827f171542037b819ebe7d55e090275 Reviewed-on: https://gerrit.libreoffice.org/63948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-26tdf#42949 Fix IWYU warnings in include/unotools/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444c43b9d549977039f25bec2b5bf666c3e15e0e Reviewed-on: https://gerrit.libreoffice.org/62041 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-20pvs-studio: loop-variable-too-smallCaolán McNamara
Change-Id: Ie4aafecd17cf53ab3cbab2003b59da374d06e06b Reviewed-on: https://gerrit.libreoffice.org/62058 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-19loplugin:staticvar in xmloffNoel Grandin
Change-Id: I283d162807a906334627613be7c340af566144f1 Reviewed-on: https://gerrit.libreoffice.org/61921 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-13loplugin:constfields in xmloffNoel Grandin
Change-Id: I9623e6b483b28f5b50a2c76016bcc319b375a35a Reviewed-on: https://gerrit.libreoffice.org/60394 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-13loplugin:simplifyconstruct in writerfilter..xmlsecurityNoel Grandin
Change-Id: Ic2d901ca0dbc2d6fa96611d260c1572da8a783c0 Reviewed-on: https://gerrit.libreoffice.org/60398 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-10tdf#42949 Fix IWYU warnings in include/cppuhelper/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib420e9216b8313f5ed7634ec375e39ceb741fd45 Reviewed-on: https://gerrit.libreoffice.org/59297 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-29new loplugin:oustringbufferNoel Grandin
look for places where we are appending the temporary result of adding strings together, to an OUStringBuffer, where we could rather call append repeatedly and avoid the temporary creation Change-Id: I481435124291ac7fb54b91a78344a9fe5b379a82 Reviewed-on: https://gerrit.libreoffice.org/59708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14create appendCopy method in OUStringBufferNoel Grandin
so we can avoid temporary copies when appending a substring of an OUString to the buffer. I would have preferred to call the method just "append" but that results in ambiguous method errors when the callsite is something like sal_Int32 n; OUStringBuffer s; s.append(n, 10); I'm not sure why Change-Id: I6b5b6641fcb5b26ce2269f89ef06e03c0b6aa76f Reviewed-on: https://gerrit.libreoffice.org/58666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-17loplugin:useuniqueptr in SvXMLExportPropertyMapper::ImplNoel Grandin
Change-Id: I10729d720338ad3fc0d9507491b6255dd53a3173 Reviewed-on: https://gerrit.libreoffice.org/57512 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-29loplugin:unusedfields-in-constructor in xmloffNoel Grandin
fields that are only referenced in the constructor Change-Id: I44bddb2dce2f30c21ea0f1ada4c1615c854d3334 Reviewed-on: https://gerrit.libreoffice.org/54823 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-15Fix typosAndrea Gelmini
Change-Id: Icb2d5f8bb9eb781d6a59384e1aac75abf6145774 Reviewed-on: https://gerrit.libreoffice.org/51337 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-12More loplugin:cstylecast: xmloffStephan Bergmann
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: Ic872cef7bb9982305528ec3ce12a1871f055b752
2017-12-03Use for-range loops in xmlexppr (xmloff)Julien Nabet
Change-Id: I65b20b98082db6cd2bda17f527f7ade7a1123a97 Reviewed-on: https://gerrit.libreoffice.org/45743 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-14clang-tidy modernize-use-emplace in xmloffNoel Grandin
Change-Id: I55bf75b5505d01cb33f26fac4603afdb3b4f1780 Reviewed-on: https://gerrit.libreoffice.org/42262 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11convert std::map::insert to std::map::emplace IINoel Grandin
Change-Id: Ief8bd59c903625ba65b75114b7b52c3b7ecbd331 Reviewed-on: https://gerrit.libreoffice.org/41019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-14use more OUString::operator== in test..xmlsecurityNoel Grandin
Change-Id: If5bdd1532be44a47ff7cc3b769be3ea585aea562 Reviewed-on: https://gerrit.libreoffice.org/39685 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05new loplugin unnecessaryparenNoel Grandin
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08loplugin:checkunusedparams in xmloffNoel Grandin
Change-Id: I59d2cb1f69882b62e6fe732e9d9214feec8a79a2 Reviewed-on: https://gerrit.libreoffice.org/37283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>