Commit Graph

186 Commits

Author SHA1 Message Date
Caolán McNamara
0d003606a4 coverity#1306214 Uninitialized pointer field
Change-Id: Iac0c13c2c8236109370bf4677cc62e7fa6041c5c
2015-06-12 13:49:37 +01:00
Caolán McNamara
a0239af64d coverity#1306212 silence Infinite loop
Change-Id: I8266c914c4f6fa34fcb000db8c1e342e18afcfe1
2015-06-12 13:49:37 +01:00
Michael Meeks
48c2815dd2 tdf#91727 - Unwind non-dispatch of idle handlers.
This clobbers the functionality from commit:

    06d731428e

    make idle timers actually activate only when idle

Since now all rendering and re-sizing is done in idle handlers it
does effectively the opposite of what was intended. A better solution
would allow special-casing the processing of just rendering,
re-sizing and window management to spin for eg. progress bar
rendering.

Also add helpful debugging labels to the idle & timeouts.

Also cleanup the Idle vs. Scheduler handling.

Also ensure that starting an Idle triggers a mainloop wakeup.

Also add a unit test.

Change-Id: Ifb0756714378fdb790be599b93c7a3ac1f9209e6
2015-06-10 17:27:20 +01:00
Stephan Bergmann
f6ec07a396 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I07bf1403e6b992807541a499b786d47f835b2f81
2015-06-08 16:29:41 +02:00
Stephan Bergmann
0648f2c270 loplugin:redundantcast
Change-Id: Ibb641ab458e49a30637f1dff715480c0ed5d8b42
2015-06-08 09:00:24 +02:00
Michael Meeks
7aae8772aa Clear VclPtr instance reference on removed UserEvents.
Also extend VclPtr lifecycle test.

Change-Id: I4d989375ca02327216eb1f37e466aefdb733579d
Reviewed-on: https://gerrit.libreoffice.org/16107
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-06-05 19:45:12 +00:00
Michael Meeks
15499b1e4f VclPtr - more extensive lifecycle tests.
Change-Id: Ifb5355b3a8f33601bcec0c11ce1afe1c735695b6
Reviewed-on: https://gerrit.libreoffice.org/16100
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-06-05 14:22:08 +00:00
Caolán McNamara
d524f3a895 add testcase for CVE-2015-0848
Change-Id: Id49cbc139a39a18cd3965413fc06cc14961747e7
2015-06-02 13:33:43 +01:00
Stephan Bergmann
622988dd84 loplugin:unreffun
Change-Id: Ic0c4bd61aad4354f58cc60e8b584b9d63e397a3b
2015-05-27 16:08:03 +02:00
Tobias Lippert
2a0118a98f tdf#88675 Fix display names for hicontrast and tango_testing
The special cases for the icon themes with the filenames
"images_hicontrast.zip" and "images_tango_testing.zip" are now handled.
They will be displayed as "High Contrast" and "Tango Testing"
respectively.

Change-Id: Ia3c2b8b57809db9c5ed132c42a412157e91b2599
Reviewed-on: https://gerrit.libreoffice.org/14574
Reviewed-by: Yousuf Philips <philipz85@hotmail.com>
Tested-by: Yousuf Philips <philipz85@hotmail.com>
2015-05-27 12:24:21 +00:00
Caolán McNamara
acad8441cc cppcheck: noExplicitConstructor
Change-Id: I62076450ab77472bfd09b3fb9824f54b6ea1e0f7
2015-05-25 12:32:54 +01:00
Noel Grandin
566922a98d convert WINDOW constants for GetWindow() methods to scoped enum
Change-Id: I0c7c6d095732704eb4ab48f1277a0592b1c7fa33
2015-05-22 10:37:59 +02:00
Noel Grandin
23b439a664 convert DEFAULTCONSTANT constant to scoped enum
Change-Id: I5ebd77edfa29d6c6c7acea37e826ef1d625916c3
2015-05-20 09:52:09 +02:00
Noel Grandin
ad0c5e6c66 convert META_*_ACTION constants to scoped enum
Change-Id: I8ecfbfecd765a35fafcbcc5452b0d04a89be2459
2015-05-15 10:05:03 +02:00
Takeshi Abe
6a26624d8b vcl: simplify code by using std::any_of/std::none_of
Change-Id: I37c4fd80780738b823c7928f22deaff0ea1c6bff
Reviewed-on: https://gerrit.libreoffice.org/15585
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-05-07 14:05:16 +00:00
David Tardon
93d004c544 WaE: format ‘%d’ expects argument of type ‘int’
Change-Id: I1697f563d21c02551088ea1469eb973a6cfc5a10
2015-05-07 08:27:23 +02:00
Noel Grandin
b13fbd19b7 convert BMP_SCALE constant to scoped enum
Change-Id: Ibc9f88d2588c028cd71aa86c26d970a73025ef22
2015-05-06 09:01:30 +02:00
Noel Grandin
bfcb2a1a75 convert DEFAULTFONT_ constants to scoped enum
Change-Id: Ia33e957f6cf530e2639b3c86d9482f642652cb46
2015-05-06 09:01:29 +02:00
Stephan Bergmann
a23313076c loplugin:literaltoboolconversion
Change-Id: I556a0fc4e47e51880b12c7e1ae25a588f576cd7c
2015-04-30 08:40:30 +02:00
Tor Lillqvist
d883c12556 Get rid of the initial :: for the vcl namespace
We used it all over the place without leading :: already anyway, even
in many files in include. So let's be consistent. In the majority of
cases, prefer the easier-on-the-eyes choice, not the "safe" one.

