Commit Graph

3983 Commits

Author SHA1 Message Date
b3ade2609d loplugin:cstylecast
Change-Id: I365b43f0327219f5ccd74984ec907088a8769785
2015-07-16 10:18:27 +02:00
5483138402 Working toolbar entry: Save As > Remote file
Change-Id: I5601c7847f30a7d5fb7ede5f90b2a6a89f4c8693
2015-07-16 09:53:34 +02:00
ce722af0cc 'Save As' popup menu in the Writer's toolbar
Change-Id: I1b1cb7fcd2ae0e0f50e4d8e3900bc416435e60bf
2015-07-16 09:53:32 +02:00
0cfec3d3bd open remote entry in the open drop down menu
Change-Id: Idebc8a926c6653c476c2507606d4a89b22e2eaaf
2015-07-16 09:53:28 +02:00
269bf161e6 loplugin:unusedmethods framework
Change-Id: Ibfeb0ef753a083f458c84f446f0729f05c73e2d6
Reviewed-on: https://gerrit.libreoffice.org/17060
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-15 11:33:21 +00:00
ba562acdf2 Remove pointless check for well-formed sal_Bool value
Change-Id: I69cd54f6fddc93f0cdf87651401fedb60aeeb1f4
2015-07-15 10:42:28 +02:00
ffafd8e7a0 -fsanitize=function
Change-Id: I0a57d590d9e82d368b00ef11426e512ba7bc4dd4
2015-07-14 18:04:31 +02:00
06ea347b93 loplugin:unusedmethods svtools
Change-Id: I04ad31055c04a247faddf4311943ca769051473c
Reviewed-on: https://gerrit.libreoffice.org/17032
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-14 10:21:55 +00:00
9be8c4f212 sfx2: remove the global SidebarController::maSidebarControllerContainer
This global was crashing on exit, unsurprising as it contains UNO
services that reference VCL objects.

It turns out that there is already a UNO singleton
framework::ContextChangeEventMultiplexer that effectively contains this
mapping already, so try to hook that up without creating a public API of
it, which is made quite a bit harder by framework's inexplicable
multitude of libraries.

Change-Id: I4baf67b42c630191fa8879d650eeb62520c331a5
2015-07-14 11:50:44 +02:00
2aea9e37d6 Introduce generic sub toolbar controller
Currently many toolbar controllers are basically doing the
same thing - show some docked toolbar. So the idea here is
to have one generic controller that will handle all these
cases in a unified way. It will get the name of the toolbar
that it's supposed to show from the configuration, based on
the command it was registered for.

Right now it can handle both simple (i.e. with DROPDOWNONLY
bits) and split (i.e. with DROPDOWN bits) scenarios, where
for split kind it replaces the function (and the image) of
the main part of the button, with the last selected function,
for easy reusing. A button is considered to be a split one,
if the name of the initial default command was passed along
with the sub toolbar name, otherwise it will be a simple
button.

The core change is in framework/. Other parts are a usage
example, in form of converting the custom shapes buttons
to this new controller.

Change-Id: I087cc58c3db1889ca69a26546d4f00fe07e2a58d
Reviewed-on: https://gerrit.libreoffice.org/16967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2015-07-13 12:09:52 +00:00
5a72bbd483 allow also to use non-frame modules for sidebar
One more step away from using the frame as key and moving to the
controller.

Change-Id: I438b7eea2161d49a6f2cbf649bf01b8a2e233ebd
2015-07-12 18:56:49 +02:00
7aa9f04538 do not include boost/utility.hpp
It just includes a bunch of other boost headers; mostly we need
boost/noncopyable.hpp so include that directly.

This eliminates 831 MB(!) of boost/preprocessor/seq/fold_left.hpp
completely, which is the 2nd biggest header after ustring.hxx.

