summaryrefslogtreecommitdiff
path: root/i18nutil
AgeCommit message (Collapse)Author
2021-01-28add string_view variants of methods to O[U]StringBufferNoel
and update the stringview loplugin to detect cases where we can use these new methods. Change-Id: I998efe02e35c8efcb3abfb4d7186165bbe6dfb2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110046 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-22tdf#135590 rotated paper sizes reported as portrait size they are notCaolán McNamara
since... commit ff4896a2af1df6138e9246fe1588dfe8c3748f1a Date: Fri Jun 29 11:36:03 2018 -0300 Sets paper sizes listbox in print dialog see as the above commit added some uses of doSloppyFit to vcl I imagine the calls there want to be able to match rotated paper sizes, but in the cases of tdf#135590 we don't want that behaviour because it doesn't match what the user is presented with, the width and height are swapped. So drop matching against swapped height/width by default, but let calls added in 'Sets paper sizes listbox in print dialog' continue to match rotated sizes. Change-Id: I34aeddf12a7ca22234fbc6394487d3c8da7772ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109784 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-17loplugin:stringviewparam check methods tooNoel
not just functions Change-Id: Icca295dd159002b428b73f2c95d40725434f04d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105789 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-16Instead of labs, use overloaded absStephan Bergmann
...more likely to pick an appropriate version for the involved integer types, esp. after the recent long -> tools::Long changes Change-Id: Ia91259ca35aaf74b0e907de6831fc926f30057f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-10sync filter's paper table with calcs and i18nutilsCaolán McNamara
older ms specs confused JIS and ISO "B" sizes and there are now documented newer sizes not in filter. some of the sizes at https://docs.microsoft.com/en-us/windows/win32/intl/paper-sizes are surely still wrong, e.g. Letter extra paper and I trust the values in calc table more. orientation of ISO B6 Envelope dimensions is still ambiguous to me, so left that alone for now Change-Id: I6b6beb2620fe79f03ad5068eab0657a0b65f1aa4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105521 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-22long->tools::Long in hwpfilter..ooxNoel
Change-Id: I9ab8876aac7b2f8b488db6dfa9c6fd0cecd2238b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104626 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-03loplugin:flatten in configmgr..i18nutilNoel Grandin
Change-Id: Idaeed33df4f1dd1b2acbdaf8a895c5d56c3ca14c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99980 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-01Upcoming improved loplugin:staticanonymous -> redundantstatic: i18nutilStephan Bergmann
Change-Id: I2264559759133cb6617e8a7db28a26749bb59191 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97590 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-29loplugin:simplifybool in hwpfilter..lotuswordproNoel Grandin
Change-Id: Iedfd492c963eb89fe75fdd73cae630e7e1dae119 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95100 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-11Adapt to be able to build against ICU 66Eike Rathke
In case building against system ICU 66 is wanted. Otherwise an interim step on the way to ICU 67. Change-Id: I8c559ee3206afd4f61af4fd3af7dd85911198f3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93985 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2020-05-11change USCRIPT_JAMO language value for UnicodeDaeHyun Sung
Jamo is composition elements of Hangul Syllable change jamo language value that can be written in a given ISO 15924 script code Example] 각 Decomposition of hangul syllable Unicode code point: U+AC01 Hangul(한글) ‘각’ jamo(자모/字母): ‘ᄀ’ plus ‘ᅡ’ plus ‘ᆨ’ choseong(초성/初聲):ㄱ (codepoint: U+1100) jungseong(중성/中聲):ㅏ(codepoint: U+1161) jongseong(종성/終聲):ᆨ (codepoint: U+11A8) Change-Id: I0de11c2b12fbb959a30f6044b680d9c5f01952c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93914 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-04-15loplugin:buriedassign in f,h,i*Noel Grandin
Change-Id: Iac753e528e13cb2565832a484e87f88061bbc91e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92239 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-16Add case table for AdlamAlex Henrie
Change-Id: I8e6bbff8f8d6fa71f71dbbef7ec498ea22d7212b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88740 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2020-02-12Add case table for MedefaidrinAlex Henrie
Change-Id: I7325311a4a0957b1a43c36d04cbefde2ea7461eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88420 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2020-02-10Add case table for Warang CitiAlex Henrie
Change-Id: Idc42ffe7d68f612da759146079fa900b559b1def Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87317 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2020-01-22Add case table for Old HungarianAlex Henrie
Change-Id: Ie49a7b8866ab9c608cca87721fe175c575ffbf26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86566 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2020-01-10Fix Osage lowercase-to-uppercase mappingsAlex Henrie
Change-Id: I8c298a8008000a769e675721bf6b52ded3eae954 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86515 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2020-01-08Fix case mapping for undefined characters in the Osage blockAlex Henrie
Regression from commit 209fc9fd7fa433947af0bf86e210d73fa7f5a045 Change-Id: Icd181d0611b5fe194ba00352a93bf40bef35a8f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85641 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2019-12-20Add case table for Deseret and OsageAlex Henrie
For characters like these that are in Unicode's Supplementary Multilingual Plane, only the low surrogate changes when changing case. Change-Id: I2c4e9880b4c41a6ecfc333bb2710cf1db3f80da7 Reviewed-on: https://gerrit.libreoffice.org/85621 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2019-11-22Extend loplugin:external to warn about classesStephan Bergmann
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend loplugin:external to warn about enums". Cases where free functions were moved into an unnamed namespace along with a class, to not break ADL, are in: filter/source/svg/svgexport.cxx sc/source/filter/excel/xelink.cxx sc/source/filter/excel/xilink.cxx svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx All other free functions mentioning moved classes appear to be harmless and not give rise to (silent, even) ADL breakage. (One remaining TODO in compilerplugins/clang/external.cxx is that derived classes are not covered by computeAffectedTypes, even though they could also be affected by ADL-breakage--- but don't seem to be in any acutal case across the code base.) For friend declarations using elaborate type specifiers, like class C1 {}; class C2 { friend class C1; }; * If C2 (but not C1) is moved into an unnamed namespace, the friend declaration must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace.") * If C1 (but not C2) is moved into an unnamed namespace, the friend declaration must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882> "elaborated-type-specifier friend not looked up in unnamed namespace". Apart from that, to keep changes simple and mostly mechanical (which should help avoid regressions), out-of-line definitions of class members have been left in the enclosing (named) namespace. But explicit specializations of class templates had to be moved into the unnamed namespace to appease <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace". Also, accompanying declarations (of e.g. typedefs or static variables) that could arguably be moved into the unnamed namespace too have been left alone. And in some cases, mention of affected types in blacklists in other loplugins needed to be adapted. And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is not moved into an unnamed namespace (because it is declared in sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler doesn’t give this warning for types defined in the main .C file, as those are unlikely to have multiple definitions." (<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The warned-about classes also don't have multiple definitions in the given test, so disable the warning when including the .cxx. Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4 Reviewed-on: https://gerrit.libreoffice.org/83239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-28Upgrade to ICU 64.2Eike Rathke
As an interim step to upgrade to ICU 65.1 Adds new scripts and Unicode blocks from Unicode 12. Change-Id: Idc4a6b29ffb04bcb424522fcbd29a8db0428c056 Reviewed-on: https://gerrit.libreoffice.org/81611 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-10-05Drop bogus memsetStephan Bergmann
..that is both bad and unnecessary since 8003f8694ac7c4bc117f7ce692339534d37681f0 "loplugin:useuniqueptr in oneToOneMappingWithFlag" changed oneToOneMappingWithFlag::mpIndex from an array of raw pointers to an array of std::unique_ptr. Change-Id: I247a619ebd7804a8a4faee2797f8c4753f9c4ec6 Reviewed-on: https://gerrit.libreoffice.org/80288 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-17avoid some copyingNoel Grandin
Change-Id: I2e8da57f0fe048c3cf7288bf688f9411e62a1ffc Reviewed-on: https://gerrit.libreoffice.org/79035 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-23tdf#42949 Fix IWYU warnings in: animations/ eventattacher/ i18nutil/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I23a6d485ee1ca0bc3801bcc1a6d748b8ed2b490c Reviewed-on: https://gerrit.libreoffice.org/72634 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-09loplugin:indentation in helpcompiler..ioNoel Grandin
Change-Id: Ia3f05662cc9542feeac3096d29e9dec6d1858620 Reviewed-on: https://gerrit.libreoffice.org/67558 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-20Fix typo in codeAndrea Gelmini
It passed "make check" on Linux Change-Id: I577f6ff01e8216ed85556ce4b3365fd924f75608 Reviewed-on: https://gerrit.libreoffice.org/65468 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-11-29Adds 16k papers to print files in vcl and paper files in i18nutilDaniel Silva
Change-Id: Iacb5903e1a51134b65836f33948a1cf5cfc3af0d Reviewed-on: https://gerrit.libreoffice.org/57832 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-11-29Sets paper sizes listbox in print dialogDaniel Silva
Change-Id: Iaeb50f6e854b90c1062d2ed6e3e053a6c26ea520 Reviewed-on: https://gerrit.libreoffice.org/56711 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-11-07tdf#42949 Fix IWYU warnings in include/i18nutil/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Icc3cb8118b225c9b19b451b2a6463c844ef4162d Reviewed-on: https://gerrit.libreoffice.org/62459 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-31loplugin:useuniqueptr in oneToOneMappingWithFlagNoel Grandin
Change-Id: I729d6640c105ca43fdd2e3e702f6f62876db75e5 Reviewed-on: https://gerrit.libreoffice.org/62647 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-18loplugin:staticvar in hwpfilter..salNoel Grandin
Change-Id: I8bf3509637cb295847e0dd667c1862269a192bbe Reviewed-on: https://gerrit.libreoffice.org/61881 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann
...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-09-17New loplugin:externalStephan Bergmann
...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-07-16Upgrade to ICU 62.1Eike Rathke
Change-Id: I9426e77aa85cfe068df59db47b8ac50b59cd4eb3 Reviewed-on: https://gerrit.libreoffice.org/57500 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-06-27fix thread-unsafe return of a reference to a staticLuboš Luňák
The Mapping struct is small, so there's no need to reuse it. Without this, sc/qa/.../sumif_wildcards.fods sometimes fails with calc threading. Change-Id: If1f370bebe8e1afa14f8645d843a056b6f0dbdea Reviewed-on: https://gerrit.libreoffice.org/56449 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-06-05tdf#42949 remove unused compheler includes ..Jochen Nitschke
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-03-12loplugin:redundantfcast look for redundant copies in return statementsNoel Grandin
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-02-02Clean up of dirty hack.Winfried Donkers
Follow up of tdf#103550. The conversion from half to full width characters and vice versa happens per character according to a table. There is no need to have a separate table with exceptions to the general rule. Change-Id: Id611d1d6074cb2489fb0254d8ba9a83d7c26065f Reviewed-on: https://gerrit.libreoffice.org/49102 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2018-01-26tdf#103550 fix issue with HYPHEN-MINUS in Calc function JIS.Winfried Donkers
Change-Id: Ie1e25ea7a0d6f23dfe21f53ed47430be6b357984 Reviewed-on: https://gerrit.libreoffice.org/48523 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2018-01-24loplugin:unused-returns in drawinglayer..svxNoel Grandin
Change-Id: I033a78cc7fe7d8e5086f1c855c4aa371cc98dc7c Reviewed-on: https://gerrit.libreoffice.org/48400 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-18android: use unified headers and llvm-c++ STL (x86) with NDK 16Christian Lohmaier
gnustl (and others) are to be removed in future versions of the ndk also bump gradle and build-tools to current versions along with it arm unfortunately crashes with llvm-c++, so keep with gnustl for now/fix that later Change-Id: Ic794c3293b599b77ec48096bf3283a99c09cbb79 Reviewed-on: https://gerrit.libreoffice.org/45163 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-01-15More loplugin:cstylecast: i18nutilStephan Bergmann
Change-Id: Ibdfec3e35c6424fdd4d9b15ff4f4d7441a5f7e36
2018-01-12More loplugin:cstylecast: i18nutilStephan Bergmann
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: Idca83b62766c2de87bf112cf0bb565e953b7dcb0
2018-01-02tdf#114681: Adding support for case folding in GlagoliticAleksandr Andreev
Change-Id: I3f7f4b7ecfd53a918318c2091a0756ba327c98ba Reviewed-on: https://gerrit.libreoffice.org/47057 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-12-19Explicitly qualify ICU types with icu:: namespaceEike Rathke
It will be required by ICU 61 anyway, see https://ssl.icu-project.org/repos/icu/trunk/icu4c/readme.html#RecBuild Change-Id: Ia051e8e2aa64b0e32a7f16a2afebaef0e4ebf531 Reviewed-on: https://gerrit.libreoffice.org/46739 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-12-13Make loplugin:salcall look into macros tooStephan Bergmann
"Indirect" calls to isSallCallFunction (for canonic and overridden FunctionDecls) already needed to handle many cases of FunctionDecls spanning macros, so it isn't that much more work to make that also work for cases called directly from VisitFunctionDecl. Change-Id: I529f148c8872b86aa1ef082c6cb73db8ab1866e7 Reviewed-on: https://gerrit.libreoffice.org/46367 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-11loplugin:salcall fix functionsNoel Grandin
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 Grandin
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-11-20Upgrade to ICU 60.1Eike Rathke
Change-Id: I6d90f51ee88c4e1005edbaa93d23cfb94cb2acfb Reviewed-on: https://gerrit.libreoffice.org/44871 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-11-17Revert "Upgrade to ICU 60.1"Eike Rathke
This reverts commit f643e1f687e27e7f46c53d7298772d4dddb3e660. Failing in firebird, back to the drawing board.. Change-Id: I087d2fa6e81cf713458b1c9645edc7c1facf148c Reviewed-on: https://gerrit.libreoffice.org/44843 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>