Commit Graph

1905 Commits

Author SHA1 Message Date
2beeeea4ea Get rid of OSL_UNUSED
In many cases it was originally used to silence warnings about variables used
only in OSL_ENSURE etc., but that's no longer necessary since OSL_ENSURE is
based on SAL_WARN etc.  In some other cases it was apparently used as a
speculative debugging aid, to have a value assigned to a variable to be easily
able to view the value in a debugger.  And in some cases it was used with
(otherwise ignored) return values of (typically SQL-related) function calls, but
it is probably better to eventually find and fix all the problematic ones among
such calls via function declarations annotated SAL_WARN_UNUSED_RESULT.

Change-Id: Ib925b38da70073b546fdcd00fa8524dc302accbf
2015-09-09 07:54:04 +02:00
bfa5b13b42 toolkit: tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants.

Change-Id: If62a0c3da7f9732a60316dfd49323f6ab838fb6d
Reviewed-on: https://gerrit.libreoffice.org/18396
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-08 08:07:43 +00:00
4ea70f87f7 convert Link<> to typed
Change-Id: I2136c3db2742afcb4722f69297276bea1e0119f4
Reviewed-on: https://gerrit.libreoffice.org/18306
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-04 06:31:30 +00:00
d829012eff loplugin:stringconstant: OUStringBuffer: appendAscii -> append
Change-Id: I03529fd3a769d0ebf1f17e3885cd6ecb691a8678
2015-08-31 08:01:08 +02:00
bd8b93fdff make PostUserEvent Link<> typed
Change-Id: I13f10bda985d55d419a5bff481130a456ae2db8a
2015-08-28 09:49:56 +02:00
fe6c124da7 Remove demonstrated-useless comphelper::compare
Change-Id: Ifd1b38afb963255b76f0d821eb46e4c6a972128a
2015-08-21 10:34:04 +02:00
ef46917ff3 Put Polygon from tools under tools:: namespace
Polygon is one of these names that Clash with some system objects
A similar work has been done earlier with PolyPolygon.

Change-Id: Icf2217cb2906292b7275760f1a16be0e150312f5
Reviewed-on: https://gerrit.libreoffice.org/17789
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-08-17 02:07:43 +00:00
286dfc2a72 loplugin: defaultparams
Change-Id: I50ba6a836473961d952ed88e56532501469c5368
2015-08-11 09:48:18 +02:00
b8eeefebb7 toolkit: don't let ToolkitWorkerFunction join its own thread
Change-Id: I6694bf83e1e5ba6563d399e454442ce3574e8d26
2015-08-06 13:22:59 +02:00
300b4fa81a vcl:: replace boost::function with std::function
Change-Id: Ibcc536558f26ed15c59263c25bfeb690950dd3d0
2015-08-03 14:47:43 +02:00
a4fd6c4f9e inline some use-once typedefs
Change-Id: I02cbbba56a2ad83e0ac3d806265a7e0d6a29594d
Reviewed-on: https://gerrit.libreoffice.org/17495
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03 12:16:33 +00:00
38ecca9b30 inline a bunch of use-once macros
no point in having a macro unless it's actually going to reduce the
number of lines of code

Change-Id: Ic8760d6506cf272d7bd088f7b3b4dcbf288099fc
2015-07-27 08:18:16 +02:00
442b788bc8 Resolves: tdf#90609 SolarMutex assert on threaded load
Change-Id: I81a784ab506d0d3ae266d7341b8ff7a163dcd8d2
2015-07-24 14:01:32 +01:00
9582380ebc convert ImageAlign to enum class
Change-Id: I22e2e66a1f0b230403ad1d9c1f5b7f34a6ee6ea5
2015-07-24 09:52:08 +02:00
dc7fc2074d convert WALLPAPER constants to scoped enum
Change-Id: I3b4b4e8a94904e22823a263bd5446a2e1aa47661
2015-07-24 09:52:08 +02:00
9f27e5b0e0 Fix typos
Change-Id: I52cbaad71560d73f5e24f3de3cd62b00d678dd6c
Reviewed-on: https://gerrit.libreoffice.org/17187
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-07-19 19:45:07 +00:00
93f0c1fdd8 loplugin:simplifybool
Change-Id: I9875ceec4276382d4bf96bc7e150d594df646602
2015-07-16 14:00:22 +02:00
cbce40e965 Make content of OSL_ASSERT, DBG_ASSERT, etc. visiblie in non-debug builds
...to avoid lots of loplugin:staticmethods warnings.  Also enables DBG_ASSERT
etc. also for --enable-debug builds in addition to --enable-dbgutil builds.

