Commit graph

703 commits

Author SHA1 Message Date
Noel Grandin
9f25d34d65 clang-tidy modernize-pass-by-value in idl/idlc
Change-Id: Iccd18eb394564d3ba90c395725923c559b2b81e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134532
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-18 18:18:14 +02:00
Noel Grandin
3817965ded add SvStream::ReadLine(OStringBuffer... to reduce OString allocation
and use it where possible

Change-Id: I3efc7a642f73661ce606c917c0323ba9948521c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134265
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-13 11:11:27 +02:00
Noel Grandin
33bd16b344 loplugin:stringviewparam convert methods using copy()
which converts to std::string_view::substr()

Change-Id: I3f42213b41a97e77ddcc79d84d512f49d68ca559
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132729
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-17 10:27:33 +02:00
Noel Grandin
6fc3dfd3f1 use more string_view
found by tweaking the loplugin:stringview and making it whitelist
getLength

Change-Id: Ic41cd4e3026d93b70a76fe1279c6de3abbe6b4a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132820
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-11 17:44:46 +02:00
Gabor Kelemen
67478f9d63 Recheck modules [i-l]* with IWYU
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-27 18:52:16 +01:00
Noel Grandin
8fed86b3eb add some more TypeWhichId annotations
and update the idl compiler to cope with namespaced class names

Change-Id: I7b5242f872e358bc3c5584f543767719172aac83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129026
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-27 14:10:25 +01:00
Arnaud VERSINI
978acbeb8c idl : no need to use rtl::Static
Change-Id: I8b53ab93010f500a61aa4930817c25d09cb2552d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127869
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-02 18:24:56 +01:00
Arnaud VERSINI
335ecfee17 idl : use delegating constructor
Change-Id: Ic3a23dfc1278a9f34d0b7a441d604903eadc2a8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127818
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2022-01-01 18:48:07 +01:00
Arnaud VERSINI
7a6fb93905 idl : remove useless define and copy the code directly !
Change-Id: I92d53beb110a44624b72f7ec76ab8d1089f9caf0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127438
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-25 08:32:26 +01:00
Jan-Marek Glogowski
03faef951a mergelibs: fix duplicate aSfxInt16Item_Impl
The callgrind / mergelibs build fails with:

/svx/source/form/typemap.o: in function `aSvxColorItem_Impl´: \
   multiple definition of `aSfxInt16Item_Impl´; \
/sfx2/source/appl/appbas.o: first defined here

Regression from commit 60d7796624
("sd theme: allow setting color effects in the sidebar").

Change-Id: Ibe382e2e12d3359caa3e853e264de0ede6a5e601
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127429
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-24 19:21:29 +01:00
Noel Grandin
a3bc9dc511 loplugin:flatten in filter..include
Change-Id: I74c1ea8b9b490eaa9508a885758224063e39051b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127235
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-22 07:44:07 +01:00
Emircan Agac
c7685f030f tdf#114441:Convert use of sal_uLong to better integer types
Change-Id: I14cfc4113e9aff0fcff3b2d3c2b0444aad8934ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120332
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-08-13 10:43:58 +02:00
Noel Grandin
bfc1600c6a loplugin:indentation improve checks for brace alignment
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-28 10:47:34 +02:00
Jan-Marek Glogowski
8a4173987e WASM: add initial support for Emscripten cross build
- configure with:
- --host=wasm64-local-emscripten
- had to make a few externals optional, so adding:
  - --disable-nss
  - --disable-cmis
  - --disable-curl

Change-Id: I48d1c73d2675ad2e2beaf2c341578199efbd24ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111130
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-05-05 21:14:54 +02:00
Noel Grandin
04aafba860 loplugin:stringadd simplify some *StringBuffer operations
pulled from a larger patch which I created with a more permissive
variant of this plugin

Change-Id: I7abf1f3f09e84703b6e0e52fe9587dff691b2187
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114875
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-29 18:25:31 +02:00
Noel Grandin
62f6d6ee8b use more string_view in tools/stream
Change-Id: I2a957cd72d71fea717734488cdb3670e0bcdd6f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114657
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-27 09:27:44 +02:00
Noel Grandin
c7428c607c use more string_view in OString API
some parts of the OString seem to have fallen behind
its more popular sibling OUString.

Change-Id: Ie6d64c3005b2df5da49ba79d0c38282dd5057a23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114252
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-19 12:11:43 +02:00
Hossein
ea5641baee Updated README.md files to represent current code / use Markdown format
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-04-07 17:47:16 +02:00
Hossein
c16158772d Using .md extension/Markdown syntax for modules README
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-24 11:46:14 +01:00
Ahmet Hakan Çelik
0726ecd9e2 tdf#114441: Convert use of sal_uLong to better integer types
Change-Id: I173d57105429e2bdf2288678fa7911b8541a402b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112154
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-03-16 11:45:04 +01:00
Bayram Çiçek
a88effc4f5 tdf#114441: Convert use of sal_uLong to better integer types
Change-Id: Ibb432c3db6d99343514c412c4c1b968808b733c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110886
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-03-11 11:37:49 +01:00
Julien Nabet
863ee228e0 -Werror,-Wformat in idl with Raspberry pi 4b
[CXX] sax/source/expatwrap/sax_expat.cxx
/home/pi/lo/libreoffice/idl/source/prj/database.cxx:437:23: error:
format specifies type 'unsigned long' but the argument has type
'sal_uInt64' (aka 'unsigned long long') [-Werror,-Wformat]
              "error", nRow, nColumn );
                       ^~~~
