4539 Commits

Author SHA1 Message Date
Maxim Monastirsky
1f9b7ccd6e Restore custom tooltip support
This reverts the toolbarmanager.cxx part of
38839ae10cb565ff1977b1839de1c8278eac657b ("Remove the
ability to set tooltips in the toolbar xml files").

It is true that tooltips can't be set in xml files,
but toolbars can also be created/modified via the
UIConfigurationManager and LayoutManager APIs,
e.g. the test doc of i#105626 .

Change-Id: Ida1559e61e7fd9bd6dcdd7b7159bc5efe070c721
2017-02-05 18:19:29 +02:00
Maxim Monastirsky
6296abc143 HelpURL toolbar property is unused
Change-Id: I74b22509f59899b7c15aa791a01c60c8d982221f
2017-02-05 18:17:34 +02:00
Julien Nabet
223f1f2b81 Typos
Change-Id: I36f443c266670bd26aa6b813075e18653f372f52
Reviewed-on: https://gerrit.libreoffice.org/33900
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-02-03 21:09:44 +00:00
Noel Grandin
f4826959c1 new loplugin:unusedenumconstants
These are the simple removals, where it is obviously safe,
the more complex ones will come in separate commits

Change-Id: I7211945a6a5576354b60d9c709940ce9b674f308
Reviewed-on: https://gerrit.libreoffice.org/33828
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-03 08:59:39 +00:00
Samuel Mehrbrodt
436035a2b2 Fix some typos
Change-Id: Ide3786aad5589e2d430a4e3890d51117b145e51d
Reviewed-on: https://gerrit.libreoffice.org/33842
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-02-02 17:29:29 +00:00
Noel Grandin
c0f9bdd3e6 unnecessary use of OUStringBuffer in throwing exceptions
Change-Id: Iec1473264426f19c31e72260dfce9494389e474f
Reviewed-on: https://gerrit.libreoffice.org/33788
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-02 07:48:21 +00:00
Noel Grandin
0681a6ee28 more SAL_WARN_UNUSED
Change-Id: Idf44fe0302b4504c443f083e527b63b2461ada85
2017-01-31 14:05:11 +02:00
Noel Grandin
1c3e84d819 teach lolugin:stringconstant about calling constructors
so we can remove unnecessary calls to the OUString(literal) constructor
when calling constructors like this:
   Foo(OUString("xxx"), 1)

Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36
Reviewed-on: https://gerrit.libreoffice.org/33698
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-31 08:56:20 +00:00
Noel Grandin
f1d83ac45f loplugin:stringconstant check for unnecessary OUString constructor..
..calls when creating exceptions

Change-Id: I3bc58a5aa4dc6f0508ecb88b3a843b96b8c7ebfe
Reviewed-on: https://gerrit.libreoffice.org/33617
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-28 09:22:55 +00:00
Stephan Bergmann
e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
Takeshi Abe
6d898945d5 Fix typo in comments: relativ -> relative
Change-Id: I58833e503e93b8057f92710c5828bba6cecd4e09
Reviewed-on: https://gerrit.libreoffice.org/33488
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Tested-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-01-25 06:05:54 +00:00
Noel Grandin
b4adb0c533 loplugin: unnecessary destructor forms..idlc
Change-Id: I765e0fa61f8134a60e5ea24452c6bbcb3fa8b054
Reviewed-on: https://gerrit.libreoffice.org/33492
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-25 05:20:06 +00:00
Jan-Marek Glogowski
bf110d40ef Change all Idle* LINKs to be Timer*
Seem UBSAN doesn't like my forced reinterpret_cast to set the Idles
Link in the Timer class. Now there are two possible solution:

  1. convert all (DECL|IMPL).*_LINK call sites to use a Timer* or
  2. split the inheritance of Idle from Timer again to maintain
     different Link<>s and move all common code into a TimerBase.

While the 1st is more correct, the 2nd has a better indicator for
Idles. This implements the first solution.

And while at it, this also converts all call sites of SetTimeoutHdl
and SetIdleHdl to SetInvokeHandler and gets rid of some local Link
objects, which are just passed to the SetInvokeHandler call.

It also introduces ClearInvokeHandler() and replaces the respective
call sites of SetInvokeHandler( Link<Timer *, void>() ).

Change-Id: I40c4167b1493997b7f136add4dad2f4ff5504b69
2017-01-23 20:49:05 +01:00
Caolán McNamara
f9b87a2e50 move GetXGraphic to its only user
Change-Id: I72ec4a7e72ca3355a97f987fab70b3e3a8e45168
2017-01-21 14:46:11 +00:00
Caolán McNamara
aa0951b22d empty Image is an empty XGraphic
Change-Id: I43fa17c2ef9324c841344554b093500d0fb26165
2017-01-20 16:45:47 +00:00
Caolán McNamara
d1f1871078 don't need an intermediate Image
Change-Id: Ibdc4b94e284a1d54b94abfdeb99df393b6a7bf59
2017-01-20 11:09:45 +00:00
Stephan Bergmann
fba7a44ee4 New loplugin:dynexcspec: Add @throws documentation, framework
Change-Id: I19a4517449be3defe97fe0d78dd1a16b08b79247
2017-01-19 18:03:20 +01:00
Juergen Funk
fe9c6fa5a4 Expand and improve the output log in Session-Management
in dependency of tdf#104101

Change-Id: I799f81adf4e4751fb505c84aa075363acf70f5a7
Reviewed-on: https://gerrit.libreoffice.org/33034
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-01-19 14:20:43 +00:00
Michael Stahl
b2c467e47f framework: AutoRecovery uses Timer without SolarMutex
This results in a SolarMutex assert when creating a new Base document.

... and also implts_startListening() is looking less thread safe
than advertised.

Change-Id: I4635064733c16416f903dab4caee59fb2de3cb00
2017-01-19 14:41:51 +01:00
Jan-Marek Glogowski
59b84bc78d Change Idle to be a Timer subclass
Drops a lot of duplicated code, as Idle is just a convenience
class for instant, mostly low priority timers.

Change-Id: I847592e92e86d15ab1cab168bf0e667322e48048
2017-01-17 16:22:57 +01:00
Jan-Marek Glogowski
9e51007039 tdf#97087 GDB pretty print the Scheduler task list
In addition to the GDB pretty printer, this annotates a lot more
Timers and Idles.

Change-Id: I5b93fab02161b23bb753e65ef92643a04fb0789c
2017-01-17 16:08:46 +01:00
Noel Grandin
63c40ba180 manage m_xInplaceMenuBar with rtl::Reference
instead of both a raw pointer and an uno::Reference

Change-Id: I44111694671371fac5c4207d1c46f99761bf10eb
2017-01-17 15:27:33 +02:00
Noel Grandin
2f4dbfdd2c manage m_xToolbarManager with rtl::Reference
instead of both a raw pointer and an uno::Reference

Change-Id: Idcdbbcd4f01c21bd32b4f00d3cfc3febd70e9194
2017-01-17 15:27:33 +02:00
Noel Grandin
04790b2332 use rtl::Reference in RequestFilterSelect_Impl
instead of raw pointers

Change-Id: I86e929d71afc1ce9852d2b01339f7623cc119fcb
2017-01-17 15:27:33 +02:00
Noel Grandin
70fed865df new loplugin: useuniqueptr: forms..framework
Change-Id: I4300a13f455148b7156ac3f444c7102d63ae6db3
Reviewed-on: https://gerrit.libreoffice.org/33164
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-17 11:31:40 +00:00
Caolán McNamara
0bb8bcf1f8 e*, f*: load BitmapEx resources instead of Image ones
Change-Id: I3383e222829042557a8fd9f575049c47aeddeb09
2017-01-16 14:30:43 +00:00
Caolán McNamara
6391993d1f move Image(Bitmap, MaskBitmap) code to last user of it
the last use looks rather dubious to me, I wonder if anything can really end up
here

Change-Id: I13314610405463122891b3ed0f311da65fd1d542
2017-01-14 16:12:08 +00:00
Michael Stahl
7d0e3b32de framework: call disposing from disposing, not notifyTermination
Don't rely on current implementation details of TerminateListener.

Change-Id: I7977c73669f0ab5afac1c93be620e7aeebfe68a2
2017-01-11 20:37:05 +01:00
Markus Mohrhard
ad915fafd5 tdf#104830, need an own termination listener for lib objects
The destruction of the SwDLL object happens already through the normal
termination listener but the other termination listeners might still
depend on it. Also the outstanding events might need the SwDLL instance
to be still around.

This makes the destruction of the instance explicit and at a time when
it should be safe. We should use the same code for calc, impress, math
and base as well.

Change-Id: I50b8f30426f5a4a54e362e748fe962839abca73e
Reviewed-on: https://gerrit.libreoffice.org/32856
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-01-10 13:23:43 +00:00
Noel Grandin
014b9ac2e4 loplugin:unusedmethods
Change-Id: Ibe11923601760ded53a277c48631e4893606b2d6
Reviewed-on: https://gerrit.libreoffice.org/32875
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-10 06:29:10 +00:00
Stephan Bergmann
a109caf3e2 New loplugin:externvar: framework
Change-Id: Idcc4e0bb8065d7a9b30d38463470a67b1921c6cb
2017-01-09 15:43:26 +01:00
Stephan Bergmann
c30f9cdda1 loplugin:salbool
Change-Id: I1c71cdbd4cc36bd048277d9b52a7f74e709ca125
2017-01-08 14:35:40 +01:00
Caolán McNamara
ab3fe69ffb finish moving ImageList to framework
Change-Id: I9d9f292066321174af8b0bcd96c58de5fc7566b8
2017-01-05 15:54:29 +00:00
Caolán McNamara
3cd39b91f8 move ImageList to framework
this can probably be replaced by a std::*map<Image>

Change-Id: Ic36c5f406f5ea51cb9ff135858e319e0877179c7
2017-01-05 15:00:54 +00:00
Caolán McNamara
4f5cd607e3 move CommandImageResolver out of vcl and beside its only user
Change-Id: I2bd70d87bb12d5750d8427b8a8fe786cfce8961b
2017-01-05 15:00:54 +00:00
Caolán McNamara
3ff74ff16b hidden use of removed RID_SVXIMGLIST_FMEXPL resource
Change-Id: I23c64f0071640cb9946340151b7648f47894a113
2016-12-30 16:33:32 +00:00
Caolán McNamara
faff682995 include header instead of duplicating defines
Change-Id: Iee47a90071cb988d5b9fc434569bf91035d52007
Reviewed-on: https://gerrit.libreoffice.org/32510
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-12-30 16:32:43 +00:00
Markus Mohrhard
db1726216b process all outstanding events before shutdown, tdf#104969, tdf#104286, tdf#104399
Change-Id: Id09c3dfdc94c430d5dcb2aebb017f17db80f17e6
Reviewed-on: https://gerrit.libreoffice.org/32486
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-12-29 18:22:05 +00:00
Markus Mohrhard
657ec16557 add a crashreporter entry when we start the shutdown
This will help us identify shutdown related crashes.

Change-Id: Id09c3dfdc94c430d5dcb2aebb017f17db80f17e5
Reviewed-on: https://gerrit.libreoffice.org/32485
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-12-29 00:34:47 +00:00
Markus Mohrhard
7b3f5a9c93 fix indentation
Change-Id: I37c3864ad3c7293f46190d6492a47f640e0dcb81
Reviewed-on: https://gerrit.libreoffice.org/32484
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-12-28 23:10:33 +00:00
Caolán McNamara
3c96a9c431 unused Image in framework, luckily because uses GetImage on pos not id
Change-Id: I97dab3bc1025cd4804910c228235b49216f3afe7
2016-12-24 16:24:32 +00:00
Maxim Monastirsky
c9303b98ad tdf#104818 Show the right label when a11y enabled
Change-Id: If4da5b9435e96e3830bac3d01e06f7ddc87754eb
2016-12-22 01:08:37 +02:00
Noel Grandin
5ec1b04b9b convert EnumContext::Application to scoped enum
Change-Id: Ia289a7b63bf8797085315218785e2a2a4c45d232
Reviewed-on: https://gerrit.libreoffice.org/32230
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-21 07:10:54 +00:00
Michael Stahl
d266cb32c3 tdf#104621 framework: Redo commit 84f2ff67a7e404febf710b1dc7f66d06745c503f
The fix was silly and wrong, need to check m_xUIElement, not m_aName,
which may be set independently, see the confusing code in
ToolbarLayoutManager::requestToolbar().

Change-Id: I279088cb2516b0a19619b5647f15f738a2624edf
2016-12-15 13:36:24 +01:00
Noel Grandin
d15b4e2045 teach sallogareas plugin to catch inconsistencies
Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a
Reviewed-on: https://gerrit.libreoffice.org/32004
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-15 06:45:14 +00:00
Noel Grandin
872cf486c5 Revert "verify SolarMutex when ref-counting VclPtr" series
This reverts the following commits:

    commit 722f4e1d86710f2facd37d7e040df9e1fd585e26
    tdf#104573 - Assertion failed: SolarMutex not locked

    commit f04ec99f5e6a543b8191ced61db4710c3c0de356
    tdf#104573 - Assertion failed: SolarMutex not locked

    commit 71b1e3ff6374c23e65200d3bcafca387d29af04f
    tdf#104573 - Assertion failed: SolarMutex not locked when trying

    commit e794ce1eef6730e5a46d5fb0aa6db2895ede85e7
    verify that we hold the SolarMutex when ref-counting VclPtr

IRC discussion:
<noelgrandin> sberg, maybe I should revert this whole "VclPtr assert" series, I don't have mental bandwidth to sort this out properly now
<sberg> noelgrandin, what I fear is that you'll end up adding lots of SolarMutex locks to small places, where the proper fix would be to add it further out; and once such a dreaded recursive SolarMutex lock is in place (but needlessly so, once the proper fix is done), it's hard to clean that up again
<noelgrandin> sberg, yeah, in that case I'll just remove all of this, leave it for another day

Change-Id: Ie4f84b72b79a1b7e80164b5c7693af398c2c569a
Reviewed-on: https://gerrit.libreoffice.org/31946
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-13 13:04:34 +00:00
Noel Grandin
a005fbeddc OSL_TRACE->SAL in framework..sal
Change-Id: I9a897af88aa9f6f7ca98ce521c69b5a4ee8462e9
Reviewed-on: https://gerrit.libreoffice.org/31903
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-13 06:10:04 +00:00
Michael Stahl
84f2ff67a7 framework: fix race in ToolBarManager creation
ToolbarLayoutManager::createToolbar() may be called concurrently on
different threads, and then it can happen that both threads want to
create the same toolbar URL, see that it does not exist in line 457,
then both release the SolarMutex and create a new ToolBarManager
and the first inserts it and then the second overwrites it on line 514
without disposing the first one.

The non-disposed extra ToolBarManager is kept alive because it is
registered as a listener on the Frame.  When the Frame::close() is
called, the ToolbarLayoutManager is disposed, and that disposes all the
ToolBarManagers it knows about, but not the extra one, which is
then un-ref'd and then has a live VclPtr m_pToolBar, which asserts
because the SolarMutex is not locked since commit
e794ce1eef6730e5a46d5fb0aa6db2895ede85e7.

(This commit is thanks to rr, which recorded the
JunitTest_framework_complex execution and allowed debugging this.)

Change-Id: I8f5333e8e36ac8ea347ef545e014ffc10501aebb
2016-12-10 00:03:08 +01:00
Tomaž Vajngerl
99fd3b2a27 vcl: set toolbox size correctly when using 32px icons
Change-Id: Ifacff75f80bc8401ccff2a4d4dc90e56e3b4aa84
Reviewed-on: https://gerrit.libreoffice.org/31801
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-12-09 14:42:06 +00:00
Noel Grandin
e794ce1eef verify that we hold the SolarMutex when ref-counting VclPtr
Change-Id: If0c5a8c99f0f853c9ecad0f1a4a7299d69805b34
Reviewed-on: https://gerrit.libreoffice.org/31755
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-08 17:26:41 +00:00