Age | Commit message (Collapse) | Author |
|
My very first Basic TestCase: Assistance/mentoring is welcome
Change-Id: I6399fdb603051792d698695fe659e5a12a0c8396
Reviewed-on: https://gerrit.libreoffice.org/83553
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "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>
|
|
This gets rid of the last 72 lost bytes I could identify in the
huge valgrind logs to look like its PDF generation related.
Change-Id: Idda3c2c5b7f5ce0211199b86503037b74438ccf2
Reviewed-on: https://gerrit.libreoffice.org/83302
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
To mitigate the dangers of silently breaking ADL when moving enums into unnamed
namespaces (see the commit message of 206b5b2661be37efdff3c6aedb6f248c4636be79
"New loplugin:external"), note all functions that are affected. (The plan is to
extend loplugin:external further to also warn about classes and class templates,
and the code to identify affected functions already takes that into account, so
some parts of that code are not actually relevant for enums.)
But it appears that none of the functions that are actually affected by the
changes in this commit relied on being found through ADL, so no adaptions were
necessary for them.
(clang::DeclContext::collectAllContexts is non-const, which recursively means
that External's Visit... functions must take non-const Decl*. Which required
compilerplugins/clang/sharedvisitor/analyzer.cxx to be generalized to support
such Visit... functions with non-const Decl* parameters.)
Change-Id: Ia215291402bf850d43defdab3cff4db5b270d1bd
Reviewed-on: https://gerrit.libreoffice.org/83001
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I2c0352fee1621f03604409f9899cc1f9e8a6cbf8
Reviewed-on: https://gerrit.libreoffice.org/82717
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I2990da77a91f6c8fdb6fd9e4112d0451bc3342da
Reviewed-on: https://gerrit.libreoffice.org/82547
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I325149be2ea7697b5b4a2ce4a662edd2f8be6e50
Reviewed-on: https://gerrit.libreoffice.org/82312
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I4c5978b019549d1509c4c70b4cfa93a362395fed
Reviewed-on: https://gerrit.libreoffice.org/82448
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Idb63c169c7e39f27bc99e3c3aa9155583f2a65ab
Reviewed-on: https://gerrit.libreoffice.org/82431
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
This reinstates the fix by Pierre Lepage, which was reverted in
351dead74b4c213b13102f81b5ae9bb47ad8ca39, and makes sure it only
has effect when the compilation is started from IDE.
The idea is that the IDE is used primarily for development, and
that's a good opportunity to detect any error in the code. When
the code is compiled from outside of the IDE (like running an
extension), the error is tolerated to allow users run the legacy
code having this error. Hopefully this is enough for tdf#106529.
This re-uses comphelper's NoEnableJavaInteractionContext class,
which is converted into general-purpose SetFlagContext class to
avoid code duplication.
Change-Id: Ie290019cb190b8d1d590699ec13bd63eac478d09
Reviewed-on: https://gerrit.libreoffice.org/81616
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
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>
|
|
Change-Id: Ice9a57eedb166672dbdfae6da2a172ab77566a19
Reviewed-on: https://gerrit.libreoffice.org/81983
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
update the script and make private standalone functions
Change-Id: Icb26ce258107700c90f89ad4e0d3329d075a2eb1
Reviewed-on: https://gerrit.libreoffice.org/81879
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia4a622b34ff3f71963cff7a1aa8658a4df12f04f
Reviewed-on: https://gerrit.libreoffice.org/81676
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
rather than every time its result it needed to deconvolute this a
layer
Change-Id: I1a611ed2bd74e682501cf8cbd64a5e285ec1c7e9
Reviewed-on: https://gerrit.libreoffice.org/81628
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
I started with 32 and kept doubling the size until the site
did not need re-alloc, but clamped it at 512 (e.g. in emfio/).
Change-Id: Ib7caf35a1b7e42b0e4ed8aa812493449e3eefc8f
Reviewed-on: https://gerrit.libreoffice.org/81540
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I324496ff7c61d87a83b6b378810aa5c78cd7dba3
Reviewed-on: https://gerrit.libreoffice.org/81405
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
As discussed in the mail thread starting at
<https://listarchives.libreoffice.org/global/users/msg54775.html>
"[libreoffice-users] Experimental macro features: How to determine object
types?", it is confusing if a variable dim'ed as
com.sun.star.util.XSearchDescriptor cannot hold an object whose
css.lang.XTypeProvider::getTypes only reports css.util.XReplaceDescriptor (which
is derived from XSearchDescriptor) but not XSearchDescriptor itself.
At least for now, keep the odd endsWithIgnoreAsciiCase check intact (instead of
checking for strict equality).
Change-Id: Idd8ae8cb11b0f2e9c6369842629fc5a21e1c5cc5
Reviewed-on: https://gerrit.libreoffice.org/81386
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...since 96710f8e466d44047ea4ac9cb8c70dc7664f5c73 "convert OUString::match to
OUString::endsWith"
Change-Id: Ifd08feede5908e6cc41b25bfe9f8bde6c6d6930b
Reviewed-on: https://gerrit.libreoffice.org/81362
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
This partly reverts f7a2795c881c2eba95aa09f21881f842281ae819 and
removes useless casts that don't serve any purpose, to improve
readability.
Change-Id: Ia3559cb765a645ed81ba286e59d37005cee93bb1
Reviewed-on: https://gerrit.libreoffice.org/81275
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I18112d114c4632961b86da5539959c0d4abd79c7
Reviewed-on: https://gerrit.libreoffice.org/81276
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: If00ef09bec9b66cd4b7725398b2cdb3f49a3fe90
Reviewed-on: https://gerrit.libreoffice.org/81274
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
The positions (including current line) might have changed in Next(),
even though it's "single line IF", due to line continuation char _.
nP* members haven't been updated yet, so next call to Next() after
Push() would restore wrong positions.
I didn't store values of nLine/nCol1/nCol2 before if( IsEoln( Next() ) ),
(doing which would allow to mimic Peek() behaviour), because I don't
see how restoring their old values in the single line IF case would
affect the logic. Possibly something to do later.
Change-Id: I5a2a5c307ccbba77e9c02db50a04e33d71cd15a8
Reviewed-on: https://gerrit.libreoffice.org/81204
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
E.g. #ifdef LIBO_INTERNAL_ONLY is always true for code that builds
with our PCHs.
Change-Id: I3cf311ea3621b909105754cfea2cb0116b8b67f5
Reviewed-on: https://gerrit.libreoffice.org/80961
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
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>
|
|
mostly so that my stringadd loplugin can point out places to improve
Change-Id: I9920ee1c99cdb6b811ba67ff9d8e32aa261884b5
Reviewed-on: https://gerrit.libreoffice.org/80618
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and improve the WriteOString method, we can avoid the strlen here, we
already have the length
One change in behaviour to be noted - if the string contains
trailing zero bytes, which ARE INCLUDED IN THE STRING LENGTH,
i.e. I'm not talking about the normal terminating zero, then this
patch changes behaviour because we will now write those zeros to
the stream.
Change-Id: I4668b9b9eb877f820b1dc70d6cd10ba2623bc0a2
Reviewed-on: https://gerrit.libreoffice.org/80597
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I114a6b028eb59a1ae38c31bc20439a35643fe972
Reviewed-on: https://gerrit.libreoffice.org/80159
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
Change-Id: Ib8b2bc1c5f7b27a646036ce23cae2b6a06edd038
Reviewed-on: https://gerrit.libreoffice.org/79922
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: If10e70b30313509988861ee5200f08f2b83a647b
Reviewed-on: https://gerrit.libreoffice.org/79918
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I2fdeb7eb3ead3512ad6d3fe793305038ab3aa7ae
Reviewed-on: https://gerrit.libreoffice.org/79886
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I0e400bdd9cfc5fd123c574e05c4aca55b782395f
Reviewed-on: https://gerrit.libreoffice.org/79831
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
If the value of the hex string lies within the range of 0x8000
(SbxMAXINT + 1) and 0xFFFF (SbxMAXUINT) inclusive, cast the value to 16 bit
in order to get signed integers, e.g., SbxMININT through SbxMAXINT.
Moved unit test to test_scanner.cxx in order to test basic hex
convertations. Removed old vba unit tests.
Change-Id: I247b41c40197afc5328ef5685c758c1dd1cefae5
Reviewed-on: https://gerrit.libreoffice.org/79583
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I17f06c9415b9d43b6d8896360e07216c2856367a
Reviewed-on: https://gerrit.libreoffice.org/79627
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I7b3a22584bb2e4d501f509ffcd80929feed23a4c
Reviewed-on: https://gerrit.libreoffice.org/79360
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: Iea2a937559ac8393c0fb5bf9482115ba162c2a6c
Reviewed-on: https://gerrit.libreoffice.org/79079
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: Id8840431b9dc1f1e97882c675ebfc6456e33d953
Reviewed-on: https://gerrit.libreoffice.org/77684
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id95a33bd7f2a89791e140bf0cb51b59c06a2c65e
Reviewed-on: https://gerrit.libreoffice.org/79054
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Iaf9b5107cf88390f62d5ca94bf985c77bcb8b7ad
Reviewed-on: https://gerrit.libreoffice.org/79048
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Id005a7531d546dd43de13b49bcb3e93081c5ad8d
Reviewed-on: https://gerrit.libreoffice.org/78679
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: Ib2056ab8437e163c7ae42e3ab7a4a3f8b6cb80a2
Reviewed-on: https://gerrit.libreoffice.org/78547
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
To complete this:
https://gerrit.libreoffice.org/#/c/78312/
This is a massive replace for
".." instead of "..." between words.
It passed "make check" on Linux.
Change-Id: I144d8061fca9f545c762941551e59dffdd3650e8
Reviewed-on: https://gerrit.libreoffice.org/78357
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
|
|
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
|
|
"modifiedTimout" doesn't exist
Change-Id: If0576c2f286124f8afa39cd70ab563cee1919237
Reviewed-on: https://gerrit.libreoffice.org/78265
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I3a51812bbd3fcdc6b11e47cb12962f0d4fa7a2ae
Reviewed-on: https://gerrit.libreoffice.org/78191
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86
Reviewed-on: https://gerrit.libreoffice.org/77569
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I15d825de3201808d188b461415f78a4d81b64127
Reviewed-on: https://gerrit.libreoffice.org/77494
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
> basic/source/sbx/sbxint.cxx:342:13: error: implicit conversion from 'sal_Int64' (aka 'long') to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-int-float-conversion]
> if( d > SAL_MAX_INT64 )
> ~ ^~~~~~~~~~~~~
> basic/source/sbx/sbxint.cxx:358:13: error: implicit conversion from 'sal_uInt64' (aka 'unsigned long') to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion]
> if( d > SAL_MAX_UINT64 )
> ~ ^~~~~~~~~~~~~~
> basic/source/sbx/sbxint.cxx:706:34: error: implicit conversion from 'sal_uInt64' (aka 'unsigned long') to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion]
> else if( d > SAL_MAX_UINT64 )
> ~ ^~~~~~~~~~~~~~
> basic/source/sbx/sbxlng.cxx:60:30: error: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Werror,-Wimplicit-int-float-conversion]
> if( p->nSingle > SbxMAXLNG )
> ~ ^~~~~~~~~
> basic/source/sbx/sbxsng.cxx:280:21: error: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Werror,-Wimplicit-int-float-conversion]
> if( n > SbxMAXLNG )
> ~ ^~~~~~~~~
> basic/source/sbx/sbxsng.cxx:297:21: error: implicit conversion from 'sal_uInt32' (aka 'unsigned int') to 'float' changes value from 4294967295 to 4294967296 [-Werror,-Wimplicit-int-float-conversion]
> if( n > SbxMAXULNG )
> ~ ^~~~~~~~~~
> basic/source/sbx/sbxulng.cxx:66:30: error: implicit conversion from 'sal_uInt32' (aka 'unsigned int') to 'float' changes value from 4294967295 to 4294967296 [-Werror,-Wimplicit-int-float-conversion]
> if( p->nSingle > SbxMAXULNG )
> ~ ^~~~~~~~~~
Consistently use o3tl::convertsToAtLeast/Most(o3tl::roundAway(...), ...) for all
those conversion cases that check that a floating-point value falls into an
integer range, even those that don't cause a warning.
even those that don't con
Change-Id: I008f615e9b4ad7533390aa1822cc932bf4a4b351
Reviewed-on: https://gerrit.libreoffice.org/77452
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
> basic/source/sbx/sbxvalue.cxx:1038:58: error: implicit conversion from 'sal_Int64' (aka 'long') to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-int-float-conversion]
> if( dTest < SAL_MIN_INT64 || SAL_MAX_INT64 < dTest)
> ^~~~~~~~~~~~~ ~
> basic/source/sbx/sbxvalue.cxx:1065:58: error: implicit conversion from 'sal_Int64' (aka 'long') to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-int-float-conversion]
> if( dTest < SAL_MIN_INT64 || SAL_MAX_INT64 < dTest)
> ^~~~~~~~~~~~~ ~
Change-Id: Ic1e88ae0e0cbc58bec0742d73fa40bfa0ff88858
Reviewed-on: https://gerrit.libreoffice.org/77453
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I174b057e29e5c0d56534fb1d2b6240880c7ddf2b
Reviewed-on: https://gerrit.libreoffice.org/76695
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|