Commit Graph

8661 Commits

Author SHA1 Message Date
Jan Holesovsky
5ca1936975 rendercontext: Mass fix of using the wrong size.
In the paints, we must use the size of the Window for the computations, not of
the RenderContext - the RenderContext can be much bigger than the Window in
the double-buffering case.

Fixes for example the list boxes, and many others.

Change-Id: I4c7607569f88b2d097587140858d0862e54b5ea6
2015-06-23 10:32:28 +02:00
Jan Holesovsky
7f19a7f1f1 rendercontext: Fix crash with double-buffering in the Styles combo box.
Decouple the actual window from rendercontext in UserDrawEvent.

Change-Id: Ic440c4e7f59fcffb7800c578146e8eb528cbb7b4
2015-06-19 17:59:07 +02:00
Stephan Bergmann
4dd62d9cc3 Disambiguate needlessly overloaded SvDetachedEventDescriptor::hasByName
Change-Id: I951e95c4c81e7e0b4bfb2246c163809863fedac5
2015-06-19 11:04:16 +02:00
Takeshi Abe
0980095619 Replace boost::scoped_array<T> with std::unique_ptr<T[]>
This may reduce some degree of dependency on boost.
Done by running a script like:

git grep -l '#include  *.boost/scoped_array.hpp.' \
 | xargs sed -i -e 's@#include  *.boost/scoped_array.hpp.@#include <memory>@'
git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \
 | xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/'

... and then killing duplicate or unnecessary includes,
while changing manually
m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx,
extensions/source/ole/unoconversionutilities.hxx, and
extensions/source/ole/oleobjw.cxx.

Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd
Reviewed-on: https://gerrit.libreoffice.org/16289
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-17 15:50:45 +00:00
Stephan Bergmann
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
Andrea Gelmini
814af9f1e5 Fix typos
Change-Id: Icfb885b72d51edc886851cf503c56fa12b8f559f
Reviewed-on: https://gerrit.libreoffice.org/16309
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-16 11:21:07 +00:00
Andrea Gelmini
f378e723d2 Fix typos
Change-Id: I528752dfabeb31d14c350f79819b521537ab9b56
Reviewed-on: https://gerrit.libreoffice.org/16300
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-16 11:14:55 +00:00
Andrea Gelmini
01532b1ab8 Fix typos
Change-Id: I28cfc629dc3d6ef54128615452667ccce86c1072
Reviewed-on: https://gerrit.libreoffice.org/16297
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-16 11:05:58 +00:00
Noel Grandin
4729774b24 remove unnecessary check for null when calling delete
Idea originally from caolan.
Found using the following command:
find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;'

Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
2015-06-15 14:46:41 +02:00
Noel Grandin
dcf6abfcdf cppcheck:unreadVariable
Change-Id: I03981ceba67280e8ed98a9add7f24b3bd958d522
2015-06-15 14:06:31 +02:00
Noel Grandin
4ea281a3cc cppcheck:redundantAssignment
Change-Id: I1167d0ce6b6f6e48309d0551c1d2a283d79546a7
2015-06-15 13:34:14 +02:00
Andrea Gelmini
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
Noel Grandin
776a3f14f2 convert expressions like 'size() == 0' to 'empty()'
Change-Id: Ia5c8c0f38a347f398d587970a22e03f29ffd37af
2015-06-11 10:07:08 +02:00
Caolán McNamara
88b104f44a coverity#1302618 deref of NULL
on examination this PreparePaint virtual is only called from
SvTreeListBox::PaintEntry1

