38 Commits
Author SHA1 Message Date
Armin Le Grand (collabora) 609d3192d3 SmartArt: Replace PointNameMap & optimize some stuff
Replaced PointNameMap in DiagramModel, too unsafe with
needed StateUpdates. Simplified some stuff dependent on
that. More stable now with changes. Embedding of
DiagramModelID back to ObjectName, that's just better.

Re-activated locked state for SdrObject members of
Diagrams for now due to UnitTests, but see comment
there.

Had to add an exceptional case to
XMLDiff::compareAttributes due to usage of GuidString,
see comment there. DiagramNodes do save their
GuidString in the name attribute of XShape. That
ID can change at every usage, thus when extracting
it *cannot* be compared to something saved/checked
in in a given state.

Change-Id: I112425d1efde58cfde8792cf2ee8c0c688d517e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199502
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Tested-by: Jenkins
2026-02-17 17:57:59 +01:00
Noel Grandin 093d1a22e4 improve unit test assert message when diffing
Change-Id: Icffb187e004852ddfd190b42318ff53ba6a0f859
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197788
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2026-01-23 10:25:12 +01:00
Caolán McNamara 512e28bf8d WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: I7a4df11c23a92d0c5538cea4290dcc5e2c9ac3c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167547
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-05-12 17:21:32 +02:00
Gabor Kelemen 52ef78f492 Recheck modules t* with IWYU
See tdf#42949 for motivation

Change-Id: I109fa07d52721fd10354de07a2ed995ffa2f27c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132369
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-04-02 23:32:08 +02:00
Yukio Siraichi 3bf3face22 tdf#130975 replace rtl::math::isNan with std::isnan.
Change-Id: I5d53e6369d35093445b2efd8936bbf8c6775ff47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90451
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-03-14 09:19:00 +01:00
Noel Grandin 17e712ccc8 Revert "loplugin:constfields in sw"
This reverts commit 4969f4c0d3.

Change-Id: I527e9366b05e8a20633720e334395b285991c524
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90473
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-13 15:41:42 +01:00
Gabor Kelemen 7ac769c1a9 tdf#42949 Fix IWYU warnings in test/
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Id1ee9b6d44315443d023bdfbf9ae8e5aa2158ab2
Reviewed-on: https://gerrit.libreoffice.org/85171
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-19 10:20:04 +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 2341569fb0 improve assert message in XMLDiff
Change-Id: I561dca23621075753185d7ea2afc5fd174cd2b3d
Reviewed-on: https://gerrit.libreoffice.org/71728
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-03 15:16:47 +02:00
Noel Grandin 191f85df58 re-land "new loplugin typedefparam""
This reverts commit c9bb48386b,
and adds a bunch more fixes.

Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a
Reviewed-on: https://gerrit.libreoffice.org/68680
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05 12:12:26 +01:00
Noel Grandin c9bb48386b Revert "new loplugin typedefparam"
This reverts commit 9865440d21.

This is not ready to land yet, seems like the latest update
of the logic reveals a bunch more places I need to fix before it can land.
2019-03-04 08:56:11 +02:00
Noel Grandin 9865440d21 new loplugin typedefparam
verify that parameters use the exact same typedef-names (if any)
in definition and declaration

