1753 Commits

Author SHA1 Message Date
Stephan Bergmann
071dcb5f6a loplugin:redundantinline (clang-cl)
Change-Id: I03a19b599005f6ef25040889a1e1802445ebf430
Reviewed-on: https://gerrit.libreoffice.org/36063
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04 12:06:18 +00:00
Miklos Vajna
a5a571307f tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using

make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle"

Except some modules have their own foo::tools namespace, so there have
to use ::tools::Rectangle. This commit just moves the class from the
global namespace, it does not update pre/postwin.h yet.

Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2
Reviewed-on: https://gerrit.libreoffice.org/35923
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-31 06:27:11 +00:00
Andrea Gelmini
5262883672 Fix typos
Change-Id: If92860597a44ee79b513d255ce3f21112485a97e
Reviewed-on: https://gerrit.libreoffice.org/35617
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25 08:43:01 +00:00
Stephan Bergmann
6291574d94 Remove unused #include <ctype.h>
Change-Id: I8bf3e30687e20151a9e1936e69362abfe9b3a99d
2017-03-23 17:55:31 +01:00
Stephan Bergmann
0f49fdd70e Remove unused #include <cctype>
Change-Id: I9c61e1b558104fa55d887a6c32e1ef2b03f1d1a0
2017-03-23 15:22:46 +01:00
Noel Grandin
ed76d1d350 loplugins:redundantcast teach it about c-style typedef casts
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c
Reviewed-on: https://gerrit.libreoffice.org/35558
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-23 09:48:10 +00:00
Caolán McNamara
376ae93f48 ofz#887 support avoiding reading config
Change-Id: Ic7e0e65b15c7b6a01a10d6004230ad71a2d439d2
2017-03-17 21:27:44 +00:00
Miklos Vajna
a6209ba6a8 vcl: OutputDevice::GetGlyphBoundRects()'s nIndex and nBase is always the same
So keeping just nIndex is enough.

Change-Id: I5d3a0e6b4a6ce1305a56cf50e7ff181a098f6412
Reviewed-on: https://gerrit.libreoffice.org/35336
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-17 20:18:46 +00:00
Stephan Bergmann
4084d5dd5b loplugin:unoany (clang-cl)
Change-Id: I14351561764811562a2c2904b6f7db6148e55c9b
2017-03-14 14:40:50 +01:00
Andrea Gelmini
6fab286b2a Fix typos
Change-Id: I4f16ba5fc32cbfd6a5b01e495f3ad905da193524
Reviewed-on: https://gerrit.libreoffice.org/34808
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03 07:42:39 +00: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
Stephan Bergmann
3ef509a1d9 loplugin:loopvartoosmall
Change-Id: I4dce711021557e6e0b1fb661285d32292b0478b6
2017-02-26 21:58:10 +01:00
Noel Grandin
58f75fb66a drop ModulationMode enum
since we only ever use the MODULE_NONE enumerator

Change-Id: Icd075bb01b5938dbd75b901521d084ddd6469963
2017-02-17 07:57:52 +02:00
Noel Grandin
51d474abdb drop cairocanvas::ColorType enum
since we only use the one enumerator value

Change-Id: Ifec39f4845348c753a6207795c62b27a7af1bbcd
2017-02-17 07:57:52 +02:00
Tor Lillqvist
6de3688cc6 Drop :: prefix from std in c*/
Change-Id: If078cda95fa6ccd37270a5e9d81cfa0b84e71155
Reviewed-on: https://gerrit.libreoffice.org/34324
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-02-15 23:01:23 +00:00
Andrea Gelmini
417bc89880 Fix typos
Change-Id: Iaf6bbe81f519d49b82f624282d786c8cc18d641c
Reviewed-on: https://gerrit.libreoffice.org/34199
Reviewed-by: Aleksandar Stefanović <theonewithideas@gmail.com>
Tested-by: Aleksandar Stefanović <theonewithideas@gmail.com>
2017-02-13 09:37:18 +00:00
Noel Grandin
65b7b6322b loplugin:unusedenumconstants read-only constants in vcl
Change-Id: I8c81444cbecdc103cc47d9a4133b0b4d9010e0c2
Reviewed-on: https://gerrit.libreoffice.org/34018
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-08 12:42:52 +00:00
Noel Grandin
8a16f665b1 makeAny->Any in canvas..configmgr
Change-Id: Id06812595f373cd0da8b421dbac34a60a266ae6e
Reviewed-on: https://gerrit.libreoffice.org/33869
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-03 10:44:01 +00:00
Tor Lillqvist
385c207e3a tdf#105620: Probably better to not ignore initial x0 and y0
So add to them instead of just assigning. In the bugdoc the initial
values were zero, but maybe in some other cases they aren't.

