Commit Graph

68 Commits

Author SHA1 Message Date
bf18145d3f tdf#93837 Add helper code to load popup menus from xml
Using internally MenuBarManager to manage this kind of menus.
Implemented as a popup menu controller to be able to use in
menubar/toolbar, not only as a context menu.

Change-Id: I46719d66c569db83edd04faf977e0b2b3df0c5fa
2015-12-13 09:12:22 +02:00
ac5d31ee13 New controller to show toolbar contents as menu
Change-Id: I75911a251b0a38874068b95f496496eccc4d05fb
Reviewed-on: https://gerrit.libreoffice.org/20224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2015-11-28 18:39:13 +00:00
4f69d0810e Change the bits of the save button dynamically
When the save slot is disabled, we want it to become
a dropdown only instead of disabling it.

Change-Id: I22fb04c8a0c9afc0a1af8f031a584cdaa99484f9
Reviewed-on: https://gerrit.libreoffice.org/20079
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-11-20 13:24:10 +00:00
5da5076871 Unify menu-based toolbar controllers
The new GenericPopupToolbarController takes by default
the popup menu controller that registered for the same
.uno:Something command, and sets ToolBoxItemBits to
ToolBoxItemBits::DROPDOWNONLY. If a different command
specified using the "Value" property - takes the popup
menu controller that registered for this command, and
sets bits to ToolBoxItemBits::DROPDOWN.

Change-Id: I75c5300bd27fcc9f618f2ee0df2aa6aefd088239
Reviewed-on: https://gerrit.libreoffice.org/20040
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2015-11-18 15:16:58 +00:00
a133053f94 tdf#93837 Create Thesaurus popup menu controller
The old context menu implementation adds the thesaurus
sub-menu by manipulating the menu at runtime, which isn't a
good idea in general. Since it's a sub-menu anyway, better
to have it as a separate controller, so it can be added
to the xml, and users could decide if they want it, and
where.

Most of the code adapted from sfx2 (menu/mnumgr.cxx,
menu/thessubmenu.cxx), hence the Apache-based license
header.

Change-Id: I4f533fcdd5d6480fae8ebcf53ec7c69675025adb
2015-11-11 15:03:38 +02:00
ce722af0cc 'Save As' popup menu in the Writer's toolbar
Change-Id: I1b1cb7fcd2ae0e0f50e4d8e3900bc416435e60bf
2015-07-16 09:53:32 +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
c388071c4d remove now empty fwk_component_getFactory
Change-Id: I5f2f5fc9ccc75b145572aa0bb88b00b0d7a5872d
2014-02-13 11:27:21 +01:00
2d46ef6da5 fwk: Constructor feature for single-instance framework::Desktop.
Change-Id: Id582e672c0b41a35d25361f7dfe970a767880b2a
2014-02-13 11:27:15 +01:00
ce02519c5c Introduce com.sun.star.frame.theDesktop singleton.
Change-Id: I3d269609119149e289652f6bc106e6bd9061672d
2014-02-13 11:26:33 +01:00
c864bd3105 fwk: Constructor feature for one instance ContextChangeEventMultiplexer.
Change-Id: Ibb89e4dd46fc5d1f8a85f96b7e4677fa764bb112
2014-02-11 11:28:55 +01:00
72139db6b4 fwk: Constructor feature for one instance SessionListener.
Converted as usual service implementation.

Change-Id: I37c2f25e8a463abb236753c1299cc0aeb3007cd9
2014-02-11 11:28:55 +01:00
53052e5bfa fwk: Constructor feature for single-instance WindowStateConfiguration.
Change-Id: I0537d7a30b6c6807bf746a52dbd2c7fc66607ae2
2014-02-06 12:03:30 +01:00
4ff873bda2 Introduce com.sun.star.ui.theWindowStateConfiguration singleton.
Change-Id: I50861ac8952d54cb1a45846ea72a2ecac4f83409
2014-02-06 12:03:28 +01:00
813b0f60e8 fwk: Constructor feature for single-instance FooBarFactories.
Converted them as usual service implementations.
Otherwise - if static singletons are used -
it does not show menu for some reason.

Change-Id: I0673d0bfbba268728a3fa676f2af95aa6c74bbb2
2014-02-06 12:03:27 +01:00
094f92bb78 Introduce com.sun.star.util.thePathSettings singleton.
To replace single-instance com.sun.star.util.PathSettings service,
incorrectly converted in 89b0017b22889af6a8afe28b94c06e7095dc8c6f

