4539 Commits

Author SHA1 Message Date
Samuel Mehrbrodt
d9f8ea556c Add experimental flag for Commands
Such marked commands should only be available when experimental features are active

Change-Id: I4ef922f0261adc193d46ba287073d67910222f51
2016-10-13 21:53:06 +02:00
Samuel Mehrbrodt
ecec552447 tdf#102274 Closing LibreOffice should not kill active UNO connections
When closing the last window, check whether there are active UNO connections.
If that's the case, just close the window, don't terminate the application
so that the connected application keeps working.

This doesn't affect the behavior of "File->Exit LibreOffice". In that case,
the application still gets terminated and existing connections are closed.

Change-Id: If2d22d51c9b566be8abd51969f35c80896ed4767
Reviewed-on: https://gerrit.libreoffice.org/29018
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2016-10-10 10:40:14 +00:00
Samuel Mehrbrodt
6d9f07d53e tdf#102288 TerminationVetoException should only prevent termination
When using a TerminationVetoException, all windows should be closed,
but the process should be kept running.

Change-Id: I71b0b57b6035a36f0325c8dea3cd38309408f176
Reviewed-on: https://gerrit.libreoffice.org/29031
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2016-10-10 10:36:02 +00:00
Noel Grandin
7cf9028d3b loplugin:unnecessaryoverride in forms/framework
Change-Id: Ia2aabec5af5559903be09e1ef81d156a7538ab3f
2016-10-05 13:53:28 +02:00
Noel Grandin
954f752cf1 convert MapUnit to scoped enum
I left a prefix on the names "Map" so that I would not have to re-arrange
each name too much, since I can't start identifiers with digits like "100thMM"

And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore.

Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224
Reviewed-on: https://gerrit.libreoffice.org/29096
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05 06:51:20 +00:00
Stephan Bergmann
106ea87205 Remove _TYPED suffix from tools/link.hxx macros
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173
"remove untyped Link<>" removed the old versions.

Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-05 07:56:12 +02:00
Andrea Gelmini
f0249a88fc Fix typos
Change-Id: I6730c6c5eab9157533822e5045e9f86109062580
Reviewed-on: https://gerrit.libreoffice.org/29433
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-03 11:21:52 +00:00
Andrea Gelmini
c7114b66bd Fix typos
Change-Id: I7000efdb7276053c16de992fa8f9a4e614ecb3e2
Reviewed-on: https://gerrit.libreoffice.org/29434
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-03 08:59:34 +00:00
Jochen Nitschke
e44961c95d cleanup includes
related tdf#102630 Useless /org.openoffice.Office/Substitution feature

Change-Id: Ifa260c962efcaacd7477fb03a3d4d07e43743e6f
Reviewed-on: https://gerrit.libreoffice.org/29359
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-09-28 16:55:36 +00:00
Stephan Bergmann
47f7e30f35 tdf#102630: [API CHANGE] Remove SharePoints support from PathSubstitution
...apparently unused and broken (see issue)

Change-Id: Ic20d287b59d3317fecdba03a3edf8f51611c91ba
2016-09-27 18:12:11 +02:00
Stephan Bergmann
120d8fc75c Use FixedVariable::bAbsPath to check for special path vars
Change-Id: I526c45ecf3c7e21b87c16eef5047707f74da7668
2016-09-27 15:47:57 +02:00
Stephan Bergmann
02f114096d Remove redundant FixedVariable::nEnumValue
Change-Id: I39a2a65e06cdf421786fbbfedecad604fcb3abd2
2016-09-27 15:47:57 +02:00
Stephan Bergmann
02c079fc4f Remove unnecessary typedefs
Change-Id: I0c65720a3db88242bdf36338864f6961478f547f
2016-09-27 15:47:57 +02:00
Stephan Bergmann
da2e1ea7d4 Use range-based for
Change-Id: If112967db4828f8570692af5dbbbd9e3c2a837aa
2016-09-27 15:47:57 +02:00
Stephan Bergmann
2c5934b1a1 Reduce var scope
Change-Id: I5b5ea9968c7648e38a5cacda5e1f6ba8bea78749
2016-09-27 15:47:57 +02:00
Stephan Bergmann
bae1e2aa63 Add note
Change-Id: I68af0bcfd6700ee40f2d0879e57de9d66c62c983
2016-09-27 09:52:59 +02:00
Stephan Bergmann
653e0ccc4e tdf#101898: Only re-substitute whole segments with $(username)
...otherwise, if $(username) happens to be "user", it will endlessly re-
substitute inside a (already partly re-substituted) URL of the form

  $(user)/...

