Age | Commit message (Collapse) | Author |
|
Found with bin/find-unneeded-includes a few low hanging
boost/optional headers.
This gets us about 75M includebloat reduction; still much to go
Change-Id: I5c737631767970f9145609aad298a5d11e3fed65
Reviewed-on: https://gerrit.libreoffice.org/59840
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
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>
|
|
==18428== 12,809 (176 direct, 12,633 indirect) bytes in 1 blocks are definitely lost in loss record 2,664 of 2,683
==18428== at 0x4C2EBAB: malloc (vg_replace_malloc.c:299)
==18428== by 0x8D1CBC8: xmlNewDoc (tree.c:1171)
==18428== by 0x8D0C43D: xmlParseEntityDecl (parser.c:5521)
==18428== by 0x8D0F017: xmlParseMarkupDecl (parser.c:6802)
==18428== by 0x8D11588: xmlParseInternalSubset (parser.c:8305)
==18428== by 0x8D1733A: xmlParseTryOrFinish (parser.c:11977)
==18428== by 0x8D17DDA: xmlParseChunk (parser.c:12263)
==18428== by 0x3060C380: sax_fastparser::FastSaxParserImpl::parse() (fastparser.cxx:1041)
==18428== by 0x3060B6DC: sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) (fastparser.cxx:850)
==18428== by 0x3060E675: sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) (fastparser.cxx:1357)
==18428== by 0x2F4B2ABE: SvXMLImport::parseStream(com::sun::star::xml::sax::InputSource const&) (xmlimp.cxx:485)
==18428== by 0x34E2C12C: filter::odfflatxml::OdfFlatXml::importer(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XDocumentHandler> const&, com::sun::star::uno::Sequence<rtl::OUString> const&) (OdfFlatXml.cxx:150)
Change-Id: I63885b837e7311330255457da3a368bd3f4f8921
Reviewed-on: https://gerrit.libreoffice.org/58933
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Also make the functions constexpr.
Due to slight changes in floating-point arithmetics (90.0 instead of
180.0, M_PI2 instead of M_PI resp.), results might differ in last
digits (usually 17th decimal digit). This has lead to need to tweak
char2dump's PieChartTest unit test.
Change-Id: I20323dd7dab27e4deb408ea4181e390cc05e7cd3
Reviewed-on: https://gerrit.libreoffice.org/58583
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I7f90b7672665be0d8d5e47c6456433b06f88d5e0
Reviewed-on: https://gerrit.libreoffice.org/58553
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
|
|
Change-Id: I2bad74a8f103e9dc68c8e0d0e6315697068d2f6d
Reviewed-on: https://gerrit.libreoffice.org/58135
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Use std::vector<char> for pendingCharacters in SAXParser to avoid
calling the OUString utf8 conversion routine more than one per character
block. We seem to hit multiple characters() callbacks per chunk of text
fairly often in loading writer docs.
This is only good for about 0.5% performance
Change-Id: I354bb4efe9d883c4bebf49bc96dd44be4f2b1610
Reviewed-on: https://gerrit.libreoffice.org/57731
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
since it seems to cost us 20% performance
Change-Id: Ic4796ee3756c8c722feb4851dc48a99e882ba0fe
Reviewed-on: https://gerrit.libreoffice.org/57545
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
this gives another 2% perf
Change-Id: Ia2983339f3f11daef37c48044904c8037a7a0bf6
Reviewed-on: https://gerrit.libreoffice.org/57265
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
(*) in GetTokenWithPrefix, use rtl_str_reverseCompare_WithLength
faster than strncmp
(*) No need for NamespaceDefine to be stored via std::shared_tr
Change-Id: Ibd262a3f4f5a0f518ec6abe1fb19e7803f78fe8b
Reviewed-on: https://gerrit.libreoffice.org/57261
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and give utl::OStreamWrapper a new constructor so that it knows it is
taking ownership of the SvStream, which appears to fix several leaks
Change-Id: Idcbcca9b81a4f0345fd8b8c8a2f4e84213686a6b
Reviewed-on: https://gerrit.libreoffice.org/57187
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
these are the smaller improvements, they make about 5% worth of
difference
- use std::vector instead of std::deque
- use std::move on pendingCharacters instead of copying
- in FastAttributeList::add, when reallocate the buffer, allocate twice
the existing size, instead of increasing to only what we need
- in FastAttributeList, create getAttributeIndex and friends, so
we can avoid iterating the attribute list more often than necessary
Change-Id: I3e3380ea50b77c6845b66e83404e245778ec06eb
Reviewed-on: https://gerrit.libreoffice.org/57021
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
The problem is that -2^31 is negative after negation in 2's
complement.
This causes ODF validation error now in CppunitTest_sd_export_tests
testFdo84043:
Error: attribute "svg:x" has a bad value: ...
svg:x="--2147483.-6-4-7cm"
The validation error only happens in 32-bit builds; 64-bit builds
show a different value svg:x="2139324.72cm", so there must be another
problem somewhere else that isn't fixed here.
Change-Id: If2040cb6ae914c69b7cc651d3ab2d5d232fc71fb
Reviewed-on: https://gerrit.libreoffice.org/56718
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
...as the implicitly defined copy operations would just copy the m_p* member
pointers. Needed some modification of the ParserCleanup class so that Entity
(which has a XMLFile2UTFConverter member) can be std::move'd into
SaxExpatParser_Impl::pushEntity.
Found by new -Wdeprecated-copy of GCC trunk towards GCC 9.
Change-Id: I0cb5b5dbcd55249b475ed74b4ac6bcb12f20f2c6
Reviewed-on: https://gerrit.libreoffice.org/56453
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
and fix the fallout
Change-Id: I15bc5d626f4d157cbc69a87392078b41e621d14e
Reviewed-on: https://gerrit.libreoffice.org/54882
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
idea originally from either tml or moggi, can't remember which
Change-Id: Id78d75035036d3aa1666e33469c6eeb38f9e624d
Reviewed-on: https://gerrit.libreoffice.org/55126
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
(*) if we are already throwing a Wrapped*Exception, get the
exception using cppu::getCaughtexception.
(*) when catching and then immediately throwing UNO exceptions,
use cppu::getCaughtException to prevent exception slicing
(*) if we are going to catch an exception and then
immediately throw a RuntimeException, rather throw a
WrappedTargetRuntimeException and preserve the original exception information.
Change-Id: Ia7a501a50ae0e6f4d05186333c8517fdcb17d558
Reviewed-on: https://gerrit.libreoffice.org/54692
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I1d17301e4d7f951b7176d5a91c0dca0ef051b2a2
Reviewed-on: https://gerrit.libreoffice.org/51830
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
e.g. ooo82358-1.odt which has Chinese characters used in tags inside
a parent xforms:instance tag
Change-Id: If2edf9cc13e5a4cc969f5a46618a6534c52f2877
Reviewed-on: https://gerrit.libreoffice.org/51352
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
to make the call-sites less verbose
Change-Id: Ifddcbb03a454a241bef93f31a8025801b84a66fc
Reviewed-on: https://gerrit.libreoffice.org/50578
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and use the underlying comphelper methods rather. This is so that I can
break the dependency that tools has on sax, and can add methods that
make sax depend on tools.
Change-Id: I8a2d6ce2ffc3529a0020710ade6a1748ee5af7d5
Reviewed-on: https://gerrit.libreoffice.org/50767
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Surely that's indication of a bug somewhere.
Change-Id: Ic6219d8eb7f22301d8c4da98b2132ae3ef0467b5
Reviewed-on: https://gerrit.libreoffice.org/50579
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
|
|
Add a cheap check for this in both SaxWriter and FastSaxSerializer
so we can find such bugs earlier, e.g. with the weekly crashtesting.
Don't do a correct check but a cheap & fast one, let's ignore
non-ASCII characters for now as the only filter with such is UOF
and that is implemented with XSLT, not this sax code.
Change-Id: I4db8f70ffb23684d4cb4211468519edd6c7c465f
Reviewed-on: https://gerrit.libreoffice.org/50507
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
|
|
SaxParser was crashing during load of some MS documents if logging
is enabled.
Change-Id: I08a57b9a948bb4a35afcb82a29614c2f6a443446
Reviewed-on: https://gerrit.libreoffice.org/50110
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Change-Id: Ifb434589ef08428ce609bc7a40b015d4df13224c
Reviewed-on: https://gerrit.libreoffice.org/50048
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I359c5aff8c90359783588d189de4e5b94224fa9c
Reviewed-on: https://gerrit.libreoffice.org/48232
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I7c695073d9a9d3b7a641d6eb9fe01a47d8c3a504
Reviewed-on: https://gerrit.libreoffice.org/48392
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...so consistently use the latter instead of the former
Change-Id: I144d5e7c472632f93b2258461510346bc85892d9
Reviewed-on: https://gerrit.libreoffice.org/48135
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ia976371bf52eb1216d8abe728d80bbb87a3c38a2
Reviewed-on: https://gerrit.libreoffice.org/47858
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
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: Ide5941d633fb3bf930b790d644154829b77ad117
|
|
The problem here is presumably that the parser thread reports a
low-level SAX exception and the main thread reports a high-level filter
exception at the same time, so both threads modify maSavedException
concurrently.
Change-Id: Ic8ce9a4992208a24a111c990a67be163858ddaf8
Reviewed-on: https://gerrit.libreoffice.org/47478
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: I7929ccf751d37f65975d6412e28d34bec4421c07
|
|
Modifying it to emit the namespace URI instead of
prefix and qualified name instead of local name.
This will be useful for handling arbitrary elements
in the fast contexts.
Change-Id: I0f150b862574612e97491f6c335f3f4c9966da0a
Reviewed-on: https://gerrit.libreoffice.org/47055
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: I2a752025cd429e4d271626402dce5d8a8b0c76d2
Reviewed-on: https://gerrit.libreoffice.org/47021
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
improve the detection of stuff we can return by const &, instead of by
copying
Change-Id: I479ae89d0413125a8295cc3cddbc0017ed61ed69
Reviewed-on: https://gerrit.libreoffice.org/46915
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
merge the droplong and convertuintptr into one new plugin.
Limit the analysis to looking at var decl's, since that seems to be
safest proposition, even if that too needs some careful analysis.
Change-Id: Id005baaf05cfb157ce44a06a1c81f08559a07d1f
Reviewed-on: https://gerrit.libreoffice.org/46851
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.
Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I1fbeec6a29854dbc80736ed442941f55bc1bb0a3
Reviewed-on: https://gerrit.libreoffice.org/46179
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
and some more in base64.cxx
Change-Id: I31c9f23d3bd11f5482774e976a7c40025ffcfb86
Reviewed-on: https://gerrit.libreoffice.org/46157
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I75c8224452ca9c3711a2ccaca9ecf549fa59cb64
Reviewed-on: https://gerrit.libreoffice.org/45549
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I90aed11ae0a29a0e9fc725b297e10a7ed30c9942
Reviewed-on: https://gerrit.libreoffice.org/45533
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791
Reviewed-on: https://gerrit.libreoffice.org/45068
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...which had been left out because "lots of our code uses this style, which I'm
loathe to bulk-fix as yet", but now in
<https://gerrit.libreoffice.org/#/c/45060/1/> "use std::unique_ptr" would have
caused an otherwise innocent-looking code change to trigger a
loplugin:unnecessaryparen warning for
pFormat = (pGrfObj)
? ...
(barring a change to ignoreAllImplicit in
compilerplugins/clang/unnecessaryparen.cxx similar to that in
<https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in
loplugin:simplifybool consistent", which should also have caused the warning to
disappear for the modified code, IIUC).
Change-Id: I8bff0cc11bbb839ef06d07b8d9237f150804fec2
Reviewed-on: https://gerrit.libreoffice.org/45088
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I2a10e087a776ac96b3193226610577227d2492a8
Reviewed-on: https://gerrit.libreoffice.org/44655
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Page <aptitude@btconnect.com>
|
|
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91
Reviewed-on: https://gerrit.libreoffice.org/44654
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Page <aptitude@btconnect.com>
|
|
Change-Id: I7a3eb2bfda869e9e66db919f929ead60cf8890a4
Reviewed-on: https://gerrit.libreoffice.org/44209
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I7ca2fd05d1cf61f9038c529a853e72fedb1c9ed0
Reviewed-on: https://gerrit.libreoffice.org/44087
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I13df4e184a826682f34a1d9e974b601397ba4a3d
Reviewed-on: https://gerrit.libreoffice.org/43865
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I211327928a86f706513ebd78cff979283396e742
Reviewed-on: https://gerrit.libreoffice.org/43777
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ie05e44e2a4019e2549843961ebfa04fef7b7aeb4
Reviewed-on: https://gerrit.libreoffice.org/43767
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|