Commit Graph

6112 Commits

Author SHA1 Message Date
25accda781 tdf#39440 reduce scope of local variables
This addresses some cppcheck warnings.

Change-Id: I6ab170c4426494ab9fc53017f88e47fbfdbd9aad
Reviewed-on: https://gerrit.libreoffice.org/17920
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-08-22 13:02:08 +00:00
af6daec72b more config skipping stuff and a tester tool
Change-Id: I5e93a4c84b3a0940239213766eb24d21fb5fd649
Reviewed-on: https://gerrit.libreoffice.org/17863
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-20 07:40:21 +00:00
f0e90c712b for testing allow disabling configmgr for time critical paths
Change-Id: I83396e7c90d3b182f353a77c9bdf06fd17af92a1
2015-08-19 20:28:35 +01:00
8894f3cfa0 Remove redundant check
...became redundant with previous commit
d3d7cb989b8d3c7d8e9947511bf78e9aefedc490 "Remove ConvertOSLtoUCBURL."

Change-Id: I08c436dec8ed661eae60a17723fc63e6aafb1f86
2015-08-19 11:20:52 +02:00
d3d7cb989b Remove ConvertOSLtoUCBURL
"Not all OSL URL's can be mapped to UCB URL's" might have been true in the days
of vnd.sun.star.wfs, but I can't see any good reason for this functionality
today.

Change-Id: Ia887531ee9fa70092766406cee1fc8962576a8ac
2015-08-19 11:15:52 +02:00
236714e86c Clean up remaining utl::LocalFileHelper::Convert...
together with 58d68a1bc9146334376206ae7ba8b1a6594a1040
"ConvertURLToSystemPath->getSystemPathFromFileURL" and
28f3464a571a23a2c16bd0980e9021b95d011511
"ConvertSystemPathToURL->getFileURLFromSystemPath," this replaces all those
Convert... functionality with direct calls to the corresponding osl::FileBase
functions.

Change-Id: I2876171cd337a5eb939d25d8cf1e0c1253ff73a7
2015-08-19 10:48:42 +02:00
431f2ce818 framework: tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants.

Change-Id: I6acff50f23bcbac58c689caf2a7f07dbd5404e57
Reviewed-on: https://gerrit.libreoffice.org/17734
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-14 10:46:14 +00:00
371a535afb loplugin: defaultparams
Change-Id: I0538bbb2e121d8feeff03535cb327c957e03de1b
2015-08-14 11:11:07 +02:00
0db25f68ab remove default value from SfxPoolItem::PutValue
more useful to make it explicit.

Specifically, otherwise my defaultvalue clang plugin would want to
remove lots of places that contains #define constants which, while
technically the same as the default value, convey semantic
information which is quite useful.

Change-Id: I918ad5b0e73ba279fa1b1489b62d900339ff71eb
2015-08-14 09:16:06 +02:00
26c106a5ae append '(Remote)' in the titlebar when remote file is opened
Change-Id: Idf0a9594406601154319ae17e42ece4bf2d56dc9
2015-08-14 08:45:20 +02:00
ded58e062c Related tdf#93404: Fix deadlock when joining WakeUpThread
...after 54f10a9654b617c4c993044e52e7bd40d0151c53 "tdf#93404: Forgot to launch
WakeUpThread," when the WakeUpThread blocks on locking
StatusIndicatorFactory::m_mutex in StatusIndicatorFactory::update() while the
joining thread blocks on StatusIndicatorFactory::impl_stopWakeUpThread() ->
WakeUpThread::stop() -> Thread::join().

Change-Id: I3480014b1f522901064ea9b71ffa2ebf5d74fef5
2015-08-13 15:16:38 +02:00
54f10a9654 tdf#93404: Forgot to launch WakeUpThread
...in 017f250764ec7b4ecb82ac19f5b3f68cadf1bf56 "Ensure WakeUpThread is joined
before exit"

Change-Id: Iaa5a5772f099b11229bd40c3cc10d863ef0ad5b3
2015-08-13 12:07:21 +02:00
f1639b2150 loplugin: defaultparams
Change-Id: I44772f7c26568353d02278486a8e960f40af6354
2015-08-11 09:48:17 +02:00
403c13487c loplugin:unusedmethods
Change-Id: I6801618efb5a66d24156fa429e026acb6ca03aba
Reviewed-on: https://gerrit.libreoffice.org/17506
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-05 09:39:22 +00:00
2886f830a9 idl,framework,forms: inline some use-once typedefs
Change-Id: Icb4908c274ec0778af7ed9fe2d935bf6723fedfb
2015-08-04 08:55:56 +02:00
5256953397 inline some use-once typedefs
Change-Id: I55cc82c8e180cce371c996690608090b1bfdfda4
Reviewed-on: https://gerrit.libreoffice.org/17494
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03 12:16:13 +00:00
0ea54aed15 remove some unused defines
Change-Id: I85a9a2bc12681e13fc482374165ff9bd6858dc93
2015-08-03 11:12:31 +02:00
f5deb46349 remove some unused typedefs
Change-Id: I98c1e7eaa66b7afb05255a017a3de54714637501
Reviewed-on: https://gerrit.libreoffice.org/17491
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03 08:53:21 +00:00
75a84417af Whitespace.
Change-Id: Ifcccd6376a6a44bf6761e9fa451b46933adb6ce9
2015-08-01 02:23:22 +02:00
4cf0869b69 framework: replace boost::function with std::function
Change-Id: I9342bbdaa626c88592d3a7bdf12f150cc2a605b1
2015-07-31 21:54:27 +02:00
a45827b230 loplugin:unusedmethods
Change-Id: Ib4d77ee01e7362f5951f81fceeca3c489872d971
Reviewed-on: https://gerrit.libreoffice.org/17378
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-30 06:23:00 +00:00
180a5fe0a2 Simplify
Every button has a controller, so it should be enough to
just iterate the controllers map.