Regression introduced with 16fb0d3d0f68708c183c53bd18660a23970b77fe "tdf#98407
PathSubstitution: Add substitution for $(username)".

Change-Id: I1c8b64f383fdfd97fa5edc192e9ca4b46944d6f1
2016-09-27 09:18:11 +02:00
Maxim Monastirsky
02ddfd10e9 tdf#96736 Let MenuBarManager handle the save dropdown
Instead of trying to do everything (icon theme
changes, disabling commands etc.) manually.

Change-Id: Iffd420bf09ccd566e96f39cb9684ab466a7c6555
2016-09-25 18:48:12 +03:00
Maxim Monastirsky
a05b675852 tdf#102266 Try to keep HUD up to date
Recent HUD versions don't seem to support the activation
callback, so we have to update menus in the background.

(regression of 15436c009e756dd4c94046f9849ad5a186454af8)

TODO: Is this manual iteration in GtkSalMenu::SetItemText
worth it, or maybe simply calling Update() will be good
enough, too?

Change-Id: I7f08c3518e1767915d84036cdce7f678961595ef
2016-09-25 00:06:47 +03:00
Maxim Monastirsky
769f640558 tdf#102355 Fix disabling entries via dispatch interception
... in ResourceMenuController based top-level menus.
MenuBarManager doesn't set frame action listener for
top-level. This wasn't an issue when top-level always
was the menubar, but now top-level can be a popup menu.

Change-Id: Ibc9116389239eb06f84a2e53b31eacc0a09d438e
2016-09-22 13:00:12 +03:00
Szymon Kłos
af3df5340d Notebookbar: separate .ui files settings for each module
* each module have own list of implementations
* deleted placeholder .ui files from Calc and Impress

Change-Id: Ib7d4cafbb332447e769ca753003d31e9f3025f0a
Reviewed-on: https://gerrit.libreoffice.org/29143
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-09-22 09:02:48 +00:00
Noel Grandin
b18e1bc61c loplugin:unusedfields
Change-Id: I852e98b16fdcb88b04e39d11e3101d502c918c24
Reviewed-on: https://gerrit.libreoffice.org/29078
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-20 10:45:14 +00:00
Noel Grandin
a2b77b4368 loplugin:singlevalfields in basic..idl
Also fix obvious bug in the initialisation of the
connectivity::odbc::OConnection::m_bClosed field.
Probably closes some kind of connection leak there.

Change-Id: I04579cf91bcd6d6c51c697d83971da4142743a82
Reviewed-on: https://gerrit.libreoffice.org/28932
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-16 08:30:26 +00:00
Michael Stahl
437377bbda tdf#101771 framework: avoid deadlock in AutoRecovery
AutoRecovery::implts_updateModifiedState() should call external
functions like isModified() before acquiring its own mutex.

(regression from 403eefe81b8a0afe888c60452c17d6b2c5d8343f)

Change-Id: Iae56eec2b6f392b7a7f65a5f54c73efa746263d0
2016-09-15 15:47:10 +02:00
Maxim Monastirsky
74fd959945 tdf#74377 Keyboard shortcuts for context menus
Configurable through the options dialog. The default behavior
depends on the current vclplug (hide for gtk2/3 and OS X, show
otherwise).

Menus currently affected by this change:

- SfxDispatcher based context menus
- chart2 context menus
- vcl's Edit control context menu
- Several MenuBarManager based toolbar dropdowns.

Change-Id: Iad9fb99dc90e01c17cba9c07c1a2b262b920e11d
Reviewed-on: https://gerrit.libreoffice.org/28849
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2016-09-13 23:06:38 +00:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.