Change-Id: I55d2817f599b0253904dce2d35a1a93967e15a77
Reviewed-on: https://gerrit.libreoffice.org/68439
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04 07:32:43 +01:00
Noel Grandin 4969f4c0d3 loplugin:constfields in sw
Change-Id: I1eb6583bb9ec815bc0564b0d7c676f5b1fb9045f
Reviewed-on: https://gerrit.libreoffice.org/61177
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-03 11:56:43 +02:00
Jochen Nitschke 01b4c5b27f cppcheck: useInitializationList in test to xmloff
Change-Id: I50545784c5412ab7767f401c6e40058a1d0bfab0
Reviewed-on: https://gerrit.libreoffice.org/58262
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-29 08:52:51 +02:00
Tomaž Vajngerl 8ecf34e823 xml diff - report what attribute values actually differ
Change-Id: I16bc122e3f2cce94a5eb8454b528bf484210a4ae
Reviewed-on: https://gerrit.libreoffice.org/53369
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-04-26 17:42:44 +02:00
Stephan Bergmann 34307a8a7d loplugin:includeform: test
Change-Id: Ibcbb5b002e8326c484547a825cb295d0f5158a3b
2017-10-23 22:45:50 +02:00
Noel Grandin 9348b322a5 clang-tidy readability-simplify-boolean-expr
Change-Id: Iea7ab64683f0b29794d50d774cc482b54a00e70a
Reviewed-on: https://gerrit.libreoffice.org/36450
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-28 11:23:34 +02:00
Stephan Bergmann 5d353ff608 loplugin:nullptr (automatic rewrite)
Change-Id: I31e61fc91dff70f32143d84ccf308f2bbc9c740e
2015-11-10 10:31:53 +01:00
Stephan Bergmann e935f05c80 Some more loplugin:cstylecast: test
Change-Id: I48397ba0cc3c0737f6c47808d353245f81050a2b
2015-01-20 09:06:52 +01:00
Stephan Bergmann eacd4c044f Improve test failure output
Change-Id: I4417318988ef70639cbcec9d776c783ad69c3990
2014-08-06 10:09:50 +02:00
Stephan Bergmann d910a51498 Remove unused function
Change-Id: I5457124fe584d86953f3167303e92ae6134fa843
2014-04-09 10:21:01 +02:00
Markus Mohrhard b10ed913dd whitespace cleanup in test
Change-Id: Iaf3f7c360cd8d081d706e92ec52c3c96fe68c57c
2014-04-06 17:19:55 +02:00
Markus Mohrhard d00e9e7fe2 make the tolerance file optional
Change-Id: I172cbd54a231a4f9b621fb85c7f349839286143a
2014-04-03 01:10:52 +02:00
Caolán McNamara 06b44f9961 coverity#738915 Uninitialized scalar field
Change-Id: I1ac675441b50ceab7df78fb9646e4e1bd8e6e36e
2014-02-18 15:18:11 +00:00
Andras Timar b55259eeb5 typo fixes
Change-Id: Ia5f104bfd707bcf4e159c78ca2764c861fb0b6d9
2013-12-20 15:55:00 +01:00
Jan Holesovsky 91ab2b6e9d Improve error messages for the xml-diff based unit tests.
Change-Id: Ided6749ebe4899a6d826d069c38d7b21b467d431
2013-05-14 16:50:46 +02:00
Michael Meeks 62badf3828 Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-22 09:37:38 +01:00
Luboš Luňák 1af22c05c6 fix other problems found by Wundef
Change-Id: Ib4aba95436f82d2a20b07a092f0fd07e0620fdcf
2013-03-18 17:15:57 +01:00
Stephan Bergmann 373074611c Improve error message
Change-Id: Ibaee8bd83e9f34e0258b48d87151ec03c8301a3a
2012-11-29 10:52:21 +01:00
Michael Stahl 87c6beddfb test: move XMLDiff implementation details to cxx file
This makes it unnecessary to link clients against libxml2.

Change-Id: Ifd295623c01bdc6f579afbf81d5b609a2b29f4bf
2012-07-13 12:29:03 +02:00
Caolán McNamara 810f4a007c rework callcatcher makefile to build subsequentcheck tests
Change-Id: Idda0262e62e42817b8c0502a38ee16913495233c
2012-05-01 14:18:42 +01:00
Markus Mohrhard 60d39b758d add tolerance to chart regression test
Change-Id: I5e7694571815df48e54488a33435bb7d022e6889
2012-04-27 13:52:10 +02:00
Markus Mohrhard 9e82b503fe use the correct macro
don't push at 3a.m.

Change-Id: Ia50253fe136bab3ebef7a71ba5dbf87e752c2e1a
2012-04-27 04:13:07 +02:00
Markus Mohrhard 811899e4a2 improve assert messages 2012-04-27 03:15:32 +02:00
Markus Mohrhard b1dc2c5818 use the new xml diff in chart regression test 2012-04-27 03:15:31 +02:00
Markus Mohrhard a0c9ebf483 std::isnan is c++11; use rtl::math::isNan for now 2012-04-26 20:07:35 +02:00
Markus Mohrhard e6a4ea3c9d add readme for xmldiff 2012-04-26 19:07:22 +02:00
Markus Mohrhard 58114896d1 add xml diff with tolerance
# Changes to be committed:
2012-04-26 19:01:09 +02:00