Commit Graph
1198 Commits
Author SHA1 Message Date
BaiXiaochun 7838efe4b7 Purge out rtl::math::setNan
Change-Id: If8794c105e279afd4437517d3e61f2f900eb6490
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118123
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-30 09:52:45 +02:00
Noel Grandin bfc1600c6a loplugin:indentation improve checks for brace alignment
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-28 10:47:34 +02:00
Julien Nabet 57796f2724 Simplify Sequences initializations (writerfilter/writerperfect/x*)
Change-Id: I1bd31fe6cf0f8aaf4f2cfe1d3d49e61a0633f361
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117057
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-06-11 16:03:10 +02:00
Michael Stahl 16de54a5c4 tdf#138209 ODF export: work around forms problem in LO < 7.0
LO without commit 519d96fd8b 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-10 21:07:40 +02:00
Noel Grandin 7cc1d3437a loplugin:unnecessaryparen small improvement
when calling a function, and passing only one arg, but the
function has defaulted args, we were ignoring this case.

Change-Id: I86517f18e30531127664088ddc09ef96dbd8bdf5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115033
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-03 14:03:54 +02:00
Stephan Bergmann 10d29c390d throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewrite
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-02 17:02:28 +02:00
Mike Kaganski a0656ec6fc const OUString -> const OUStringLiteral
Mostly automated rewrite

Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-25 10:06:26 +01:00
Vincent LE GARREC aef40e7388 tdf#124176 Use pragma once in x*
xmlhelp, xmloff, xmlsecurity

Change-Id: I80c6fa806387f3dcba8be7f93fe2fef146b033e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112050
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-03-23 13:14:42 +01:00
Samuel Mehrbrodt 4141533a3f [API CHANGE] tdf#133423 Implement chart:regression-moving-type
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-22 07:36:21 +01:00
Ouyang Leyan 4a9d257bec tdf#136011 convert numbers in categories to string during chart export
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-11 15:59:42 +01:00
Samuel Mehrbrodt 505a8f4889 tdf#94235 Only write data-label-series attr to ODF 1.3 docs
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-08 19:31:58 +01:00
Samuel Mehrbrodt b99f310d3b tdf#94235 Add support for series name in data series labels
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-08 07:52:27 +01:00
Andrea Gelmini 96a38db6e5 Remove unneeded breaks on xmloff/
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-07 09:44:01 +01:00
Noel Grandin 14d61304c3 use ::Color in ColorPropertySet constructor
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-17 09:45:34 +01:00
Noel 63a68064bb make the Color constructors explicitly specify transparency
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-16 10:07:07 +01:00
Caolán McNamara ac396f2f6b fix coverity parse errors
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-09 13:01:49 +01:00
Stephan Bergmann a3d0091d18 New loplugin:stringliteralvar
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-26 14:51:15 +01:00
Noel 8e6ec5ebcc use more string_view in IsXMLToken
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-18 09:29:49 +01:00
Noel d9b8670548 use more string_view in convertEnum
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-18 07:56:54 +01:00
Noel 95283f63fd use more string_view in SvXMLUnitConverter
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-17 14:05:21 +01:00
Noel 97e2bd8378 use views to parse
Change-Id: I4cdf09f4ce8dc399fa5ae4620191a2ad2e7f78da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107759
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-16 08:42:53 +01:00
Noel a79e6a7cf1 use views to parse rather than allocating OUString
Change-Id: If0a848c64ce8077d1681661873629c83307cf8b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107736
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-15 10:50:28 +01:00
Noel 1b69f0c273 use more direct parsing on FastAttributeList
instead of first allocating an OUString

Change-Id: I796b1b2d47eb3cb9bebb00ae1bbd465010ebf494
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107691
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-14 17:46:15 +01:00
Stephan Bergmann 35e471bb4d Adapt the remaining OUString functions to std string_view
...for LIBO_INTERNAL_ONLY.  These had been missed by
1b43cceaea "Make many OUString functions take
std::u16string_view parameters" because they did not match the multi-overload
pattern that was addressed there, but they nevertheless benefit from being
changed just as well (witness e.g. the various resulting changes from copy() to
subView()).

This showed a conversion from OStringChar to std::string_view to be missing
(while the corresponding conversion form OUStringChar to std::u16string_view was
already present).

The improvement to loplugin:stringadd became necessary to fix