/home/pi/lo/libreoffice/idl/source/prj/database.cxx:437:29: error:
format specifies type 'unsigned long' but the argument has type
'sal_uInt64' (aka 'unsigned long long') [-Werror,-Wformat]
              "error", nRow, nColumn );
                             ^~~~~~~
2 errors generated.

Following https://cgit.freedesktop.org/libreoffice/core/commit/?id=5419b894a2e791de24d10f0c4433a807e175e7a0

author    siddheshpatil777 <[hidden email]> 2021-01-06
14:14:33 +0400
committer    Michael Stahl <[hidden email]> 2021-01-21
16:36:00 +0100
commit    5419b894a2 (patch)
tree    72cdf2b964
parent    21138573fc (diff)

tdf#114441: Convert use of sal_uLong to better integer types

Change-Id: I0d961e8b1e0a6a9709fabb50b5e209c7ac5e7250
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110844
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2021-02-14 09:42:44 +01:00
Caolán McNamara
28555fc345 fix fuzzer build
Change-Id: I41df4af812cd225a0bd8e49df9e8b3c322698d28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110825
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-12 21:21:09 +01:00
siddheshpatil777
5419b894a2 tdf#114441: Convert use of sal_uLong to better integer types
Change-Id: I14742675541a315e72191df4ee38c35373b39d52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108842
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-01-21 16:36:00 +01:00
Stephan Bergmann
cf7306194f No longer need to worry about ambiguous operator== in loplugin:stringviewparam
...after 46c5de8328 "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-20 13:07:02 +01:00
Stephan Bergmann
35e471bb4d Adapt the remaining OUString functions to std string_view
...for LIBO_INTERNAL_ONLY.  These had been missed by
1b43cceaea "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-11 21:25:10 +01:00
Stephan Bergmann
4f0c70fb55 Avoid calling OString ctor with null pointer
...in preparation of potential future changes from using OString to using
std::string_view, where OString has an undocumented feature of allowing
construction from a null pointer.

This is mostly the result of a manual audit of potentially problematic getenv
calls across the code base.  But there can be other problematic places too, like
the xmlGetProp call in tools/source/xml/XmlWalker.cxx.  To identify those,
rtl_{string,uString}_newFromStr aborts now in non-production debug builds when a
null pointer is passed(and all places that hit with a full `make check
screenshot` have been addressed here).  Once we are confident that all
problematic places have been identified, we should drop support for the
undocumented feature (see the TODO in sal/rtl/strtmpl.cxx).

Change-Id: I595cc6d4f1cda74add2a3db171323f817d362b08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107430
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-10 16:27:35 +01:00
Noel
8ef6067596 loplugin:stringviewparam check methods too
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-17 09:57:35 +01:00
Philipp Hofer
9c9a822920 tdf#123936 Formatting files in module idl with clang-format
Change-Id: I0a2681218773288c14b6faf98dd0bb8a7dbac56d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105679
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-13 15:19:47 +01:00
Caolán McNamara
1ec39615b9 fix oss-fuzz build failure
/work/instdir/program/libtllo.a(stream.o):stream.cxx:function
  tools::isEmptyFileUrl(rtl::OUString const&): error: undefined reference to 'comphelper::isFileUrl(rtl::OUString const&)'