Keeping util::PathSettings::create in
sc/source/ui/vba/vbaapplication.cxx because for some reason
util::thePathSettings::get does not work in sc_macros_test
while testing sc/qa/extras/testdocuments/Ranges.xls.

Change-Id: I75b68ae56ac5b58f72416070dba100ab3ab70fe8
2014-02-06 12:03:25 +01:00
92c8a8fc82 fwk: Ctor feature for single-instance ModuleUIConfigurationManagerSupplier.
Change-Id: I4674ed6852807e08ff8319515b0ab4e9535b668a
2014-01-30 10:48:25 +01:00
19e16083c6 Introduce com.sun.star.ui.theModuleUIConfigurationManagerSupplier singleton.
Change-Id: I7b503e5d49865c9ff287bf72eaff1995ce871790
2014-01-30 10:48:25 +01:00
a8f9feb9c1 fwk: Constructor feature for single-instance TaskCreatorService.
Change-Id: I9e994ebb4822458039709690aa5dd0a7f75735ac
2014-01-30 10:48:25 +01:00
6c15ca4d9d fwk: Constructor feature for single-instance SubstitutePathVariables.
Change-Id: Ibd626f00bb844ae8ec1cab773093b8c94bf8d936
2014-01-30 10:48:25 +01:00
eb4a4ebc9d fwk: Constructor feature for single-instance WindowContentFactoryManager.
Change-Id: I6786bc1d76fd57edc8dfacb667b53deab792bd20
2014-01-30 10:48:24 +01:00
b3856b0e09 Introduce com.sun.star.ui.theWindowContentFactoryManager singleton.
Change-Id: If979db945b2f5e50e146fdadafd1559530c50122
2014-01-30 10:48:24 +01:00
a64c6c448d fwk: Constructor feature for single-instance UIElementFactoryManager.
Change-Id: Iaa6b6bf8f132e2f8efb9ae71e9302e6be19347c9
2014-01-29 11:46:11 +01:00
e9a23fd78c Introduce com.sun.star.ui.theUIElementFactoryManager singleton.
To replace single-instance com.sun.star.ui.UIElementFactoryManager
service.

Change-Id: I4262909c4396e3907d271a56696a06903168a58d
2014-01-29 11:46:10 +01:00
43b84c9662 fwk: Constructor feature for single-instance UIControllerFactories.
Change-Id: I0867404f7e4aa7b9caafe4f0568bd2c20190867f
2014-01-29 11:46:10 +01:00
af1c0ef8d3 Introduce com.sun.star.frame.ControllerFactory singletons:
com.sun.star.frame.thePopupMenuControllerFactory
com.sun.star.frame.theStatusbarControllerFactory
com.sun.star.frame.theToolbarControllerFactory

To replace their single-instance service variants.

Change-Id: I00586d0d61e63f9482cb659071e88aa9cf02d5b5
2014-01-29 11:46:10 +01:00
d3dce837fa fwk: Constructor feature for one instance UICommandDescription.
Change-Id: I3b772ce36492e89451597b3c7dadc5e5b5b22de7
2014-01-28 18:52:23 +01:00
ba8413d262 Introduce com.sun.star.frame.theUICommandDescription singleton.
Change-Id: Ic88cca3722d555ba48d7da8c176556fa1ff90650
2014-01-28 18:52:22 +01:00
b2c89e7236 fwk: Constructor feature for one instance UICategoryDescription.
Change-Id: I56c906c9eeafb625dee65eec9fe39ea3aee66251
2014-01-28 18:52:22 +01:00
54f606c666 Introduce com.sun.star.ui.theUICategoryDescription singleton.
Change-Id: I79a78f208b2aa5eaacbd2e349b2b5066afa1ad23
2014-01-28 18:52:22 +01:00
dd1c991bd9 Introduce com.sun.star.frame.theAutoRecovery singleton.
To replace com.sun.star.frame.AutoRecovery single-instance service,
incorrectly converted in 279859fdbc40f68d8f1649fa5b928d9de49e8d9e

Unfortunately needs a lot of changes in autorecovery.cxx.