and PaintEntry1 is only called from SvImpLBox::Paint in a

    for(sal_uInt16 n=0; n< nCount && pEntry; n++)
    {
        /*long nMaxRight=*/
        pView->PaintEntry1

loop so pEntry always exists given that test. Re-jig things
so these families of method take a reference instead of a pointer
so verifying it cannot be NULL and a whole pile of else paths
fall away

Change-Id: Ied40acb1c2263c21b4447832f8cb86f64ed9e80d
2015-06-10 22:11:33 +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
Miklos Vajna
c97971ea3b svtools: WaE: '<::' cannot begin a template-argument list
Change-Id: I25d4dbd916297fef51f24100dbde0009a4943750
2015-06-09 13:43:50 +02:00
Stephan Bergmann
95f03f4994 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I0df3b3737e02e6467fc9d71bc948a58797582173
2015-06-08 16:28:33 +02:00
Andras Timar
7f4230675c tdf#90804 remove SfxFieldUnit enum
b78d881520 removed unused values
from SfxFieldUnit enum. This broke the mapping between SfxFieldUnit
and FieldUnit. In fact SfxFieldUnit was redundant.

Change-Id: I13c7e7d708c6eeab0de192f4cd110b0a23989a31
Reviewed-on: https://gerrit.libreoffice.org/16150
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2015-06-08 13:44:11 +00:00
Caolán McNamara
0f71828a95 cppcheck: noExplicitConstructor
Change-Id: I8b03c27188b02c3c4a9a9fbbe0df1fb1ae1c5caf
2015-06-08 11:14:38 +01:00
Noel Grandin
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
Caolán McNamara
dd46a9b3b0 callcatcher: update unused code
Change-Id: I1d26c96a2f7e5351e24b931971d5ca80161acec5
2015-06-06 15:00:02 +01:00
Tomaž Vajngerl
2e4380a077 forgot to change the Invalidate to InvalidateEntry in treelistbox
Change-Id: Ifa70abbecb6899d0e665039cecc2d9036ffc4b92
2015-06-03 20:42:27 +09:00
Tomaž Vajngerl
f64588a923 tdf#91677 fix flickering ruler
Change-Id: Ia14be98fbfd46871b2ac9bd42a07951d86722a8a
2015-06-03 20:42:27 +09:00
Eike Rathke
43e4382a4c tdf#91199 add Venetian [vec-IT] to language list
Change-Id: Ide2837739a32142c39e933bda5761d620dcf2a35
2015-06-03 13:23:24 +02:00
Jan Holesovsky
5f39d1078f lok: Avoid instantiation of the slide sorter bar
Change-Id: Ia21bea54d1d6bd34256cb45ed704c6f7785fc2fc
2015-06-03 12:16:50 +03:00
Stephan Bergmann
fea2e004d4 loplugin:cstylecast: deal with those that are (technically) const_cast
Change-Id: I5e665deb034b564de90e65981384ea5a2d892980
2015-06-02 11:28:15 +02:00
Caolán McNamara
8e22cd40ec cppcheck: noExplicitConstructor
Change-Id: I8ae8623252546ca94f65fc04b331dd9cafa4fc92
2015-06-02 08:57:56 +01:00
Tomaž Vajngerl
cba920edf8 invalidate entry instead of everything in TreeListView
Change-Id: I4f28267194a7b0053df25b7e9be993c7838eca32
2015-06-01 13:18:27 +09:00
Stephan Bergmann
58389480b7 loplugin:redundantcast: const_cast to same type
Change-Id: Ifced01f17de220d430bb9d51d1fdc67242efcff8
2015-05-29 12:04:51 +02:00
Tomaž Vajngerl
b0922150c2 tdf#91677 fix invidsible menu in Base
Change-Id: Ie1a8d6125d4a9d67f06f7dc37aa4d5115ad1af28
2015-05-29 16:58:19 +09:00
Noel Grandin
afcf1ecee1 loplugin:loopvartoosmall
Change-Id: I1e9768c08af0bc7caac6a39c13842ee9d8ad962c
2015-05-29 08:48:41 +02:00
Noel Grandin
79db3fc0ee convert STARTTRACK constants to scoped enum
Change-Id: I9b441688eb59ffd3540b014716a9abe7969c9be4
2015-05-28 12:47:07 +02:00
Noel Grandin
a086ca1898 convert AUTOSCROLL constants to scoped enum
Change-Id: Id1d2b5c13ad6af05314cba60ba5b9a62e0683f5e
2015-05-28 12:47:06 +02:00
Noel Grandin
4c93c30c79 convert GETFOCUS constants to scoped enum
Change-Id: I7c324bb6358be28c119592850eb7607479279f09
2015-05-28 12:47:05 +02:00
Tomaž Vajngerl
8400e87a41 fix highlight rendering for iconview with more effective clipping
Change-Id: I9d8f2341477b9b9c0acd71a7d33cd5a9a55757d2
2015-05-28 18:56:01 +09:00
Tomaž Vajngerl
02482eef01 fix drawing treelistbox with redefined background in dbaccess
Change-Id: Ia55797e3e42309f9d37d5335088f7657d99954de
2015-05-28 18:56:01 +09:00
Philippe Jung
1379e2feaa Rewrite all calls like Dialog(params).Execute()
Replace all calls looking like
  ADialog(some params).Execute()
by
  ScopedVclPtrInstance<ADialog>::Create(some parms)->Execute()

Change-Id: I0b6f0a9ea5ef0a749ffa30ce131e9dc989604639
Reviewed-on: https://gerrit.libreoffice.org/15915
Tested-by: Jenkins <ci@libreoffice.org>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-05-28 08:44:31 +00:00
Caolán McNamara
afe5672fbc cppcheck: noExplicitConstructor
Change-Id: I27c24d3284a8e0678fc5c041426b4a7e71cbd363
2015-05-27 13:54:54 +01:00
Stephan Bergmann
668408fa1c Fix accidental mis-uses of VclPtr address-of operator
Change-Id: I3a82423378d3198a25f90ddfbf42af55d85c96fb
2015-05-27 11:40:22 +02:00
Noel Grandin
66854d697f convert WINDOW_DRAW flags to scoped enum
Change-Id: I9400a286fab18d683b4c109007961685f01b6da3
2015-05-27 11:14:26 +02:00
Michael Meeks
f849d96463 tdf#91416 - fix some incorrectly allocated VirtualDevices.
Change-Id: I9ebed313827986473c60e77b7e218b4c1b2487fe
2015-05-26 17:54:27 +01:00
Caolán McNamara
ca95160830 Push without Pop
regression from

commit fb8f83c12e
Date:   Mon May 11 14:33:01 2015 +0900

    refactor TabBar to use RenderContext

Change-Id: Ie77d23e164a880cec6ba5f5387070da1ada30760
2015-05-26 16:24:59 +01:00
Noel Grandin
6ea81e0c78 loplugin: unnecessarysuperclass merge HashedEntryList into NameTranslationList
Change-Id: Idba2112b81e06ada7567dd5476a4e9d84f38ff56
Reviewed-on: https://gerrit.libreoffice.org/15897
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-26 06:44:38 +00:00
Noel Grandin
204d147b8a convert SCROLL constants to scoped enum
Change-Id: I5696fa39b2d032735cea7abe039349d4f83cf68d
2015-05-26 08:30:19 +02:00
Noel Grandin
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
Michael Meeks
e4097762dd Audit all PostUserEvent calls and instrument for VclPtr.
Hold a reference on the VclPtr while we're waiting for the UserEvent.

Change-Id: I55c2671ca12eb14761c6a7dffd551af71547ecbd
2015-05-25 21:38:08 +01:00
Jan Holesovsky
4163bde705 related tdf#90127: Simplify setting of the 'auto' icon theme.
Change-Id: I9aedfd0b7943517b5444195b63140132dd728d57
2015-05-25 11:47:15 +02:00
Noel Grandin
65be8fd0f7 convert WINDOW_ZORDER constants to scoped enum
Change-Id: I91a583fe7d4195ee6bc73b4854f757517b38408b
2015-05-25 10:31:35 +02:00
Caolán McNamara
6240967cfc callcatcher: update unused code
Change-Id: I1f2a94cdcd4329af68d946ff0a74ddec4ac1c590
2015-05-24 15:40:22 +01:00
Miklos Vajna
1c4c7e0296 svtools: SAL_WARN -> SAL_INFO that was OSL_DEBUG_LEVEL > 1 printf before
So that just like before, it doesn't appear in a dbgutil build by
default.

Change-Id: Ie2c18400cc6b617aa51a173e8f3c764a2c3c48c8
2015-05-22 11:15:09 +01:00