Change-Id: I3d399fe4aab9260817f171d4e69388a19eb85d21
2017-02-01 14:16:07 +02:00
Tor Lillqvist
b220bc6d82 tdf#105620: Fix placement of image embedded in graphic
Change-Id: I419e44d72f594fab0774152720f55c1d7d5366e6
Reviewed-on: https://gerrit.libreoffice.org/33723
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-02-01 11:43:30 +00:00
Noel Grandin
0681a6ee28 more SAL_WARN_UNUSED
Change-Id: Idf44fe0302b4504c443f083e527b63b2461ada85
2017-01-31 14:05:11 +02:00
Noel Grandin
1c3e84d819 teach lolugin:stringconstant about calling constructors
so we can remove unnecessary calls to the OUString(literal) constructor
when calling constructors like this:
   Foo(OUString("xxx"), 1)

Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36
Reviewed-on: https://gerrit.libreoffice.org/33698
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-31 08:56:20 +00:00
Tor Lillqvist
93a49ee2a2 Drop meaningless forward declaration
Change-Id: I29e09ad50e8adb2c5dd99014872be9c3f0fdcdbd
2017-01-30 13:14:09 +02:00
Noel Grandin
f1d83ac45f loplugin:stringconstant check for unnecessary OUString constructor..
..calls when creating exceptions

Change-Id: I3bc58a5aa4dc6f0508ecb88b3a843b96b8c7ebfe
Reviewed-on: https://gerrit.libreoffice.org/33617
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-28 09:22:55 +00:00
Tor Lillqvist
5b2f40d918 Fix comments to match reality
Change-Id: I99b49a3c8472b063316baeebdaa89119832a2a1b
2017-01-27 12:10:27 +02: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
Aron Budea
bb50474225 tdf#100151: Dispose of window if DX device creation failed
Before, if the device lacked Direct3D capabilities, VclPtr
handling became compromised, and caused a crash. This was
particularly a problem in virtualized/remote desktop
connections in Windows.

Now mpWindow instance is disposed of right away if DX
device creation fails.

Change-Id: I639340380affdb31a93ce6dccd8df33a0a466df6
Reviewed-on: https://gerrit.libreoffice.org/33413
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-01-23 17:44:19 +00:00
Stephan Bergmann
f22e5db80b loplugin:externvar (clang-cl)
Change-Id: Ied0ee5f637e83fe7819c68e3f4ea4634f21ac3f6
2017-01-11 13:42:39 +01:00
Stephan Bergmann
6f710c79e2 New loplugin:externvar: canvas
Change-Id: If11977a086dd7bd7d76782577db619fd272e814c
2017-01-09 15:44:18 +01:00
Stephan Bergmann
c38aa3b734 loplugin:salbool
Change-Id: I7dfd48a04e2dff1391d10acb75180711b403af9b
2017-01-06 11:19:42 +01:00
Khaled Hosny
d538d3d841 This fallback code makes no sense any more
Ito probably made sense only with bitmap fonts which we no longer
support, and if we don’t need the fallback for printer devices then we
don’t need it on screen either (that whole printer/screen distinction
needs to die someday).

Change-Id: Icf77cd70f0f1b2c186a3c856900295caba72e903
Reviewed-on: https://gerrit.libreoffice.org/31914
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2016-12-14 00:28:15 +00:00
Caolán McNamara
48b561c770 post glew->epoxy, we don't need to link to win openg32 and mac OpenGL
Change-Id: Iadc373961dcca788b1174ee71cb386979ce064ed
Reviewed-on: https://gerrit.libreoffice.org/31954
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-12-13 21:01:48 +00:00
Caolán McNamara
482d7ce61b change from glew to epoxy
because that works under wayland out of the box and gtk3 uses it already

