Commit Graph
1749 Commits
Author SHA1 Message Date
Caolán McNamara e48e2bb907 cid#1448381 Unchecked return value
Change-Id: I4f0b48df10bf8557e39e0769a61a36bacac8f02a
Reviewed-on: https://gerrit.libreoffice.org/75884
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-18 22:18:38 +02:00
Andrea Gelmini 794102acd8 Fix typos
Change-Id: If81c6224abbd0028bcc446159cf12436e89325d8
Reviewed-on: https://gerrit.libreoffice.org/73421
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-23 13:58:42 +02:00
Arkadiy Illarionov fbead41b7d tdf#39593 Remove frm::OGridControlModel::getColumnImplementation
Replace with comphelper::getUnoTunnelImplementation.

Change-Id: I3b662136778340a95216ac08035f7c25d5882349
Reviewed-on: https://gerrit.libreoffice.org/74472
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-06-21 19:32:06 +02:00
Noel Grandin 7508c1d1e7 loplugin:logexceptionnicely in filter..framework
Change-Id: I8cf70ee278c641767e3fcfcfd151d99d791b3468
Reviewed-on: https://gerrit.libreoffice.org/74098
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-16 08:55:07 +02:00
Andrea Gelmini 882074308d Fix typo
Change-Id: I351a41c7b6964bdf60d9231640c18461fca81ff2
Reviewed-on: https://gerrit.libreoffice.org/73575
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-06 07:07:51 +02:00
Andrea Gelmini ff22834795 Fix typo
Change-Id: I2d361544b571144e7f0f2c4190ec3e578427ec7c
Reviewed-on: https://gerrit.libreoffice.org/73475
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-05 07:09:39 +02:00
Andrea Gelmini 0f97f545dd Fix typo
Change-Id: Ib92c1a4b60e46019b4c6f89f88b9e99e5b2d497a
Reviewed-on: https://gerrit.libreoffice.org/73473
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-05 07:08:56 +02:00
Andrea Gelmini 5f26419865 Fix typo
Change-Id: Ie8b8aeb1ebcb78cca73c6c2bc0512b2f30d245ae
Reviewed-on: https://gerrit.libreoffice.org/73474
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-05 07:07:59 +02:00
Andrea Gelmini 8b8c3a95e4 Fix typo
Change-Id: I86e2040fb54bb13f26a458b7ad96353b7bf7065d
Reviewed-on: https://gerrit.libreoffice.org/73353
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-03 10:28:36 +02:00
Andrea Gelmini 187deae2df Fix typo
Change-Id: I588837ea6eeeb271a821edcd4e9bc14bb78bf933
Reviewed-on: https://gerrit.libreoffice.org/73351
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-02 21:09:12 +02:00
Arkadiy Illarionov 966f40eecf Use hasElements to check Sequence emptiness in [e-i]*
Similar to clang-tidy readability-container-size-empty

Change-Id: I79e31919db8f4132216f09a7868d18835eeb154b
Reviewed-on: https://gerrit.libreoffice.org/71795
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-31 16:10:17 +02:00
Noel Grandin a361231b13 fix wrong SET/QUERY flags passed to uno::Reference
By creating deleted methods for the wrong calls.

Avoids the compiler needing to construct a temporary

Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a
Reviewed-on: https://gerrit.libreoffice.org/72103
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-13 08:15:27 +02:00
Andrea Gelmini ba84300b82 Fix typo
Change-Id: I43ba5d6591be6ad782bc72bac1938ae9763c7103
Reviewed-on: https://gerrit.libreoffice.org/71900
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-07 19:16:17 +02:00
Andrea Gelmini 6a8aac9b3d Fix typo
Change-Id: I5bacb30918f72d8b6a992c88a209b30647303177
Reviewed-on: https://gerrit.libreoffice.org/71031
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-21 08:54:48 +02:00
Andrea Gelmini 84dc21f5ae Fix typo
Change-Id: I39f878774386c896b842e23b3ad6e6637dc79f64
Reviewed-on: https://gerrit.libreoffice.org/71000
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-20 07:04:35 +02:00
Andrea Gelmini 0a166dbf8d Fix typo
Change-Id: I10729c848b6b5db0e9880ac2ca27b2d0ef24b5f4
Reviewed-on: https://gerrit.libreoffice.org/70977
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-19 22:57:08 +02:00
Andrea Gelmini 271dc5920d Fix typo
Change-Id: If0104ebab265a98982808fa5003a499deae542b6
Reviewed-on: https://gerrit.libreoffice.org/70908
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-18 10:09:09 +02:00
Noel Grandin 04112bce50 loplugin:sequentialassign in filter..fpicker
Change-Id: I4ba0e1e982897bd570612f6cda8ba1e6a9fa5dbd
Reviewed-on: https://gerrit.libreoffice.org/70700
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-13 14:46:53 +02:00
Mike Kaganski d38f9934f0 [API CHANGE] Asserts to never clear already cleared guard
... which could help catch copy-paste errors when wrong guard is cleared
second time.

