summaryrefslogtreecommitdiff
path: root/lingucomponent
AgeCommit message (Collapse)Author
2023-07-05lok: remove duplicated locales for LanguageToolSzymon Kłos
Change-Id: I8fd1632f36a6c2c2d61331d6ce5dbd3cce83e2a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146776 Reviewed-by: Henry Castro <hcastro@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153961 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2023-07-05lok: LanguageTool provides list of languagesSzymon Kłos
- it sends supported list to the LOK client - disables Spell Checker for locales supported by LanguageTool - duden protocol supports only german - initialize language tool config before usage to fetch correct list of supported languages Change-Id: Id9de8519303774163721def8661fa408da449348 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146665 Reviewed-by: Henry Castro <hcastro@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153960 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2023-07-05Load the locales from config file for languagetoolMert Tumer
Locales needs to be read again in the Preferences/Writing Aids section and since this is a network operation it can cause a problem. Better to list all the supported locales in the xcu and load it right away. Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: Ifff624334627f7be259b677f9b416d6ddedfb2c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135598 Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153959 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2023-03-12tdf#153617: percent-encode the text sent to LanguageTool API.Mike Kaganski
Change-Id: I0bb55c70f5602444440fca6e3c13b3d75418e49d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148236 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-12tdf#153948: LanguageTool: cache the prepared requestMike Kaganski
So that when the same text is re-checked using different settings (e.g., language), the cached result is not used. Change-Id: Ic4ed63c6835f9d3935f1b9541c80822bb52313c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148200 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-09tdf#153436: Improve handling of Arabic system spell dictionary on macOSKhaled Hosny
The system has only a generic “ar” spell dictionary, but LibreOffice wants country code as well. Since it is the same dictionary for all Arabic locales, we now add entries to all Arabic country codes we know about. Change-Id: Iaf5a8f495b3d1023d7fe40654afa0cce3fe9fbdc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146616 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2023-02-06lingucomponent: implement custom parse response rest protocolHenry Castro
Response: HTTP/1.1 200 OK Transfer encoding: chunked Content-Type: application/json { "hyphenation-positions":[ {"offset":15,"quality":0}, {"offset":20,"quality":1} ], }, "check-positions":[ {"offset":15,"length":6,"errorcode":4711,"type":"orth","severity":1,"propos als":["Entwurf","Entw\u00fcrfe"]}, {"offset":22,"length":3,"errorcode":8221,"type":"orth","severity":1} ] } Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I87228237f23306fb367edab1e21ce002aaf13f2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143108 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145598 Tested-by: Jenkins
2023-01-28lingucomponent: implement custom request http rest protocolHenry Castro
Request: POST /api/check HTTP/1.1 Host: localhost:8099 Content-Type: application/json Cache-Control: no-cache { "dictionaries": [ "daily", "jungblutt" ], "text-language": "en-DE", "property-sets": [ "base", "daily", "culture" ], "hyphenation": true, "spellchecking-level": 1, "correction-proposals": true, "single-word-mode": false, "message-language": "fr-LU", "message-level": 1, "text": "This is a final throw for the interface to the Duden server." } Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I2a288a7c573014d42df03f7cc12c57a7f788750e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143107 Reviewed-by: Ashod Nakashian <ash@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145607 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2023-01-28Added option to disable ssl verification for languagetoolMert Tumer
This will allow to use self-signed certificates with local run languagetool APIs Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: I2bda575fa6174dfc0f6c24da45267ee732643db6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136811 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145604 Tested-by: Andras Timar <andras.timar@collabora.com>
2022-11-28Disable languagetool for WASM buildThorsten Behrens
Change-Id: Icd0face05c33bbb1b56230a59015402d5f565422 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143385 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-10-17use more string_viewNoel Grandin
Change-Id: Ie826234aa9064b08b8f0647738b57c47ac0ed91a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141369 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-11Deduplicate O(U)StringConcatenationMike Kaganski
And use an overloaded helper function with a better (?) unified name to show that the result is not an O(U)String. Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-13clang-tidy modernize-pass-by-value in variousNoel Grandin
Change-Id: Ie091b22bd77d4e1fbff46545bc86c12f1dbafcfe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138171 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-30lingucomponent: avoid 'using namespace' in a header fileMiklos Vajna
Because that would pollute the global namespace in any cxx file including this header. Change-Id: Ida324d125114ae03d8868842b881e3b94af62bfb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136631 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-06-23lingucomponent: use comphelper::makePropertyValue() in languagetoolimpMiklos Vajna
This allows giving aColor an actual type. Change-Id: If51ec4028b712166094c3f24a2e1d7643ff0136d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136295 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-06-18add usual footer directivesCaolán McNamara
Change-Id: I1fd6c5e98e77bc7f275dff65f4c2287b58550f48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136081 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-18cid#1506303 silence Unchecked return valueCaolán McNamara
and cid#1506308 Unchecked return value from library Change-Id: I2a2057b44f1e1e3b8577b02fb63e5460c7222b11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136080 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-15Revert "Load the locales from config file for languagetool"Xisco Fauli
This reverts commit c3ed41752237a7a70c856dfb0d618f1c2eacea5a. Jenkins fails in CppunitTest_sw_core_draw on Mac and Windows Change-Id: I3e2b6359f3238a1b8af2e98d3cb5eee7aa864bae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135859 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-06-14Load the locales from config file for languagetoolMert Tumer
Locales needs to be read again in the Preferences/Writing Aids section and since this is a network operation it can cause a problem. Better to list all the supported locales in the xcu and load it right away. Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: Ifff624334627f7be259b677f9b416d6ddedfb2c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135598 Tested-by: Jenkins
2022-06-10LanguageTool Grammar Checker implementationMert Tumer
Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: I275cbea668afc5beb5147370119631df8b6a2d46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135178 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-06-10new loplugin:moveitNoel Grandin
look for local variables that can be std::move'd to parameters off by default, since it doesn't do proper data flow analysis Change-Id: I3403a0fcffd165bdea6a772528bc53995c5fdb40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-05use more o3tl::getTokenNoel Grandin
found by inspecting call sites of OUString::getToken Change-Id: I4269c7476c7aa46fac39528227e350568f0eb34a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132644 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-28-Werror,-Wunused-but-set-variableStephan Bergmann
...ever since cab1870e677f33a2501f15916110da46d3336d24 "INTEGRATION: CWS languageguessing: #i73173# integrate Google SoC language-guessing" Change-Id: I0abf783944499b6ac8015e37952013d05b273558 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132206 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-01-27Recheck modules [i-l]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I758bb27e93779e3df21c463714e49354748f446f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128715 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-01-20WASM --enable-wasm-strip now skips lots of LO codeArmin Le Grand (Allotropia)
... resulting in a stripped-down, Writer-only build to decrease the resulting WASM bytecode size. It removes the following code from the build: * All other major modules: Base, Calc, Chart, Draw, Impress and Math and related writerperfect filters * The premultiply tables * The (auto-)recovery functionality * All accessibility (but not the accessibility document checker) * The LanguageGuess component * EPUB support * The start center / BackingWindow * The TipOfTheDay functionality * The splash screen communication Currently crashs with anything different then soffice --writer. Closing the document also still crashes. FYI: many of these features are now behind ENABLE_WASM_STRIP_* defines, but they normally don't work on their own, globally! That's because we started with stripping the main components. Change-Id: Ib9c0f9452815910c0a2aceaf142ba1ad4a9cb0d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126182 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-10Generally determine Rdb content from gb_*_set_componentfile callsStephan Bergmann
...instead of by listing the content somewhat redundantly in the Rdb_*.mk files, to avoid duplication of logic for components that are only built conditionally (and thus should only be included conditionally in the corresponding Rdb). To achieve that, add an "rdb" parameter to gb_ComponentTarget_ComponentTarget (and to the gb_*_set_componentfile macros that internally call gb_ComponentTarget_ComponentTarget), which is used to make the appropriate gb_Rdb_add_component call internally from within gb_ComponentTarget_ComponentTarget. (As a special case, gb_CppunitTest_set_componentfile shall not call gb_Rdb_add_component, as that has already been done by the corresponding gb_Library_set_componentfile call, so allow the gb_ComponentTarget_ComponentTarget "rdb" parameter to be empty to support that special case.) Most Rdb_*.mk files are thus mostly empty now. One exception is i18npool/Rdb_saxparser.mk, which duplicates some of the Rdb_services content as needed during the build in CustomTarget_i18npool/localedata. 1c9a40299d328c78c035ca63ccdf22c5c669a03b "gbuild: create services.rdb from built components" had already tried to do something similar (in addition to other things) under a new --enable-services-rdb-from-build option. However, that approach had four drawbacks that this approach here addresses (and which thus partly reverts 1c9a40299d328c78c035ca63ccdf22c5c669a03b): 1 Rdb_services shall not contain the component files of all libraries that are built. While that commit filtered out the component files that go into Rdb_ure/services (ure/Rdb_ure.mk), it failed to filter out the component files that go into others like Rdb_postgresql-sdbc (connectivity/Rdb_postgresql-sdbc.mk). 2 The code added by that commit to Makefile.gbuild codified the knowledge that there is an Rdb_services, which is brittle. 3 The code added by that commit to solenv/gbuild/Rdb.mk codified the knowledge (for gb_Rdb__URECOMPONENTS) that there is an Rdb_ure/services, which is brittle. 4 Introducing an --enable-services-rdb-from-build option needlessly provided two different ways how the content of Rdb_services is assembled. The changes done here would leave --enable-services-rdb-from-build as a misnomer, as it no longer controls how Rdb_services is assembled. I thus renamed it to --enable-customtarget-components, as that is apparently what it still does now. Change-Id: Ia5e8df4b640146c77421fcec6daa11a9cd260265 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126577 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-27use more OInterfaceContainerHelper3 in lingucomponentNoel Grandin
Change-Id: I4ad7c868815d7f6b8982dd192bc74b0b07a438f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-26Unused Import of Carbon.h in macspellimp.hxxmwarner
The macspellimp.hxx file was needlessly importing Carbon/Carbon.h Change-Id: I22ee6bf5c39b52fb09409983f52803e58459f2e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125853 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-30Prepare for removal of non-const operator[] from Sequence in lingucomponentMike Kaganski
Change-Id: Ibce58dc277a703881de91bebdfd8b328c820a28e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124373 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-04drop 'using namespace std' in l*Julien Nabet
Change-Id: I88909cf813f39a52c70d3cbcb19ff326d9bb42d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123069 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-08-03Consolidate on C++17 std::scoped_lock instead of std::lock_guardNoel Grandin
as in commit 9376f65a26240441bf9dd6ae1f69886dc9fa60fa Change-Id: I3ad9afd4d113582a214a4a4bc7eea55e38cd6ff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119927 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-02convert #defines to OUStringLiteralNoel Grandin
mostly by doing $ git grep -l '#define.*\"' -- *.cxx | xargs perl -pi -e 's/^#define\s+(\w+)\s+(\".*\")/constexpr OUStringLiteral \1 = u\2;/g' Change-Id: Idface893449b0ef2a3c5254865a300585d752fbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119669 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-31osl::Mutex->std::mutex in NumberText_ImplNoel Grandin
Change-Id: I9903a2717fe9019c45c4ecc3e7dcaed7e1a9d9f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-31osl::Mutex->std::mutex in LangGuess_ImplNoel Grandin
Change-Id: If2ea21cd52ddae821598398524c84b5b22817c33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119729 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-23do not use "using namespace std" in headersCollabora
It's a bad style, doing that in headers can affect many source files (especially with PCH used). Change-Id: Ic9091a1d018e74606c9fa95df71a55faaa93d4ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119011 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-06-10-Werror,-Wunused-but-set-variable (Clang 13 trunk)Stephan Bergmann
...ever since the code's introduction in 4e386a897cd43aae3664ce68e47dd46b271de780 "INTEGRATION: CWS macosxspellchecker" Change-Id: I932b7ff4cc8aabf2e70379ed9ebe361881246c46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116997 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-17Don't use the macOS system German spelling dictionary for Swiss GermanTor Lillqvist
The system German dictionary accepts 'ß' which is not used in Swiss Standard German but completely replaced with 'ss'. We assume that the LibreOffice German dictionary is installed, too. It has correct spelling for de_CH. It would be good if we knew in the macosxspell code whether the LibreOffice German dictionary installed, and act correspondingly. But figuring that out seems more complicated than what I am willing to spend on this for now. Change-Id: I380d7734cea34a2408d9ed20a8c3d9efe6a8fea2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115690 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-04-08Fix typoAndrea Gelmini
Change-Id: I2cc70345d508da17d466d04c6a9a59b689e9ae16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113797 Tested-by: Jenkins Reviewed-by: Hossein <hossein.ir@gmail.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-04-07Updated README.md files to represent current code / use Markdown formatHossein
Previously, all of the README files have been renamed to README.md and now, the contents of these files were changed to use Markdown format. Other than format inconsistency, some README.md files lacked information about modules, or were out of date. By using LibreOffice / OpenOffice wiki and other documentation websites, these files were updated. Now every README.md file has a title, and some description. The top-level README.md file is changed to add links to the modules. The result of processing the Markdown format README.md files can be seen at: https://docs.libreoffice.org/ Change-Id: Ic3b0c3c064a2498d6a435253b041df010cd7797a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113424 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-03-25tdf#124173: Enable thesauruses in the iOS appTor Lillqvist
Build our lnth library and the external mythes library. Install thesauruses for the app's Xcode project to pick up and include in the app bundle. Look for them in the place where they will end up. To get thesauruses you need to configure with --with-myspell-dicts. Change-Id: I2d850ca3c821c5c764cb061340a265440d04e41b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113066 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113073 Tested-by: Tor Lillqvist <tml@collabora.com>
2021-03-24Using .md extension/Markdown syntax for modules READMEHossein
Renaming all README files for all top level modules to README.md, applying no content change at this stage to be able to track history of the files. These files should be edited to use correct Markdown syntax later. Change-Id: I542fa3f3d32072156f16eaad2211a397cc212665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112977 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-03-19Use the iOS fr_FR and it_IT dictionaries for other relevant countries, tooTor Lillqvist
Fixes https://github.com/CollaboraOnline/online/issues/1463 Change-Id: I9fffd4bc9499aee2098258f5c3a9181330b339a1 Signed-off-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112670 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112690
2021-03-17tdf#124909: Use the myspell dictionary for Swiss German on iOSTor Lillqvist
The iOS system German dictionary is not good for Swiss German. (And it doesn't even claim to be, it says it is for de_DE.) The system German dictionary accepts 'ß' but that is not used in Swiss German, 'ss' is always used instead. Build the spell library for iOS, too, and don't assume that the system de_DE dictionary would be usable for de_CH and de_LI. Copy those dictionaries for inclusion in the iOS app bundle. Change-Id: I0f8020812221024756c792bddc16a707de35b827 Signed-off-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112603 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112635
2021-03-10Drop 'static_cast<cppu::OWeakObject*>' syntactic noiseMike Kaganski
... where the object is created in-place, and its type is known Change-Id: Ifabfcf2f3ad0d60152f14e8d970c1faa42115288 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112256 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-03loplugin:refcounting (macOS)Stephan Bergmann
Change-Id: Id68d9c9733738595aeb4bad24d77f77da2878e83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111830 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-23loplugin:refcounting check for managing OWeakObject with raw pointerNoel
Change-Id: I7471725f1e658940b5e6993361c327be6ccf0d31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111064 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-01Use Unicode paths on Windows in libnumbertextMike Kaganski
Change-Id: I02790afc314c8633a24dbf23001f3d5cffe169b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108478 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-12-11Adapt the remaining OUString functions to std string_viewStephan Bergmann
...for LIBO_INTERNAL_ONLY. These had been missed by 1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take std::u16string_view parameters" because they did not match the multi-overload pattern that was addressed there, but they nevertheless benefit from being changed just as well (witness e.g. the various resulting changes from copy() to subView()). This showed a conversion from OStringChar to std::string_view to be missing (while the corresponding conversion form OUStringChar to std::u16string_view was already present). The improvement to loplugin:stringadd became necessary to fix > [CPT] compilerplugins/clang/test/stringadd.cxx > error: 'error' diagnostics expected but not seen: > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd] > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd] > 2 errors generated. Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-13tdf#123936 Formatting files in module lingucomponent with clang-formatPhilipp Hofer
Change-Id: Ia156fe8eb259fda0c23275fcaebc6b37790f11f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105688 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-11loplugin:stringviewNoel
Add new methods "subView" to O(U)String to return substring views of the underlying data. Add a clang plugin to warn when replacing existing calls to copy() would be better to use subView(). Change-Id: I03a5732431ce60808946f2ce2c923b22845689ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105420 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>