summaryrefslogtreecommitdiffstats
path: root/i18npool
Commit message (Collapse)AuthorAgeFilesLines
* loplugin:buriedassign in dbaccess..ooxNoel Grandin2018-11-162-18/+23
| | | | | | | Change-Id: Ic0ca695a1d9d05418213475a68e233953136cc8e Reviewed-on: https://gerrit.libreoffice.org/63468 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#120703 PVS: V560 Properly compare current to cDecimalSepAltMike Kaganski2018-11-121-1/+1
| | | | | | | | | | | | V560 A part of conditional expression is always false: current == cDecimalSep. Assuming a copypaste error in commit 21052ba2edeef9e16bf90fea62f007b1131c73c0. Compare to a similar case below (line 817). Change-Id: Iebd84aa8df3e37b9a5e4fdc7ce7a25a0704a260f Reviewed-on: https://gerrit.libreoffice.org/63269 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
* fix missing "else" in transliterateBulletNoel Grandin2018-11-121-1/+1
| | | | | | | | | | | | | | | | | ever since commit f1830339193643466c1dd76dc37594c21ab3ac4f Date: Tue Apr 8 15:07:08 2003 +0000 INTEGRATION: CWS calc06 (1.2.44); FILE MERGED not it will make much difference to the logic found by experimental loplugin:indentation Change-Id: I2d724ababa1664a87f2822ed8b59f3e3cd50e5e4 Reviewed-on: https://gerrit.libreoffice.org/63287 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* clang-tidy: (WIP) bugprone-too-small-loop-variable findings 2Tamás Zolnai2018-11-101-1/+1
| | | | | | | Change-Id: I1ddf3fe0e5fad265ae14712a23469b684253079d Reviewed-on: https://gerrit.libreoffice.org/63241 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski2018-11-101-2/+1
| | | | | | | Change-Id: I0b3c407331bfa1fa0c5003250d327d4f26de3643 Reviewed-on: https://gerrit.libreoffice.org/63235 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* loplugin:collapseif in sdext..svxNoel Grandin2018-11-071-7/+5
| | | | | | | Change-Id: I188d9e9b53e00acfbae3c7acd54de28f084c4b3f Reviewed-on: https://gerrit.libreoffice.org/62985 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* convert some macros to local functionsNoel Grandin2018-11-061-2/+4
| | | | | | | Change-Id: If2c89f0f53615f6200b6cd1fb6267cc9b47df927 Reviewed-on: https://gerrit.libreoffice.org/62884 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* gbuild: rename value OS=IOS to OS=iOSMichael Stahl2018-11-013-3/+3
| | | | | | | | | | | | | | | | This gets rid of the horrible hack in gbuild.mk to accomodate the case-incorrect iOS platform makefiles that cannot be renamed without upsetting git on file systems that sadly lack the case sensitivity feature. Keep the macro defined to IOS though. Change-Id: I1022bfef4900da00e75fc1ccce786b20f8673234 Reviewed-on: https://gerrit.libreoffice.org/62705 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
* clang-tidy performance-unnecessary-copy-init in editeng..i18npoolNoel Grandin2018-10-231-6/+6
| | | | | | | Change-Id: I2ee2c8d15d8700cfaa1697363da4557c741a5f36 Reviewed-on: https://gerrit.libreoffice.org/62216 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:staticvar in variousNoel Grandin2018-10-222-2/+2
| | | | | | | | | | | looks for variables that can be declared const and static i.e. they can be stored in the read-only linker segment and shared between different processes Change-Id: I8ddc6e5fa0f6b10d80c75d5952df8ddd311cf892 Reviewed-on: https://gerrit.libreoffice.org/61591 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* clarify Calendar_jewish::getDisplayString a littleCaolán McNamara2018-10-191-2/+2
| | | | | | | Change-Id: I7abecaebd296d404e6a095b2befe5da07d346e75 Reviewed-on: https://gerrit.libreoffice.org/62017 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* clang-tidy readability-redundant-smartptr-getNoel Grandin2018-10-174-4/+4
| | | | | | | | | 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>
* clang-tidy misc-redundant-expressionNoel Grandin2018-10-151-1/+1
| | | | | | | Change-Id: I708b0b486a233071f95592ccdb97f27fc35a23c4 Reviewed-on: https://gerrit.libreoffice.org/61783 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann2018-10-093-10/+10
| | | | | | | | | | | | | | | | ...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>
* Resolves: tdf#119613 [*-ZA] default to ISO 8601 date formatEike Rathke2018-10-011-7/+21
| | | | | | | | | | This also made it necessary to adapt the unit tests that checked for the old default format in output. Change-Id: Ie7bc78d1e5a17e5cb6f52d5ed1ab42db80f07d2e Reviewed-on: https://gerrit.libreoffice.org/61200 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
* Deleted whitespace, use correct branding, fixed typosMatthias Seidel2018-09-301-13/+13
| | | | | | | | | | (cherry picked from commit 6cf656f2bbeb39e5a46984c58b32098ed6185699) Change-Id: I88724806f5b8eb809661d4e754726a6246d47e8a Reviewed-on: https://gerrit.libreoffice.org/61157 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* loplugin:useuniqueptr in lcl_LookupTableHelperNoel Grandin2018-09-261-25/+14
| | | | | | | Change-Id: I8ee34ced61a23d7ade71b25f547c607cd4fe37bb Reviewed-on: https://gerrit.libreoffice.org/60968 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Avoid U+21D2 Rightwards Double Arrow characterEike Rathke2018-09-201-2/+2
| | | | Change-Id: I181e5ad44027e261b3b8ad45c3d3d8cfcd23f987
* Document rules for use of nominative / genitive / partitive case month namesEike Rathke2018-09-201-5/+36
| | | | Change-Id: Ie322be2c85e1b652273565eb61a8b62f116b9f9e
* loplugin:unusedmethodsNoel Grandin2018-09-182-10/+0
| | | | | | | Change-Id: I5f63ac44654ed3fc658e72e0d1148a5a22decc47 Reviewed-on: https://gerrit.libreoffice.org/60662 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:useuniqueptr in TestTextSearchNoel Grandin2018-09-181-6/+2
| | | | | | | Change-Id: Ifce0dc836ea8500105ebcf3302f37ad6968929ec Reviewed-on: https://gerrit.libreoffice.org/60607 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:external in i18npoolStephan Bergmann2018-09-1717-103/+36
| | | | | | | | | ...showing that print_node etc. are actually unused Change-Id: Ife7faf53dc2487a7ee0cfbe131a761ea18104945 Reviewed-on: https://gerrit.libreoffice.org/60538 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* tdf#42949 Fix IWYU warnings in include/cppuhelper/*Gabor Kelemen2018-09-101-0/+1
| | | | | | | | | | Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib420e9216b8313f5ed7634ec375e39ceb741fd45 Reviewed-on: https://gerrit.libreoffice.org/59297 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
* loplugin:simplifyconstruct in helpcompiler..ioNoel Grandin2018-09-093-8/+1
| | | | | | | Change-Id: Ibdc1933b5d8d6be1fe42a7df93bd7e1c903bb39b Reviewed-on: https://gerrit.libreoffice.org/60202 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Related: tdf#119613 inherit af_ZA separators from identical en_ZAEike Rathke2018-09-031-23/+1
| | | | | | | | | Also LC_FORMAT is already inherited. Change-Id: I166ac1b50329430139d3f243454d7fdd2069e4ad Reviewed-on: https://gerrit.libreoffice.org/59920 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
* tdf#119613 [*-ZA] decimal separator is comma, group separator is spaceEike Rathke2018-09-032-24/+24
| | | | | | | Change-Id: I9152a419385cc894f973a7333ae03b75b7f79008 Reviewed-on: https://gerrit.libreoffice.org/59919 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
* Resolves: tdf#119399 add es-VE currency Bolivar Soberano VES Bs.S.Eike Rathke2018-08-221-1/+8
| | | | | | | | | Introduced on 2018-08-20 Change-Id: I1b10a0f3b2ff8037310e7cba9caceaacb0858463 Reviewed-on: https://gerrit.libreoffice.org/59462 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
* Fixed LongDateYearSeparatorMatthias Seidel2018-08-222-2/+2
| | | | | | | | | (cherry picked from commit ba13ae2c5b626b6e5ccd27c9f88e8e4dcc79729c) Change-Id: I408e1294a3c25d8b8fc036f40f754c20cfbe1653 Reviewed-on: https://gerrit.libreoffice.org/59426 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
* LongDateDaySeparator with blankEike Rathke2018-08-217-7/+7
| | | | | | | | | So LocaleDataWrapper::getLongDate() forms the correct long date string. Change-Id: I794a64c79706fe97922b12d319bb242a7994e579 Reviewed-on: https://gerrit.libreoffice.org/59392 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
* Fixed LongDateDaySeparatorMatthias Seidel2018-08-211-1/+1
| | | | | | | | | (cherry picked from commit 870f47795d6675d28ea2277e2e7cba64ebcee32b) Change-Id: Iaec68d103d3e7f27a0f118ca13e57ed0ce55832c Reviewed-on: https://gerrit.libreoffice.org/59382 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
* loplugin:useuniqueptr in OutlineNumberingNoel Grandin2018-08-211-5/+5
| | | | | | | Change-Id: I7413ac32e976ffa965de92f9339f838dec5d543a Reviewed-on: https://gerrit.libreoffice.org/59359 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#119117: get phonebook sort work by tweaking ICU call mechanismJulien Nabet2018-08-171-2/+10
| | | | | | | | | | | | | | | | Using "phonebook" as variant does't work with de_DE since it gives de_DE_PHONEBOOK whereas icu expects de__PHONEBOOK See http://userguide.icu-project.org/locale#TOC-Variant-code, Level 2 canonicalization, 8. So let variant empty and use the fourth arg of icuLocale "keywords" See constructors in http://icu-project.org/apiref/icu4c/classicu_1_1Locale.html Change-Id: I6c216c86cdd32abfa477c14a80d1b8794b536900 Reviewed-on: https://gerrit.libreoffice.org/58870 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
* tdf#118127 fix date format duplications in Hungarian localeLászló Németh2018-08-161-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | – by adding and using narrow month names "jan."–"dec." (abbreviated month names are still Roman numbers for back-compatibility); – by adding ortographically incorrect, but "interoperable/back-compatible" typewriter & Excel format "YYYY.M.D."; – by replacing one of the "YYYY. MMM. D." by "YYYY. MM. DD.". Other changes: – replacing incorrect "YYYY. M. D." format with the ortographically correct "YYYY. MM. DD." format. We keep its long YYYY format for back-compatibility. (This system format is visible only on the extra page of the Date formatting list, so it's not an annoying duplication.) – abbreviated eras use non-breaking narrow spaces. Note: there is also a not so annoying duplication, the "YYYY-MM-DD HH:MM:SS", not on the first page of the date list in the dialog window and not in the XML file, but only on the second page of the date list. For back-compatibility, we keep this format in the XML file. Change-Id: I4c49d637710295395b75034aa50015a5f3719d89 Reviewed-on: https://gerrit.libreoffice.org/59171 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
* cclass_Unicode::StrChr needs to support non-BMP charsStephan Bergmann2018-08-142-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...as seen with Clang's new -fsanitize=implicit-cast during CppunitTest_starmath_qa_cppunit: > i18npool/source/characterclassification/cclass_unicode_parser.cxx:565:46: runtime error: implicit conversion from type 'sal_uInt32' (aka 'unsigned int') of value 119886 (32-bit, unsigned) to type 'sal_Unicode' (aka 'char16_t') changed the value to 54350 (16-bit, unsigned) > #0 in i18npool::cclass_Unicode::getFlags(unsigned int) at i18npool/source/characterclassification/cclass_unicode_parser.cxx:565:46 (instdir/program/libi18npoollo.so +0x3ae807) > #1 in i18npool::cclass_Unicode::parseText(com::sun::star::i18n::ParseResult&, rtl::OUString const&, int, int) at i18npool/source/characterclassification/cclass_unicode_parser.cxx:712:29 (instdir/program/libi18npoollo.so +0x3b04c3) > #2 in i18npool::cclass_Unicode::parsePredefinedToken(int, rtl::OUString const&, int, com::sun::star::lang::Locale const&, int, rtl::OUString const&, int, rtl::OUString const&) at i18npool/source/characterclassification/cclass_unicode.cxx:275:5 (instdir/program/libi18npoollo.so +0x3a17ea) > #3 in non-virtual thunk to i18npool::cclass_Unicode::parsePredefinedToken(int, rtl::OUString const&, int, com::sun::star::lang::Locale const&, int, rtl::OUString const&, int, rtl::OUString const&) at i18npool/source/characterclassification/cclass_unicode.cxx (instdir/program/libi18npoollo.so +0x3a18dc) > #4 in i18npool::CharacterClassificationImpl::parsePredefinedToken(int, rtl::OUString const&, int, com::sun::star::lang::Locale const&, int, rtl::OUString const&, int, rtl::OUString const&) at i18npool/source/characterclassification/characterclassificationImpl.cxx:118:63 (instdir/program/libi18npoollo.so +0x3c48ba) > #5 in non-virtual thunk to i18npool::CharacterClassificationImpl::parsePredefinedToken(int, rtl::OUString const&, int, com::sun::star::lang::Locale const&, int, rtl::OUString const&, int, rtl::OUString const&) at i18npool/source/characterclassification/characterclassificationImpl.cxx (instdir/program/libi18npoollo.so +0x3c497c) > #6 in CharClass::parsePredefinedToken(int, rtl::OUString const&, int, int, rtl::OUString const&, int, rtl::OUString const&) const at unotools/source/i18n/charclass.cxx:443:25 (instdir/program/libutllo.so +0x904d17) > #7 in SmParser::NextToken() at starmath/source/parse.cxx:391:25 (workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0xa4a3e7) > #8 in SmParser::DoTerm(bool) at starmath/source/parse.cxx:1337:13 (workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0xa5951b) > #9 in SmParser::DoPower() at starmath/source/parse.cxx:1285:35 (workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0xa57d46) > #10 in SmParser::DoProduct() at starmath/source/parse.cxx:1105:19 (workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0xa5685a) > #11 in SmParser::DoSum() at starmath/source/parse.cxx:1087:19 (workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0xa55ebc) > #12 in SmParser::DoRelation() at starmath/source/parse.cxx:1069:19 (workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0xa558dc) > #13 in SmParser::DoExpression(bool) at starmath/source/parse.cxx:1043:29 (workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0xa54ff5) > #14 in SmParser::ParseExpression(rtl::OUString const&) at starmath/source/parse.cxx:2366:12 (workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0xa671dc) > #15 in (anonymous namespace)::Test::ParseAndCompare(char const*, char const*, char const*) at starmath/qa/cppunit/test_nodetotextvisitors.cxx:485:30 (workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0x5f7ea6) > #16 in (anonymous namespace)::Test::testMiscEquivalent() at starmath/qa/cppunit/test_nodetotextvisitors.cxx:637:5 (workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0x5f2dc8) Change-Id: Iaf62efd60bd6132e005ab69ce385bbf5c2db5d19 Reviewed-on: https://gerrit.libreoffice.org/58979 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* create appendCopy method in OUStringBufferNoel Grandin2018-08-142-8/+8
| | | | | | | | | | | | | | | | so we can avoid temporary copies when appending a substring of an OUString to the buffer. I would have preferred to call the method just "append" but that results in ambiguous method errors when the callsite is something like sal_Int32 n; OUStringBuffer s; s.append(n, 10); I'm not sure why Change-Id: I6b5b6641fcb5b26ce2269f89ef06e03c0b6aa76f Reviewed-on: https://gerrit.libreoffice.org/58666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* add operator+=(OUStringBuffer) method to OUStringNoel Grandin2018-08-011-2/+2
| | | | | | | | | | | | | to reduce needless object creation and copying some more And fix what looks like a bug in CSS hex color parsing at line 609 in sw/../parcss1.cxx that has been there since commit 7b0b5cdfeed656b279bc32cd929630d5fc25878b "initial import" Change-Id: Ibad42b23721a56493bd1edcd7165e6104494a5c3 Reviewed-on: https://gerrit.libreoffice.org/58357 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:stringloop in variousNoel Grandin2018-07-291-5/+5
| | | | | | | Change-Id: Ic2436c6d94729211cd5bc72fee18af228381e4a3 Reviewed-on: https://gerrit.libreoffice.org/58250 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* new loplugin:stringloop, and applied in variousNoel Grandin2018-07-271-2/+3
| | | | | | | | | | 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>
* Prepare for "Japan's Y2K" Gengou calendar era switch after 2019-04-30Eike Rathke2018-07-272-4/+12
| | | | | | | | | | | | | The emperor Akihito will abdicate on 2019-04-30. The next emperor will be Naruhito, but so far neither the new era name (Heisei for Akihito) nor its abbreviation or a Unicode character are determined. At least introduce the new era with some dummy names (Naruhito,Na,N). Change-Id: I8c0af390ca0408ac259e47e7eaf2e49b5889c9ba Reviewed-on: https://gerrit.libreoffice.org/58142 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
* use OUStringBuffer in some loopsNoel Grandin2018-07-271-11/+11
| | | | | | | Change-Id: Ib32fb5ddc04df1c090f9d7b319e4ff9be0c285f9 Reviewed-on: https://gerrit.libreoffice.org/58007 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:redundantcast (clang-cl)Stephan Bergmann2018-07-261-1/+1
| | | | | | | Change-Id: Iaf6cbe8dcfd107a66660746719b6b61e82a6ed0a Reviewed-on: https://gerrit.libreoffice.org/57998 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Fix typosAndrea Gelmini2018-07-231-2/+2
| | | | | | | Change-Id: If6e6df9ac592c77f19e381e50b7eb26fbf429f61 Reviewed-on: https://gerrit.libreoffice.org/57831 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
* Fix typosAndrea Gelmini2018-07-231-1/+1
| | | | | | | Change-Id: If0d8f4033d9bc20f521d33d732fb349f0df5eeef Reviewed-on: https://gerrit.libreoffice.org/57822 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
* Check string length before copying, tdf#115007 follow-upEike Rathke2018-06-271-1/+2
| | | | | | | Change-Id: I50b842afc505ce603225fb2d25281cc8e9240200 Reviewed-on: https://gerrit.libreoffice.org/56537 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
* locale hu_HU.xml: add date formats with suffixes, articlesLászló Németh2018-06-271-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | and spelling out using the new NatNum12 modifier to support common "in", "on", "from", "to", etc. date suffix variants, "dash-free" spell out format of years of the new Hungarian orthographical reform, and months with articles. For example, "in 2018" is "2018-ban", "in 2019" is "2019-ben" in Hungarian because of "vowel harmony", the word stem dependent fluctuation of the suffix variants, a frequent linguistic feature of other agglutinative languages, too, including Estonian, Finnish and Turkish. Note: some of the new date formats will work correctly only with the upcoming update of the external libnumbertext. Note 2: add also alternative (real) abbreviated month names, because the default abbreviated month names are Roman numbers. Change-Id: Ibb33ff6a627b8e27fd02388653e3b33ebd446a10 Reviewed-on: https://gerrit.libreoffice.org/55637 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
* remove the useOffset thread-unsafe hack from transliterationLuboš Luňák2018-06-2622-137/+123
| | | | | | | | | | | And instead pass it as an argument to an implementation function. Otherwise this is thread-unsafe for Calc's threaded calculation, and transliteration is used in various places in Calc code. Change-Id: Ibdf95e4b6867ec251618f6ff91e605acb69667c0 Reviewed-on: https://gerrit.libreoffice.org/56290 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* NatNum12: fix and add capitalization prefixes, tdf#115007 follow-upLászló Németh2018-06-205-22/+66
| | | | | | | | | | | | | | | | | | | Limit NatNum12 conversion only for the selected parts of the date format (this bug – double calls of getNumberText – was hidden by the space prefix " " and empty return values at the first calls, resulting unchanged dates yet). New prefixes: "capitalize", "upper" and "title" to handle optional capitalization. (In Calc, it was not possible to format the result of NatNum formatting, but some languages often need capitalization or title case to format numbers and currencies.) Thanks code clean up using enum WhichCasing to Eike Rathke. Change-Id: I5fceb784930e6bc6d376116f5a42ad49cd248a54 Reviewed-on: https://gerrit.libreoffice.org/55681 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
* tdf#115007 NatNum12 "spell out" formats in datesLászló Németh2018-06-131-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to support variants of preposition, suffixation, article or their combination. For example, Catalan "de març"/"d'abril", English "1st of May"/"First of May" or Hungarian "május 1-je/május 2-a". When the date format contains more than a date keyword, it needs to specify in NatNum12 argument which date element needs special formatting by using libnumbertext: '[NatNum12 ordinal-number]D' -> "1st" '[NatNum12 D=ordinal-number]D" of "MMMM' -> "1st of April" '[NatNum12 D=ordinal]D" of "MMMM' -> "first of April" '[NatNum12 YYYY=year,D=ordinal]D" of "MMMM", "YYYY' -> "first of April, nineteen ninety" Note: set only for YYYY, MMMM, M, DDDD, D and NNN/AAAA in date formats. It's possible to extend this for other keywords and date + time combinations, as required. Note 2: default l10n date formats can use the new NatNum12 date formats, see FormatElement in i18npool/source/localedata/ XML files and FormatElement specification: https://opengrok.libreoffice.org/xref/core/i18npool/source/localedata/data/locale.dtd#223 Change-Id: I598849f1492f4012e83cef9293773badbff16206 Reviewed-on: https://gerrit.libreoffice.org/55613 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: László Németh <nemeth@numbertext.org>
* tdf#115007: add import/export to NatNum12 (spell out numbers,László Németh2018-06-082-6/+8
| | | | | | | | | | | | | | | | dates and money amounts, supporting all the XNumberText/libnumbertext formatting codes, for example "ordinal", "ordinal-number", "ordinal-feminine", etc., and ISO 4217 currency codes, also their possible combinations. NatNum12 formatting codes are stored by using the newly introduced (yet, loext:)transliteration-spellout attribute. creator-initials also added to token list Change-Id: I20f93c9d16778f142067a56d53b336d0acbe2d92 Reviewed-on: https://gerrit.libreoffice.org/54673 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: László Németh <nemeth@numbertext.org>
* tdf#115007: Use [NatNum12 params...] syntaxMike Kaganski2018-06-084-34/+47
| | | | | | | | | | | | | | | This allows using all the libnumbertext library functions. [NatNum12] gives cardinal number names (one, two, three, ...) [NatNum12 ordinal] gives ordinal number names (first, second, third, ...) [NatNum12 ordinal-number] gives ordinal indicators (1st, 2nd, 3rd, ...) [NatNum12 money USD][$-409] gives formal English (US) money text ... etc (see numbertext.org for syntax). Change-Id: I16dbb44d8d4bdb82a1b950de6d438c8311b554ff Reviewed-on: https://gerrit.libreoffice.org/54366 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: László Németh <nemeth@numbertext.org>