Commit Graph
139 Commits
Author SHA1 Message Date
Gabor Kelemen fd2e467ba3 tdf#146619 Run IWYU in fw decl mode on include/[a-c]*
After recent commit 851fb75779
recheck these directories in include/ again
to test drive the new --headersfwd mode of bin/find-unneeded-includes

Change-Id: I0ede437c4f9958cd98210ed1760a5b98ea8bd1ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192377
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2025-11-08 09:37:19 +01:00
Noel Grandin d52a4dba6a loplugin:ostr in dbaccess
Change-Id: I6d720ef94d9f29c120f292b844721621e6630856
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167259
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-07 12:53:22 +02:00
Gabor Kelemen 69303d5d09 tdf#146619 Drop unused 'using namespace' in: dbaccess/
Change-Id: If006c5f0002b9d5981220efa22873bf0adb169bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165543
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-04-03 08:57:28 +02:00
Stephan Bergmann 91ba9654ba Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxx
...so that its TOOLS_WARN_EXCEPTION can be used in
comphelper/source/misc/logging.cxx in a follow-up commit.  (And while at it,
rename from diangose_ex.h to the more appropriate diagnose_ex.hxx.  The
comphelper module is sufficiently low-level for this immediate use case, so use
that at least for now; o3tl might be even more suitable but doesn't have a
Library until now.  Also, for the immediate use case it would have sufficed to
only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION,
TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of
include/tools/diagnose_ex.h into an additional new
include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move
the complete include file as is.)

Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-18 17:10:19 +02:00
Noel Grandin c1965859c0 elide some makeStringAndClear() class
when we are passing the result to a string_view, it is pointless.

Change-Id: I4c780bd8dd356bd764b9f88400a41cca6d85f84b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135337
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-03 11:34:19 +02:00
Noel Grandin c7c6f0af6c loplugin:stringadd convert chained append to +
which can use the more efficient *StringConcat

Also fix a crash in stringview plugin which
started happening while I working on this.

Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-27 14:07:56 +02:00
Noel 547b1d0541 use more TOOLS_WARN_EXCEPTION
Change-Id: I8b5cde993c13e0b7c8c830b1ff698933a6b7cfd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103863
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-03 08:13:29 +02:00
Noel Grandin 034e9eee27 loplugin:buriedassign in dbaccess
Change-Id: Ia97da8d228a8c4e3ced31718a756fb13757beb8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92407
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-17 12:09:30 +02:00
Noel Grandin 598a65a3c1 loplugin:flatten in dbaccess
Change-Id: Ifcfd3637fbce6dc3a07a1859f102a6ac85149190
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92237
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-15 09:39:03 +02:00
Noel Grandin 1a26e950ab loplugin:unusedvariableplus in dbaccess
Change-Id: Id2c2416443b2c9d6d516513ee543542e9681f69a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91728
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-06 10:24:58 +02:00
Gabor Kelemen 88e1abdee1 tdf#42949 Fix IWYU warnings in dbaccess/source/core/*/*cxx
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I24808de5bfd176e007fdc96f120a3c9a43dc7902
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90480
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-03-23 13:57:57 +01:00
Noel Grandin e523053587 simplify ORefVector code
by making it extend std::vector - it wants to be a ref-counted vector,
so let it be, and we can simplify the usage sites

Change-Id: I93ff6ee1522da965e16223dca171401d36fd67b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90664
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-18 09:49:50 +01:00
Noel Grandin db90e072fa loplugin:virtualdead unused params in OCacheSet
these methods do nothing except forward to their similar named variants,
so just remove them

Change-Id: I28d31bbe2c1e39fe5a9c2d7eaa9e14006213ab27
Reviewed-on: https://gerrit.libreoffice.org/81247
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-22 08:13:45 +02: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 347571a687 loplugin:indentation in dbaccess..drawinglayer
Change-Id: I05de6c01e827e596c9802c04964f43508dfd4d64
Reviewed-on: https://gerrit.libreoffice.org/67537
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-08 13:39:15 +01:00
Noel Grandin 4c91b89d8c new loplugin:oustringbuffer
look for places where we are appending the temporary result of adding
strings together, to an OUStringBuffer, where we could rather call
append repeatedly and avoid the temporary creation

Change-Id: I481435124291ac7fb54b91a78344a9fe5b379a82
Reviewed-on: https://gerrit.libreoffice.org/59708
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-29 09:05:18 +02:00
Gabor Kelemen 3fb5f7181d Add missing sal/log.hxx headers
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it.
This is a continuation of commit 6ff2d84ade to be able to remove those unneeded includes.