In those files in include where *all* existing uses of ::vcl:: indeed
used the :: prefix, there let's keep it for consistency.

Change-Id: If99cb41d3bf290d38c601d91125c3c8d935e61d0
2015-04-30 07:27:52 +03:00
Michael Meeks
4eed8e5331 abhortive focus unit test - apparently we need visible windows for that.
Change-Id: I64999eb625a4b312997ba78698710bd1acaf8da7
2015-04-29 20:52:27 +01:00
Michael Meeks
e4fb1081ee Build and warning fixes, Mac, Win, Linux.
Change-Id: I8a8420f96c512e031ba3cde499523b71341dfa94
2015-04-24 09:25:13 +01:00
Michael Meeks
4fed8865be vcl: convert new to ::Create
Change-Id: Ifd52953086ea923fa1770892d13f32c2263aec54
2015-04-20 15:35:54 +01:00
Michael Meeks
324377ada2 VclPtr - add a templatized ::Create method for better readability.
Change-Id: I2437198709ba4848d975efd1ebb4df1071c6c8f1
2015-04-13 21:25:36 +01:00
Michael Meeks
28a863756b Fix misc. issues in lifecycle unit tests.
Change-Id: I667852d1c854259ed698541b868a49322c6fbe64
2015-04-10 13:27:09 +01:00
Michael Meeks
07f3d95b3d vcl: stop vcl::Window clobbering mnRefCnt itself.
Change-Id: If1926c8ecc94c3b9786a3f255371b440c482a155
2015-04-10 13:26:59 +01:00
Michael Meeks
3072f80c53 automated VclPtrInstance conversion.
Change-Id: I9a1d47202e2794461f6ec44f3e72ee1dd2fde09d
2015-04-10 13:26:44 +01:00
Michael Meeks
f59c489e64 Convert more sites to VclPtrInstance.
Change-Id: I364c5eb176d5003deb1938810cccf4f2aaedbd59
2015-04-10 13:14:06 +01:00
Michael Meeks
582e89610b vclptr: create Instance helpers, and set initial ref-count to 1.
Document that in README.lifecycle; the problem is that our constructors
currently take and release references left/right on the object being
created, which ... means we need an initial reference.

Change-Id: I5de952b73ac67888c3fbb150d4a7cde2a7bc9abf
2015-04-10 13:13:53 +01:00
Michael Meeks
5c91c9fed5 Fix LazyDelete crasher, and add & test more post-dispose robustness.
Change-Id: I0e9460cb33b7cb5da9ddb950ff27bac8cbf7fed8
2015-04-10 13:07:59 +01:00
Michael Meeks
2177201e65 fix VirtualDevice unit test.
Change-Id: I7a1f95ae1d8577114634c62aa89d3c7e1fde62c1
2015-04-10 12:11:54 +01:00
Michael Meeks
a13007addd vcl: fix virtual device lifecycle.
Also remove an over-optimistic assert & ref-holding in dispose piece.

