summaryrefslogtreecommitdiff
path: root/xmlreader/source
AgeCommit message (Collapse)Author
2021-05-14Revert "improve perf of xmlreader::Pad"Noel Grandin
This reverts commit de5af8315e014ce3408f66c6de3c9c4e841f8437. Reason for revert: this commit needs bounds checking before it can reland Change-Id: I686a533cc27fc4644cce918ca64bd168bba19617 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115518 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-11improve perf of xmlreader::PadNoel Grandin
Change-Id: I83cc88977e7c287b0f428a3e01f289179b6dbad9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115353 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-10speed up XmlReader::handleSkippedTextNoel Grandin
this part of config loading is fairly hot at startup, so inlining this memchr call from rtl_str_indexOfChar_WithLength shaves off 2% of my load time. Change-Id: Ia79f43179475c51d856b685f053f597919cf12af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113924 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-10Revert "Optimize getNamespaceId (xmlreader)"Julien Nabet
This reverts commit def00961243da0662f394bdf58b1157cfd45dfab. Finally after other tests, it doesn't improve perfs Change-Id: Icbaaf751181069dd36dba0c676a4c9a2a6c8a9f3 Reviewed-on: https://gerrit.libreoffice.org/80565 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-10-08cleanups in xmlreaderNoel Grandin
(*) fix order of headers (*) include the right headers in span.hxx (*) use std::memcmp instead of memcmp (*) clear entries from cache when the namespaces array is resized Change-Id: I04319bbaa84369e5470799578fadcda66a591c9f Reviewed-on: https://gerrit.libreoffice.org/80347 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-06we can use Span for the cache key hereNoel Grandin
Change-Id: I77894e3c5e3d68cb2a12abcc0b09f2c042664ba0 Reviewed-on: https://gerrit.libreoffice.org/80315 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-06convert equals() to operator== in xmlreader::SpanNoel Grandin
Change-Id: Ic6a8eae344c06be87e2bc4bf7f242a2d18ebc8ad Reviewed-on: https://gerrit.libreoffice.org/80312 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-06Optimize getNamespaceId (xmlreader)Julien Nabet
Adding a map to cache values allows me 20s -> 13s to start LO Change-Id: If343225def253e29696b96f223cdcb54d0d8525d Reviewed-on: https://gerrit.libreoffice.org/80290 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-02-04tdf#42949 Fix IWYU warnings in xmlreader/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I9e64ad0a20654e2b97de5b23302ce2cab1a09c00 Reviewed-on: https://gerrit.libreoffice.org/66975 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-09-15Simplify containers iterations in xmlhelp, xmlreader, xmlscript, xmlsecurityArkadiy Illarionov
Use range-based loop or replace with functions from std algorithm. Change-Id: I5b1859da37c2a6c6e5e70602287bfc2ada951893 Reviewed-on: https://gerrit.libreoffice.org/60463 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-24loplugin:unusedfields,can-be-const in xmlreaderNoel Grandin
Change-Id: I762a749b858063a1c063ee918bb6d33e06328876 Reviewed-on: https://gerrit.libreoffice.org/57852 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-23Silence -Werror=implicit-fallthrough= (upcoming GCC 8)Stephan Bergmann
Earlier GCC already require a similar workaround to silence -Werror=return-type ("control reaches end of non-void function") a few lines further down, so it's rather consequential that GCC now also warns about the potential fall-through here (i.e., for these warnings, GCC apparently assumes that an enum can take on all of the values from its range of values, not just those denoted by an enumerator). Change-Id: I1537a7f6975f900861225ee7a521366a5e57046a
2017-09-14clang-tidy modernize-use-emplace in variousNoel Grandin
Change-Id: Id1bbd3f380c17beeaab11f7140d4df1304c3d0d8 Reviewed-on: https://gerrit.libreoffice.org/41750 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-25loplugin:unusedmethodsNoel Grandin
Change-Id: Ia874baf21257e5fe41e104211068a2bcc50446eb Reviewed-on: https://gerrit.libreoffice.org/40391 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-08-31convert XmlReader::State to scoped enumNoel Grandin
Change-Id: I8020843ad238ac3487f7f2781693ca619db5e1b3
2016-05-25Convert XmlReader::Result to scoped enumNoel Grandin
Change-Id: I6a0d1dcf5ae51d2ac08aacdfec50865f93e51c21 Reviewed-on: https://gerrit.libreoffice.org/25365 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-24Convert XmlReader::Text to scoped enumNoel Grandin
Change-Id: I4741b13fcf887a95b85886cb41f8236e128e81a2 Reviewed-on: https://gerrit.libreoffice.org/25364 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-13clang-tidy modernize-loop-convert in writerfilter to xmlsecurityNoel Grandin
Change-Id: I334411c6b57c028ffb41b5deb72002f9d54038c3 Reviewed-on: https://gerrit.libreoffice.org/24923 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-02cleanup: remove unused Reference.h(xx) includesJochen Nitschke
and unused using-declarations from Reference.h Change-Id: I297a7ae6044fa329d245ecf08fd5c4cb930f5b19 Reviewed-on: https://gerrit.libreoffice.org/23735 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-03-31use SAL_N_ELEMENTS in for loopsNoel Grandin
for with git grep -n 'for.*sizeof' Change-Id: I6211024385e03ac5eeeb38690d2c1c699e015c2f Reviewed-on: https://gerrit.libreoffice.org/23569 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-15Rename rtl::isValidCodePoint -> rtl::isUnicodeCodePointStephan Bergmann
...and fix its documentation, and use it throughout the code base. Change-Id: I349bc2009b1b0aa7115ea90bc6ecd0a812f63698
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I86546bcf9b476c73da2d6bff30ee1e56933f69c4
2014-06-17improve the inlinesimplememberfunctions clang pluginNoel Grandin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-05various: remove SAL_THROW macroNoel Grandin
Change-Id: I9464179a736b91f5bc32eb5e5e89b3b4e3da3494
2014-05-23remove boilerplate in UNO Exception constructor callsNoel Grandin
Now that we have default values for Exception constructor params, remove lots of boilerplate code. Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
2014-04-30coverity#708727 Uninitialized pointer fieldCaolán McNamara
Change-Id: I816f7e239f83c35666101aac057912dd7e65ecff
2014-01-23coverity#1158416 Uninitialized pointer fieldCaolán McNamara
Change-Id: I5c1b07bd3898e89141fe3c3c8f8b63b81513a97e
2013-12-06Zip .ui translations per UIConfig target.Matúš Kukan
Fix installer / scp2 to not ignore directory prefix in 'Name'. Change-Id: Ib319363c8be73a72029f1ba3833e518e15c55e29 Reviewed-on: https://gerrit.libreoffice.org/6915 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2013-11-11xmlreader: include <> for external includesNorbert Thiebaud
Change-Id: I8ee7c2155a721eedb9d54fc00a681f3a08790194
2013-06-24fdo#43460 shell,vcl,xmlreader: use isEmpty()Jelle van der Waa
Change-Id: Ie3d16da6c246b79c4c304b21476f84b2788f0d6e Reviewed-on: https://gerrit.libreoffice.org/4444 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-05-16Some string literal clean upStephan Bergmann
Change-Id: I108882af13fa97fa094547ec4efb468f988f337d
2013-05-06cleanup whitespaces due to RTL_CONSTASCII_USTRINGPARAM removalPhilipp Riemer
In e2e2cc61144cb22227eebfadff0ea24b51ccfbd0 the method was removed automatically leaving several line breaks etc. as visual noise.
2013-05-06remove usage of RTL_CONSTASCII_USTRINGPARAMLuboš Luňák
Mechanical removal of usage together with OUString ctor, done by compiler plugin. Change-Id: I554227f76df0dac620b1b46fca32516f78b462c5
2013-04-07mass removal of rtl:: prefixes for O(U)String*Luboš Luňák
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk have kept them, in order not to break external API (the automatic using declaration is LO-internal). Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-03-19automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStringsThomas Arnhold
Done with a perl regex: s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec Reviewed-on: https://gerrit.libreoffice.org/2832 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-01-21Replaced O[U]String::valueOf( static_cast<> ) with O[U]String::number()Jean-Noël Rouvignac
Change-Id: I2f11f2f15a652a9edc3c7e5b67c854debeed20de Reviewed-on: https://gerrit.libreoffice.org/1784 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
2012-11-30c++ API: use css alias in generated headers, adds global css declThorsten Behrens
This changes all generated API headers (.hpp and .hdl) to use a namespace alias 'css' instead of the pointlessly long com::sun::star Makes the change in cppumaker & associated tools, adds a global namespace alias definition in sal/types.h, and removes a kiloton of local, now pointless-to-harmful versions of that alias from all over the code. Change-Id: Ice5a644a6b971a981f01dc0589d48f5add31cc0f
2012-10-27remove xmlreader from string now I don't need it anymoreCaolán McNamara
Change-Id: I8d280a5fa352bf4514a5e593b34be767648f4e64
2012-10-17allow XmlReader to parse a stringCaolán McNamara
Change-Id: I3433e6f3766c1ea54ad53896c4e4d142d1e319a5
2012-09-18deprecate oustringostreaminserter.hxxNorbert Thiebaud
the intent of this header has canged over time. now it is already systematically included with ustring.hxx and the operator overload it provide fit nicely there... Just to be safe, since that include as been added to the api during the 3.5 timeframe and therefore is already in 'production' the header remain and simply attempt to include ustring.hxx but a warning is issued indicating that this header should not be used anymore... in a couple of major release we will thenr emove it completely All internal users of that header are converted. Change-Id: I8934c55f089e29d78c0f5649b7c87b2ecf024bad Reviewed-on: https://gerrit.libreoffice.org/634 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-06-26re-base on ALv2 code.Michael Meeks
2012-06-08calling nextAttribute before first tag uses uninited variablesCaolán McNamara
(cherry picked from commit c5818e929c7b608ccc3277f1204b491e426925de) Signed-off-by: Caolán McNamara <caolanm@redhat.com>
2012-04-18Improved error reportingStephan Bergmann
2012-01-26Better exception message.Stephan Bergmann
2011-12-21osl_unmapFile can't work for files bundled inside the .apk on AndroidTor Lillqvist
On Android, when an app is installed, arbitrary files bundled in the app won't be unpacked into actual separate files in the file system. They will exist only as archive entries in the .apk file (which is a zip archive). The SDK tooling puts such files under the /assets folder in the .apk. The LibreOffice bootstrapping code for Android maps the .apk file into memory. osl_openFile() knows about the /assets special case, and uses a separate abstraction for such memory-mapped files. Obviously, when producing an .apk, one needs to make sure these bundled files are not compressed, if one wants to be able to use them directly from the memory-mapped .apk file. We do that in our test and sample Android projects. When mapping such files under /assets , just return a pointer to the file's location inside the mapped .apk archive. We can't use the old osl_unmapFile() on such mapped files, as that would unexpectedly unmap fairly arbitrary pages of the .apk mapping, wreaking havoc on later use of the same pages. So, introduce a new osl_unmapMappedFile() function that takes also the oslFileHandle originally passed to osl_mapFile(). Use this instead in the few places where the code actually called osl_unmapFile(). Make sure osl_mapFile() is nonexistent on Android.
2011-11-29Adapted to new assertion/logging mechanisms.Stephan Bergmann
2011-09-30add mode-lines to .m files and last round of merged files, etc.Caolán McNamara
2011-06-17CWS gnumake4: convert xmlreader to new build system [hg:751b4a1bff7b]Mathias Bauer
2010-09-29CWS-TOOLING: integrate CWS sb129Vladimir Glazunov
2010-09-16sb129: #i113189# adjusted commentssb