Also an assert added that when resetting, there's something to reset
(i.e., no descendant class had cleared protected pResetT, making reset
impossible, and thus actually unable to guard anything).

framework/source/layoutmanager/layoutmanager.cxx: made sure to not call
clear() second time

framework/source/layoutmanager/toolbarlayoutmanager.cxx: restored lock
lost in commit 777bc22ca6

forms/source/misc/InterfaceContainer.cxx: removed a leftover from commit
a19cd21e3c which reduced guarded scope

forms/source/component/DatabaseForm.cxx: fixed clear-reset sequence
broken from the initial commit bf4154eb53

Change-Id: Ibab6660c79561eee31faf3e6c1128ab141a7e8a3
Reviewed-on: https://gerrit.libreoffice.org/70381
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-09 21:34:07 +02:00
Mike Kaganski 5a824268df Don't use resettable/clearable guard where plain guard is enough
Also use scope where possible. This allows to limit guard scope at
language level; visualises the scope clearly; and helps avoiding
errors like fixed in commit 61e4437c85.

Change-Id: Ifeca96e2df8e8a0897770d9546b2536806275f41
Reviewed-on: https://gerrit.libreoffice.org/70376
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-07 17:53:04 +02:00
Matteo Casalin cca2e42926 Use getTokenCount and indexed getToken
Change-Id: Id57a1771c897c69b05d02a359f22e5fb2b1f5a31
Reviewed-on: https://gerrit.libreoffice.org/69239
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-04-06 23:41:12 +02:00
Gabor Kelemen 97ab50f381 Remove unused using declarations in directories [e-l]*
Found by:
run-clang-tidy-7 -checks=-*,misc-unused-using-decls

Change-Id: Iee4e9df37d4c971ea97256d041afbc3d3aaa3d27
Reviewed-on: https://gerrit.libreoffice.org/70027
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-05 09:27:08 +02:00
Gabor Kelemen 1d39c5aa7b tdf#42949 Fix IWYU warnings in include/sfx2/[e-M]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I6e97c7ed6c0211dfafee83b9bdbea672e415fc49
Reviewed-on: https://gerrit.libreoffice.org/69715
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-28 10:27:23 +01:00
Noel Grandin b1cfdb7bee new loplugin:unoquery
look for places we are doing code like:

    Reference<XProperty>(model, css::uno::UNO_QUERY)->getAsProperty()

which might result in a SIGSEGV is the query fails

Change-Id: I5cbdbc9e64bd0bed588297c512bf60cbacb9442e
Reviewed-on: https://gerrit.libreoffice.org/69044
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-25 07:19:13 +01:00
Gabor Kelemen 80aec8ef2a tdf#42949 Fix IWYU warnings in include/connectivity/*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I02f75be483529ba1f7a6e460e34c4752b4265221
Reviewed-on: https://gerrit.libreoffice.org/68893
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-12 10:14:54 +01:00
Noel Grandin 8b5e23eac3 log nice exception messages whereever possible
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1
Reviewed-on: https://gerrit.libreoffice.org/68579
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-07 07:12:39 +01: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 cd383000f8 loplugin:unusedfields in forms..fpicker
Change-Id: Ifd3afbf276100e3cef802bbcc0792b43a9cd84f8
Reviewed-on: https://gerrit.libreoffice.org/68228
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-23 11:54:54 +01:00
Noel Grandin dbc7fc7587 use unique_ptr in OComponentEventThread
and simplify - by passing in a std::unique_ptr to addEvent we avoid the
need to have a virtual clone method

