summaryrefslogtreecommitdiff
path: root/l10ntools
AgeCommit message (Collapse)AuthorFilesLines
2019-11-03loplugin:stringaddNoel Grandin1-2/+2
tweak the plugin to be more permissive, then validate by hand afterwards Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654 Reviewed-on: https://gerrit.libreoffice.org/81942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-14loplugin:stringadd look for unnecessary temporariesNoel Grandin2-14/+14
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 Lohmaier1-3/+4
Change-Id: I53b67e8c690b110d2d77e100b8170ac968e35e2b
2019-10-01loplugin:stringadd in helpcompiler..ooxNoel Grandin2-10/+2
Change-Id: I858870d883de10a673d7ce2798bda8c8f511cee5 Reviewed-on: https://gerrit.libreoffice.org/79889 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-27loplugin:referencecasting find more redundant static_castNoel Grandin1-2/+1
Change-Id: I3a51812bbd3fcdc6b11e47cb12962f0d4fa7a2ae Reviewed-on: https://gerrit.libreoffice.org/78191 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-27add Silesian (szl) language packChristian Lohmaier1-0/+1
Change-Id: I47d9659fc21abec652a5a440004c0c2d27ec3b53
2019-08-23Mark move ctors/assignments noexceptMike Kaganski2-2/+2
This should enable using move semantics where possible e.g. in standard containers. According to https://en.cppreference.com/w/cpp/language/move_constructor: To make strong exception guarantee possible, user-defined move constructors should not throw exceptions. For example, std::vector relies on std::move_if_noexcept to choose between move and copy when the elements need to be relocated. Change-Id: I6e1e1cdd5cd430b139ffa2fa7031fb0bb625decb Reviewed-on: https://gerrit.libreoffice.org/77957 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-12Fix typosAndrea Gelmini1-1/+1
Change-Id: I72cc7132721706b3a5e06480efbae42065c36661 Reviewed-on: https://gerrit.libreoffice.org/77319 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-01new loplugin:mapindexNoel Grandin1-1/+1
Change-Id: I6b5f73b2187009e95d4d666e03e5803f522cee06 Reviewed-on: https://gerrit.libreoffice.org/76584 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): l10ntoolsStephan Bergmann1-2/+2
Change-Id: I98476e17e0ab6009d822205c7b31935173da2722 Reviewed-on: https://gerrit.libreoffice.org/76666 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-29Fix typosAndrea Gelmini1-3/+3
Change-Id: Ic2fb0772648b3f93c2fdfa4d2f663b6ede2ead51 Reviewed-on: https://gerrit.libreoffice.org/76507 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-09tdf#126030 Translate automatic chart title in OOXML chartsGabor Kelemen1-0/+1
Add l10n support to oox module to achieve this Change-Id: I7bece62bdf5ef0f0d1ef424074f16cef94649d77 Reviewed-on: https://gerrit.libreoffice.org/74819 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-07-04cid#1448320: Resource leak in object (l10ntools/treemerge)Julien Nabet1-0/+3
Change-Id: I9d09d690e003d73878ef2e30da11cf079d0db441 Reviewed-on: https://gerrit.libreoffice.org/75098 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-27Ditch "using namespace U_ICU_NAMESPACE;", qualify icu:: insteadEike Rathke1-3/+2
geez.. for two places.. Change-Id: I4855fc92290547b0e1ca6ff5b2f10a333c6caa3f Reviewed-on: https://gerrit.libreoffice.org/74815 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-06-25improve loplugin:simplifyconstructNoel Grandin2-4/+3
Change-Id: If863d28c6db470faa0d22273020888d4219e069e Reviewed-on: https://gerrit.libreoffice.org/74559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-29Related: tdf#82184 correct wrong or obsoleted LCIDs for MSIEike Rathke1-4/+4
This solves the cases of Oromo, Kinyarwanda and Sinhala. Kabyle is a problem on its own and apparently not easily solvable, see attempts in https://gerrit.libreoffice.org/71247 Change-Id: Id001aeba07a95f283b4cd6057c1f6e8088de940a Reviewed-on: https://gerrit.libreoffice.org/71535 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-04-24tdf#124791: Fix Gaelic (Scotland) (gd-GB) LCID in MSI installerMike Kaganski1-1/+1
... which was obviously omitted in commit 6b678c135da07f34da1bf7b19562366361e95085, which introduced the correct value of 0x0491 (1169) in addition to the pre-existing 0x043C (1084). The new value is used when user sets relevant entry in Region and Language control panel applet (intl.cpl); having the old value in MSI summary information blocks auto-detection of proper installer language. [MS-LCID] Appendix A mentions that the new code is available since Win7, so we are good with the fix. [MS-LCID] https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c Co-authored-by: Eike Rathke <erack@redhat.com> Change-Id: Ic03b0e8eaf145c662fde48846cd5307e362d4d63 Reviewed-on: https://gerrit.libreoffice.org/71242 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-13loplugin:sequentialassign in embeddedobj..l10ntoolsNoel Grandin1-2/+0
Change-Id: I69377e2f96a376a7a5ccaec268c4f92c00a250f7 Reviewed-on: https://gerrit.libreoffice.org/70705 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-03Revert "add more append methods to *StringBuffer"Noel Grandin1-1/+1
This reverts commit 8cfa7f4dc00f3dd37e57917ef25c806b0e9e6e73. comment from sberg: we already have 70519a43e0d89a6b5d89859a6851f8c757c6b0c7 "Replace OUStringBuffer::appendCopy with append(std::u16string_view)" (which can be extended to OStringBuffer if needed) Change-Id: Ifcc550a8cf26ef38ad49fde8b067f53c999c9276 Reviewed-on: https://gerrit.libreoffice.org/70178 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-03add more append methods to *StringBufferNoel Grandin1-1/+1
which performs the append without needing the creation of a temporary *String Change-Id: If9ad3222275f26659db2e7df8d34f068977c4d17 Reviewed-on: https://gerrit.libreoffice.org/69826 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-20Reduce OString operationsMatteo Casalin1-31/+10
Change-Id: I13291ca27574d3536e55d8207a0b13b2694385be Reviewed-on: https://gerrit.libreoffice.org/69233 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-18Remove broken MergeDataHashMap optimizationStephan Bergmann2-155/+12
...which apparently didn't take into account that inserting into a std::unordered_map may invalidate iterators, which now started to cause build failures like > [PRP] dictionaries/hu_HU/dialog/hu_HU_de > warn:sal.osl:25175:25175:sal/osl/unx/thread.cxx:1026: RTL_TEXTENCODING_DONTKNOW -> _ASCII_US > .../gcc/trunk/inst/include/c++/9.0.1/debug/safe_iterator.h:307: > In function: > __gnu_debug::_Safe_iterator<_Iterator, _Sequence, _Category>::pointer > __gnu_debug::_Safe_iterator<_Iterator, _Sequence, > _Category>::operator->() const [with _Iterator = > std::__detail::_Node_iterator<std::pair<const rtl::OString, > std::unique_ptr<MergeData> >, false, true>; _Sequence = > std::__debug::unordered_map<rtl::OString, std::unique_ptr<MergeData> >; > _Category = std::forward_iterator_tag; > __gnu_debug::_Safe_iterator<_Iterator, _Sequence, _Category>::pointer = > std::pair<const rtl::OString, std::unique_ptr<MergeData> >*] > > Error: attempt to dereference a singular iterator. > > Objects involved in the operation: > iterator "this" @ 0x0x5a8228 { > type = std::__detail::_Node_iterator<std::pair<rtl::OString const, std::unique_ptr<MergeData, std::default_delete<MergeData> > >, false, true> (mutable iterator); > state = singular; > references sequence with type 'std::__debug::unordered_map<rtl::OString, std::unique_ptr<MergeData, std::default_delete<MergeData> >, std::hash<rtl::OString>, std::equal_to<rtl::OString>, std::allocator<std::pair<rtl::OString const, std::unique_ptr<MergeData, std::default_delete<MergeData> > > > >' @ 0x0x5a81c8 > } > /bin/sh: line 1: 25175 Aborted (core dumped) LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"$I/program:$I/program" $W/LinkTarget/Executable/propex -i $S/dictionaries/hu_HU/dialog/hu_HU_en_US.properties -l de -m ${MERGEINPUT} -o $W/PropertiesTranslateTarget/dictionaries/hu_HU/dialog/hu_HU_de.properties > make[1]: *** [.../solenv/gbuild/Dictionary.mk:88: .../workdir/PropertiesTranslateTarget/dictionaries/hu_HU/dialog/hu_HU_de.properties] Error 134 with trunk libstdc++ in debug mode. Both classes MergeData and MergeDataHashMap became redundant. Change-Id: I771548a6155e14037d84acfd74cd13566a26a8d7 Reviewed-on: https://gerrit.libreoffice.org/69395 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-14Fix TRUE to sal_True conversion in stringMatteo Casalin1-2/+2
This would lead to always false condition, since that text should be uppercase. Introduced in d210c6ccc30466e98240c1409df0550514668d68. Reduce parentheses while at it. Change-Id: Iec9cbbfd0a596ad1d4dcba50aa3a5c00a54ef425 Reviewed-on: https://gerrit.libreoffice.org/69234 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-05Group some more common codeMatteo Casalin1-23/+12
Change-Id: I2bf3e8afd9f330e8d7377300163a3224ed4db05c Reviewed-on: https://gerrit.libreoffice.org/68179 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-05Use optimized OString concatenationMatteo Casalin1-17/+11
Change-Id: Iaefacf4a57398d0e88b4de7552af11832db3e881 Reviewed-on: https://gerrit.libreoffice.org/68178 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-05Use optimized OString concatenationMatteo Casalin1-30/+12
Change-Id: I7c74e007cb382701c3d9c41f9a6fb76ff0cb19fe Reviewed-on: https://gerrit.libreoffice.org/68120 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-05Avoid unneeded OUString copyMatteo Casalin1-7/+4
Change-Id: I43d66f1bf4fc4a17f7dbea62e3fb13675dbbfb8a Reviewed-on: https://gerrit.libreoffice.org/68119 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-03yyinput() returns intStephan Bergmann1-1/+1
Change-Id: I2e1958bff9778bab65b5c972bc9e0721a86546f5 Reviewed-on: https://gerrit.libreoffice.org/68630 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-28loplugin:unreffunStephan Bergmann4-4/+4
Change-Id: I983394e10e1a316fe01bd3925913e5e65f944b68 Reviewed-on: https://gerrit.libreoffice.org/68470 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-28Remove unused YYWarning functions (cargo cult?)Stephan Bergmann2-21/+0
Change-Id: I9cb03530150ee35bdaee4920dd2e818007a0a658 Reviewed-on: https://gerrit.libreoffice.org/68469 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-28loplugin:includeformStephan Bergmann2-8/+8
Change-Id: Id2c44c104a417feba152d4af43caca561f3432bf Reviewed-on: https://gerrit.libreoffice.org/68465 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-28loplugin:externvarStephan Bergmann2-3/+3
Change-Id: I7f09837e76a8368fd60aed1bb3a16fd0434e11ec Reviewed-on: https://gerrit.libreoffice.org/68466 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-27Untabify .l files (to silence loplugin:indentation warnings)Stephan Bergmann2-131/+131
Change-Id: I8368c8a1d52f6c55a8cea952b2b02345e41c1e5c Reviewed-on: https://gerrit.libreoffice.org/68448 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-27Add missing modelines to .l filesStephan Bergmann2-2/+10
...and change connectivity/source/parse/sqlflex.l license header from using (unusual, anyway) // comments to using /* */ comment, so that it can go before Flex's opening %{ Change-Id: I371890e937cc5055405c17226dd87ba1694688aa Reviewed-on: https://gerrit.libreoffice.org/68433 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-27loplugin:unusedfields look for classes where we can make all the..Noel Grandin1-2/+1
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-23loplugin:unusedfields in l10ntools..saxNoel Grandin2-15/+0
Change-Id: I6e4ff4853c3995072b020af54549dc81303a4fde Reviewed-on: https://gerrit.libreoffice.org/68225 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18Simplify containers iterations in [f-l]*Arkadiy Illarionov1-2/+2
Use range-based loop or replace with STL functions Change-Id: Ib3fab47318d1bfbb4df8f886a8cd9596525a420f Reviewed-on: https://gerrit.libreoffice.org/67914 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11new loplugin writeonlyvarsNoel Grandin1-2/+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-09loplugin:indentation in jvmfwk..lotuswordproNoel Grandin1-1/+1
Change-Id: I1af665f4c6d34d8514dd23bb7a3eba700ce3ddbc Reviewed-on: https://gerrit.libreoffice.org/67559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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>