summaryrefslogtreecommitdiff
path: root/xmlhelp
AgeCommit message (Collapse)AuthorFilesLines
2019-07-02Use LanguageTag::getFallbackStrings() instead of old dumb hard coded stuffEike Rathke1-15/+15
So finding correct offline help will actually work with language tags containing scripts or variants. Change-Id: I493041fbfe62dc7cd2e035592fe94ef9fe3c2480 Reviewed-on: https://gerrit.libreoffice.org/74855 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 049189f49dba87e0b6d948e2b6a5e416f1fca36b) Reviewed-on: https://gerrit.libreoffice.org/74859
2019-06-28Fix Help collator loading, processLang() does not return only the languageEike Rathke2-26/+13
... but a tag of an installed language, e.g. "en-US". Adding a country then resulted in "en-US-US", used to load a collator. Further inspection of processLang() needed which can't work for sr-Latn or ca-valencia, for example. Change-Id: Id587ede738143c506da1ff2822aa605d0e7bee83 Reviewed-on: https://gerrit.libreoffice.org/74847 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 41cf4e6604bfb9b51ce54c5ea64d77249c7545d7) Reviewed-on: https://gerrit.libreoffice.org/74849
2019-04-15improve loplugin simplifyconstructNoel Grandin1-2/+1
to find stuff like OUString s = OUString("xxx") Change-Id: Ie7ed074c1ae012734c67a2a89c564c1900a4ab04 Reviewed-on: https://gerrit.libreoffice.org/70697 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-31tdf#120703 PVS: remove redundant static castsMike Kaganski2-3/+3
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-21loplugin:unusedfields in xmlhelp,xmlsecurityNoel Grandin2-2/+1
Change-Id: Id3858365a54e6ae96bf9e6c3e27a777441ab56ae Reviewed-on: https://gerrit.libreoffice.org/68133 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11new loplugin writeonlyvarsNoel Grandin1-3/+0
largely based on the relevant portion of the unusedfields loplugin, but adapted for local vars Change-Id: Ic522a941573940e8f75c88f90ba5f37508ca49b1 Reviewed-on: https://gerrit.libreoffice.org/66835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11loplugin:indentation in writerfilter..xmloffNoel Grandin3-20/+20
Change-Id: Ibda157508e92ab5fb222daf79a38941c30a8057e Reviewed-on: https://gerrit.libreoffice.org/67611 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-08o3tl::make_unique -> std::make_unique in tools..xmloffGabor Kelemen1-3/+2
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: Ib3201f865d43f372007cdf381c7e244e9cbeae26 Reviewed-on: https://gerrit.libreoffice.org/67474 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-24loplugin:constparams in ucb..xmlhelpNoel Grandin2-2/+2
Change-Id: I3c1e0bfbba1a1849075500882133aac3899de5c8 Reviewed-on: https://gerrit.libreoffice.org/66834 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-21use unique_ptr in xmlhelpNoel Grandin1-3/+3
Change-Id: Ic49bb1bc6591735562b0b23d821202bab00ceba2 Reviewed-on: https://gerrit.libreoffice.org/65533 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05loplugin:unnecessaryparen include more assignmentsNoel Grandin1-1/+1
Change-Id: I9fb8366634b31230b732dd38a98f800075529714 Reviewed-on: https://gerrit.libreoffice.org/64510 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27convert treeview::TVDom::Kind to scoped enumNoel Grandin1-5/+5
Change-Id: Ia505df60f5758d40dd55bc5b24886fd8aec327ce Reviewed-on: https://gerrit.libreoffice.org/64092 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-09loplugin:useuniqueptr in ResultSetForQueryNoel Grandin1-7/+4
Change-Id: Ie375f7fded2592cd1e926f14be0216608c2695d6 Reviewed-on: https://gerrit.libreoffice.org/63130 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-20pvs-studio: The 'aIndexFolderResultVector' variable is used after it was movedCaolán McNamara1-1/+0
Change-Id: I565f22594a371188c4a6eff5f405946ec1e04d95 Reviewed-on: https://gerrit.libreoffice.org/62061 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-10Set up our own libxslt security context in xmlhelp, as per #i117643.Damjan Jovanovic1-7/+23
Patch by: me (cherry picked from commit ae1f34be5c9a49fae1eacdb3c1e5267acea53441) Change-Id: I0e5277b17243f6b8f5f4303206cf446b10dd0aef Reviewed-on: https://gerrit.libreoffice.org/61597 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Michael Stahl <Michael.Stahl@cib.de>
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann2-2/+2
...where "inline" (in its meaning of "this function can be defined in multiple translation units") thus doesn't make much sense. (As discussed in compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions in include files for now.) All the rewriting has been done automatically by the plugin, except for one instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus some subsequent solenv/clang-format/reformat-formatted-files. Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224 Reviewed-on: https://gerrit.libreoffice.org/61573 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-01loplugin:useuniqueptr in TVChildTargetNoel Grandin1-4/+3
Change-Id: I5d51df50a0c2279c52273254c451f3f21eaafbfb Reviewed-on: https://gerrit.libreoffice.org/61112 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-18loplugin:useuniqueptr in xmlhelp::DatabasesNoel Grandin2-28/+19
Change-Id: Idaf73fd5d12badbee58861c6ca3b087c16946b9c Reviewed-on: https://gerrit.libreoffice.org/60615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann2-5/+9
...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-15Simplify containers iterations in xmlhelp, xmlreader, xmlscript, xmlsecurityArkadiy Illarionov2-24/+10
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-09-13loplugin:constfields in xmlhelpNoel Grandin9-19/+17
Change-Id: Ia8eda3075b0387ec3a5ed6267f1dfcfb3a8cf782 Reviewed-on: https://gerrit.libreoffice.org/60426 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-13tdf#42949 Fix IWYU warnings in include/ucbhelper/*Gabor Kelemen4-0/+7
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7bfeef47abaf94cfb355db95c0fdb928ce36c0a6 Reviewed-on: https://gerrit.libreoffice.org/60232 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-13loplugin:simplifyconstruct in writerfilter..xmlsecurityNoel Grandin3-9/+2
Change-Id: Ic2d901ca0dbc2d6fa96611d260c1572da8a783c0 Reviewed-on: https://gerrit.libreoffice.org/60398 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-08loplugin:useuniqueptr in xmlhelpNoel Grandin2-14/+9
Change-Id: I8a407e0492adf61e1d815cadd5da0a1623c2b23b Reviewed-on: https://gerrit.libreoffice.org/60191 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-22loplugin:useuniqueptr in chelp::DynamicResultSetNoel Grandin3-5/+6
Change-Id: If9ffa025ba0ce9a1c97c89ec50e71e7f90c5435b Reviewed-on: https://gerrit.libreoffice.org/59436 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-02loplugin:stringloop in variousNoel Grandin1-2/+2
Change-Id: Ia400e67108e622ae63a8d59667eae96c858f22dc Reviewed-on: https://gerrit.libreoffice.org/58463 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-31Fix typosAndrea Gelmini1-1/+1
Change-Id: Iaa00d65b518b3e638c2d31912e247cb91bdd0950 Reviewed-on: https://gerrit.libreoffice.org/58347 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-07-12Add missing sal/log.hxx headersGabor Kelemen2-0/+2
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 w* x* Change-Id: I27bff44da3d34d24262031c7489e755311599bc5 Reviewed-on: https://gerrit.libreoffice.org/57307 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-11clean up UNO available() implementationsNoel Grandin2-2/+8
There seems to be some confusion here. available() is actually the number of bytes that can be read without blocking, but most implementations seems to be just returning the number of bytes remaining in the stream. Since we're doing that, let's do it properly. (*) some of them were just casting, instead of clamping, which will return wrong values sometimes. (*) FileStreamWrapper_Impl/OInputStreamWrapper/OTempFileService were doing unnecessary work, instead of just asking the underlying SvStream for it's remaining size Change-Id: I3ef26e0363e989ed3e00be0fdb993e1cdeb7819f Reviewed-on: https://gerrit.libreoffice.org/57264 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-26tdf#96099 Remove some trivial container iterator typedefsArkadiy Illarionov1-1/+0
Change-Id: Ifec98748d55ff6aca64c425c50c2cf2650f61591 Reviewed-on: https://gerrit.libreoffice.org/56422 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-07tdf#96099 Remove std::vector typedefsAbhyudaya Sharma1-1/+1
Change-Id: Ic7e1cecaecadf3f9ebfa183727d61046dd87e473 Reviewed-on: https://gerrit.libreoffice.org/55260 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-05-17loplugin:unusedfields in tools..xmlhelpNoel Grandin4-14/+6
Change-Id: I5e909a8def86ce9ad150440e6c6ad304e855cc69 Reviewed-on: https://gerrit.libreoffice.org/54415 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-14loplugin:useuniqueptr in helpdatafileproxy::HdfNoel Grandin2-16/+11
Change-Id: I4324a290b826d76f89319f556aededb30d921f8d Reviewed-on: https://gerrit.libreoffice.org/54166 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-01remove unused processfactory.hxx includesJochen Nitschke3-3/+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-12loplugin:redundantfcast look for redundant copies in return statementsNoel Grandin3-8/+5
Change-Id: I5f416c865dfe1c36018784246a8007452eb42008 Reviewed-on: https://gerrit.libreoffice.org/50996 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05loplugin:useuniqueptr in chelp::ResultSetBaseNoel Grandin2-12/+10
Change-Id: I6e8541837a07c8cf2e001289e0804d7e4e7ba3b1 Reviewed-on: https://gerrit.libreoffice.org/50658 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-02xmlhelp: MSVC: pragma warning: make more specific, remove obsoleteMike Kaganski1-9/+0
Change-Id: I211a6f95f7146d7ffaa0c44af786c4474abc73f4 Reviewed-on: https://gerrit.libreoffice.org/49058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-12More loplugin:cstylecast: xmlhelpStephan Bergmann2-6/+6
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: Ieee6d6e7246ac03e06a10455c8ad0aaf7caa48a9
2018-01-11convert (a>b?a:b) to std::max(a,b)Noel Grandin1-2/+2
with something like: git grep -nP '(.*)\s*>\s*(.*)\s*\?\s*\g1\s*:\s*\g2' Change-Id: I60b9a3a2a09162bc0de4c13fdde2c209696e5413 Reviewed-on: https://gerrit.libreoffice.org/47602 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-04loplugin:unusedfieldsNoel Grandin2-4/+0
fix the ReturnStmt check Change-Id: I95076076bd1313d23798c4615ea12910c86ed9a8 Reviewed-on: https://gerrit.libreoffice.org/47309 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-29loplugin:passstuffbyref improved return in xmlhelp,slideshowNoel Grandin2-2/+2
Change-Id: I57e235ecec733f1b5dd03f95f4e022769a369ae2 Reviewed-on: https://gerrit.libreoffice.org/47165 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-14No need to keep these whitelisted functions decorated with SAL_CALLStephan Bergmann2-4/+4
The only effect SAL_CALL effectively has on LO-internal code is to change non- static member functions from __thiscall to __cdecl in MSVC (where all other functions are __cdecl by default, anyway). (For 3rd-party code, it could be argued that SAL_CALL is useful on function declarations in the URE stable interface other than non-static member functions, too, in case 3rd-party code uses a compiler switch to change the default calling convention to something other than __cdecl. But loplugin:salcall exempts the URE stable interface, anyway.) One could argue that SAL_CALL, even if today it effectively only affects non- static member functions in MSVC, could be extended in the future to affect more functions on more platforms. However, the current code would already not support that. For example, 3af500580b1c82eabd60335c9ebc458a3f68850c "loplugin:salcall fix functions" changed FrameControl_createInstance in UnoControls/source/base/registercontrols.cxx to no longer be SAL_CALL, even though its address (in ctl_component_getFacrory, in the same file) is passed to cppuhelper::createSingleFactory as an argument of type cppu::ComponentInstantiation, which is a pointer to SAL_CALL function. Change-Id: I3acbf7314a3d7868ed70e35bb5c47bc11a0b7ff6 Reviewed-on: https://gerrit.libreoffice.org/46436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-11Attempt to blind fix build breakerEike Rathke1-0/+1
Change-Id: Ic20cc65b7fa78729d432fbf5e15fabe0e25cf627
2017-12-11tdf#114242 xmlhelp: fix crash in TVChildTarget::Check()Michael Stahl2-15/+23
The ... idiomatic C++ code in TVChildTarget::Check() and SearchAndInsert() handles ownership in non-obvious ways, so it's not surprising that it took offense at the recent conversion to std::unique_ptr. Let's at least try to prevent it from crashing so quickly. (regression from 4b69497e36b941d4db62ae8d5bad863d032fdc50) Change-Id: I0981707a61aee1733e727b1c00346d8ec524362e
2017-12-11loplugin:salcall fix functionsNoel Grandin2-2/+2
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-07loplugin:salcall handle static methodsNoel Grandin2-2/+2
Change-Id: Id6820abec4b8ca8bee26d62b333fd30b42a14aec Reviewed-on: https://gerrit.libreoffice.org/46007 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05loplugin:salcall fix non-virtual methodsNoel Grandin3-3/+3
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-17loplugin:useuniqueptr in TVDomNoel Grandin1-21/+17
Change-Id: I885c202c64f43b89372d079659dd9b5b12677fbd Reviewed-on: https://gerrit.libreoffice.org/44861 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: xmlhelpStephan Bergmann3-4/+4
Change-Id: I0ae8533889742d314938b497d566a4bde722057a
2017-10-23overload std::hash for OUString and OStringNoel Grandin2-14/+10
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>