Change-Id: Ib89ecd9ab8ce7abb2c64790ace248b31f9d2b64d
2015-07-13 18:14:11 +02:00
462e986e0d Fix typos
Change-Id: Id9296115f30858e7fd470a199e59343a96d7deec
Reviewed-on: https://gerrit.libreoffice.org/16712
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-07-04 10:18:19 +00:00
b55166d266 Revert "return and use std::vector from OInterfaceContainerHelper"
This reverts commit e57314f61f67b093510c5a8a8f34a62126ba8734.
2015-06-29 10:11:53 +02:00
e57314f61f return and use std::vector from OInterfaceContainerHelper
since most of the time we don’t need a heavyweight uno::Sequence.
Adds a new method getElementsAsVector().

Change-Id: I9e72bef0c0c723ffd0dd7d4152db5baec6784a7a
Reviewed-on: https://gerrit.libreoffice.org/15747
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-29 07:25:22 +00:00
7d59a63471 coverity#1308539 Uncaught exception
Change-Id: Id9cad4eaccd71c769fea06d71bbfdd03e8c112ae
2015-06-28 17:56:00 +01:00
8e1ad96626 Some missing SolarMutexGuard around VclPtr acquire/release
At least OutputDevice::acquire/release use a plain unguarded int and ++, --, so
apparently rely on the SolarMutex being locked whenever they are called.  Fixed
those places that caused "make check" to fail for me when temporarily adding
DBG_TESTSOLARMUTEX() to OutputDevice::acquire/release.  (A recurring pattern is
that a class fails to ensure the SolarMutex is locked around the destruction of
non-null VclPtr members.)

Change-Id: I77cba6f3908f2de1b516ce28f1c3c43b3f57a9c5
2015-06-17 15:24:19 +02:00
9b7e1bf43d Fix typos
Change-Id: Ieaf67cf597e05dbae5affa153af907fda4462a41
Reviewed-on: https://gerrit.libreoffice.org/16295
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-16 10:59:53 +00:00
4ea281a3cc cppcheck:redundantAssignment
Change-Id: I1167d0ce6b6f6e48309d0551c1d2a283d79546a7
2015-06-15 13:34:14 +02:00
c3c45ff7ef Fix typos
Change-Id: Id05ea8cf8aed878bedfe73c274df3c67b64bad37
Reviewed-on: https://gerrit.libreoffice.org/16263
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-15 06:53:19 +00:00
e5de5696a4 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: Ib636a7566825dd4bd30cc7e8c2e6b744b619b59b
2015-06-08 16:29:04 +02:00
f6e5a0ac09 vclptr fix in ScrollableWrapper
Change-Id: I28b0c9712d3eb35181ccd323e583d947db06094d
2015-06-08 12:12:26 +02:00
3f72218069 Apply new VclPtr clang plugin to catch potential problems.
Omit the plugin, and sw's FrameControlsManager for now.

Change-Id: Ifb98a2e6e03a9d099efc1668305b96bd9142ca5f
Reviewed-on: https://gerrit.libreoffice.org/16117
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-06-06 20:26:54 +00:00
3f69547397 Resolves: tdf#46440 SIGSEGV on toolkit bootstrap without running instance
Change-Id: I9a78a75b3d72586b1702ed6fa63bb0b62ce6cd72
2015-06-04 11:10:10 +01:00
81610561ed uno::Sequence provides now begin and end
use begin() and end() when calling std::copy on an uno::Sequence

Inspired by commit b34b648fc3262c5d9aa295f621e8fe9c97d4c6b2
"uno::Sequence provides now begin and end"