Change-Id: I6ce6abb666c8143502fc450a26e1ba2aac787455
2015-04-10 11:32:24 +01:00
Michael Meeks
06f826c812 vcl: fix lifecycle test to disposeOnce.
Change-Id: Idef33e0b8e6c986c8808c2b611c5f4b6632e7511
2015-04-10 11:01:58 +01:00
Noel Grandin
d7a84ce840 vclwidget: only call dispose() once
by using a new utility method in vcl::Window
This means that we don't have to make all our dispose
methods safe to call more than once.

Change-Id: I2110c7de4a86c70fdc97dd8fd318c86b56865374
2015-04-10 10:55:36 +01:00
Michael Meeks
7553deec1a vcl: new lifecycle test.
Change-Id: I05500c136839877db5c4a215b15e24a8444d3c16
2015-04-09 22:22:50 +01:00
Michael Meeks
bf428ae414 vcl: add assert and improve lifecycle test.
Change-Id: Ic70a890dae41b04d6dd1f19cbea419fe5a794af3
2015-04-09 22:22:28 +01:00
Michael Meeks
ef5ee32474 vcl: more double-dispose protection, and survival after dispose.
Change-Id: I271f9bcb85d07a28abef2d97ef3c31287878324d
2015-04-09 22:22:10 +01:00
Noel Grandin
a632fa5f2e vcl: rename VclReference to VclPtr
and remove the typedefs. The code is more obvious this way.

Change-Id: I4c8f5b5ab050dd96216302a03e760ed0e3ab3464
2015-04-09 19:57:33 +01:00
Noel Grandin
99ff2fcfb5 vcl: add cast operator to VclReference to convert to pointer
so we don't have to call .get() everywhere

Change-Id: If6ccd7dcf1a492b1e7703956ecbe8e5ac2dd0fb7
2015-04-09 19:56:31 +01:00
Noel Grandin
d904316d3d vcl: implement upcasting of VclReference types
to make code less verbose

Change-Id: I0e28bfc412d50e798e6c215434cffc2183b104a6
2015-04-09 19:55:09 +01:00
Michael Meeks
2e03ce9e18 vcl: manage SubEdit with references - and fix leak / cleanup.
Change-Id: Icbfe237a55cfbd83739b055350d5a6a54a2fa36d

Conflicts:
	vcl/source/control/edit.cxx
2015-04-09 19:53:19 +01:00
Michael Meeks
99fc2f4e92 vcl: double dispose protection & unit test.
Widgets must be able to tolerate multiple 'dispose' calls.

Change-Id: I76069a10b83b8384ad84dd146766054cab5bd222
2015-04-09 19:51:11 +01:00
Michael Meeks
f3add7029e vcl: more rtl::Reference cleanup
Change-Id: Idef6b4259d784120a06d2a6c51b77029566da59f
2015-04-09 19:51:08 +01:00
Noel Grandin
e9cb5577f4 loplugin:staticmethods
Change-Id: Ibf0c73ac17ec19ed672f66907db47057920babca
2015-04-02 09:38:29 +02:00
Tor Lillqvist
08f9448bd4 Scanlines on Windows seem to be padded to DWORD multiples
Change-Id: I806744fed51f451f17e6f493555f81cc38e2d71e
2015-03-30 23:28:39 +03:00
Caolán McNamara
c54d7a83bc coverity#1292225 variable guards dead code
Change-Id: Ie00be7806b5bce3599c47654585246edf6f8cc90
2015-03-30 15:33:32 +01:00
Stephan Bergmann
fec207b77a Fix test on non-Linux
Change-Id: I0852c732d580d85ebad629ca26c28ede1576b957
2015-03-29 20:31:10 +02:00
Tomaž Vajngerl
024bc58aef vcl: test for bitmap convert, use scoped read/write access
Change-Id: I702d3e1ced356efce28ebfec141776f07645b2f9
2015-03-29 18:26:31 +09:00
Tomaž Vajngerl
28c61871e8 vcl: stack blur implementation + basic test & performance test
Change-Id: I793ed80a07d9488c5f75b3abdca6db344d80d3d8
2015-03-27 10:45:16 +09:00
Tomaž Vajngerl
44c6c4da95 vcl: tests for Bitmap, check for symmetry when scaling bitmaps
Change-Id: I53d6e70018477abb9f98140a52697c1de0f90934
2015-03-27 10:45:15 +09:00