This commit adds missing headers to every file found by:
grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG')
to directories from dbaccess to extensions

Change-Id: I4d15aa35e11664ef78c836ffc2937c7e0bb6ea59
Reviewed-on: https://gerrit.libreoffice.org/58165
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-01 09:49:07 +02:00
Jochen Nitschke b4d36b5dcf remove some unused comphelper includes
and fix the fallout

Change-Id: I5d0c2040f57a3ac354a7e277592da31d09a5f359
Reviewed-on: https://gerrit.libreoffice.org/52894
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-15 11:17:24 +02:00
Noel Grandin f657ab7bbb loplugin:virtualdown in various
Change-Id: I4db71fda953ea1d20712ae8033f6fc09b3b2855d
Reviewed-on: https://gerrit.libreoffice.org/52068
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-30 12:55:56 +02:00
Julien Nabet d6b33e49a5 Use for-range loops in dbaccess (part 3)
Change-Id: I4cec44ea6366b6a38992e583d6290223d5c469f6
Reviewed-on: https://gerrit.libreoffice.org/50849
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-08 00:15:34 +01:00
Julien Nabet 84466e76a9 Incrementing end iterator has undefined behavior (dbaccess/cacheset)
Change-Id: I9f4cdacd87cc4802b13c99c15e1d24d11285a375
Reviewed-on: https://gerrit.libreoffice.org/47188
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-30 10:54:48 +01:00
Noel Grandin c0ac78c971 loplugin:salcall handle virtual methods
Change-Id: Iab95db31188ea2914a46d63a7ebef3d825e6ec42
Reviewed-on: https://gerrit.libreoffice.org/45851
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-06 07:42:50 +01:00
Stephan Bergmann 4b27653a12 loplugin:includeform: dbaccess
Change-Id: I15aee966012612033ab7e2ee03ac1a553802f540
2017-10-23 22:46:10 +02:00
Caolán McNamara 00657aef09 migrate to boost::gettext
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl
* all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string")
* ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching
  MODULE .mo files
* UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui
  goes from l10n target to normal one, so the res/lang.zips of UI files go away
* translation via Translation::get(hrc-define-key, imbued-std::locale)
* python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there
  to keep finding the .hrc file uniform) so magic numbers can go away there
* java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation
  mechanism
* en-US res files go away, their strings are now the .hrc keys in the source code
* remaining .res files are replaced by .mo files
* in .res/.ui-lang-zip files, the old scheme missing translations of strings
  results in inserting the english original so something can be found, now the
  standard fallback of using the english original from the source key is used, so
  partial translations shrink dramatically in size
* extract .hrc strings with hrcex which backs onto
   xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap
* extract .ui strings with uiex which backs onto
   xgettext --add-comments --no-wrap
* qtz for gettext translations is generated at runtime as ascii-ified crc32 of
   content + "|" + msgid
* [API CHANGE] remove deprecated binary .res resouce loader related uno apis
      com::sun::star::resource::OfficeResourceLoader
      com::sun::star::resource::XResourceBundleLoader
      com::sun::star::resource::XResourceBundle
    when translating strings via uno apis
      com.sun.star.resource.StringResourceWithLocation
    can continue to be used

Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-21 08:20:50 +01:00
Caolán McNamara 1807db242a DBACORE_RESSTRING can go now
Change-Id: I0d1f5372dc6a29af62d3d85c5f771e1e8884626e
2017-05-18 10:08:43 +01:00
Noel Grandin 389da66dfc remove unused uno::Reference vars
found by temporarily marking Reference as SAL_WARN_UNUSED.

Change-Id: I18809b62654467f890016adcc92576980ced393b
Reviewed-on: https://gerrit.libreoffice.org/37511
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-12 09:56:01 +02:00
Jochen Nitschke b3eb843766 cleanup tools/debug.hxx includes
with command
> git grep -l tools/debug.hxx |
  xargs grep -L DBG_ |
  xargs sed -i '/#include *\(<\|\"\)tools\/debug.hxx.*/d'

don't change files in includes/ and */pch

