summaryrefslogtreecommitdiff
path: root/i18npool/source/localedata/LocaleNode.cxx
AgeCommit message (Collapse)Author
2019-10-17Remaining loplugin:bufferaddStephan Bergmann
...that had been missing because the plugin didn't implement postRun, so it didn't report anything when run as part of the shared plugin. (But did report the expected warnings when run as a standalone plugin during CompilerTest_compilerplugins_clang.) Most fixes are straightforward. A noteworthy one is PreparedStatement::setBytes in connectivity/source/drivers/postgresql/pq_preparedstatement.cxx: The old preallocation of a 20 character OStringBuffer might have prevented buf.append( reinterpret_cast<char *>(escapedString), len -1 ); from potentially throwing std::bad_alloc, which would have caused escapedString to be leaked. Even though that 20-character preallocation was likely just random junk and not meant to address the potential leak, lets address it now. Change-Id: Ib506332d061684a22a74e5e39e591539fd2c4900 Reviewed-on: https://gerrit.libreoffice.org/80925 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-01Fix '..'Andrea Gelmini
To complete this: https://gerrit.libreoffice.org/#/c/78312/ This is a massive replace for lines ending with ".." instead of "..." It passed "make check" on Linux. Change-Id: I07fa7b2e30ba9ea17a1f9a5e21c57216ba958efe Reviewed-on: https://gerrit.libreoffice.org/78356 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2019-08-19Add build time check for NF_INDEX_TABLE_ENTRIES <= nFirstFreeFormatIndexEike Rathke
This was just tribal knowledge.. Change-Id: I3d4d93d6eae01c2f3f73a309043bf59dcca10ff6 Reviewed-on: https://gerrit.libreoffice.org/77749 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-05-28tdf#42949 Fix IWYU warnings in i18npool/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ic331c845f0a8f06c4a8f8f79b6f87e26ca7c3a7d Reviewed-on: https://gerrit.libreoffice.org/72972 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
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-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-25tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski
Change-Id: I2ae298f49ceba8059cd7236431db9a4d9a46b125 Reviewed-on: https://gerrit.libreoffice.org/63992 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-23clang-tidy performance-unnecessary-copy-init in editeng..i18npoolNoel Grandin
Change-Id: I2ee2c8d15d8700cfaa1697363da4557c741a5f36 Reviewed-on: https://gerrit.libreoffice.org/62216 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-18loplugin:unusedmethodsNoel Grandin
Change-Id: I5f63ac44654ed3fc658e72e0d1148a5a22decc47 Reviewed-on: https://gerrit.libreoffice.org/60662 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17loplugin:external in i18npoolStephan Bergmann
...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>
2018-03-18Use for-range loops in hwpfilter, i18n*, idl* and ioJulien Nabet
Change-Id: I980464162b73ed9ee0a09acbca1b9050af8d1027 Reviewed-on: https://gerrit.libreoffice.org/51492 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-12More loplugin:cstylecast: i18npoolStephan 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: I5ca5f27425c150f58e5ec3f2392dda43a857fc33
2017-11-30loplugin:unusedmethodsNoel Grandin
Change-Id: I9188f4579900d7eec375754aa94d21ac4e8456e2 Reviewed-on: https://gerrit.libreoffice.org/45504 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-29loplugin:unusedmethodsNoel Grandin
Change-Id: I2efb5c0e5735c179314c6c5de87821cee3b033e1 Reviewed-on: https://gerrit.libreoffice.org/45386 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-27Parse/gen optional <DecimalSeparatorAlternative> in locale data, tdf#81671Eike Rathke
Change-Id: I2781040c76e7c3dbfb4eedc7830a1f24b4c56b46
2017-10-25Use SAL_N_ELEMENTSEike Rathke
Change-Id: I643d839a2b1d8473c484c659793bd3344ace8859
2017-10-25Always generate count number of elements in locale data arraysEike Rathke
Change-Id: I6fecfb24bced7d6e747175befe423060d5ea445b Reviewed-on: https://gerrit.libreoffice.org/43793 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-08-23loplugin:useuniqueptr, look for containers..Noel Grandin
that can use std::unique_ptr, and apply it in i18npool Change-Id: Ib410abaf73d5f392c7a7a9a322872b08c948f9e9 Reviewed-on: https://gerrit.libreoffice.org/41438 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-13use more OUString::operator== in forms..salNoel Grandin
Change-Id: I70d7e50f8c1e019524ccad915f0cca912c5035dc Reviewed-on: https://gerrit.libreoffice.org/39899 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05new loplugin unnecessaryparenNoel Grandin
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-27loplugin:useuniqueptr in variousNoel Grandin
extending it to find places we can use std::unique_ptr on arrays Change-Id: I9feb1d12d738d6931e752ecb6dd51cbc1540c81b Reviewed-on: https://gerrit.libreoffice.org/39255 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-25loplugin:oncevar in helpcompiler..jvmfwkNoel Grandin
Change-Id: Ia9b20a8ca95684cbeb21e3425972c43ba50df3cd Reviewed-on: https://gerrit.libreoffice.org/39187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09remove unnecessary empty OUString fields and varsNoel Grandin
Change-Id: I940120087a0bc6b1b0abc30a3e7727ce22b7d9a7 Reviewed-on: https://gerrit.libreoffice.org/37394 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-27loplugin:loopvartoosmallStephan Bergmann
Change-Id: I1842a5e047e4566371b62511ad5b56d466e717da
2017-02-01loplugin:useuniqueptr extend to check local varsNoel Grandin
just the simple and obvious case for now, of a local var being allocated and deleted inside a single local block, and the delete happening at the end of the block Change-Id: I3a7a094da543debdcd2374737c2ecff91d644625 Reviewed-on: https://gerrit.libreoffice.org/33749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-25show next free formatindex hint for errorsEike Rathke
Change-Id: I4252a572c1cef02ff5e7de0ecc78d84ddc806919
2016-10-19loplugin:expandablemethodds in hwpfilter..linguisticNoel Grandin
Change-Id: If20fd4a6cf8a8e005804dbb7caf41cce73d587a5 Reviewed-on: https://gerrit.libreoffice.org/30016 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-23tdf#100726 Improve readability of OUString concatinationAsela Dasanayaka
concat string in module i18npool to improve readability Change-Id: I7f447d64703cf5eb07742329ff2656f67214898b Reviewed-on: https://gerrit.libreoffice.org/29206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-08-05loplugin:countusersofdefaultparams in framework..lotuswordproNoel Grandin
Change-Id: I9833d85eb6543e996b0f357657c53b1c076ecde4 Reviewed-on: https://gerrit.libreoffice.org/27898 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-02[PATCH] up the free usage formatindex start from 50 to 60Eike Rathke
In preparation of adding some builtin format codes, actually already NF_FRACTION_3 and NF_FRACTION_4 needed that. Change-Id: I734a1ef5e6405aceaace7d44e8901a6183dc2a64
2016-05-10Replace fallthrough comments with new SAL_FALLTHROUGH macroStephan Bergmann
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in preparation of enabling -Wimplicit-fallthrough. (This is only relevant for C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.) Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but that would require adding back in dependencies on boost_headers to many libraries where we carefully removed any remaining Boost dependencies only recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its future evolution will not have any impact on the stable URE interface.) C++17 will have a proper [[fallthroug]], eventually removing the need for a macro altogether. Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-02-23new loplugin: commaoperatorNoel Grandin
Change-Id: I03f24e61f696b7619855e3c7010aa0d874e5a4ff
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I7af8d14bfe7337fea3f18dbbd41eb32e0f7ae331
2015-11-06loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)Stephan Bergmann
Change-Id: I2c65eac8aa0b24be7f0c8a083b21904c842ca1ee
2015-10-26remove extra spaces around ::Noel Grandin
just makes it harder to grep for methods Change-Id: I0925db2f9284972fcf7e1e3adf90cbe21f69eb15
2015-10-07Reduce variable scopeStephan Bergmann
Change-Id: I1269bd713bae10f9b6c1d3e797dd7043d24fa8d3
2015-08-31loplugin:stringconstant: OUStringBuffer: appendAscii -> appendStephan Bergmann
Change-Id: Iff961fccfa7b60e788b538569bb724e806e99408
2015-08-27Actually process the escaped characterStephan Bergmann
...was like this ever since it got introduced in b75958473503f7eca096b8843e57a031bbabe0ab "implemented date acceptance patterns API." Found with clang-tidy's clang-analyzer-deadcode.DeadStores. Change-Id: Ib1572ca9f254e3e835dbbe088f6a48c24dbd8235
2015-07-03Fix typosAndrea Gelmini
Change-Id: Ie2bbe020fc6e3a4a4f913208c245f395849bb9ee Reviewed-on: https://gerrit.libreoffice.org/16708 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-19Don't truncate a UTF-32 code point to a UTF-16 code unitStephan Bergmann
Change-Id: Ie332b3d088547f6bcc676471182420766ecfedca
2015-06-05ensure engineering notation format is presentEike Rathke
We could generate that in the number formatter, but as long as we don't ... Change-Id: Icbbad4215fdf7f3a94f652c27cb2f9b04205b519
2015-06-03ensure that at least one abbreviated DateAcceptancePattern is presentEike Rathke
Change-Id: I30619fc9f894dda89cd1c84153abcb21214a5fbc
2015-06-01loplugin:loopvartoosmallNoel Grandin
Change-Id: I86ff38a90018a2ddfb2db3babf67168b0e6257a5
2014-12-17Introduce rtl::OUStringLiteral1Stephan Bergmann
...to use single ASCII character literals "more directly" in the OUString API (instead of having to go via an intermediary OUString ctor call). Especially useful for character literals that are defined as const variables or via macros ("direct" uses of character literals in the OUString API can often simply be replaced with single-character string literals, for improved readability). (The functions overloaded for OUStringLiteral1 are those that are actually used by the existing LO code; more could potentially be added. The asymmetry in the operator ==/!= parameter types is by design, though---writing code like 'x' == s is an abomination that shall not be abetted.) Change-Id: Ic5264714be7439eed56b5dfca6ccaee277306f1f
2014-12-12i18npool: Use appropriate OUString functions on string constantsStephan Bergmann
Change-Id: I82fea345a05c0327af3b75ccfd3358f54523c082
2014-12-04add missing newline to incError...() callsEike Rathke
Change-Id: I8ab36fd1e93b0d1297c95f47a3efd3603fd58c8f
2014-08-07coverity#706150 Copy into fixed size bufferCaolán McNamara
Change-Id: Iee86d6233771a9e07a037257786e928c6f18addd
2014-08-07drop prepareErrorFormat from LocaleNode::incErrorStrCaolán McNamara
Change-Id: I3489f84ee66628d2ea9fcdaa1dd89dcd8523aa8a
2014-08-07incErrorStrStr always called with two %sCaolán McNamara
so we don't really need prepareErrorFormat Change-Id: I3f5ae846ad4ba59468f90eba2f8e0eac2a7da9ae
2014-07-08Include <algorithm> for std::min() and max()Tor Lillqvist
Change-Id: I6a46e6466ab56aea14e16902cb51f9c3f088f30e