/src/libreoffice/solenv/gbuild/LinkTarget.mk:667: recipe for target '/work/workdir/LinkTarget/Executable/svidl' failed

Change-Id: I9ed31787c6d98ea516dd6927f8aa8b589c3b9824
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105024
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-29 21:20:57 +01:00
Maxim Monastirsky
710c794bbf svidl: Don't mention removed properties
Get/Set were removed in ccbed01b40
("remove unused GET/SET/STATUSBARCONFIG in .SDI files").

Nested methods were removed in
20f33eb7c5 ("svidl: Remove nested
method support").

Change-Id: Ice03e63dc5f54365099bcaff3ba379cf691709bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102346
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-10 11:33:30 +02:00
Maxim Monastirsky
37ec75564d Remove the useless Export sdi property
Maybe I'm missing something, but its usage -
"if ( !GetExport() && !GetHidden() )" seems like expects
it to be true and false at the same time. Anyway, there's
no diff in workdir/SdiTarget after this change, so should
be safe to remove.

Change-Id: I6db508ff40c05dc828ffa91bb41a37c17b697503
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102345
Tested-by: Jenkins
Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2020-09-10 09:27:47 +02:00
Noel Grandin
8ee2063fa8 loplugin:flatten in idl
Change-Id: I7e8fe338a366d146c7951fe54f74cc5e42bde039
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91833
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-07 19:56:18 +02:00
Stephan Bergmann
cbb42f9dd4 The idl __attribute__((__weak__)) hack doesn't seem necessary for --enable-lto
dbfc495a9a "Add config option used when we try to
link one huge object file" had added it for the --enable-lto case, but without
documenting exactly what it should help with.  And at least my local Linux
--enable-lto --enable-dbgutil etc. build successfully does `make check &&
make screenshot` without it.

This removes the only use of STATIC_LINKING, so remove it completely.  (And
basctl/source/basicide/basidesh.cxx still needs to include config_options.h for
ENABLE_MERGELIBS.)

Change-Id: I3820e1cacccc92f5ac0c9c7fcc539c29a6864694
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90804
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-03-20 19:31:11 +01:00
Bugra
ad53c99620 tdf#114441: Convert use of sal_uLong to better integer types
Change-Id: I6b6f59a73aeda6af78fecaf4344826a943072033
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90191
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-03-11 17:36:44 +01:00
Caolán McNamara
133eafab9b ofz#20976 build-failure
Change-Id: I6fc81e6ef13f77dea410f95e159a932089603aeb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89801
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-03-02 21:46:57 +01:00
Caolán McNamara
2b03e0ba52 Revert "ofz#20976 build-failure"
This reverts commit 5b22433d79.

Reason for revert: <INSERT REASONING HERE>

Change-Id: I4a104ca86dadbcc7f797df41326d48a53ca1c990
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89800
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-03-02 19:58:35 +01:00
Caolán McNamara
5b22433d79 ofz#20976 build-failure
Change-Id: I31434d2b979aff20a53b164ffbb3d19247cd1ce3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89826
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-03-02 19:54:28 +01:00
Noel Grandin
e73b99b8dd loplugin:finalclasses in i18npool..linguistic
Change-Id: Ib903fb2fdb4c4c25f73053065b828dade8b63785
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86687
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-14 07:12:31 +01:00
Stephan Bergmann
f853ec317f Extend loplugin:external to warn about classes
...following up on 314f15bff0 "Extend
loplugin:external to warn about enums".

Cases where free functions were moved into an unnamed namespace along with a
class, to not break ADL, are in:

  filter/source/svg/svgexport.cxx
  sc/source/filter/excel/xelink.cxx
  sc/source/filter/excel/xilink.cxx
  svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx

All other free functions mentioning moved classes appear to be harmless and not
give rise to (silent, even) ADL breakage.  (One remaining TODO in
compilerplugins/clang/external.cxx is that derived classes are not covered by
computeAffectedTypes, even though they could also be affected by ADL-breakage---
but don't seem to be in any acutal case across the code base.)

For friend declarations using elaborate type specifiers, like

  class C1 {};
  class C2 { friend class C1; };

* If C2 (but not C1) is moved into an unnamed namespace, the friend declaration
must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see
C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither
qualified nor a template-id and the declaration is a function or an
elaborated-type-specifier, the lookup to determine whether the entity has been
previously declared shall not consider any scopes outside the innermost
enclosing namespace.")

* If C1 (but not C2) is moved into an unnamed namespace, the friend declaration
must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882>
"elaborated-type-specifier friend not looked up in unnamed namespace".

Apart from that, to keep changes simple and mostly mechanical (which should help
avoid regressions), out-of-line definitions of class members have been left in
the enclosing (named) namespace.  But explicit specializations of class
templates had to be moved into the unnamed namespace to appease
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of
template from unnamed namespace using unqualified-id in enclosing namespace".

Also, accompanying declarations (of e.g. typedefs or static variables) that
could arguably be moved into the unnamed namespace too have been left alone.

And in some cases, mention of affected types in blacklists in other loplugins
needed to be adapted.

And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which
is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is
not moved into an unnamed namespace (because it is declared in
sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is.  GCC warns about
such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler
doesn’t give this warning for types defined in the main .C file, as those are
unlikely to have multiple definitions."
(<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>)  The
warned-about classes also don't have multiple definitions in the given test, so
disable the warning when including the .cxx.

Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4
Reviewed-on: https://gerrit.libreoffice.org/83239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-22 12:57:32 +01:00
Noel Grandin
7b99cdb2d7 loplugin:indentation find broken if statements
so I don't read the "then" block as being a sequential statements

Change-Id: Ib2004acd3518bd4ebd2246f02a26c2c0a8bbab4c
Reviewed-on: https://gerrit.libreoffice.org/82069
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-06 06:27:51 +01:00
Stephan Bergmann
6d6fad522a Introduce OStringChar
...similar to OUStringChar, to be used in string concatenation expressions.  And
enable the corresponding loplugin:stringadd check, and fix its findings.

Change-Id: I35ebb2253ba82bda6c98ae6ebd2ad4f27cf9abf9
Reviewed-on: https://gerrit.libreoffice.org/81456
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-24 17:17:46 +02:00
Noel Grandin
0f874472c6 size some stringbuffer to prevent re-alloc
found by the simple expidient of putting asserts in
the resize routine. Where an explicit const size is used,
I started with 32 and kept doubling until that site
did not need resizing anymore.

Change-Id: I998787edc940d0a3ba23b5ac37131ab9ecd300f4
Reviewed-on: https://gerrit.libreoffice.org/81138
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21 08:36:01 +02:00
Stephan Bergmann
8b4719c29f Rename OUStringLiteral1 to OUStringChar
It started out as a wrapper around character literals, but has by now become a
wrapper around arbitrary single characters.  Besides updating the documentation,
this change is a mechanical

  for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done

Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f
Reviewed-on: https://gerrit.libreoffice.org/80892
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-17 07:28:49 +02:00
Noel Grandin
f13c6ad5f0 new loplugin:bufferadd
look for OUStringBuffer append sequences that can be turned
into creating an OUString with + operations

Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6
Reviewed-on: https://gerrit.libreoffice.org/80809
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-15 14:33:57 +02:00
Noel Grandin
231e16d909 loplugin:redundantpointerops simplify *p.get()
Change-Id: I12517651fb3f777fd08e384992bb3e84b340ad85
Reviewed-on: https://gerrit.libreoffice.org/80382
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-08 08:26:23 +02:00
Andrea Gelmini
77902a3cb2 Fixing '....'
Change-Id: Icf2a34500acc18b28f113c85366bf24edc6d20b9
Reviewed-on: https://gerrit.libreoffice.org/78695
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-09-06 14:12:27 +02:00
Caolán McNamara
dcfc5ecf93 cid#1448323 Unchecked return value
Change-Id: I2d1d3d2ce7302fa895820981e0c15b59d491ddc4
Reviewed-on: https://gerrit.libreoffice.org/75876
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-18 21:15:24 +02:00
Noel Grandin
19240f625f loplugin:unusedfields look for classes where we can make all the..
fields private

Change-Id: Id3c6b123f06ab5dcf87628de4c347626110d2d27
Reviewed-on: https://gerrit.libreoffice.org/68302
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-27 07:34:52 +01:00
Noel Grandin
de8c193833 loplugin:indentation in helpcompiler..io
Change-Id: Ia3f05662cc9542feeac3096d29e9dec6d1858620
Reviewed-on: https://gerrit.libreoffice.org/67558
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-09 17:07:29 +01:00