Change-Id: I3df55770adcb46e56f389af828e8ba80da2dc1f2
2015-07-10 23:25:22 +02:00
e6a0ef5eee comphelper: remove boost::bind from headers
Change-Id: I40c504d086c8ae1fd825acdafaada283ad9db8d0
2015-07-09 10:18:05 +02:00
799cc41b53 Fix typos
Change-Id: I70b03c152f63e48341dc5629a99b0eeab7b497c0
Reviewed-on: https://gerrit.libreoffice.org/16834
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-07-08 05:48:18 +00:00
1745af7d0a Set button size before updating the images
So that the sub-toolbar controller will pick the
right image size.

Change-Id: I70b642ac84377b461a001ef11f551a5e1448c0f1
2015-07-06 17:58:05 +03:00
dd69bde36a ToolBarManager: Let XSubToolbarController update itself
The doc for XSubToolbarController::updateImage says:

"gets called to notify a controller that it should set an image
which represents the current selected function.

Only the controller instance is able to set the correct image
for the current function. A toolbar implementation will ask
sub-toolbar controllers to update their image whenever it has
to update the images of all its buttons." However, it didn't
work that way until now.

Steps to reproduce:

1. Open one of the custom shapes dropdowns, and choose a shape
   other than the default. Note that the button is now updated
   with the last selection.

2. Change the icon theme. Note that the button shows now the
   default shape, despite the fact that a future activation
   of that button, will still draw the last used shape.

Change-Id: I9345c9faa17dc82a5f590b242b60751ce5d8e648
Reviewed-on: https://gerrit.libreoffice.org/16781
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2015-07-06 14:54:54 +00:00
032c0ec6b1 loplugin:unusedmethods svl
Change-Id: Ic136cce6abef44291b7236a6d709f0eee391f311
Reviewed-on: https://gerrit.libreoffice.org/16784
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-06 13:14:08 +00:00
465489d97a Fix typos
Change-Id: Id884946cae0687d0b71c967e236e58df17567884
Reviewed-on: https://gerrit.libreoffice.org/16707
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-07-03 09:43:46 +00:00
e9e61a4a78 typo: therfore -> therefore
Change-Id: I9dcc0ce882dfd533d98a4f71625bb85e44084283
2015-07-03 10:06:39 +02:00
cfaf0a5809 systools/win32/snprintf.h already included via sal/config.h
Change-Id: I74c683cf1ca821733717348a7840feeb7fbff3e9
2015-07-01 11:57:00 +02:00
1a8915ef83 Fix typos
Change-Id: I1c5e4970d4e90bdea68a901294594104de5e189e
Reviewed-on: https://gerrit.libreoffice.org/16582
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2015-06-30 15:57:12 +00:00
16f8348f36 coverity#1308429 Unchecked return value
Change-Id: I1d7db630eb6d0c12c5eb8b507be114693689e4e1
2015-06-29 12:58:06 +01:00
f4f3eb309e coverity#1308590 Uncaught exception
Change-Id: Ic92709acff10386f22b633e9cd4c3ad6cd1fbc9b
2015-06-29 12:58:04 +01:00
3e9a13f16c coverity#1308570 Uncaught exception
Change-Id: I9009a96e09943b5339c6ef6995d9a28c3e4b596c
2015-06-29 09:43:32 +01:00
fa6db8cff1 coverity#1308527 Uncaught exception
Change-Id: I7ddc62f0ee005652dba62adc359959e1eb09a41e
2015-06-28 17:55:55 +01:00
4c15726253 coverity#1308516 Uncaught exception
Change-Id: If5dcf42448f87888e9f6bab2209bc1f9dd1d525c
2015-06-28 17:55:50 +01:00
5d5dc059cb Fix typos
Change-Id: I80995af6459af9f647e66d1c85da2eedad2647b9
Reviewed-on: https://gerrit.libreoffice.org/16523
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-06-28 12:35:58 +00:00
69c88a32aa Fix typos
Change-Id: Ifd126a535f18db79a18aaec61b76cdf26ab33dff
Reviewed-on: https://gerrit.libreoffice.org/16522
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-06-28 12:28:31 +00:00
0b60670850 loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: Ie17c1d6c7664b3d3ad0255094b26ba433c2c1921
2015-06-26 13:55:32 +02:00
8d5e97a7e5 += does not make any sense here
...although it was like that ever since its inception in
4718eab5490fd470945890d90427f87894952d5f "INTEGRATION: CWS keyconfig01," but
perhaps impl_st_normPath never actually gets called with a path with leading
slash, anyway.