Change-Id: I9e3d269a00ddd9362164a45000a90d9dc6220cab
2015-07-28 01:28:29 +03:00
4b35bffa0e Fix image update of DROPDOWNONLY buttons
Change-Id: I787878d6ac02d15286a405ccfcc1f09f04c39501
2015-07-27 17:54:02 +03:00
efac5fa06e remove some unused defines
Change-Id: Ib2d50e8c29ccbc5ffcb52cdff4ae3eaae9a62188
Reviewed-on: https://gerrit.libreoffice.org/17332
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-27 06:12:01 +00:00
ea956fa67f string: 'Remote File' -> 'Save Remote File...'
Change-Id: I30e664e6fa16cdcbdffa97c57905b73224d42636
2015-07-24 12:28:50 +02:00
24ad908709 Don't show open remote entry in the recent doc menu
We use the same menu controller for both the Open toolbar
button and the Recent Documents menu. While it's
reasonable to put the open remote file command under the
open button, it has nothing to do with recent documents,
so it shouldn't appear there.

Also don't add the "No Document" entry in case the open
remote entry is visible. The whole point of the "No
Document" entry is that we can't leave the menu empty,
but if there is another visible entry, it's not needed.

Change-Id: Ibefbdc6dc7d1d49f555d8ee23f67b47eba19b445

Signed-off-by: Szymon Kłos <eszkadev@gmail.com>
2015-07-24 12:28:46 +02:00
9e28cc8ca7 convert WindowAlign to scoped enum
Change-Id: I028d108b3a83bd5541d873c4d03b87339cd3be52
2015-07-24 09:52:08 +02:00
bc9a8ddbb7 tdf#82744: fix WebDAV lock/unlock behaviour - part 2
Changes done to the code in framework, comphelper and unotools,
in no particular order

- add an interaction handler dedicated to WebDAV
The stock interaction handler can be missing depending on the need of
the framework performing its tasks, so a dedicated handler is
provided, this one is always present.

- force opening of a WebDAV file.
A WebDAV file sould be open r/o even if explicitly requested to open
as r/w.
This is a limitation of current WebDAV implementation, not of the
standard.
This change is needed in order to reopen correctly a file as
requested by a 'Edit Mode' GUI command.

Change-Id: I5368fa2c0511f1630e6d6139c6a986d33aa19082
Reviewed-on: https://gerrit.libreoffice.org/17182
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-07-22 16:17:04 +00:00
01854d2d82 remove some unused constants
Change-Id: I8742db77a0cfd99257584d830162c1c7126da263
Reviewed-on: https://gerrit.libreoffice.org/17283
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-22 09:52:04 +00:00
74cc3fbc17 tdf#36796 Status updates for custom shapes buttons
We're dealing here with 2 bugs:

1. Single shape buttons (like rectangle, ellipse etc.) don't get
   the pressed state when active. The cause is that all commands of
   the same kind (Basic Shapes, Symbol Shapes etc.) are handled as
   one internally, allowing only one type of status updates. It used
   to transport the current active shape, but it was changed to a
   boolean value in the fix for i#41753, and since then used for
   the pressed state of the group buttons.

2. The pressed state of a group button shows always, even when a
   user activates a shape from a place other than the drop-down
   of that button. But in this case the image of the group button
   doesn't update with the current shape, thus confusing the user on
   what is currently active. The cause here is that we use (since
   i#41753) the XSubToolbarController interface to update the last
   selected function (instead of the old-style status based update),
   and ToolBarManager notifies a controller about a new selection
   only if it was made from a particular toolbar that the controller
   claimed to use in the getSubToolbarName method.

   Since 7352a7c17875e5adcc4226c45f4a03e11c44ff49 there is a similar
   regression for other group buttons in sd (like lines, 3D Objects
   and other), with the same cause. This is also fixed now.

Change-Id: Ida074a001ff78bf5bd5bcb8151516daa6e27cbce
2015-07-21 17:36:09 +03:00
3e926736c7 Miscellaneous typos
Change-Id: I5187364d420ab78c36a91632efab9c32951d867a
2015-07-21 04:53:48 -05: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
de48b8af6d Ignore string status updates completely
See no benefit of it here, and also it has some unexpected
results with some commands that have enum commands, and
use a string item to update the currently selected item.

Change-Id: Iae54c4e1fb7a3aa5a7c1a03904fb3629ed63c8f0
2015-07-16 23:42:25 +03:00
ecc9fc12f1 loplugin:simplifybool
Change-Id: I1ad92d1496759007f770b86f9d24e322b3ae194b
2015-07-16 14:00:18 +02:00
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