(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to

  OOO_DLLPUBLIC_CHARTTOOLS    virtual ~CloseableLifeTimeManager();

in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro.  Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)

Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13 13:19:22 +02:00
Andras Timar
822209e282 typo fix: oue -> our
Change-Id: I4c592f467017cc88cd7deb124f9859e0ff515009
Reviewed-on: https://gerrit.libreoffice.org/28775
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-09-10 05:32:41 +00:00
Noel Grandin
c158c00489 loplugin:constantparam in framework..vbahelper
Change-Id: I592f73012ae8a4df8488ef04dc0956d9400625bc
2016-09-07 10:04:44 +02:00
Noel Grandin
a1cd62bcd5 convert ToolBoxButtonSize to scoped enum
Change-Id: I365b0e34361eb339b04e5f4792f54eff5bf582a5
2016-09-05 08:21:46 +02:00
Maxim Monastirsky
671ac3a922 Looks like the menu highlight handler is now unused
Change-Id: I75ff4bce35e7940e07b760f672e08ffe0dd208f8
Reviewed-on: https://gerrit.libreoffice.org/28580
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2016-09-01 09:39:52 +00:00
Caolán McNamara
a7b18aaa46 no point in these dtors being virtual
nothing inherits from these classes

Change-Id: Ic887ac8a046b8697e310e19b6e7fdf9efae8f074
2016-08-30 19:26:41 +01:00
Caolán McNamara
2b8b8740f2 default assignment operator is fine
Change-Id: I0b63abbfe7d29c35cf7c7dd047527b20ad46c538
2016-08-30 19:26:41 +01:00
Maxim Monastirsky
ab67543e09 Toolbar popups need explicit deactivation
... if based on MenuBarManager, because unlike context
menus, we reuse the same menu instead of creating from
scratch each time, so that it suffers from the same
"double activation" problem as in tdf#97665.

Note that for GtkSalMenu the problem is only for the
top level popup menu, as the Deactivate callback is
properly called when sub menus are closed.

The non-native case also had this problem, but only when
closing the menu by selecting one of its items, and was
fixed already in b41deb2ef057c3bd43fa61448bb4d7299138c8d4.

Change-Id: Iee037f7baba0f80c32fb3a45f16511f8585c203e
2016-08-29 13:43:06 +03:00
Maxim Monastirsky
6bf7d1d0f6 ResourceMenuController: Better error handling
This should stop crashes in framework::MenuBarManager::FillMenu
as seen in crashreport. Unfortunately no idea how to reproduce
those crashes other than corrupting the installation (e.g.
removing files).

Change-Id: Iaed8e888dd74c4c1bb5d6fd7996ecf80f4645b68
2016-08-28 21:08:31 +03:00
Jochen Nitschke
33b38082ca put StreamMode masks in scope of enum class
Change-Id: I77682f7e289a59b986bb84edf014029a20266470
Reviewed-on: https://gerrit.libreoffice.org/28420
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-27 12:06:15 +00:00
Gökhan Gurbetoğlu
674e0f0b43 tdf#100726 - Improve readability of OUString concatanations
Change-Id: I3099818283a9801976288d0efa67a8711106f376
Reviewed-on: https://gerrit.libreoffice.org/28360
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-26 07:15:34 +00:00
Samuel Mehrbrodt
e2deb53e67 tdf#101658 Don't show embedded frames in Window menu
Change-Id: I3e22a92815624cd9b287623c4958cf2df611bb97
Reviewed-on: https://gerrit.libreoffice.org/28325
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2016-08-22 22:38:17 +00:00
Szymon Kłos
dabb20ebd5 GSoC: tdf#101249 Toolbar Mode switching
+ added registry entry for storing current toolbar mode
  for each application
+ registry entries to store toolbar mode configuration,
  remember additional visible toolbars activated by user
+ changing toolbar mode hides and shows suitable toolbars
+ added menu controller for toolbar mode
+ notebookbar implementation entries are disabled when
  notebookbar mode is not active
+ each mode can open/collapse the sidebar

Change-Id: I2b03f87c6dce53190d12102892d9ad30fbfd3bf6
Reviewed-on: https://gerrit.libreoffice.org/27991
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2016-08-22 19:38:25 +00:00
Szymon Kłos
af97c18098 GSoC notebookbar: multiple .ui implementations
+ added menu controller for .uno:Notebookbar showing
  all implementations