Change-Id: Ie429d6a7dca5dfa1073e0f5ba037f7c84bdbec08
Reviewed-on: https://gerrit.libreoffice.org/37349
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08 08:33:01 +02:00
Noel Grandin 198c41c4fe new loplugin unoany
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89
Reviewed-on: https://gerrit.libreoffice.org/34714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28 10:17:47 +00:00
Tor Lillqvist b57d51e32f Drop :: prefix from std in [de]*/
Change-Id: I3247894fe022dce7f0aa351bd85fefcd7c545dd4
Reviewed-on: https://gerrit.libreoffice.org/34377
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2017-02-17 18:41:19 +00:00
Stephan Bergmann e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
Noel Grandin c1805c48ae loplugin:oncevar in dbaccess
Change-Id: I956063bb354fbbd002e922bb06d0b3863a2750fc
Reviewed-on: https://gerrit.libreoffice.org/30565
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-04 13:15:41 +00:00
Caolán McNamara f28dd1d9d2 coverity#1372404 Uncaught exception
Change-Id: Id78404a2fae06004a35c9bf07136bd4806a12e02
2016-09-01 10:40:14 +01:00
Caolán McNamara cb1539c4d6 coverity#1372401 Uncaught exception
Change-Id: I9624eeacbe8dc32fd22560737c3d69cf022b2724
2016-09-01 10:40:14 +01:00
Caolán McNamara 2ff52852a2 coverity#1372395 Uncaught exception
Change-Id: Ia384d4f7186e3ea870a6bb06fb8227ae0321715e
2016-09-01 10:40:14 +01:00
Caolán McNamara 8f7886c742 coverity#1372393 Uncaught exception
Change-Id: I310fb547b81d89e9000760f6628e07d2e5c7effc
2016-09-01 10:40:14 +01:00
Caolán McNamara 50caee009b coverity#1372385 Uncaught exception
Change-Id: Ic8a33ef10d627bc5868a77aa7f14b46682d735d2
2016-09-01 10:40:14 +01:00
Caolán McNamara 9f0e49cee4 coverity#1372382 Uncaught exception
Change-Id: I7c3e11542d2b82af212d2f52bc1b66f0e6ce187c
2016-09-01 10:40:14 +01:00
Noel Grandin 47a72493a9 std::list<sal_Int32> -> std::vector
Change-Id: Ie1d062bd4dabf7ca7de08193597225462447b076
2016-09-01 11:05:21 +02:00
Noel Grandin 414a66587b convert StandardSQLState to scoped enum
Change-Id: Ia0a1526140cfed35a73a6fea1a173d2fb5005960
2016-02-25 13:50:26 +02:00
Noel Grandin bf7690bc1b convert EComposeRule to scoped enum
Change-Id: I5a2e4f6f6f0f353c75dff85e865608b12c2104f9
2016-02-25 13:50:25 +02:00
Noel Grandin d15d523d07 sequence->vector in OCacheSet
Change-Id: I61c6486d42dbc404355809a80943885457e79384
Reviewed-on: https://gerrit.libreoffice.org/22184
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-09 13:49:19 +00:00
Stephan Bergmann 89c4edc13f loplugin:nullptr (automatic rewrite)
Change-Id: I2bba104b1bff30910864e45b5b032533099742ff
2015-11-10 10:31:22 +01:00
Noel Grandin 7dc5e8731f com::sun::star->css in dbaccess
Change-Id: I4fbdd3fb7d1e0ad4423148aaaed3a15aebb26d14
2015-08-03 13:38:44 +02:00
Noel Grandin 38023af6c1 loplugin:unusedmethods
Change-Id: If5090c330e12d6e537766bf4a9be0a2360381a7a
Reviewed-on: https://gerrit.libreoffice.org/17312
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-24 10:36:20 +00:00
Noel Grandin e103bf6cfd loplugin:unusedmethods dbaccess
Change-Id: Ifa16acc6d90ebd4f56c5662959010f6228228cb5
Reviewed-on: https://gerrit.libreoffice.org/17209
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-20 11:56:11 +00:00
Caolán McNamara 582dc20778 coverity#1308436 Uncaught exception
Change-Id: Icdcd3deee724eddbed776db4ee4a77fae2dcc2ee
2015-06-27 14:42:21 +01:00
Caolán McNamara a6d8adc78b coverity#1308434 Uncaught exception
Change-Id: I7014f77a194af6aae43051b680c02c4f2b97b597
2015-06-27 14:42:19 +01:00
Noel Grandin add1351e59 loplugin:staticmethods
Change-Id: Ie6867e04156f40cacee275d5bbf3d63ac4965b30
2015-05-05 09:30:39 +02:00
Noel Grandin 705c48d32e fdo#38835 strip out OUString globals
they are largely unnecessary these days, since our OUString infrastructure
gained optimised handling for static char constants.

Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
2014-11-05 08:44:19 +02:00