summaryrefslogtreecommitdiff
path: root/unoxml
AgeCommit message (Collapse)AuthorFilesLines
2019-07-21loplugin:referencecasting in unotools..uuiNoel Grandin4-40/+21
Change-Id: Ia2c991591e65deb00710ab7a5b73bc42ae6b1b46 Reviewed-on: https://gerrit.libreoffice.org/76031 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-03tdf#125706 and tdf#125665 writer, speed up RDF, take2Noel Grandin1-21/+159
second attempt at this - modify the existing API so we cache all queries. This slow things down slightly from 6.9s to 7.2s Change-Id: Idb20f90be346fb1e3d7271132337ab14b49a814b Reviewed-on: https://gerrit.libreoffice.org/74992 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-03Revert "tdf#125706 and tdf#125665 writer, speed up RDF"Noel Grandin1-266/+7
This reverts commit 47e04cf31c6165dd55dc20962ad9c72962b958bd. Because we are going to do this a better way. Change-Id: Ic92d6fc471578973a141b6fd2be49fc38a9f55a5 Reviewed-on: https://gerrit.libreoffice.org/74991 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-28tdf#125706 and tdf#125665 writer, speed up RDFNoel Grandin1-7/+266
The RDF stuff is sloooooooow, so (a) add some caching and (b) fold a very hot UNO_QUERY call. To add the caching we need to add a new UNO interface, since XEnumeration is not amenable to being cached. Add an optimised getStatementsGraph_NoLock2 that skips the intermediate enumeration object, and consequently a lot of locking/unlocking. Cache by OUString key, to avoid expensive OUString<->OString conversion when looking up entries in the cache. For the test document in tdf#125706, this takes the time from 7s to 5s for me. For the test document in tdf#125665, this takes the load time from 60s to 7s for me. Change-Id: I207387e975b4f107834edd0974134c481fb4012d Reviewed-on: https://gerrit.libreoffice.org/74740 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-25Simplify Sequence iterations in unoxmlArkadiy Illarionov4-27/+18
Use range-based loops or replace with STL functions Change-Id: Ib1c49834a2c5c67a73ec05ba8f30c1d39a5c019c Reviewed-on: https://gerrit.libreoffice.org/74600 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
2019-06-18tdf#39593 Remove DOM::CNode::GetImplementationArkadiy Illarionov4-22/+17
Replace with comphelper::getUnoTunnelImplementation. Change-Id: If98801fd85bf0967c54e1924a04b6de371868942 Reviewed-on: https://gerrit.libreoffice.org/74234 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-06-18loplugin:logexceptionnicely in toolkit..unoxmlNoel Grandin3-10/+13
Change-Id: I0a3126545f9ef98640f6dd166290e9b9e91b8355 Reviewed-on: https://gerrit.libreoffice.org/74244 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-13fix wrong SET/QUERY flags passed to uno::ReferenceNoel Grandin1-1/+1
By creating deleted methods for the wrong calls. Avoids the compiler needing to construct a temporary Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a Reviewed-on: https://gerrit.libreoffice.org/72103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-09regenerate PCH headers for the 4 new levelsLuboš Luňák1-1/+12
Plus some build fixes triggered by this. Change-Id: I59b21def706598ceffd45ae5b1f0262ec9c1ad50 Reviewed-on: https://gerrit.libreoffice.org/71581 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-05-05Use returned iterator from eraseJulien Nabet1-3/+1
Change-Id: I1ae4e4d0adc467f1bcce08fdd07a5dbf94c3111c Reviewed-on: https://gerrit.libreoffice.org/71815 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-02Use hasElements to check Sequence emptiness in [t-u]*Arkadiy Illarionov1-1/+1
Similar to clang-tidy readability-container-size-empty Change-Id: Idefe55e37f5c837c889548ffe7c5711400012a4d Reviewed-on: https://gerrit.libreoffice.org/71667 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-19optimise find/insert patternNoel Grandin1-4/+1
if we're doing a find/insert on a set or a map, it is better to just do a conditional insert/emplace operation than triggering two lookups. Change-Id: I80da5097f5a89fe30fa348ce5b6e747c34287a8d Reviewed-on: https://gerrit.libreoffice.org/70937 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-31tdf#120703 PVS: remove redundant static castsMike Kaganski1-1/+1
V572 It is odd that the object which was created using 'new' operator is immediately cast to another type. Change-Id: I54976062dc3f62eaaa79f89eff54454f0b24ac2c Reviewed-on: https://gerrit.libreoffice.org/69989 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-02-27loplugin:unusedfields look for classes where we can make all the..Noel Grandin1-1/+0
fields private Change-Id: Id3c6b123f06ab5dcf87628de4c347626110d2d27 Reviewed-on: https://gerrit.libreoffice.org/68302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-22loplugin:unusedfields in unoxmlNoel Grandin4-8/+1
Change-Id: I03655d967dc165885bb51e4a931930590632c32d Reviewed-on: https://gerrit.libreoffice.org/68159 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18use clear() instead of erase(begin, end)Noel Grandin1-1/+1
Change-Id: Ie1dcff4c2e5f52521b4172ef5726413a9d048214 Reviewed-on: https://gerrit.libreoffice.org/67961 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-12tdf#120703 PVS: remove redundant static castsMike Kaganski1-24/+12
V572 It is odd that the object which was created using 'new' operator is immediately cast to another type. Change-Id: I5fee1c4bebd1972fbb5e43da37149d4e2ff6ce0d Reviewed-on: https://gerrit.libreoffice.org/67664 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-02-11loplugin:indentation in unotools..vbahelperNoel Grandin6-8/+8
Change-Id: I76de5678dd21f207e9e9c2a0c446f2c0b9be974e Reviewed-on: https://gerrit.libreoffice.org/67609 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-06loplugin:singlevalfields in unoxmlNoel Grandin6-15/+9
Change-Id: I340be161aeb343ccc01b86bcb807e4441025419e Reviewed-on: https://gerrit.libreoffice.org/64595 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-16loplugin:staticmethods improvementNoel Grandin1-1/+1
Change-Id: I8889ce8a7d2309b54454cfe4c6421282e1c6e755 Reviewed-on: https://gerrit.libreoffice.org/63434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-09Fix many Java subsequentcheck test by using JUHJan-Marek Glogowski2-14/+2
Splits gb_JunitTest_set_unoapi_test_class_and_jars into two separate defines as: - gb_JunitTest_use_unoapi_jars - gb_JunitTest_use_unoapi_test_class Then replaces many of the gb_JunitTest_use_jars lists with the new gb_JunitTest_use_unoapi_jars to fix the JUH dependencies. This probably adds some unneeded JUH dependencies to some Java tests, but that shouldn't be a problem. Change-Id: I0c4fce6b50f7c6eb8d62bfb2c50f056b97584794 Reviewed-on: https://gerrit.libreoffice.org/63119 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-10-30tdf#42949 Fix IWYU warnings in include/sax/*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I8061ef6a7a8c04baf350844fae1f97836ac03554 Reviewed-on: https://gerrit.libreoffice.org/62399 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-28tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski1-5/+2
Change-Id: Ic92cc594979cac2edac04a085957398672a5dfcc Reviewed-on: https://gerrit.libreoffice.org/62450 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-24clang-tidy performance-unnecessary-copy-init in test..xmlscriptNoel Grandin1-4/+2
Change-Id: I1ae16467a8e58e8a50f59b7a140e9f8b68bde07e Reviewed-on: https://gerrit.libreoffice.org/62254 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-20use equal_range instead of lower_bound+upper_boundNoel Grandin1-3/+2
Change-Id: I7cc1c95b3a55630e3571cac5fe22be6c2f3a1bc9 Reviewed-on: https://gerrit.libreoffice.org/62015 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17clang-tidy readability-redundant-smartptr-getNoel Grandin1-7/+17
redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-15Simplify containers iterations in unotools, unoxml, uui, vbahelperArkadiy Illarionov3-27/+15
Use range-based loop or replace with STL functions. Change-Id: I5a43f6fc62c81453dcef3820bb715f4da76915af Reviewed-on: https://gerrit.libreoffice.org/61762 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-08Missing includeStephan Bergmann1-0/+1
Change-Id: I5cb4fad28312e3ab28f26d7e12169d6db25e3758
2018-09-19loplugin:constfields in unotools..uuiNoel Grandin2-2/+2
Change-Id: I9d9cfd107bea9556cbc505e977838fb13bd25e2a Reviewed-on: https://gerrit.libreoffice.org/60573 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann1-1/+1
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-10tdf#42949 Fix IWYU warnings in include/cppuhelper/*Gabor Kelemen2-0/+2
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-13loplugin:returnconstant in unoxml,uuiNoel Grandin2-7/+6
Change-Id: Iac240f59acf8404fe5439a7e450c048df0d7a54e Reviewed-on: https://gerrit.libreoffice.org/58879 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-02Add missing sal/log.hxx headersGabor Kelemen6-0/+6
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from test to vbahelper Change-Id: Ia7f773511624099505d6a36a8d6e23c0cde4a737 Reviewed-on: https://gerrit.libreoffice.org/58225 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-05tdf#42949 remove unused compheler includes ..Jochen Nitschke1-1/+0
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>
2018-05-25Improve re-throwing of UNO exceptionsNoel Grandin1-16/+26
(*) 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>
2018-05-17crashtesting: assert on fdo62508-1.odtCaolán McNamara1-3/+3
document, with meta:generator of "opxml2odf - Version KO 0.1" has a styles.xml xmlns of... xmlns:ofo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" instead of the usual xmlns:fo=... use the importer namespace map to get the importers namespace prefix for the fastparser namespace uri for the token Change-Id: Ib633009f6c2b7dae5a3ceb1c921adfff84e21150 Reviewed-on: https://gerrit.libreoffice.org/52720 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-13Fix typosAndrea Gelmini1-1/+1
Change-Id: If4bc1698af2a43a2dbc45b8518c0f5b736d6abaf Reviewed-on: https://gerrit.libreoffice.org/52278 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-04-02use https links for api.libreoffice.org and opengrokdennisroczek1-2/+2
Change-Id: I74dd0142562cb8698f19b2715fa1d514f82bd749 Reviewed-on: https://gerrit.libreoffice.org/52262 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2018-04-01remove unused processfactory.hxx includesJochen Nitschke1-1/+0
and fix fallout Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee Reviewed-on: https://gerrit.libreoffice.org/52206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-03-14Moving XSAXDocumentBuilder2 to use XFastDocumentHandler:Mohammed Abdul Azeem3-120/+137
This is used in parsing of meta Contexts across different modules. This also involved moving to XFastParser for parsing xml filters in sw, sd, starmath. Change-Id: Ic663aaac6cb20ee8ce5b97cae87c93220f5a2929 Reviewed-on: https://gerrit.libreoffice.org/42989 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-02-02unoxml: MSVC: pragma warning: make more specific, remove obsoleteMike Kaganski1-3/+0
Change-Id: I6c09eeeb43cd0bf85b89b1332f2ee6121b11de3c Reviewed-on: https://gerrit.libreoffice.org/49056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-15More loplugin:cstylecast: unoxmlStephan Bergmann3-5/+5
Change-Id: I832b0495f3510e853037e87e90da2fd04c21f8ad
2018-01-12More loplugin:cstylecast: unoxmlStephan Bergmann1-5/+5
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: I646f70befa576a2bc759cd7db8e0fe8fb3e9cf06
2018-01-04ofz#4940 Null-dereference READCaolán McNamara1-1/+1
Change-Id: I2c8c83ef6ffde5f1599814538acc36ec5beab6c8 Reviewed-on: https://gerrit.libreoffice.org/47387 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-27Fix typosAndrea Gelmini1-2/+2
Change-Id: Icebbbb392d9187a11837b72116c00036247e9b74 Reviewed-on: https://gerrit.libreoffice.org/47104 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-19inline use-once typedefsNoel Grandin2-7/+3
Change-Id: I5c3ffc03c26b3428f1f336e6ecba7838a1cf1157 Reviewed-on: https://gerrit.libreoffice.org/46764 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11loplugin:salcall fix functionsNoel Grandin8-26/+26
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>
2017-12-05loplugin:salcall fix non-virtual methodsNoel Grandin3-4/+4
first, since those are safer to change than virtual methods Change-Id: Ie3b624019d75ee2b793cee33b3c5f64e994e8bfe Reviewed-on: https://gerrit.libreoffice.org/45798 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-27loplugin:unnecessaryparen check for (f1()).f2Noel Grandin1-2/+2
Change-Id: I93257b0ddd41c649875124d6d5c5faeaa431bae3 Reviewed-on: https://gerrit.libreoffice.org/45218 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-22Make loplugin:unnecessaryparen warn about (x) ? ... : ... after allStephan Bergmann4-5/+5
...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>