Change-Id: Ie425476a3158c7a66e399c2a9f33d2612dab5cbb
Reviewed-on: https://gerrit.libreoffice.org/67962
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18 14:52:28 +01:00
Noel Grandin c70f5f32e2 use clear() instead of erase(begin, end)
Change-Id: Ie1dcff4c2e5f52521b4172ef5726413a9d048214
Reviewed-on: https://gerrit.libreoffice.org/67961
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18 14:25:41 +01:00
Arkadiy Illarionov 44841a6778 Simplify containers iterations in [f-l]*
Use range-based loop or replace with STL functions

Change-Id: Ib3fab47318d1bfbb4df8f886a8cd9596525a420f
Reviewed-on: https://gerrit.libreoffice.org/67914
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18 07:41:05 +01:00
Noel Grandin 0019eac5e5 loplugin:indentation in forms..fpicker
Change-Id: If01379c43519cc1dbcf8dfaefde545fbe7e24fc2
Reviewed-on: https://gerrit.libreoffice.org/67556
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-09 17:07:19 +01:00
Noel Grandin adbb6d9bbb fix load/save of forms with HAVING
Since
    commit 2b1d6f0d3b
    Date:   Sun Jul 30 17:57:14 2017 +0200
    tdf#96370 rework filtering to be aware of WHERE vs HAVING clause

(1) the code was saving PROPERTY_FILTER and PROPERTY_SORT, but loading
PROPERTY_FILTER and PROPERTY_HAVINGCLAUSE
(2) the loading code was not putting the properties into m_xAggregateSet

So I fixed the load/save mismatch, put the properties into the right
location, and added the HAVING property, which meant I needed to do a
version bump.

I will note that this is somewhat of a backwards/forwards compatibility
mess - the commit referenced above added new fields in the middle of the
output stream, which means that older versions of LO will not be able
to properly load forms generated after that commit.

Change-Id: I9a13877b29d7c6bc5e6d014cfbcefd3069ddc4b5
Reviewed-on: https://gerrit.libreoffice.org/66830
Tested-by: Jenkins
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2019-01-24 18:25:10 +01:00
Gabor Kelemen cec7ae9f3c tdf#42949 Fix IWYU warnings in include/toolkit/*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Icebcf1a6ab073dce935a74ce79ee0f302b62e8a8
Reviewed-on: https://gerrit.libreoffice.org/65947
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-15 11:54:11 +01:00
Stephan Bergmann 70519a43e0 Replace OUStringBuffer::appendCopy with append(std::u16string_view)
...which is more general

Change-Id: I94f28f8eda887120cf5f143b4549e0339b60e6a7
Reviewed-on: https://gerrit.libreoffice.org/66155
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-11 13:55:14 +01:00
Gabor Kelemen 6256797dac tdf#42949 Fix IWYU warnings in include/vcl/[v-x]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I98f49765c6b74808dcbd692e0f375dd2848fcfd4
Reviewed-on: https://gerrit.libreoffice.org/65614
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-07 09:13:14 +01:00
Gabor Kelemen 00b49f9ff9 tdf#42949 Fix IWYU warnings in include/vcl/s*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ie87d27dd2c385a63349e0b322fd067ba03d2d152
Reviewed-on: https://gerrit.libreoffice.org/64479
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-10 14:19:50 +01:00
Stephan Bergmann ab9b67bbb0 Remove obsolete SAL_FALLTHROUGH completely
...after 7ffdd830d5
"HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now"

Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937
Reviewed-on: https://gerrit.libreoffice.org/64800
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-08 13:28:16 +01:00
Noel Grandin 36b21429c2 remove unused SvLockBytesStatFlag enum
Change-Id: I90b82f1bbf4b51fc76cde10ec55448053345018c
Reviewed-on: https://gerrit.libreoffice.org/64561
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05 07:52:16 +01:00
Noel Grandin 55e42805ea improve function-local statics in forms..reportdesign
Change-Id: I285e2e75c8d9cad35445c89f00ef68b155806ea2
Reviewed-on: https://gerrit.libreoffice.org/63703
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-21 13:00:02 +01:00
Gabor Kelemen 492ea7e085 tdf#42949 Fix IWYU warnings in include/vcl/[ab]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: If18c80fc64e55d797953e24e40e5d5e62bd9c625
Reviewed-on: https://gerrit.libreoffice.org/63453
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-19 09:38:53 +01:00
Mike Kaganski e3560f4770 Replace deprecated boost::optional::reset(val) with operator =
Change-Id: I7340a561e0df0c781fd834388deb4b9f83800f9b
Reviewed-on: https://gerrit.libreoffice.org/63221
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-10 09:16:53 +01:00
Lionel Elie Mamane fec8c14e96 tdf#121188 form controls should have InputRequired false by default
Unless the underlying column is not nullable and has no default value
this is only a guess, form designer can change it