> [CPT] compilerplugins/clang/test/stringadd.cxx
> error: 'error' diagnostics expected but not seen:
>   File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd]
>   File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd]
> 2 errors generated.

Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-11 21:25:10 +01:00
Noel c3f628e790 remove now unused XML_TOK_ constants
Change-Id: I73da015abc824194b88c53b87170c987d24080a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107411
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-08 18:59:23 +01:00
Noel Grandin 7896173f7f fastparser in styles
Change-Id: I39d285f1dd7dd18c396db96863f77f511741951c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107364
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-08 07:50:58 +01:00
Noel b541cd9a80 loplugin:unusedmethods
Change-Id: Ib51fd610c5188fe95872d509f004ae88f38c5417
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107351
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-07 16:59:28 +01:00
Noel Grandin 5080bb930d convert SvXMLImport to fastparser, drop slowparser paths
Change-Id: I0f880a7680373043fecf083cdf4de8b0bb7041a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103775
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-07 08:52:49 +01:00
Noel 15c5da78ec fastparser in CreateGroupChildContext
Change-Id: I3e3e6785fdedb27353e4d97a9a2bea71c6f2b24a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107189
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-04 11:58:33 +01:00
Noel 07028e4026 fastparser in SchXMLDomain2Context
Change-Id: Ie55eb55d8ec4c8acd02dd24d19fe7f4b2b017a54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106865
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-30 18:37:16 +01:00
Noel 93ab6a682d fastparser in SchXMLDataLabelContext
Change-Id: I373f8cc91e4e8eea470cd81b439de2ef66d8a3b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106864
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-30 17:19:14 +01:00
Noel 8332d6d820 loplugin:stringviewparam include comparisons with string literals
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-30 12:32:14 +01:00
Noel d05a4cfbdc fastparser in shapeimport
Change-Id: I11227424647313ff5c5d54126bdc27a17da3932e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106851
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-30 12:09:54 +01:00
Noel 50559ad1e3 fastparser in SchXMLDocContext
Change-Id: I15edc8de34ba6a21eec19ad2636d807ecf1e100b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106777
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-28 09:46:03 +01:00
Stephan Bergmann ffa24aa035 Fix typo in comment
...introduced with cfddbf52ea "Fix typo"

Change-Id: Id3888f0216a7702d7f09d25d069d50f64859eff9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106714
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-11-27 01:57:24 +01:00
Andrea Gelmini cfddbf52ea Fix typo
Change-Id: I9bc856d4d7370f2a5fa09001d5b8b933bc72e96f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102095
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-11-26 21:11:11 +01:00
Noel c8a2550b6a use string_view for the parsing in sax utils
Change-Id: Ifd7430501318684f9999c90dd36c1ca965373947
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106499
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-25 07:13:26 +01:00
Noel bb06f51308 loplugin:stringviewparam extend to comparison operators
which means that some call sites have to change to use
unicode string literals i.e. u"foo" instead of "foo"

Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-24 09:45:04 +01:00
Ouyang Leyan fd5f3b212a tdf#134059 Always include hidden cells in chart series label
Change-Id: I92ff60b26af713a49fefd8b2ce8042f4e8e4d179
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106317
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-23 07:31:06 +01:00
Noel Grandin bcd263da24 fastparser in SchXMLSeries2Context
Change-Id: I609333f732cb8c428f1c9e3fca24e2df3146de12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106075
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-19 20:58:30 +01:00
Philipp Hofer c927d6daa9 tdf#123936 Formatting files in module xmloff with clang-format
Change-Id: I4d9016a0e646da5d9f0044762f6ecce86ce1242b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105732
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-19 19:25:20 +01:00
Noel Grandin 890849a9fc fastparser in SchXMLTextListContext
Change-Id: I27c4bcdc9c2e6131b651332301e01ead3393025d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106077
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-19 14:05:45 +01:00
Noel Grandin 85c0238556 fastparser in SchXMLTableContext
Change-Id: I6cccd109218a9f3adea311df86408ee1d1fe332f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106076
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-19 14:00:50 +01:00
Noel Grandin daf71f32cb fastparser in SchXMLRegressionCurveObjectContext
Change-Id: If630576d7583031a56960d2ddc87c2d0e37aa8ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106074
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-19 12:59:37 +01:00
Noel Grandin 560baa7e6d fastparser in SchXMLDataPointContext
Change-Id: I086f3b8abc9abae88ef2a6afcd032eb088f20008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106073
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-19 10:33:16 +01:00
Noel Grandin 2cf83fe605 fastparser in SchXMLParagraphContext
Change-Id: I612e888d364e31457aea8e66accdf1a2230ed870
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106071
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-19 10:02:36 +01:00
Noel Grandin fecb0bbb7f fastparser in SchXMLPlotAreaContext
Change-Id: I77eab3ebacaca4c3327f60fac0970330fc9fe10b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106072
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-19 09:55:37 +01:00
Noel Grandin bcfd9f8f16 fastparser in SchXMLLegendContext
Change-Id: I9fe41436f4a5dd15867e172d4a43775ca49d29df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106070
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-19 08:59:11 +01:00
Noel Grandin 388b624dde fastparser in SchXMLTitleContext
Change-Id: Ie11234a520f344e775d6ae4c030cef5c741233a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106026
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-18 09:28:16 +01:00
Stephan Bergmann 0971eda1b4 missing include (XMLOFF_WARN_UNKNOWN -> SAL_WARN)
Change-Id: I5137deca44f842eef8789d37b0c21850d6665e5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106040
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-18 08:37:06 +01:00