summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)Author
2020-12-27Simplify loplugin:stringviewparam comparison operator handlingStephan Bergmann
In practice, it works fine to look at all of them, regardless of actual argument types. Change-Id: Ifc49cbcd6003c8837c1b3f81d432c59fb0657bf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108366 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-26Cleanups after vcl/bitmapaccess.hxx splittingIlmari Lauhakangas
Change-Id: I5a24fb984ba6fbfc2b316420d5ffa372f35ce061 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108318 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2020-12-26New loplugin:stringliteralvarStephan Bergmann
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for details. (Turned some affected variables in included files into inline variables, to avoid GCC warnings about unused variables.) Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-23Don't call isIntegerConstantExpr on value dependent ExprStephan Bergmann
...as it causes Clang to fail with > Assertion failed: (!isValueDependent() && "Expression evaluator can't be called on a dependent expression."), function isIntegerConstantExpr, file .../llvm/llvm-project/clang/lib/AST/ExprConstant.cpp, line 15487. Change-Id: I335f7610955c30a5c102bfb3b8aa6441a30dd247 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108241 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-20No longer need to worry about ambiguous operator== in loplugin:stringviewparamStephan Bergmann
...after 46c5de832868d2812448b2caace3eeaa9237b9f6 "make *String(string_view) constructors explicit" Change-Id: I6e884c762a2fc91f5dd6fbb197a596fd60f17cae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108043 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-19Related tdf#138715: kill last Mork refsJulien Nabet
Change-Id: Id655f533a6957257329f9c1f9e4c082516e149f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107978 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-12-17Various minor loplugin fixes (macOS ARM64), reduxStephan Bergmann
Change-Id: I720dde70c6f6ca6c25d7b430f117ea578a25f34e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107922 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-14tdf#138715 remove mork strings and install targetsJan-Marek Glogowski
Hopefully fixes the package build. Regression from commit ee9ed2192b56c98e5b8ee9890ddb4c533117332a ("tdf#138715 remove mork driver"). Change-Id: I0faad65af834e3668c9845eadfe3439ae57b3699 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107692 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-12-14loplugin:unusedenumconstantsNoel
Change-Id: I49996ad433409a9189c0f7adc997858e1512f40c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107687 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-14loplugin:singlevalfieldsNoel
Change-Id: I31107d4e3b3bd175187a8c29a094a4c6acf2a87c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107686 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-14loplugin:unusedfieldsNoel
Change-Id: I73c49b83f5c1ef17fbff18af675e95d2f2a7b243 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107685 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-14loplugin:unusedmethodsNoel
Change-Id: I442d99e8f6a7df11dc950c5073f683bffc41a852 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107661 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-14loplugin:unnecessaryvirtualNoel
Change-Id: Ie083afe2763b21e0abada228e4007b9b387c2d39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107660 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-14loplugin:unusedfieldsNoel
Change-Id: Ib04b32654f005a879d52b880bc3787bbbab09372 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107659 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-13tdf#138715 remove mork driverRene Engelhard
since TB moved to sqlite Change-Id: Ifddf1a6c9783a294ee9ccfac667c7e798674d7a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107574 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
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-12-09Fix loplugin:stringviewparam handling of comparison operatorsStephan Bergmann
Change-Id: I58456efb9588b544d998ac6a4c27d55457280742 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107510 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-09Improve loplugin:stringview diagnostic messagesStephan Bergmann
Change-Id: If1b94de205fb9c1cc0491603f27073dfde67a485 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107511 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-08loplugin:singlevalfields update to python3Noel
Change-Id: I1257b7b865caa356c85eeeb45a19a537fc434ac5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107368 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-07loplugin:unusedmethodsNoel
Change-Id: Ib51fd610c5188fe95872d509f004ae88f38c5417 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107351 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-07loplugin:unusedfieldsNoel
Change-Id: Ia02d8359e0158c7658ac3abcaf2b6c19a3b33131 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107348 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-07loplugin:unnecessaryvirtualNoel
Change-Id: Ie9b6a588e23453aac49ba44e5c50ae70a5fb866a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107347 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-07Ignore unparsed function template bodies in loplugin:unusedvariablecheckStephan Bergmann
Otherwise, clang-cl would have reported a false positive at > In file included from C:/lo-clang/core/vcl/source/window/builder.cxx:74: > C:/lo-clang/core/vcl/inc\jsdialog/jsdialogbuilder.hxx(176,26): error: unused parameter 'sTypeOfJSON' [loplugin:unusedvariablecheck] > std::string sTypeOfJSON) > ^ Change-Id: I14420cf6712a6a18e0d341a5b00e38dff5f6c92e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107330 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-04call createFastChildContextFallback in more placesNoel Grandin
to make my fastparser work easier to manage Change-Id: If98592f016cd35ca13b48d9df363e32fb1095b55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107233 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-04Improve loplugin:stringview detection of unnecessary O[U]String constructionStephan Bergmann
Change-Id: Ia45119e11377e916a1e1deb5648ed9033c417d77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107228 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-03Replace unowinreg.dll with execution of `reg QUERY`Stephan Bergmann
The SDK's <https://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Java/ Transparent_Use_of_Office_UNO_Components> on all platforms included the Windows- specific unowinreg.dll in generated jars (so that those jars, when distributed to a Windows environment, would find a LO installation by inspecting the Windows registry). That unowinreg.dll was originally built as a 32-bit DLL (though when building a 64-bit Windows LO, it happened to be built as a 64-bit DLL). For non-Windows LO builds, it could either be built locally with a MinGW toolchain (--enable-build-unowinreg) or downloaded from dev-www.libreoffice.org. However, that had various issues: For one, unowinreg.dll was not necessarily available in a distributed jar as a 64-bit DLL for use with a 64-bit JRE on Windows. (Theoretically, running such a jar with a 32-bit JRE to access a 64-bit LO installation's URE jars could have worked. But practically, those URE jars in turn require native DLLs, which would then not have been available as 32-bit DLLs for use in the 32-bit JRE.) For another, at least the unowinreg.dll resulting from --enable-build-unowinreg on Fedora 33 would have had a dependency on libgcc_s_dw2-1.dll that would generally not have been available in a target Windows environment. There appears to be no pure Java way to read the Windows registry, but instead of using a native code DLL for that, it appears to work just as well to call out to reg.exe and parse its output. This removes the --enable-build-unowinreg and --with-mingw-cross-compiler configuration options. (The sole use of the MinGW toolchain in LO was for building unowinreg.dll.) Change-Id: I3283ea38c884d3221a205e5ab6ec99a2691ef474 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107140 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2020-11-30loplugin:stringviewparam include comparisons with string literalsNoel
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-29loplugin:toolslong: Exclude some Windows-specific filesStephan Bergmann
...where I consider long and unsigned long to be appropriate choices, for one reason or another (e.g., in combination with strtol) Change-Id: I5bfd19ab8f295152ce1436d9c0027d31118cda50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106776 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-29loplugin:toolslong: Don't warn about virtual functions at allStephan Bergmann
Now that all the relevant changes in old code should already have been done anyway, excluding virtual functions nicely avoids clang-cl warnings about the use of long and unsigned long in Windows-only StreamInterface (shell/inc/types.hxx). It is implemented by BufferStream and FileStream (both shell/inc/stream_helper.hxx), of which BufferStream internally uses [U]LARGE_INTEGER-based IStream and FileStream internally uses long (fseek, ftell) resp. size_t (fread) based FILE, so basing the common interface on [unsigned] long doesn't look like too unreasonable a choice. Change-Id: I563d59a8ca8a0ee37f46e2676ae8d00f6ea24597 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106768 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2020-11-29Avoid loplugin:toolslong in system header macrosStephan Bergmann
...as experienced with clang-cl: > C:/lo-clang/core/sal/osl/w32/socket.cxx(968,44): error: CStyleCastExpr, suspicious cast from 'unsigned long long' to 'long' [loplugin:toolslong] > ioctlsocket(pSocket->m_Socket, FIONBIO, &Param); > ^~~~~~~ > C:/PROGRA~2/WI3CF2~1/10/Include/10.0.18362.0/um\winsock2.h(220,21): note: expanded from macro 'FIONBIO' > #define FIONBIO _IOW('f', 126, u_long) /* set/clear non-blocking i/o */ > ^~~~~~~~~~~~~~~~~~~~~~ > C:/PROGRA~2/WI3CF2~1/10/Include/10.0.18362.0/um\winsock2.h(217,35): note: expanded from macro '_IOW' > #define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)) > ^~~~~~~~~~~~~~~ Change-Id: Ie2ccc816a214cf39a77bd0ffeddd9f1636f19cd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106756 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-25Ignore unparsed function template bodies in loplugin:stringviewparamStephan Bergmann
Otherwise, clang-cl would have reported a false positive at > In file included from C:/lo-clang/core/canvas/source/directx/dx_bitmapcanvashelper.cxx:36: > C:/lo-clang/core/include\canvas/canvastools.hxx(501,42): error: replace function parameter of type 'const rtl::OUString &' with 'std::u16string_view' [loplugin:stringviewparam] > bool lookup( const OUString& rName, > ~~~~~~~~~~~~~~~~^~~~~ Change-Id: Iee71ad721ebe891f51ad1dd6eba50162e40fd998 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106574 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-24tdf#138194 Chart OOXML import: set text break to trueTünde Tóth
of rotated category axis label, if the rotation is 90 or 270 degree and the inner size of the chart is not fixed. Change-Id: I02e1fd940af8a277435aa46d4ad93a42b6723710 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106422 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-22tdf#123936 Formatting files in module compilerplugins with clang-formatPhilipp Hofer
Change-Id: Ie6e23d3d2a20849e47d048b439d72fd7376c53db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105654 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-19Simplify loplugin:stringviewStephan Bergmann
(It is conversions from certain string expressions, like empty strings or copy calls, to string view we are interested in, wherever they happen to occur. Though this didn't find any additional occurrences to flag now.) Change-Id: I35e544a93f861a9ab9ce6d929f9757cb64ca71c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106118 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2020-11-19loplugin:stringview: Flag empty string converted to string viewStephan Bergmann
Change-Id: Idf412dc5f235230512160cb4fb7e1a00baa1cfa7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106085 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-18loplugin:stringviewparam: No good reason to exclude operator functionsStephan Bergmann
(at least not in general) Change-Id: I71337b53dc9735e90a37ee532d0a8a08797b518c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106043 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-17loplugin:stringviewparam extend to constructorsNoel
Change-Id: Ia573921566ec6079b843cbcc0401d9d0f5c62089 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105969 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-17loplugin:stringviewparam check methods tooNoel
not just functions Change-Id: Icca295dd159002b428b73f2c95d40725434f04d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105789 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-16Adapt to Clang 12 trunk cosmetic diagnostics changesStephan Bergmann
<https://github.com/llvm/llvm-project/commit/ e7f3e2103cdb567dda4fd52f81bf4bc07179f5a8> "Suppress printing template arguments that match default template arguments of types by default" caused > error: 'error' diagnostics seen but not expected: > File /home/sbergman/lo/core/compilerplugins/clang/test/makeshared.cxx Line 58: rather use make_shared than constructing from 'typename std::remove_reference<unique_ptr<int> &>::type' (aka 'std::unique_ptr<int>') [loplugin:makeshared] > File /home/sbergman/lo/core/compilerplugins/clang/test/makeshared.cxx Line 60: rather use make_shared than constructing from 'typename std::remove_reference<unique_ptr<int> &>::type' (aka 'std::unique_ptr<int>') [loplugin:makeshared] in compilerplugins/clang/test/makeshared.cxx, and <https://github.com/llvm/ llvm-project/commit/5f12f4ff9078455cad9d4806da01f570553a5bf9> "Suppress printing of inline namespace names in diagnostics by default, except where they are necessary to disambiguate the target" caused > error: 'note' diagnostics seen but not expected: > File /home/sbergman/lo/core/compilerplugins/clang/test/external.cxx Line 133: a function associating 'N::E' is declared here [loplugin:external] > File /home/sbergman/lo/core/compilerplugins/clang/test/external.cxx Line 140: a function associating 'N::E' is declared here [loplugin:external] > File /home/sbergman/lo/core/compilerplugins/clang/test/external.cxx Line 144: a function associating 'N::E' is declared here [loplugin:external] > File /home/sbergman/lo/core/compilerplugins/clang/test/external.cxx Line 167: a function associating 'N::E' is declared here [loplugin:external] > File /home/sbergman/lo/core/compilerplugins/clang/test/external.cxx Line 172: a function associating 'N::E' is declared here [loplugin:external] Change-Id: If1ec798fd9876b5be058c63bcaca3e2a36c0dbb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105904 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-15Extend loplugin:stringviewparen: subViewStephan Bergmann
Change-Id: Iee4833b148a5e17e09f84bdfbc8692aa5a956618 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105777 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-13fix some tools::Long falloutNoel Grandin
Change-Id: I8c15b0ee8400c3b540154bc38c51cbf04b6c3850 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105794 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-13improve sorting in global-analysis pluginsNoel
Change-Id: I417f6d9fd6981bb402cd216a08db285cc9adeed0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105628 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-12loplugin:xmlimportNoel
add check for passing XML_TOK* constants to a non-sal_uInt16 parameter, which is a sign of an incomplete fastparser conversion. Change-Id: Icad5bf9eb40fc15fd07b0d9ea79f83ed083de784 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105638 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-12loplugin:unusedfieldsNoel
Change-Id: Id4b36c3f7c4fa2b28a8deae95c125911f51334b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105630 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-12loplugin:unusedmethodsNoel
Change-Id: I90d402a5c18ab16424a042bcea1470fa8a3a5839 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105629 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-12New loplugin:stringviewparamStephan Bergmann
...to "Find functions that take rtl::O[U]String parameters that can be generalized to take std::[u16]string_view instead." (Which in turn can avoid costly O[U]String constructions, see e.g. loplugin:stringview and subView.) Some of those functions' call sites, passing plain char string literals, needed to be adapted when converting them. Change-Id: I644ab546d7a0ce9e470ab9b3196e3e60d1e812bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105622 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.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>
2020-11-11make tools::Long 64-bit on Windows platformNoel Grandin
This is only for the 64-bit windows platform. I don't see the point in messing with the 32-bit platforms, they are (a) become more and more rare (b) unlikely to even have enough available process memory to load extremely large calc spreadsheets The primary problem we are addressing here is bringing Windows-64bit up to same capability as Linux-64bit when it comes to handling very large spreadsheets, which is caused by things like tools::Rectangle using "long", which means that all the work done to make Libreoffice on 64-bit Linux capable of loading large spreadsheets is useless on Windows, where long is 32-bit. The operator<< for tools::Rectangle needs to be inside the tools namespace because of an interaction with the cppunit printing template stuff that I don't understand. SalPoint changed to use sal_Int32, since it needs to be the same definition as the Windows POINT structure. Change-Id: Iab6f1af88847b6c8d46995e8ceda3f82b6722ff7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11loplugin:xmlimport add more checksNoel Grandin
to find places where the slowparser -> fastparser conversion work is incomplete, fixing one bug in the process. Change-Id: Ifd0d801d71eee0aaf25287fbac1a4237a811e7c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105511 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>