summaryrefslogtreecommitdiffstats
path: root/i18npool/source/search
Commit message (Collapse)AuthorAgeFilesLines
* loplugin:useuniqueptr in variousNoel Grandin2017-06-271-9/+4
| | | | | | | | | 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>
* Remove redundant 'inline' keywordStephan Bergmann2017-03-031-1/+1
| | | | | | | | | | ...from function definitions occurring within class definitions. Done with a rewriting Clang plugin (to be pushed later). Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8 Reviewed-on: https://gerrit.libreoffice.org/34874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* typesafe wrappers for css::i18nutil::TransliterationModulesNoel Grandin2017-03-011-37/+40
| | | | | | | | | | | | | | | | | and related css::util::SearchOptions2 The TransliterationModules enum has it's constants spread over multiple UNO enum/constant-collections - TransliterationModules and TransliterationModulesExtra, which means that most code simply uses sal_Int32. Wrap them up into a better bundle so that only the lowest layer needs to deal directly with the UNO constants. Change-Id: I1edeab79fcc7817a4a97c933ef84ab7015bb849b Reviewed-on: https://gerrit.libreoffice.org/34582 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Remove dynamic exception specificationsStephan Bergmann2017-01-262-48/+19
| | | | | | | | | | | | | | | | | | | | | | | | | ...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* loplugin: unnecessary destructor forms..idlcNoel Grandin2017-01-251-1/+0
| | | | | | | Change-Id: I765e0fa61f8134a60e5ea24452c6bbcb3fa8b054 Reviewed-on: https://gerrit.libreoffice.org/33492 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* New loplugin:dynexcspec: Add @throws documentation, i18npoolStephan Bergmann2017-01-191-0/+9
| | | | Change-Id: Ie1304a081a8c26cb3204ca7fb3edfa7e2dfae386
* replace #ifdef SOLARIS with #ifdef __sunMichael Stahl2017-01-171-1/+1
| | | | | | | Check for a macro that is defined by the compiler, we don't really need one defined by the build system. Change-Id: Iccb8e3198396881395c97a6b81690ebe64b7e9d2
* new loplugin: useuniqueptr: helpcompiler..ioNoel Grandin2017-01-171-6/+6
| | | | | | | Change-Id: I6b394163c144e6b5540cb160abb613d56fe327de Reviewed-on: https://gerrit.libreoffice.org/33165 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:countusersofdefaultparams in editeng..rscNoel Grandin2016-11-111-1/+1
| | | | Change-Id: I8a8d13faf228cbc934ae21d6763d92d370eb42ec
* Resolves: tdf#101924 fatal exception on Sounds like Japanese optionsCaolán McNamara2016-09-131-2/+2
| | | | | | | | | | | | | | | | suspected regression from commit 1a967fead616b201535449fa812775c88d5b2e3b Author: Eike Rathke <erack@redhat.com> Date: Tue Mar 24 15:53:23 2015 +0000 do not include non-mask bits in masks Change-Id: Ic35a4aecc4834fc255eae81d3d83cc4e74618604 Reviewed-on: https://gerrit.libreoffice.org/28764 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
* loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann2016-09-131-1/+1
| | | | | | | | | | | | | | | | | The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
* loplugin:countusersofdefaultparams in framework..lotuswordproNoel Grandin2016-08-051-1/+1
| | | | | | | Change-Id: I9833d85eb6543e996b0f357657c53b1c076ecde4 Reviewed-on: https://gerrit.libreoffice.org/27898 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* Replace fallthrough comments with new SAL_FALLTHROUGH macroStephan Bergmann2016-05-101-2/+2
| | | | | | | | | | | | | | | | ...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
* Resolves: tdf#99468 do greedy '*' match if substring match is not allowedEike Rathke2016-04-241-8/+32
| | | | Change-Id: I89ac29b7e8c2e8c567e85a5025dbc1f50050465d
* loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann2016-04-201-2/+2
| | | | Change-Id: I3f7f71f05db09219f0de3ec14bdb56bd16fb0c8d
* clang-tidy performance-unnecessary-copy-initializationNoel Grandin2016-04-181-28/+22
| | | | | | | | | | | probably not much performance benefit, but it sure is good at identifying leftover intermediate variables from previous refactorings. Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657 Reviewed-on: https://gerrit.libreoffice.org/24026 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* SearchFlags::WILD_MATCH_SELECTION, SearchOptions2::WildcardEscapeCharacterEike Rathke2016-02-231-3/+4
| | | | | | | | | | At least '\' (search in Word) and '~' (search in Excel) should be supported as escape character. Being able to restrict a match to entire selection instead of substring speeds up the Calc match whole cell scenario. Change-Id: Ice242b9cd59009f172b724e03c2cc08feda4cd3c
* new loplugin: commaoperatorNoel Grandin2016-02-231-4/+8
| | | | Change-Id: I03f24e61f696b7619855e3c7010aa0d874e5a4ff
* implement '*' '?' '~' wildcard search, tdf#72196Eike Rathke2016-02-172-1/+414
| | | | Change-Id: Id6122a13423c37e91c9f7561e4d8e5c658d5530e
* Remove excess newlinesChris Sherlock2016-02-091-3/+0
| | | | | | | | | | | | | | | | | | | A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
* interface to new XTextSearch2 with SearchOptions2, tdf#72196Eike Rathke2016-02-053-16/+68
| | | | | | | | | | Places that had utl::TextSearch::UpgradeToSearchOptions2() introduced are worth an inspection if the new SearchAlgorithms2::WILDCARD search should be supported or at least use SearchOptions2 instead of SearchOptions to eliminate the small performance penalty that conversion involves. Change-Id: I565f73af2b551ae9ad0f488e672823dc6c5c1109
* unnecessary use of OUString constructorNoel Grandin2016-01-311-2/+2
| | | | | | | Change-Id: Idd31b0a53c8318af69bbcd32f6798721ec8eb8e1 Reviewed-on: https://gerrit.libreoffice.org/21945 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* loplugin:unusedmethods unused return value in i18npoolNoel Grandin2016-01-112-3/+2
| | | | Change-Id: I29844009f8357301265421325fc2070f2c9296bf
* Fix typosAndrea Gelmini2016-01-102-3/+3
| | | | | | | Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
* regex result offsets can be negative if a group was not matched, tdf#94810Eike Rathke2015-11-251-14/+22
| | | | | | | | | | | "(abc)|(def)" matches "def" with result offset sequences {0,-1,0},{3,-1,3} And thus the assert() calls introduced with 4cf1d290bab29e18e1312b63ff862f5102e00387 and ce91f3c1292f3e9b84157acf10b67ad9ca16719d were hit. Change-Id: I571b6c7d47349a2cc7b1d1e34193b2865012a49f
* straighten out broken indentationEike Rathke2015-11-241-36/+36
| | | | Change-Id: Ibb34f4a655cce13a24cc7ec22a29fa40e3a0286a
* cppcheck: noExplicitConstructorCaolán McNamara2015-11-241-1/+1
| | | | Change-Id: I1934441858baeeb41a46f694dbcef2d846b308b7
* similar to searchForward() use the correct offsets, tdf#94810 relatedEike Rathke2015-11-231-3/+6
| | | | Change-Id: Icb5a45acaad9029e0998594de8b3dc2e9211866e
* remove comment that makes no sense, tdf#94810 follow-upEike Rathke2015-11-231-1/+1
| | | | | | nStart should not become <0, not even when searching for $ end. Change-Id: I79586471f1a7908372fa3ee044a6f66499b1790f
* tdf#94810: fix reverse offset mappingMike Kaganski2015-11-231-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | With simple transliteration, TextSearch::searchForward used to use whole string to perform the search, then started to create substring to search. But it left the precautions from commit c00601dab0f5533b152cd63cec0a89bfec1ba95f by Eike Rathke: searching for $ may actually return a result set pointing behind the search string which it does with the ICU regex engine. The precaution made it to skip reverse mapping if index was 0. Commit 9aae521b451269007f03527c83645b8b935eb419 by Michael Stahl didn't consider the case when nStop is 0, and startPos > 0. Then it tried to get offset[-1]. Anyway, using value of startPos in those conditions seems illogical. Removed those precautions (and made assertions for that). Fixed handling zero indexes. Change-Id: I2066abc51fff7fb7323bc7f6198bdea06439d4f3 Reviewed-on: https://gerrit.libreoffice.org/19840 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
* use initialiser syntax for Sequence<OUString>Noel Grandin2015-11-151-4/+2
| | | | | | | | | | | | | | replaced using the script: git grep -lP 'Sequence.*OUString.*\(1\)' | xargs perl -0777 -pi -e "s/Sequence< OUString > (\w+)\(1\); .*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g" Change-Id: I23688a91562051a8eed11fc2a85599545c285c34 Reviewed-on: https://gerrit.libreoffice.org/19967 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* loplugin:nullptr (automatic rewrite)Stephan Bergmann2015-11-102-12/+12
| | | | Change-Id: I7af8d14bfe7337fea3f18dbbd41eb32e0f7ae331
* com::sun::star->css in i18npoolNoel Grandin2015-10-192-56/+53
| | | | | | | Change-Id: I13a290cba0f38c79eb2d93148b972d3d931c3862 Reviewed-on: https://gerrit.libreoffice.org/19445 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
* Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann2015-10-121-6/+6
| | | | Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
* Fix typosAndrea Gelmini2015-09-301-2/+2
| | | | | | | Change-Id: Iab78219aff60a7a45a319a96f326e27a6e8e25b8 Reviewed-on: https://gerrit.libreoffice.org/18953 Reviewed-by: Oliver Specht <oliver.specht@cib.de> Tested-by: Oliver Specht <oliver.specht@cib.de>
* Fix typosAndrea Gelmini2015-09-301-1/+1
| | | | | | | Change-Id: Ia8b2176a439742769e61fb6a981000f316033071 Reviewed-on: https://gerrit.libreoffice.org/18954 Reviewed-by: Oliver Specht <oliver.specht@cib.de> Tested-by: Oliver Specht <oliver.specht@cib.de>
* i18npool: tdf#88206 replace cppu::WeakImplHelper*Takeshi Abe2015-08-181-2/+2
| | | | | | | | | with the variadic variants. Change-Id: I0381de7fde198df74556355984bdaba2ecdedd4b Reviewed-on: https://gerrit.libreoffice.org/17768 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* loplugin:unusedmethods hwpfilter,i18npoolNoel Grandin2015-07-061-47/+0
| | | | | | | Change-Id: Ied85d93019d0f6c01c14045758b405f2ac316676 Reviewed-on: https://gerrit.libreoffice.org/16783 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* loplugin:cstylecast: deal with remaining pointer castsStephan Bergmann2015-06-081-2/+2
| | | | Change-Id: Ifdfb96f77ee23a2aaa7200ecee01f957050a6700
* loplugin:cstylecast: deal with those that are (technically) const_castStephan Bergmann2015-06-021-3/+3
| | | | Change-Id: I5bad1428e96c76f7d295f69e10beea4397d560ff
* Various #include <sal/log.hxx> fixupsStephan Bergmann2015-04-221-0/+1
| | | | | | | | | | | | | | rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. Cleaned up some, but something like grep -FwL sal/log.hxx $(git grep -Elw \ 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF') -- \*.cxx) shows lots more files that potentially need fixing before the include can be removed from rtl/string.hxx and rtl/ustring.hxx. Change-Id: Ibf033363e83d37851776f392dc0b077381cd8b90
* remove unnecessary use of void in function declarationsNoel Grandin2015-04-152-3/+3
| | | | | | | | | | | | | | | | ie. void f(void); becomes void f(); I used the following command to make the changes: git grep -lP '\(\s*void\s*\)' -- *.cxx \ | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;' and ran it for both .cxx and .hxx files. Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
* cppcheck: noExplicitConstructorCaolán McNamara2015-04-121-11/+22
| | | | Change-Id: I452a204616d98e1071b7bf43ad457c6a2376cf91
* loplugin:staticmethodsNoel Grandin2015-04-091-5/+5
| | | | Change-Id: Ie348778ea666c24e95e048386547f301083a0017
* Reduce to static_cast any reinterpret_cast from void pointersStephan Bergmann2015-03-311-1/+1
| | | | Change-Id: If4b6022129e19cdfedfda9ddf92b907f67c3063b
* do not include non-mask bits in masksEike Rathke2015-03-241-25/+51
| | | | | | | | | TransliterationModules_FULLWIDTH_HALFWIDTH, TransliterationModules_UPPERCASE_LOWERCASE and TransliterationModules_LOWERCASE_UPPERCASE are not mask bits but values, so need to be treated differently. Change-Id: I6726bddab4fec1c222a318de61eaa41a402f6286
* i18npool: fix spurious regex ^ matching in TextSearch::searchForward()Michael Stahl2015-03-111-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
* tdf#89665: i18npool: speed up TextSearch::searchBackward()Michael Stahl2015-03-101-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
* tdf#89665: i18npool: speed up TextSearch::searchForward()Michael Stahl2015-03-101-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
* remove unnecessary parenthesis in return statementsNoel Grandin2015-02-232-17/+17
| | | | | | | found with $ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;' Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e