Change-Id: I08e8c3fd6144e77b95a26f85bc0daf6a9edeeb0b
Reviewed-on: https://gerrit.libreoffice.org/16057
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-04 06:35:44 +00:00
64b33886ef loplugin:cstylecast: deal with those that are (technically) const_cast
Change-Id: Ie7129c66f236b93f505dad9ea672ab777cb380d1
2015-06-02 11:28:38 +02:00
afcf1ecee1 loplugin:loopvartoosmall
Change-Id: I1e9768c08af0bc7caac6a39c13842ee9d8ad962c
2015-05-29 08:48:41 +02:00
4c93c30c79 convert GETFOCUS constants to scoped enum
Change-Id: I7c324bb6358be28c119592850eb7607479279f09
2015-05-28 12:47:05 +02:00
66854d697f convert WINDOW_DRAW flags to scoped enum
Change-Id: I9400a286fab18d683b4c109007961685f01b6da3
2015-05-27 11:14:26 +02:00
f849d96463 tdf#91416 - fix some incorrectly allocated VirtualDevices.
Change-Id: I9ebed313827986473c60e77b7e218b4c1b2487fe
2015-05-26 17:54:27 +01:00
d2275c825d cppcheck: noExplicitConstructor
Change-Id: I955b04396d27e88ce228f180275955071da83ec6
2015-05-26 14:11:12 +01:00
204d147b8a convert SCROLL constants to scoped enum
Change-Id: I5696fa39b2d032735cea7abe039349d4f83cf68d
2015-05-26 08:30:19 +02:00
bb7ce3137d convert INVALIDATE constants to scoped enum
fixing a bug in Window::ImplMoveAllInvalidateRegions, and improving the
IDL docs for XWindowPeer

Change-Id: Idb774ac913945db2ac7c492c11cf86c370624c3d
2015-05-26 08:30:18 +02:00
c7efb51e31 convert TOTOP constants to scoped enum
Change-Id: I85ba631ba298f1034dc5b6a04a5ff3d509c41bcb
2015-05-25 10:32:24 +02:00
65be8fd0f7 convert WINDOW_ZORDER constants to scoped enum
Change-Id: I91a583fe7d4195ee6bc73b4854f757517b38408b
2015-05-25 10:31:35 +02:00
562b7b06b8 The corresponding VCL Window is not necessarily a Button
Change-Id: I1034ca3cf490e471650617e95fb93bc64eb5fd80
2015-05-22 13:59:30 +01:00
ac3802da9a convert WINDOW_POSSIZE constants to scoped enum
Change-Id: Id85137ffc7309a66b04132d588d289db136117b9
2015-05-22 10:37:59 +02:00
566922a98d convert WINDOW constants for GetWindow() methods to scoped enum
Change-Id: I0c7c6d095732704eb4ab48f1277a0592b1c7fa33
2015-05-22 10:37:59 +02:00
83eb114394 convert constants in include/vcl/settings.hxx to scoped enums
Change-Id: I2a110c017f13eca6ddbd70ef3ed195d24adef0a3
Reviewed-on: https://gerrit.libreoffice.org/15828
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-22 06:33:12 +00:00
dcefc97c8b convert IMAGE_DRAW_ constants to scoped enum
Change-Id: I75619eeb902af4953a5ac1525605cf3f0f15e2c0
2015-05-20 09:52:08 +02:00
25a47c5cd5 convert TEXT_DRAW constants to scoped enum
Change-Id: Ic0f7f8fa236bb478b3598ae3fd3c1b30ebbf1a01
2015-05-20 09:52:08 +02:00
d93915b2ae conver MENU_FLAG_ constants to scoped enum
Change-Id: I969d99fa8881cc89601696a2d8621905a82b147b
2015-05-15 10:05:02 +02:00
4f4cff08aa convert POPUPMENU_ constants to scoped enum
Change-Id: I4cdaf36581d1e1daa39929e621070d18a9996852
2015-05-15 10:05:02 +02:00
19a32ddfd2 convert KERNING_ constants to scoped enum
Change-Id: I58031485aaa9ebdeb986a3ee0376f36a9f667947
2015-05-14 12:00:40 +02:00