Change-Id: Iefaac31e325534a81a5389f752804af917c1baef
Reviewed-on: https://gerrit.libreoffice.org/31213
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-12-13 11:33:18 +00:00
Noel Grandin
3a705ab405 OSL_TRACE->SAL in avmedia..canvas
Change-Id: Id9077ea29e7028c12f40abfd4c57756c863e3cd9
2016-12-13 08:14:00 +02:00
Noel Grandin
d6f2dd831a remove useless Mutex guards
Change-Id: Ib1edb681b47ce98e2e810d15111932002786aa51
Reviewed-on: https://gerrit.libreoffice.org/31875
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-12 09:16:09 +00:00
Arnaud Versini
4282ea67c2 canvas: remove useless MutexGuards
Change-Id: I7a6f55ad7f3a26a88263660b97dd8650858890f8
Reviewed-on: https://gerrit.libreoffice.org/31859
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-11 18:55:07 +00:00
Michael Stahl
68c2c8659d canvas: try to fix Android build
Change-Id: If90e026bb6f606ea448ff853d944c9bda7f1938a
2016-12-07 21:09:50 +01:00
Noel Grandin
a08cb3b52e convert PolyFlags to scoped enum
and remove the XPolyFlags enum, which has the same values and was being
converted to PolyFlags anyhow

Change-Id: Iaead84933c79a7603698a4e50257dd944df89c41
Reviewed-on: https://gerrit.libreoffice.org/31627
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-07 10:34:17 +00:00
Stephan Bergmann
dd6ea56c02 loplugin:vclwidgets
Change-Id: Iead7373a76b086dbd96d1d9d4643247762d0522f
2016-11-11 10:31:01 +01:00
Noel Grandin
f31d98f63c loplugin:expandablemethods in avmedia..canvas
Change-Id: Ic230f1ef6b1dbe796ac7862a1a7e6a718f9e4e54
Reviewed-on: https://gerrit.libreoffice.org/30753
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-11 07:00:18 +00:00
Noel Grandin
78b4a1fb01 update vclwidget loplugin to find ref-dropping assigment
Look for places where we are accidentally assigning a returned-by-value
VclPtr<T> to a T*, which generally ends up in a use-after-free.

Change-Id: I4f361eaca88820cdb7aa3b8340212db61580fdd9
Reviewed-on: https://gerrit.libreoffice.org/30749
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-11 06:55:41 +00:00
Noel Grandin
ee0e713b53 make comphelper::sequenceToContainer a little smarter
so we don't have to specify the source type

Change-Id: I4106705a39874a8043f0f294a11374404d6cfc3a
Reviewed-on: https://gerrit.libreoffice.org/30713
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-10 06:52:26 +00:00
Noel Grandin
5a5731cd05 loplugin:expandablemethodds in include/basic..comphelper
Change-Id: I1aa9c12e8839325a9fd98530abc89a3d586ff62e
Reviewed-on: https://gerrit.libreoffice.org/30120
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-21 09:57:38 +00:00
Stephan Bergmann
29eb4f122b clang-cl loplugin: canvas
Change-Id: I3e4f9ccbe608a98759f2a9e312839eb909e6b575
Reviewed-on: https://gerrit.libreoffice.org/29878
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-16 14:19:29 +00:00
Caolán McNamara
c5d355e9c9 Resolves: tdf#103026 invalid dash causes CAIRO_STATUS_INVALID_DASH state
Change-Id: I072635ff7c67022ebfd5bdb475e390f3aab7a51c
2016-10-06 09:56:59 +01:00
Caolán McNamara
e713ec442d use a vector here instead of manual mem management
Change-Id: Ic0944837bc49f4a0e86f67bcb5dccc8c1854a396
2016-10-06 09:56:59 +01:00
Noel Grandin
954f752cf1 convert MapUnit to scoped enum
I left a prefix on the names "Map" so that I would not have to re-arrange
each name too much, since I can't start identifiers with digits like "100thMM"

And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore.

Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224
Reviewed-on: https://gerrit.libreoffice.org/29096
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05 06:51:20 +00:00
Noel Grandin
1c15a20df8 loplugin:unusedmethods unused returns
Change-Id: I4da3374e31d3c7407b401d66275da7f56ae83d30
Reviewed-on: https://gerrit.libreoffice.org/29178
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22 13:13:05 +00:00
Michael Stahl
b647996a9b replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)
... except in include/rtl, include/sal, include/uno, where sal_Size is
retained for compatibility, and where callers of rtl functions pass in
pointers that are incompatible on MSVC.

Change-Id: I8344453780689f5120ba0870e44965b6d292450c
2016-09-15 12:01:11 +02:00
Noel Grandin
20a9e101d9 loplugin:constantparam
clean up the plugin a little, and try to catch params which are default
constructed, which doesn't seem to be working yet

Change-Id: Ife45f18502a45cd26306424b7432c55fcbb0fd12
Reviewed-on: https://gerrit.libreoffice.org/28861
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-14 08:47:06 +00:00