summaryrefslogtreecommitdiff
path: root/l10ntools
AgeCommit message (Collapse)AuthorFilesLines
2018-11-29loplugin:stringconstant look for unnecessary OString constructor useNoel Grandin2-4/+4
and tweak the methods in check.hxx to make them more flexible when called with dc.Class(xxx ? "foo" : "bar") Change-Id: I881fe628f22121ced4d8849715d6b1c92b092da1 Reviewed-on: https://gerrit.libreoffice.org/64207 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-29remove unnecessary "if (!empty()" checks before loopsNoel Grandin1-5/+2
found with git grep -n -A4 'if.*!.*empty' | grep -B3 -P '(\bfor)|(\bwhile)|(\bdo)' Change-Id: I582235b7cf977a0f9fb4099eb306fdb4a07b5334 Reviewed-on: https://gerrit.libreoffice.org/64169 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-28tdf#121697 XHP extensionsOlivier Hallot1-2/+13
This is the core part of the bug, and is WIP Extend the XML parser to include new incantations of the <paragraph> tag, namely <h1> to <h6> <note>, <tip> and <warning> Extension to the <item> tag: <menuitem>, <input>, <literal>, <widget> and <keycode> Change-Id: Idaed321cc8756fa6bcf4fbc170982365ff33d4d7 Reviewed-on: https://gerrit.libreoffice.org/63955 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-11-23remove unused enums in reportdesign,linguistic,l10ntools,vcl,svxNoel Grandin1-11/+0
Change-Id: I3ae854f9fed485be915ded5bc4d7e93f5db23dc6 Reviewed-on: https://gerrit.libreoffice.org/63891 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-18cppcheck: fix returnDanglingLifetime (l10ntools)Julien Nabet1-1/+1
Change-Id: Ia3c094ee65be3f5048df6896a4a6428bdd8fed10 Reviewed-on: https://gerrit.libreoffice.org/63527 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-11-17pocheck: don't throw away Plural-Forms headerChristian Lohmaier3-4/+39
also don't change POT creation date when rewriting a po file, update Po-Revision instead. When creating templates, put X-Accelerator before X-Generator (like pootle would order it) Change-Id: I7fec4cb1c50e27b87decd9a892de3f01a02253ed Reviewed-on: https://gerrit.libreoffice.org/63416 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-11-17localize: sort directories to have predictable sorting in pot filesChristian Lohmaier1-34/+21
also remove pre-onegit special handling Change-Id: Ie60be508a188e00b9eea1b743ea10f1f985c459e Reviewed-on: https://gerrit.libreoffice.org/63288 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-11-06loplugin:collapseif in dbaccess..lotuswordproNoel Grandin1-5/+3
Change-Id: Ia2a0d25c3833dfde0cd28337361f3cbd2aa29662 Reviewed-on: https://gerrit.libreoffice.org/62934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-31loplugin:useuniqueptr in l10ntoolsNoel Grandin4-22/+19
Change-Id: Ib8dafdb2b3831cdd9481fd19b340ac377c8dc9db Reviewed-on: https://gerrit.libreoffice.org/62649 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-27pocheck: don't choke on plural formsChristian Lohmaier1-2/+25
Change-Id: I51a82ce5fc09d44ebc6f7c06c67b475ee2adf68b Reviewed-on: https://gerrit.libreoffice.org/62419 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
2018-10-23clang-tidy performance-unnecessary-copy-init in idl..reportdesignNoel Grandin2-8/+7
Change-Id: I4b2eda375bbfe1ba35a45168515d885935adcb76 Reviewed-on: https://gerrit.libreoffice.org/62217 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-22add Lower Serbian (dsb) language packChristian Lohmaier1-0/+1
Change-Id: Ibafa81b412036e98fa9ab047fc8e204660eae120
2018-10-19clang-tidy readability-container-size-emptyNoel Grandin2-2/+2
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19clang-tidy readability-misleading-indentationNoel Grandin2-3/+2
Change-Id: I4673fc7c694924b41d048a1918ddb8b0e0af1f79 Reviewed-on: https://gerrit.libreoffice.org/61935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-18loplugin:staticvar in hwpfilter..salNoel Grandin1-3/+3
Change-Id: I8bf3509637cb295847e0dd667c1862269a192bbe Reviewed-on: https://gerrit.libreoffice.org/61881 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17clang-tidy readability-redundant-smartptr-getNoel Grandin1-1/+1
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-08l10ntools: remove unused srclexAndras Timar2-276/+0
Change-Id: I464309a2409485b34bd9662372bedd897b41e474 Reviewed-on: https://gerrit.libreoffice.org/61490 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2018-10-01fix of extension description l10nAndras Timar1-1/+9
Change-Id: Ica102309627fade2a064ee5516e84801affe4082 Reviewed-on: https://gerrit.libreoffice.org/61184 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-30pocheck: tdf#119080 update po checker tool for post LO 6.0 po filesAndras Timar1-101/+16
Change-Id: I700eaa0d412fb609fdc89ca07003534e6bb13854
2018-09-30pocheck: we need to access msgctxt of a PO entryAndras Timar2-0/+9
Change-Id: I43978811056692623344239d2c6e4763fa7de16b Reviewed-on: https://gerrit.libreoffice.org/61165 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2018-09-30pocheck: PO entries can have multiple source code reference lines since LO 6.0Andras Timar1-10/+13
Change-Id: Icbe0dd5e63eb5b10d162f34347ab86dde547dc62 Reviewed-on: https://gerrit.libreoffice.org/61164 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2018-09-30pocheck: do not change msgctxt when po is regeneratedAndras Timar1-6/+5
Change-Id: I220fce194813f783c807c23eeffd2421cadd7636 Reviewed-on: https://gerrit.libreoffice.org/61163 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2018-09-30pocheck: handle the '#, c-format' flagAndras Timar1-0/+8
Change-Id: I7d1d344e79e0c23886a21032d2ce85e5abb199cb Reviewed-on: https://gerrit.libreoffice.org/61162 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2018-09-30pocheck: stop further processing, if input file cannot be openedAndras Timar1-5/+28
Change-Id: Ida6a13e112871ab6864ae2a32a33a15a591154c2 Reviewed-on: https://gerrit.libreoffice.org/61161 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2018-09-30pocheck: fix usage messageAndras Timar1-1/+1
pocheck needs environment variables that bin/run does not provide Change-Id: I0de148363d60c515d4024cd0e97d1025ce50b6a5 Reviewed-on: https://gerrit.libreoffice.org/61160 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2018-09-17New loplugin:externalStephan Bergmann2-2/+2
...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-09loplugin:simplifyconstruct in l10ntools..packageNoel Grandin2-3/+1
Change-Id: I8dba8ef1e7455af1e55bbd6086b49c0606bf4927 Reviewed-on: https://gerrit.libreoffice.org/60212 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-09Revert "clang-tidy performance-move-const-arg"Noel Grandin1-1/+1
This reverts commit 3d604d1cd6cc70ef96782ef769f0479b509987a8. comments from sberg: I assume dropping the std::move from aCurSel(std::move(aSel)) is caused by performance-move-const-arg's warning "if std::move() is called with an argument of a trivially-copyable type" (<https://clang.llvm.org/extra/clang-tidy/checks/performance-move-const-arg.html>). For my taste, that approach is too tightly tied to a class's current implementation details, something that may change over time. Imagine a trivially copyable class C with a raw pointer member (where the lifecycle of the pointed-to object is tracked by some higher-level, likely broken protocol). Now, that protocol is fixed and the raw pointer member is replaced with a std::shared_ptr. C is no longer trivially copyable, and the dropped std::move would turn out to be beneficial again. (Also, if Clang and clang-tidy did implement the fixed rules for trivially copyable classes from CWG1734/C++17, where a subset of a trivially copyable class's copy/move members may be deleted, the above rule to warn "if std::move() is called with an argument of a trivially-copyable type" would no longer make sense as written; consider a trivially copyable class whose copy ctor has been deleted.) Change-Id: Icb91610e50ed98b8f55fe6323bdfa48c8cb9b4b9 Reviewed-on: https://gerrit.libreoffice.org/60166 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-06clang-tidy performance-move-const-argNoel Grandin1-1/+1
Change-Id: I607891e120688b746c8a4c577018d97147a79217 Reviewed-on: https://gerrit.libreoffice.org/60029 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-05loplugin:useuniqueptr in l10ntoolsNoel Grandin2-9/+7
Change-Id: I8aaab2f3055bd0856926803ee7f71107b7cb1851 Reviewed-on: https://gerrit.libreoffice.org/59994 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-30Add 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 from l10ntools to reportdesign Change-Id: Ia2dc93dd848c2dc0b6a8cb6e19849c614ec55198 Reviewed-on: https://gerrit.libreoffice.org/58205 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-27l10ntools: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann1-0/+5
...by explicitly defaulting the copy/move functions (and, where needed in turn, also a default ctor) for classes that have a user-declared dtor that does nothing other than an implicitly-defined one would do, but needs to be user- declared because it is virtual and potentially serves as a key function to emit the vtable, or is non-public, etc. Change-Id: I4b3833ceb9da0a83be45c808f163dfad97f9c946 Reviewed-on: https://gerrit.libreoffice.org/58164 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-27new loplugin:stringloop, and applied in variousNoel Grandin1-4/+4
look for OUString being appended to in a loop, better to use OUStringBuffer to accumulate the results. Change-Id: Ia36e06e2781a7c546ce9cbad62727aa4c5f10c4b Reviewed-on: https://gerrit.libreoffice.org/58092 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-26loplugin:returnconstant in sal,l10ntools,sotNoel Grandin6-14/+10
Change-Id: I3f4e4efa8ea839f48b9700ebc26c7e5ab279ce49 Reviewed-on: https://gerrit.libreoffice.org/57975 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-23Fix typosAndrea Gelmini1-1/+1
Change-Id: If0d8f4033d9bc20f521d33d732fb349f0df5eeef Reviewed-on: https://gerrit.libreoffice.org/57822 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-06-13Add some help content to test-passive.oxtStephan Bergmann1-0/+2
...mainly to test how well/poorly extension help is supported by --with-help=html, but also as a kind of reference implementation. (There are also extensions in odk/examples/ that contain help content, namely odk/examples/DevelopersGuide/Extensions/DialogWithHelp/ containing context- sensitive help for a dialog, a topic that is not covered here.) See <https://wiki.openoffice.org/wiki/Documentation/DevGuide/Extensions/ Help_Content#Integration_into_the_OpenOffice.org_help_system> for the ways an extension's help content can be integrated into the "classic" (plain --with-help) help system (citing sub-section headings used in that document): * Help Viewer Contents page: The contained help.tree provides a "The test-passive Extension" section with a "The test-passive Extension" page (main.xhp). * Help Viewer Index page: The contained main.xhp provides index entries for "test-passive extension" and "extensions"-"test-passive", and---only on the index pages of Calc and Writer ---for "test-passive extension in Calc and Writer". * Help Viewer Find page: The contained main.xhp is indexer="include", so it should be found by e.g. searching for "bla bla". * Context sensitive help and extended tool tips: The contained Addons.xcu has been extended with a small (floating by default) toolbar containing a "native" button (doing the same as the "passive - native" menu entry), and the contained main.xhp provides an extended tooltip of "Show the test-passive extension's native dialog" for that toolbar button (displayed when using "Help - What's This?" and hovering over the button). For context-sensitive help for dialogs, see the mention of odk/examples/DevelopersGuide/Extensions/DialogWithHelp/ above. The contained help is only provided in "en" localization, which should thus be used as fallback regardless for which locale LO is run. The help-related XML files need to provide identifiers in lots of places, many of which appear to be unused for the given example uses. I specified those as empty strings. The workdir/Extension/test-passive.oxt extension can be built with `make Extension_test-passive`. Change-Id: I0e75f35df85683c9fae1d1384fa6afeaeb8a687d Reviewed-on: https://gerrit.libreoffice.org/55736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-06-06enable incremental linking on windowsNoel Grandin1-0/+3
requires a handful of workarounds Change-Id: I77c25580135eeec437716eceea1412607f8d14ca Reviewed-on: https://gerrit.libreoffice.org/55244 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-23tdf#117729 add Frisian (fy) UI langaugeChristian Lohmaier1-0/+1
Change-Id: I46f75e969b1252a95118888507c116f44578dfbd Reviewed-on: https://gerrit.libreoffice.org/54699 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-05-07tdf#116745 handle <object> element when localizingOlivier Hallot1-2/+3
The <object> element was brought to Pootle by wrapping it in a <paragraph> element. However, the localized build helper changed < and > to HTML entities, which broke the rendering of the localized <object> element. This patch addresses the issue and keep the < and > as is. Change-Id: If03c02b8a4170284a5f7e5caa58709b3832151ed Reviewed-on: https://gerrit.libreoffice.org/53810 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-03-29loplugin:unusedmethodsNoel Grandin1-1/+0
Change-Id: I7805ac9bc6f8c0aa5ba4804777e7d7c2c29a78f3 Reviewed-on: https://gerrit.libreoffice.org/52066 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-27loplugin:useuniqueptr in MergeDataHashMapNoel Grandin2-9/+7
Change-Id: I263c187bab997b6ab929ca04788214d7418cb449 Reviewed-on: https://gerrit.libreoffice.org/51928 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-25Use for-range loops in some modulesJulien Nabet6-39/+31
jvmaccess, jvmfwk, l10ntools, libreofficekit and linguistic Change-Id: I9d290d1098b25ccb3aee19d2df18c18f4aa65105 Reviewed-on: https://gerrit.libreoffice.org/51495 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-09Remove dead Executable_genlangStephan Bergmann41-6204/+0
...originally introduce with 999c68f12f1d95b16a97294949a0e6ba6d3ba259 "genLang project (awareness)", but apparently never took off. Change-Id: I6f61271a75d96750dea63de596b7745c2f589b83 Reviewed-on: https://gerrit.libreoffice.org/49389 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-22remove some sal_Bool remnantsNoel Grandin1-1/+1
Change-Id: I0a9637aca523a73fbdbbd22f9ad735d6d1ba6898 Reviewed-on: https://gerrit.libreoffice.org/48273 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-12More loplugin:cstylecast: l10ntoolsStephan Bergmann3-3/+3
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: I062bc41d2feb8b50371da345edac0e65e0d187b2
2018-01-11loplugin:useuniqueptr in l10ntoolsNoel Grandin6-44/+27
update plugin to find all places where we are unconditionally deleting stuff in a destructor Change-Id: Ia0fedc2420c7717ed2bdd8d3bb00262d2a63e0bc Reviewed-on: https://gerrit.libreoffice.org/47724 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-19inline use-once typedefsNoel Grandin2-7/+4
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-08cppcheck: fix some reportsJulien Nabet3-15/+9
variableScope reports in comphelper/drawinglayer/editeng +filter/framework/l10ntools Change-Id: I4575428773e8b9b3efedabb44fdcd6d8175ac46a Reviewed-on: https://gerrit.libreoffice.org/46116 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-07Replace list by vector in pocheck (l10ntools)Julien Nabet1-7/+7
+ use for range loops which included std::list while at it. Change-Id: If80e63e54f6ba39b38f5de92f97642737727e60a Reviewed-on: https://gerrit.libreoffice.org/46039 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-20look for =() in loplugin:unnecessaryparenNoel Grandin1-1/+1
Change-Id: I4f9b71ff7767e90987bb40358fc46ed5d1d571d0 Reviewed-on: https://gerrit.libreoffice.org/44944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>