+ switching between .ui files
+ officecfg stores implementation description
+ added second implementation file notebookbar_groups.ui

Change-Id: I9f406daced7a111793f61a2e9f939cba27d92184
Reviewed-on: https://gerrit.libreoffice.org/28067
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2016-08-16 07:11:25 +00:00
Yousuf Philips
b13974b474 Add Export... function to save split button menu
Change-Id: Iae47e0f671eed78923e3b97ef4bac65327458b41
Reviewed-on: https://gerrit.libreoffice.org/27924
Reviewed-by: Yousuf Philips <philipz85@hotmail.com>
Tested-by: Yousuf Philips <philipz85@hotmail.com>
2016-08-13 12:21:46 +00:00
Noel Grandin
8806a86c9d loplugin:unusedenumconstants in forms..sot
Change-Id: Ic445e1bdd012c32ef7d84aec9df908467c3296a7
Reviewed-on: https://gerrit.libreoffice.org/28055
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-12 06:53:29 +00:00
Tor Lillqvist
38a3743e0c Revert "tdf#98837 - Fail loading a new document with read only property set to true"
There was not really a good enough reason for the change, and it
causes unfortunate regressions in 3rd-party code that previously
worked fine. (It also caused two regressions in LO's own code, but
those were already fixed.)

This reverts commit 5334ff287c65f028753171c7b38da7ffbcebc1cc.
2016-08-10 17:42:52 +03:00
Miklos Vajna
4cbaa49c0e svl: implement SfxUndoAction::GetViewShellId() interface in SfxListUndoAction
Client code in sw, sd, sc and svx is adapted, the rest is just a
placeholder for now.

With this, e.g. the undo item for Writer's insert comment properly
tracks which window was used for the insertion.

Change-Id: Idad587e6ca07ba69bf59aa7013b251af8bf95bab
Reviewed-on: https://gerrit.libreoffice.org/27781
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-08-01 17:04:45 +00:00
Miklos Vajna
6850f4e845 svl: avoid defaulted parameter in SfxUndoManager::EnterListAction()
It's a virtual function, and defaulted parameters there are problematic.

Change-Id: I3f110c7ac36dfda90811b033620286ad9fce1af1
Reviewed-on: https://gerrit.libreoffice.org/27772
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-08-01 10:32:27 +00:00
Michael Stahl
d76e3abe13 framework: stop adding silly empty accelerator/current.xml files
... to ODF packages.  Somehow this is even skipped sometimes, but it's
much easier to just turn off the silliness than find out why.

Change-Id: Iff509dfd8325fd517e6434bcb56edbd06a3c27f1
2016-08-01 11:13:34 +02:00
Eike Rathke
fe46041a6b do not force the Paste command to enabled for Calc, tdf#60021 related
... so it actually gets disabled in menu or removed from context menu if we say
so. Used with disallowing Paste for Ctrl+A selection or protected cells.

Change-Id: I7d5f8bdc7b7adee65d08b93ddee015aef953d95d
2016-07-28 19:04:08 +02:00
Noel Grandin
508c95f1b6 improve passstuffbyref return analysis
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c
Reviewed-on: https://gerrit.libreoffice.org/27317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27 06:48:25 +00:00
Andrea Gelmini
8278be9860 Fix typos
Thanks to Carlo Bertoldi for the german translation.

Change-Id: I76f554e757318aed4e28b5a05fae0ba15bd46afb
Reviewed-on: https://gerrit.libreoffice.org/27355
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2016-07-22 21:45:22 +00:00
Noel Grandin
36313d93ac improve unnecessaryoverride plugin
to ignore ImplicitCastExpr when calling superclass method

Change-Id: I76a3068446acfee85aa1baeb216e57f63c7099c1
Reviewed-on: https://gerrit.libreoffice.org/27279
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-19 05:39:46 +00:00
Noel Grandin
6e72f0251b new loplugin unnecessary override
Change-Id: I88d3e33823d68745b98625050a8a274f9ef04bcb
Reviewed-on: https://gerrit.libreoffice.org/27135
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-15 14:05:41 +00:00