Change-Id: Ia3cf4f4020b3a9ca7152777bfa0378c28948fb8f
2015-06-25 17:04:46 +02:00
995296ea1d loplugin:stringconstant: Flag more inefficiencies
Change-Id: I63f1b54cc9ef49a83800b671a60ea25df7fc2121
2015-06-25 12:38:36 +02:00
aade27554d Fix typos
Change-Id: I60ed5eb658d50cbc7dc572facb5463b7527b4d9b
Reviewed-on: https://gerrit.libreoffice.org/16408
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-22 12:36:21 +00:00
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
839b50f7e6 coverity#1307696 Unchecked return value
Change-Id: Id30efd398cc5ee3df0c31cae53028e1a1b6ea025
2015-06-18 17:13:22 +01:00
3090550b52 tdf#91953 Mixture of icon sizes
Now, whatever the size of toolbar icons, the toolbar
context menu always shows small icons.

Change-Id: Id17df15278d74ae75a3e82d54ecf7af310e0ceb4
Reviewed-on: https://gerrit.libreoffice.org/16361
Reviewed-by: Philippe Jung <phil.jung@free.fr>
Tested-by: Philippe Jung <phil.jung@free.fr>
2015-06-18 13:32:56 +00:00
79be3a5e38 Rename some toolbarmanager related variables
Renames some variable to ease the understanding of what does what

Change-Id: Idd84eb89b7c1fb56dd43d66edfbbeafedc319095
Reviewed-on: https://gerrit.libreoffice.org/16360
Reviewed-by: Philippe Jung <phil.jung@free.fr>
Tested-by: Philippe Jung <phil.jung@free.fr>
2015-06-18 13:32:13 +00:00
ae150c6a54 Fix typos
Change-Id: Ibfa971952cd330ddf430e7e951c5c235d2ae6bd8
Reviewed-on: https://gerrit.libreoffice.org/16314
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-06-18 11:44:56 +00: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
3fa7b0b70f Fix typos
Change-Id: Id8c7cf460cba5af89891c470e1aaa61b227d356e
Reviewed-on: https://gerrit.libreoffice.org/16310
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-16 11:25:13 +00:00
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
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
ca9de688c2 Fix typos
Change-Id: I549635318f46718042e50c8f89ce3c620cade990
Reviewed-on: https://gerrit.libreoffice.org/16281
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-16 11:10:51 +00:00
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
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
dcf6abfcdf cppcheck:unreadVariable
Change-Id: I03981ceba67280e8ed98a9add7f24b3bd958d522
2015-06-15 14:06:31 +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
278e0083e9 It's E_BEFORECLOSE not E_CLOSING
Change-Id: Ia53f9aa8bb3c7fd1dd5c0190624a667b65996ca2
2015-06-13 23:22:19 +02:00
1f408db497 Fix typos
Change-Id: Ifaa52b49b717d893846fc1e7ae4ac50735f824ac
Reviewed-on: https://gerrit.libreoffice.org/16260
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2015-06-13 14:51:15 +00:00
fbfee1dd45 make it easier to find missing sidebar components
Change-Id: Id962fbc20d12db59818dfca421843c674755e36c
Reviewed-on: https://gerrit.libreoffice.org/16101
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-06-12 13:25:17 +00:00
a1a5588b1b loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I4a72a60d621c65e63310ef70b991f9c86f00494d
2015-06-08 16:25:25 +02:00