Change-Id: Ifa403e00b21fdaf86aef383503d54879b25ac62b
Reviewed-on: https://gerrit.libreoffice.org/62969
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2018-11-06 19:14:23 +01:00
Noel Grandin 6f50961e69 remove more rtl::OUString and OString prefixes
which seem to have snuck back in since the great rounds of removals.

Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1
Reviewed-on: https://gerrit.libreoffice.org/62229
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-24 14:43:34 +02:00
Noel Grandin 2c1b7e8d6a clang-tidy readability-container-size-empty
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422
Reviewed-on: https://gerrit.libreoffice.org/61967
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19 10:02:39 +02:00
Noel Grandin ccb2a1f650 clang-tidy readability-redundant-smartptr-get
redundant get() call on smart pointer

Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd
Reviewed-on: https://gerrit.libreoffice.org/61837
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17 08:25:47 +02:00
Noel Grandin 9ec8bf8f22 add SvStream::TellEnd
and simplify callsites to use it instead of the current
    "seek to end, find pos, seek back to original pos"
pattern

Change-Id: Ib5828868f73c341891efc759af8bd4695ae2f33c
Reviewed-on: https://gerrit.libreoffice.org/61738
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-15 07:56:42 +02:00
Gabor Kelemen 2a962cb122 tdf#42949 Fix IWYU warnings in include/comphelper/[m-z]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I04c5ba277d5b3398c07de6ae66713d977636088d
Reviewed-on: https://gerrit.libreoffice.org/61347
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-08 12:16:44 +02:00
Stephan Bergmann 206b5b2661 New loplugin:external
...warning about (for now only) functions and variables with external linkage
that likely don't need it.

The problems with moving entities into unnamed namespacs and breaking ADL
(as alluded to in comments in compilerplugins/clang/external.cxx) are
illustrated by the fact that while

  struct S1 { int f() { return 0; } };
  int f(S1 s) { return s.f(); }
  namespace N {
    struct S2: S1 { int f() { return 1; } };
    int f(S2 s) { return s.f(); }
  }
  int main() { return f(N::S2()); }

returns 1, both moving just the struct S2 into an nunnamed namespace,

  struct S1 { int f() { return 0; } };
  int f(S1 s) { return s.f(); }
  namespace N {
    namespace { struct S2: S1 { int f() { return 1; } }; }
    int f(S2 s) { return s.f(); }
  }
  int main() { return f(N::S2()); }

as well as moving just the function f overload into an unnamed namespace,

  struct S1 { int f() { return 0; } };
  int f(S1 s) { return s.f(); }
  namespace N {
    struct S2: S1 { int f() { return 1; } };
    namespace { int f(S2 s) { return s.f(); } }
  }
  int main() { return f(N::S2()); }

would each change the program to return 0 instead.

Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c
Reviewed-on: https://gerrit.libreoffice.org/60539
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-17 09:05:38 +02:00
Noel Grandin 867cfc57d8 loplugin:useuniqueptr in ODatabaseForm::GetDataMultiPartEncoded
Change-Id: Ica70b20b84a8ada5b37cb6d23ce67096bd9ced2d
Reviewed-on: https://gerrit.libreoffice.org/60352
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-12 09:00:07 +02:00