Change-Id: Iba5188dffea3e03803236f23e0b3f343746ace90
2014-01-28 18:52:21 +01:00
ef597d80dc Introduce com.sun.star.task.theJobExecutor singleton.
To replace com.sun.star.task.JobExecutor single-instance service,
incorrectly converted in 748aa84e9808ad31c6ff6b71459525c82de10e58

[including changes by Stephan Bergmann <sbergman@redhat.com>]

Change-Id: I4cea2c63a20b5b22f6e1f822fb35fcc4d0397687
Reviewed-on: https://gerrit.libreoffice.org/7609
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2014-01-24 14:24:34 +00:00
89b0017b22 fwk: Use constructor feature for one instance PathSettings.
Change-Id: Iaa01abc9f604d8f9e6f762e3340f9468e19f4848
2014-01-23 11:41:29 +01:00
279859fdbc fwk: Use constructor feature for AutoRecovery.
Change-Id: I87a6c1c1c6dc92670dccee3f56302e7f234b281d
2014-01-20 19:48:46 +01:00
748aa84e98 fwk: Use constructor feature for JobExecutor.
Change-Id: I5087320137dc17f27a382d564a59cec68f1a4f95
2014-01-20 19:43:59 +01:00
42fc427d04 fwk: Use constructor feature for ModuleAcceleratorConfiguration.
And avoid css::uno::XInitialization protocol.

Change-Id: If4a7987778e2880502bdc7ef2c30792de9377364
2014-01-18 17:02:39 +01:00
7dca32d575 fwk: Use constructor feature for DocumentAcceleratorConfiguration.
And avoid css::uno::XInitialization protocol.

Change-Id: I14daf6409bf0d651d7b23246ba3855f647b3d1ef
2014-01-18 17:02:37 +01:00
72b5343bd1 fwk: Use constructor feature for ModuleUIConfigurationManager.
And avoid css::uno::XInitialization protocol.
2014-01-18 17:02:36 +01:00
307878b6e2 fwk: Constructor feature for ControlMenuController.
Change-Id: I789205c1bc9ceefda003d9887ac4409625539537
2014-01-17 12:25:11 +01:00
9622a8072c fwk: Constructor feature for RecentFilesMenuController.
Change-Id: I7bb943a6fe7526264e8465faeb7e86adbf3cb737
2014-01-17 12:25:10 +01:00
f36fba3b85 fwk: Use constructor feature for Frame.
Change-Id: I5f7ee46671b22d17c5cb060f96342727d566fa21
2014-01-17 12:25:07 +01:00
4c016d7004 fwk: Use constructor feature for GlobalAcceleratorConfiguration.
Change-Id: Ic0268e9841c78e5de646074755e99706adac8d7d
2014-01-17 12:25:05 +01:00
278880fbd1 fwk: Use constructor feature for ImageManager.
Change-Id: I3f231980b1908495b1f5ec17f95c39c464d40ff8
2014-01-17 12:25:04 +01:00
5b034290cf fwk: Use constructor feature for LayoutManager.
Change-Id: I8f5167f7e522585ce8b80ebd8a9a0031aea50d74
2014-01-17 12:25:03 +01:00
db69bd9187 fwk: Use constructor feature for ModuleManager.
Change-Id: Ic0bcec6fffc52ed1ce535f87da933bdf01c6db01
2014-01-17 12:25:01 +01:00
af96a6635e fwk: Use constructor feature for ObjectMenuController.
Change-Id: I93bec5fcb51987b7db433250f990685f15f0aa29
2014-01-17 12:25:00 +01:00
b93ea039eb fwk: Use constructor feature for UIConfigurationManager.
Change-Id: Icd42b6b9b62271606659651a2f463e1ee2956fe6
2014-01-17 12:24:54 +01:00
86b12c3448 fwk: Use constructor feature for URLTransformer.
Change-Id: I6559cb4c97e7c20930fffba3ce3d565840c89033
2014-01-17 12:24:53 +01:00
d51b105904 fwk: Use constructor feature for JobDispatch.
Change-Id: I49a09c4dd0550c318e9f263e9d1a8d0a5e0e15b5
2014-01-17 12:24:52 +01:00
10074976b7 fwk: Use constructor feature for StatusIndicatorFactory.
Change-Id: I0595ec98df7bf4114dfb4c21aedd2d2744fda11e
2014-01-17 12:24:51 +01:00