summaryrefslogtreecommitdiff
path: root/l10ntools/source/pocheck.cxx
AgeCommit message (Collapse)Author
2020-12-08Assert that certain env vars are set in these build-time toolsStephan Bergmann
All of those env vars are exported from config_host.mk or config_host_lang.mk. The asserts guard potential future changes from using OString to using std::string_view, where OString has an undocumented feature of allowing construction from a null pointer. Change-Id: I7bb2217fb1d38300bf169b17e9e72dafc6970b2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107414 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-08Use OString::Concat(...) + ... instead of ... + OStringLiteral(...)Stephan Bergmann
...in some places Change-Id: Ia1d6135c89bcc18d436d8c0d353ca93195dda432 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107412 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-14loplugin:stringadd look for unnecessary temporariesNoel Grandin
which defeat the *StringConcat optimisation. Also make StringConcat conversions treat a nullptr as an empty string, to match the O*String(char*) constructors. Change-Id: If45f5b4b6a535c97bfeeacd9ec472a7603a52e5b Reviewed-on: https://gerrit.libreoffice.org/80724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-02pocheck: also preserve header in check for function namesChristian Lohmaier
Change-Id: I53b67e8c690b110d2d77e100b8170ac968e35e2b
2018-11-29loplugin:stringconstant look for unnecessary OString constructor useNoel Grandin
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-17pocheck: don't throw away Plural-Forms headerChristian Lohmaier
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-10-23clang-tidy performance-unnecessary-copy-init in idl..reportdesignNoel Grandin
Change-Id: I4b2eda375bbfe1ba35a45168515d885935adcb76 Reviewed-on: https://gerrit.libreoffice.org/62217 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-30pocheck: tdf#119080 update po checker tool for post LO 6.0 po filesAndras Timar
Change-Id: I700eaa0d412fb609fdc89ca07003534e6bb13854
2018-09-30pocheck: stop further processing, if input file cannot be openedAndras Timar
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 Timar
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-03-25Use for-range loops in some modulesJulien Nabet
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>
2017-12-07Replace list by vector in pocheck (l10ntools)Julien Nabet
+ 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-10-23loplugin:includeform: l10ntoolsStephan Bergmann
Change-Id: I73eed5cbaaa1a0668f0dfa89a1a26883f64b3107
2015-11-06coverity#1338269 Uncaught exceptionCaolán McNamara
Change-Id: I32bfeb0ded37da05eecc97b92d9f724d59123fce
2014-11-28Fold URE: Linux ure/lib/* -> program/Stephan Bergmann
The ../../../program/ links in the URE jar Class-Paths are a temporary kludge (and juh.jar had lacked adaption for Mac OS X). Change-Id: I2542d8a582866485dd61c05df3fc6b4b39a8403d
2014-11-06Revert "use the new OUString::fromUtf8 method"Stephan Bergmann
This reverts commit 05050cdb23de586870bf479a9df5ced06828d498, not all places that use e.g. OStringToOUString to convert potential UTF-8 are guaranteed to fulfil the prerequisites necessary to use fromUtf8 (and some places like e.g. in codemaker are happy with the best-effort effect of OStringToOUString's OSTRING_TO_OUSTRING_CVTFLAGS).
2014-11-06use the new OUString::fromUtf8 methodNoel Grandin
Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77
2014-07-01New loplugin:stringconcatStephan Bergmann
Change-Id: Id7c517fb37bc28797c45fc0dde83e866f2aa4aac
2014-06-16update usage instructions of pocheck toolAndras Timar
Change-Id: Ibc1c5051a601a83a6616e6a22c45b05394c54e88
2014-03-18Find places where OUString and OString are passed by value.Noel Grandin
It's not very efficient, because we generally end up copying it twice - once into the parameter and again into the destination OUString. So I create a clang plugin that finds such places and generates a warning so that we can convert them to pass-by-reference. Change-Id: I5341a6ea9e3190f4b4c05c42c85595e3dcd83361
2014-02-26Remove visual noise from l10ntoolsAlexander Wilms
Change-Id: Ia10056ae9e1b9adfe74f299afac5c3c84fa8cea7 Reviewed-on: https://gerrit.libreoffice.org/8278 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-26Fix memory leaksMatteo Casalin
Change-Id: I21662cb52c51332700e1021ae55d92cb46ccc15a Reviewed-on: https://gerrit.libreoffice.org/6029 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-05CID#1078786: fix memory leakMarkus Mohrhard
Change-Id: I17a257f2abe90e8d489fa1af0e0889934dc3fd47
2013-09-05CID#1078787: fix memory leakMarkus Mohrhard
Change-Id: Ia54965d35ffe29e32b85cd720ecd41495ff72063
2013-09-02PoHeader constructure problem with boostNorbert Thiebaud
No idea why that seems to work on other platform but 10.6 SDK does not like it at all Change-Id: I145b03874ba948cb29c998552e852f29999bc471
2013-09-02pocheck now removes entries from .po files which are incorrectViktor Varga
Change-Id: I1749714154be9c2aea7a8623719c38601abc13ba Reviewed-on: https://gerrit.libreoffice.org/5750 Reviewed-by: Andras Timar <atimar@suse.com> Tested-by: Andras Timar <atimar@suse.com>
2013-08-22pocheck: Math symbol names (from symbol.src) must not contain spacesAndras Timar
Change-Id: I4195ae747229dd5f991acc8ed5764b42aeb73cf3
2013-08-20Missing + signsStephan Bergmann
Change-Id: I60cfb30c7caab308a0cbe415ba04e1245ed3dd9c
2013-08-20fdo#67786 pocheck tool for checking translationsAndras Timar
Pootle has many checks, but there are cases which are not covered. Therefore I wrote a tool which checked three types of translation errors: 1. Unique style names. 2. Unique spreadsheet function names. 3. Missing trailing '|' in Windows installer translation. Usage: make cmd cmd=solver/*/bin/pocheck It checks all languages and prints the report to stdout. Change-Id: I89aad66ea41c0ebe4a6f45beaaf86afd1a6439cc