summaryrefslogtreecommitdiff
path: root/i18npool
AgeCommit message (Collapse)AuthorFilesLines
2015-05-25tdf#90809: i18npool: fix crash in Thai break iteratorMichael Stahl1-4/+6
endPos = nStartPos + 1 may be past the end index invalid write of size 4 at 0x1CBBA959: com::sun::star::i18n::BreakIterator_th::makeIndex(rtl::OUString const&, int) (breakiterator_th.cxx:139) by 0x1CBB4AA2: com::sun::star::i18n::BreakIterator_CTL::previousCharacters(rtl::OUString const&, int, com::sun::star::lang::Locale const&, short, int, int&) (breakiterator_ctl.cxx:61) by 0x1CBB544F: com::sun::star::i18n::BreakIteratorImpl::previousCharacters(rtl::OUString const&, int, com::sun::star::lang::Locale const&, short, int, int&) (breakiteratorImpl.cxx:64) by 0xA29D29A: ServerFontLayout::setNeedFallback(ImplLayoutArgs&, int, bool) (gcach_layout.cxx:99) Change-Id: I201f24cb6773b5aa1a81dea90ea906d3d4355053 (cherry picked from commit 9db629b8a1fa9b63bc320f8d47594ec82511a9c5) Reviewed-on: https://gerrit.libreoffice.org/15869 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-05-08Resolves: tdf#91057 transliterateChar2Char throws MultipleCharsOutputExceptionCaolán McNamara1-20/+36
for ß, but toTitle only allows RuntimeException, which is our usual awesomeness Change-Id: Ib5618a55a369fa5cd1d323f657f0798776828386 (cherry picked from commit d0a0da717682a0e57f733d75d9d0700cfb198823) Reviewed-on: https://gerrit.libreoffice.org/15659 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-05-05tdf#91009: Correct thousands separator character for locale es_CRJulien Nabet1-10/+32
Thanks to Severo Raz for having indicated this link: http://es.wikipedia.org/wiki/Wikipedia_discusi%C3%B3n:Manual_de_estilo/N%C3%BAmeros#Costa_Rica (cherry picked from commit 78ef368b8ca6fb53b67330c305f8c2c581cbf68e) Related tdf#91009: Correct thousands separator character for locale es_CR Reviewed-on: https://gerrit.libreoffice.org/15630 Tested-by: Eike Rathke <erack@redhat.com> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit aa06ce15fdd68983001ef33d1931fbaf6b515282) cf080bb9f21ef75487d43d8a582625be512968c4 Change-Id: Ib8eef774921922dda0db653d8d8365b5e055e646 Reviewed-on: https://gerrit.libreoffice.org/15593 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-03-19i18npool: fix spurious regex ^ matching in TextSearch::searchForward()Michael Stahl1-4/+21
Thanks to Eike for finding this: The anchors ^ and $ now anchor at the selection boundary because the only text the regex matcher gets passed is the selected text. This in two paragraphs aaa bbb aaa bbb aaa bbb aaa bbb when the selection spans from the second aaa to the third bbb, for "^aaa" finds the second aaa, where previously it found the third aaa at the real paragraph start. This may not be expected by the user, because the behavior of ^ is described as "Match at the beginning of a line" (or paragraph in our case), which the previous implementation did. (regression from 806ced87cfe3da72df0d8e4faf5b82535fc7d1b7) Unfortunately it's not obvious how to implement the same in searchBackward(). Change-Id: I07f7a8476b672d9511fa74ca473c32eea427698f (cherry picked from commit 9aae521b451269007f03527c83645b8b935eb419) Reviewed-on: https://gerrit.libreoffice.org/14829 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-03-10tdf#89665: i18npool: speed up TextSearch::searchBackward()Michael Stahl1-12/+9
There does not appear to be a good reason why searchBackward() needs to call transliterate() on the entire passed string, so don't do that, as in the previous commit for the other direction. Change-Id: Iadfca806da89bf8825e5a3df7fcad64ea08d7f9c (cherry picked from commit 666fb8b7bc210be6d785515bc7660e5a5d19b82e) Reviewed-on: https://gerrit.libreoffice.org/14827 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-03-10tdf#89665: i18npool: speed up TextSearch::searchForward()Michael Stahl1-12/+9
There does not appear to be a good reason why searchForward() needs to call transliterate() on the entire passed string. Restricting it to the passed range speeds it up from 104 billion to 0.19 billion callgrind cycles when built with GCC 4.9.2 -m32 -Os. Change-Id: I440f16c34f38659b64f1eb60c50f0e414e3dfee8 (cherry picked from commit 806ced87cfe3da72df0d8e4faf5b82535fc7d1b7) Reviewed-on: https://gerrit.libreoffice.org/14826 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-02-26tdf#89665: i18npool: fix pathological transliterate slow-pathMichael Stahl1-1/+9
TransliterationImpl::transliterate() has a slow-path for the case when more than one trasliteration module is cascaded which swaps 2 uno::Sequence. This is unbelievably slow because non-const Sequence::operator[] does a function call into cppu to check whether COW has to be done. This speeds up transliterate() from 344 billion to 101 billion callgrind cycles when built with GCC 4.9.2 -m32 -Os. Commit d2771b63b94a8aae3c25c83e9dae9f83242f46c1 added a second transliteration module that is enabled by default, making the problem visible, especially with long paragraphs in Writer. Change-Id: I2799df9173ac73aab8c4eb4cc6f592976b06c8da (cherry picked from commit 88d4b2fb08b983531b1e0abc71b07f4bdecdc925) Reviewed-on: https://gerrit.libreoffice.org/14643 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-01-07changed default value for long datetime, zh_CN locale dataKevin Suo1-3/+3
* Added a space to formatindex 46, to make it look nicer; * Long datetime default changed to formatindex 47. Change-Id: I50e05f1a4432ab4373fa0034a390658b59775f0b Reviewed-on: https://gerrit.libreoffice.org/13651 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-07fdo#87626: Improve Simplified Chinese numbering typesKevin Suo1-8/+15
This commit improves the numbering types for zh_CN locale. Since we can set more than 8 LC_NumberingLevel in the locale data file, I am adding all the commonly used numbering types in the list. This will make it easy to apply numbering. Change-Id: I067904b875046682cd56a7051258ffffab242c25 Reviewed-on: https://gerrit.libreoffice.org/13647 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-12-19fdo#87471 update locale data for French Burkina Faso [fr-BF]Eike Rathke1-24/+26
Change-Id: I7f6311c541db507236f6c6ab999aee5db8683f33 (cherry picked from commit 695e2938ff954f6dcceac4b6b170e6724294be2f)
2014-12-19fdo#87466 update locale data for Moore Burkina Faso [mos-BF]Eike Rathke1-7/+7
Change-Id: I66109a89a7aced1a4595825ee587a1844b6864e8 (cherry picked from commit aa27be0013efc91374f040b72350e490b3ac770f)
2014-12-19add more date formats for [pt-PT]Eike Rathke1-0/+24
Apparently commonly used, as suggested by Sérgio Marques Change-Id: I6cdbcd96034ec7bb04f364ec5747b069e32ec379 (cherry picked from commit 89de0181ffe2f94ea0b27bbd9da76bafa5ad1455)
2014-12-05fdo#83752: date-time cell becomes text string when editing, zh_CN localeKevin Suo1-1/+1
In the locale data xml file, formatindex 47 is used for date-and-time editing. If the format code does not match the defined date/time separators, it will cause the cell value to be treated as string text (rather than a date time value). Change-Id: I75a59d943d832f28a0a6153a17e6f671e5328abd Reviewed-on: https://gerrit.libreoffice.org/13306 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit d00a3722b46314c927ba392a31fe4ff5ebc5c0b5) Reviewed-on: https://gerrit.libreoffice.org/13309
2014-11-17sal: clean up public headers with include-what-you-useMichael Stahl2-0/+2
Sadly cannot forward declare "struct {...} TimeValue;". rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h was painful enough for now... Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-14fdo#86023 - O[U]String needs a 'clear' methodBrij Mohan Lal Srivastava2-4/+4
Added clear() method to OString and OUString class, Updated appropriate call-sites. Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini7-10/+10
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-11fdo#51008 change [pt-PT] group separator to no-break spaceEike Rathke1-10/+10
Change-Id: Ibc658c6d1db5f1d5de8fd02d6eb0e269a625644f
2014-11-06use correct LCID and English color keywordEike Rathke1-5/+5
As could be seen when running in dbgutil build or with environment variable OOO_ENABLE_LOCALE_DATA_CHECKS=1 Change-Id: Iaf3b4cbe58acea9fa8aed0b1793e0ff28c089de6
2014-11-06fdo#85954: Improvements to Simplified Chinese (zh-CN) locale dataKevin Suo1-21/+21
Change-Id: I0ba08182f1c2b75a5b625f7858c23bcd8ba2dce5 Reviewed-on: https://gerrit.libreoffice.org/12284 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2014-11-01coverity#707920 Uninitialized scalar fieldCaolán McNamara1-0/+2
and coverity#1250438 Uninitialized scalar field Change-Id: I029e033feb0805a0f744c68d43602217f9f01f6e
2014-10-29remove unnecessary 'using namespace rtl' declarationsNoel Grandin21-25/+1
It turns out that almost none of them were necessary. Change-Id: I1311ed28409c682b57ea8d149bcbaf2c49133e83 Reviewed-on: https://gerrit.libreoffice.org/12133 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-16Resolves fdo#84961: zh_CN date separator should be "/" rather than "/"Julien Nabet1-8/+8
Thanks to the patch from Kevin Suo, see https://bugs.freedesktop.org/attachment.cgi?id=107768 Signed-off-by: Eike Rathke <erack@redhat.com> With additional change to the DateAcceptancePattern. Change-Id: I80695028d51c6b91e9e9418e2d1ce33d76d23893 Reviewed-on: https://gerrit.libreoffice.org/11958 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2014-10-15Remove unused BreakIterator_Unicode::wordRuleStephan Bergmann3-6/+5
Change-Id: I8cde0dfd7b760d8075f53b9de8a8d3a81a57dc27
2014-10-15avoid out-of-bounds access when iterating code pointsDavid Tardon1-1/+3
Change-Id: I583e49180b37705ea124c0d88c2e2a8cb1470dfe
2014-10-15avoid out-of-bounds access when iterating code pointsDavid Tardon1-3/+5
Change-Id: I88290e5ccfd6ab250fe1526e452609e6de020dcd
2014-10-15More -Werror,-Wunused-private-fieldStephan Bergmann1-1/+0
...detected with a modified trunk Clang with > Index: lib/Sema/SemaDeclCXX.cpp > =================================================================== > --- lib/Sema/SemaDeclCXX.cpp (revision 219190) > +++ lib/Sema/SemaDeclCXX.cpp (working copy) > @@ -1917,9 +1917,10 @@ > const Type *T = FD.getType()->getBaseElementTypeUnsafe(); > // FIXME: Destruction of ObjC lifetime types has side-effects. > if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl()) > - return !RD->isCompleteDefinition() || > - !RD->hasTrivialDefaultConstructor() || > - !RD->hasTrivialDestructor(); > + return !RD->hasAttr<WarnUnusedAttr>() && > + (!RD->isCompleteDefinition() || > + !RD->hasTrivialDefaultConstructor() || > + !RD->hasTrivialDestructor()); > return false; > } > > @@ -3517,9 +3518,11 @@ > bool addFieldInitializer(CXXCtorInitializer *Init) { > AllToInit.push_back(Init); > > +#if 0 > // Check whether this initializer makes the field "used". > if (Init->getInit()->HasSideEffects(S.Context)) > S.UnusedPrivateFields.remove(Init->getAnyMember()); > +#endif > > return false; > } to warn about members of SAL_WARN_UNUSED-annotated class types, and warn about initializations with side effects (cf. <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039602.html> "-Wunused-private-field distracted by side effects"). Change-Id: I3f3181c4eb8180ca28e1fa3dffc9dbe1002c6628
2014-10-08back out wrong and confusing tools::Time comment changeEike Rathke2-3/+3
Apparently fc04f76336fdf8c96e35382cdeb497e2f939705c used some sed script to change all ... Change-Id: I0a8171aa474070bb1a8584e5c8c714fe34694618
2014-10-08add missing legacyOnly currency, fdo#84260Eike Rathke1-0/+7
aa33dd16b0e3075f28c56656678c0f5cb7642222 changed the currency symbol from ¢ to ₡ but changed only the symbol. Actually changing the number format codes wasn't necessary at all, but changing only the symbol is wrong, see also the ATTLIST Currency legacyOnly description in i18npool/source/localedata/data/locale.dtd Hopefully nothing relies on the actual symbol used in the number format codes ... Change-Id: I92e79403fbb80f18c44dc3ecf5a3830a52fd2ff8
2014-10-08derive all from ca-ES, fdo#83292Eike Rathke1-5/+5
Change-Id: Ia418876b8535cb69b544217fa7976514e77a88b7
2014-10-07fdo#83292 add stub locale data for Catalan (Valencian)Andras Timar3-0/+45
Change-Id: I569d203178668a2d63f4a53baca51ac16bf2361a Reviewed-on: https://gerrit.libreoffice.org/11776 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2014-10-07Avoid accessing 1 character after a stringMatthew J. Francis1-2/+2
Found while trying to reproduce fdo#83141, but not related to that - it just happened to trigger the relevant assert on a dbgutil build. The change to TextSearch::NSrchFrwrd() fixes the crash triggered by reproducing the above bug. The change to TextSearch::NSrchBkwrd() is by analogy but seems an equally good idea. Change-Id: I68c2c87b632dd53453f92394519a06f62e41bbad Reviewed-on: https://gerrit.libreoffice.org/11830 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2014-10-01fdo#82577: Handle TimeNoel Grandin2-3/+3
Put the TOOLS Time class in the tools namespace. Avoids clash with the X11 Time typedef. Change-Id: Iac57d5aef35e81ace1ee0d5e6d76cb278f8ad866 Reviewed-on: https://gerrit.libreoffice.org/11684 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-09-30i18npool: std::auto_ptr -> std::unique_ptrStephan Bergmann1-1/+1
Change-Id: I084e8dfd026d59374d92d9b4cb45d63af2aea470
2014-09-29loplugin: cstylecastNoel Grandin1-1/+1
Change-Id: Iea517d2287bded4a702c73dfdd1f182023425d67
2014-09-26coverity#1241051 Negative array index readCaolán McNamara1-1/+4
Change-Id: I958267c88f74523a5aaba0ff6c677aadd2e84dd9
2014-09-26coverity#1241117 Negative array index readCaolán McNamara1-41/+46
Change-Id: I15787a4a2b964de3b12586c823be48c0289fea0f
2014-09-26coverity#1241372 Negative array index readCaolán McNamara1-21/+31
Change-Id: I73bae29c6cc737d341381c010face6b587b31598
2014-09-24Resolves fdo#84260: Wrong CRC Costa Rica currency symbolJulien Nabet1-6/+6
See https://en.wikipedia.org/wiki/Costa_Rican_col%C3%B3n Change-Id: I6c30b2bd244f2ea40d56c812673922f27f5d53c8
2014-09-16renamed function names from german to englishMichael Jaumann2-10/+10
Change-Id: I201dc723a22097709858b0a3489ac8a562cfccc2 Reviewed-on: https://gerrit.libreoffice.org/11450 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2014-09-12well enabling optimizations with SunStudio is just asking for trouble...Michael Stahl1-1/+0
Change-Id: I396b1f612432ffe5f77cae505f2a57ca0f2068a2
2014-09-12fdo#39468 tranlation German to EnglishMichael Jaumann2-46/+49
Change-Id: Icafab1c345a3a5291e4b19821710f439a1c70048 Reviewed-on: https://gerrit.libreoffice.org/11338 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-09-11Prevent erroneous pick up of unrelated css::i18n::MapingStephan Bergmann5-11/+11
...from include/i18nutil/casefolding.hxx Change-Id: I892a83b8e40dadcffc1b59eaa18bee2b782131f1
2014-09-11Avoid name clash with generated C++ class corresponding to UNOIDL serviceStephan Bergmann4-14/+14
Change-Id: Id8201bc91c8e398b972b7294b8916d4ac76c787d
2014-09-11Avoid name clash with generated C++ class corresponding to UNOIDL serviceStephan Bergmann2-10/+10
Change-Id: Ie76cab45f5fd609457b11cb3b9732cba2da3b023
2014-09-11Avoid name clash with generated C++ class corresponding to UNOIDL serviceStephan Bergmann5-17/+17
Change-Id: I96582bf05787a30479d324ff8deb7cea758bb2c2
2014-09-10fdo#81272 Speed up break iteratorsMatthew J. Francis3-1/+24
Change-Id: I7a45a61465f71a1cc6f583b9ffc68157d19e51fa Reviewed-on: https://gerrit.libreoffice.org/11386 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-09-10Revert "fdo#81272 Speed up break iterators"Caolán McNamara3-22/+1
hmm, make CppunitTest_i18npool_test_breakiterator fails after all This reverts commit 693f72384e081429cddb29415276cc4d07b05645.
2014-09-10fdo#81272 Speed up break iteratorsMatthew J. Francis3-1/+22
Change-Id: Idcd7de83ff7e551b350db0bf80e2ac78baa67686 Reviewed-on: https://gerrit.libreoffice.org/11374 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-08-24added EUR as default currency to Lithuanian localeAurimas Fišeras1-1/+8
Change-Id: I08c82639da2acd5830fa69044b252217b69c5e62 Reviewed-on: https://gerrit.libreoffice.org/11089 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-08-17use bool directlyThomas Arnhold1-1/+1
Change-Id: I314e290b453c55e345559d8abef9b00622493ed3