Commit Graph

4148 Commits

Author SHA1 Message Date
7dd77a1271 Remove unused ToolPanel (aka TaskPane)
Superseded by the Sidebar

Change-Id: I54970d71cd9d42de4f47b223e50dd9474b40632a
Reviewed-on: https://gerrit.libreoffice.org/20724
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-12-17 08:27:55 +00:00
df997d92e0 Simplify Desktop::getInfoHelper
Change-Id: I13058816e8b2b1c821f0123f110671706bf90449
2015-12-16 14:21:27 +01:00
4ac13fb72a No need for TransactionGuard::stop
Change-Id: If1c0b7285817bb10338077460b77de4a27d35753
2015-12-16 14:21:26 +01:00
e9e61809ea Simplify TransactionManager
Change-Id: I51d1969f9f88d9e29fc081fd54df365578900126
2015-12-16 14:21:26 +01:00
fc44b7104c No need to pass eReason out of TransactionManager::registerTransaction
Change-Id: I0c8468219a4a9df904f34ec1363043bc46265c14
2015-12-16 14:21:25 +01:00
52379d720b Clean up
Change-Id: I170b12d1024d51beb5c48333c0759bc33049f577
2015-12-16 14:21:24 +01:00
0db3361527 Fix indentation
Change-Id: Ie0b842cd35ca05e4adfc0b8692423e0a91e1739c
2015-12-16 12:10:07 +01:00
dea1b890cf Fix NotebookBar not showing up when directly opening a document
Change-Id: I6bb154102d5e58e7c7e1f1b0d68629555a6d1697
2015-12-16 10:19:25 +01:00
68d75af9c6 vcl: Initial NotebookBar implementation.
Re-introduced, this is still useful code to have :-)

Change-Id: I91535c13d68261f7195989ec78bd305cf572c87c
2015-12-16 10:19:25 +01:00
d59f411bf2 loplugin:constantfunction
Change-Id: Id72123039409b7559fb4fdfe5f29bf1bb83ac23f
2015-12-15 09:18:04 +02:00
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
1e0e115d47 Clear all m_pVCLMenu->pItemList->maItemList[i]->m_pSubMenu
...even if no correpsonding xPopupMenu proxy has been set up for some i (because
that sub-menu has never been opened by the user).  Otherwise, the Menu that
m_pVCLMenu->pItemList->maItemList[i]->m_pSubMenu points to will be deleted
(during a recursive xSubMenuManager->dispose call), and when later for some
sub-menu j > i that /has/ been opened by the user SetPopupMenu is called, that
can lead to

> Menu::GetPopupMenu(unsigned short) const at vcl/source/window/menu.cxx:835
> Menu::GetAccessible() at vcl/source/window/menu.cxx:1400
> OAccessibleMenuItemComponent::getAccessibleParent() at accessibility/source/standard/accessiblemenuitemcomponent.cxx:339
> non-virtual thunk to OAccessibleMenuItemComponent::getAccessibleParent() at accessibility/source/standard/accessiblemenuitemcomponent.cxx:335
> atk_object_wrapper_new(com::sun::uno::Reference<com::sun::accessibility::XAccessible> const&, AtkObject*) at vcl/unx/gtk3/a11y/../../gtk/a11y/atkwrapper.cxx:839
> atk_object_wrapper_ref(com::sun::uno::Reference<com::sun::accessibility::XAccessible> const&, bool) at vcl/unx/gtk3/a11y/../../gtk/a11y/atkwrapper.cxx:795
> AtkListener::handleChildAdded(com::sun::uno::Reference<com::sun::accessibility::XAccessibleContext> const&, com::sun::uno::Reference<com::sun::accessibility::XAccessible> const&) at vcl/unx/gtk3/a11y/../../gtk/a11y/atklistener.cxx:157
> AtkListener::notifyEvent(com::sun::accessibility::AccessibleEventObject const&) at vcl/unx/gtk3/a11y/../../gtk/a11y/atklistener.cxx:296
> comphelper::AccessibleEventNotifier::addEvent(unsigned int, com::sun::accessibility::AccessibleEventObject const&) at comphelper/source/misc/accessibleeventnotifier.cxx:281
> comphelper::OAccessibleContextHelper::NotifyAccessibleEvent(short, com::sun::uno::Any const&, com::sun::uno::Any const&) at comphelper/source/misc/accessiblecontexthelper.cxx:188
> OAccessibleMenuBaseComponent::InsertChild(int) at accessibility/source/standard/accessiblemenubasecomponent.cxx:436
> OAccessibleMenuBaseComponent::ProcessMenuEvent(VclMenuEvent const&) at accessibility/source/standard/accessiblemenubasecomponent.cxx:624
> OAccessibleMenuBaseComponent::MenuEventListener(VclMenuEvent&) at accessibility/source/standard/accessiblemenubasecomponent.cxx:572
> OAccessibleMenuBaseComponent::LinkStubMenuEventListener(void*, VclMenuEvent&) at accessibility/source/standard/accessiblemenubasecomponent.cxx:569
> Link<VclMenuEvent&, void>::Call(VclMenuEvent&) const at include/tools/link.hxx:84
> Menu::ImplCallEventListeners(unsigned long, unsigned short) at vcl/source/window/menu.cxx:355
> Menu::SetPopupMenu(unsigned short, PopupMenu*) at vcl/source/window/menu.cxx:825
> framework::MenuBarManager::RemoveListener() at framework/source/uielement/menubarmanager.cxx:556

looking at the dangling pSubMenu pointer (and even if the dangling pointer is
never dereferenced, UBSan will try to determine whether the static_cast in

  return static_cast<PopupMenu*>(pData->pSubMenu);

in Menu::GetPopupMenu, vcl/source/window/menu.cxx, is fine and cause a crash).

Change-Id: I5e5f6dba266580e3c2e7693877ea79a07d80bb74
2015-12-11 15:58:43 +01:00
c88c187124 Unbreak reference upon disposing notification
Change-Id: Ifd9d4fe187c8259db5816f9cdb50cfeae50c8057
2015-12-10 13:36:19 +01:00
ac97f32307 Move icon rotation/flip handling from ToolbarManager to vcl's Toolbar
This enables rotatad/flipped icons in the Sidebar and other non-toolbar places (tdf#85767)

Change-Id: I034394ae6f9b8d91ef5a376a43eda587098f064e
Reviewed-on: https://gerrit.libreoffice.org/20403
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-12-08 08:39:44 +00:00
4d3d266e8a ThesaurusMenuController improvements
- The method to fill the menu shouldn't override impl_setPopupMenu
  from the base class, because we can't fill the menu before getting
  some data through status updates.

- Use vcl::CommandInfoProvider to get menu labels.

Change-Id: Ieeeafb81921bc4786256aae4e26d87c6106e63da
2015-12-06 21:37:32 +02:00
5a3b930b30 Save Remote File isn't supported in all modules
so don't add it there to the save dropdown.

Change-Id: Iee604cc15616080266f7192ac451f04830ba1bb8
2015-12-01 00:56:40 +02:00
9b3ca276da rhbz#1286416: Be more resilient during auto-recovery attempts
...called from within the signal handler, so any bets are off

Change-Id: Iedb5c7bc8d08350e5f3e3118c6713f5c25b238b6
2015-11-30 11:40:56 +01:00
1ad3acc828 Unnecessary cast
Change-Id: I7e9cd165311494d3b2a8386dcaf2f3840449395a
2015-11-29 23:12:40 +02:00
ae3f19564f SaveAsMenuController cleanup
Change-Id: Ib4a838619092b47b4eb5304e8d63ab6d7ee8d1c4
2015-11-29 23:05:56 +02:00
f863f7096b loplugin:override
Change-Id: I710b7955f7cf8d6ec9bf5f9473f467e5b206d798
2015-11-29 09:25:41 +02:00
780304aca9 ToolbarAsMenuController: treat line break as separator
Change-Id: Iea82cba12082492ef413e3a2dc0beb20100ec1b5
2015-11-28 21:16:59 +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
c6122fe614 Make this static WeakReference local to Frame::impl_checkMenuCloser()
..to avoid problem shown with comphelper added to libmerged. More info in
http://lists.freedesktop.org/archives/libreoffice/2015-November/071189.html

Change-Id: I2017d87f64f1ae3a1a1cf2e50bce24c05cff6321
2015-11-28 08:04:14 +01:00
a508f639a0 mark UNO structs as SAL_WARN_UNUSED, where possible
Change-Id: Ie3de518f60c9f1313c68df54dbdc1fb2804f1f0d
2015-11-26 13:26:25 +02:00
9c554c2c8c vcl: improve scheduler debugging information.
Change-Id: I6f7d7d3b5b027097417a15804a42aaaab4a03158
Reviewed-on: https://gerrit.libreoffice.org/20185
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-11-25 23:15:42 +00:00
f43c9aa5eb cppcheck: noExplicitConstructor
Change-Id: Id1615ac223cd6257a419e8abe39b5121d4c16ca4
2015-11-25 15:45:56 +00:00
4e88b2a787 More cleanup in toolbarmanager
Change-Id: I97339c43605a838a8fc329b4f1daa05f584ee864
2015-11-25 15:22:01 +01:00
02044b5d27 tdf#96059 Replace imageproducer with CommandInfoProvider
Change-Id: I9508a947e5ae6720516d9f926a59d4287cb15317
Reviewed-on: https://gerrit.libreoffice.org/20166
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-11-25 12:55:10 +00:00
56907b06f1 Cleanup toolbarmanager
* Remove unused fields/methods/includes
* Formatting

Change-Id: Ia4a2fba258ddf00e8fe507338f7f8c7388631f0b
Reviewed-on: https://gerrit.libreoffice.org/20164
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-11-25 12:50:21 +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
fafac0d248 loplugin:unusedfields forms,formula,fpicker,framework
Change-Id: Ic7af56ac801c1e5b3fcf3c4e8413656e96220279
2015-11-20 15:07:05 +02:00
009face61b Revert "vcl: Initial NotebookBar implementation."
Will use a different approach for NotebookBar.
Also this should not be in 5.1.

This reverts commit 8c1014021dbe9da2e18233d215b970f5359db67b.

Change-Id: Ic699723818a890bf4c3be3a2c045527148bd118b
Reviewed-on: https://gerrit.libreoffice.org/20075
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-11-20 11:14:24 +00:00
fe3fd05966 add mapKeysToSequence/mapValuesToSequence methods to comphelper
and use them

Change-Id: If4dc9df63db37185228aeaaab2979498d61304ec
Reviewed-on: https://gerrit.libreoffice.org/20055
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-20 08:14:13 +00:00
1d5c39192e new loplugin:unusedfields
run it over the framework module

Change-Id: I1220a4be0936ba30136ce22ffd78633c8a7b9d35
2015-11-20 10:12:58 +02:00
b0339005b8 loplugin:sallogareas
Change-Id: I2220ab194384fb397716bf3227d38716ba54f537
2015-11-19 16:05:35 +01:00
a95f2e02e1 The base class does this already
Change-Id: I102c7c83bc335d8b5bf597ff0610e65147d4ec9b
2015-11-19 16:18:26 +02:00
a3eec8a043 Toolbar: Add 'Save As' to 'Save' dropdown
Change-Id: I6597ae5569b29d09a8c44fc9a55b71166aa37b05
2015-11-19 13:39:17 +01:00
6480b4d11a move translating a command name to image name out of framework
This is the first step to decouple resolving of command names to
image (icon) names. This is necessary to make allow additional
processing of images before the image is passed on and better
decision which image source to take.

Change-Id: I129dc6a1ae812aaaca32696ef2a2749d5fa86a54
2015-11-19 13:02:53 +01:00
2554efabb6 use comphelper::containerToSequence
in chart2, we remove a local equivalent of the method

Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100
2015-11-19 09:33:29 +02:00
f08d0142af Fix css.awt.XSystemDependentMenuPeer.getMenuHandle
...to return an ANY containing a 64-bit HYPER instead of a 32-bit LONG for
SYSTEM_WIN32 (which covers both 32-bit and 64-bit versions of Windows), so that
the HMENU value (which is effectively a void*) is not truncated for the 64-bit
build.

This should effectively be URE ABI compatible for the 32-bit build, as there the
HYPER value will fit into 32 bits, so extracting a LONG from the ANY should
still work.

Change-Id: Ief3de5924f672e8f6bbe6df08c15439456ca036f
Reviewed-on: https://gerrit.libreoffice.org/20045
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2015-11-18 21:11:02 +00:00
f1132fd50a SystemMenuData::nSize is never read
...and of little use if all users of SystemMenuData agree on the definition in
vcl/sysdata.hxx

Change-Id: Id102a30074b611e3ad37ce69ce27c929f4505495
Reviewed-on: https://gerrit.libreoffice.org/20044
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-11-18 21:10:41 +00:00
f53615de09 Don't wrongly redefine SystemMenuData
...with a long instead of a HMENU on WNT, so with a wrong size for 64-bit WNT.
(And just ignore the comment that TRIES TO SHOUT AT ME!!!!!!!!!!!!!!!)

Change-Id: Id02ef4d8a3818b58def067e8b52f29bac8676fe9
Reviewed-on: https://gerrit.libreoffice.org/20043
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2015-11-18 21:09:54 +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
27bdc70d83 Toolbar: Refactor insert toolitem code
Change-Id: Icb615164c4dc3e96048829805a3eb0faa7d88e4e
2015-11-18 14:07:27 +01:00
ced83de530 Remove leftover break.
Change-Id: Ic6ce39960d92abc9cf3e162ee004ee14deb266eb
2015-11-18 10:16:44 +01:00
cb4177b5f6 Remove unused toolbaritem properties
The following properties have been removed:
toolbar:bitmap
toolbar:property
toolbar:width
toolbar:userdefined

This should have no impact on existing functionality or AddOns, since these properties were not in use.

Change-Id: I07574f8102648ee0713379be8cb0b605d2c76364
2015-11-18 10:12:21 +01:00
81ff7cfddb tdf#95845 Add methods for menu labels to CommandInfoProvider
Change-Id: Ibf6a26940ec194f540255584776f8ebcefbb94ae
2015-11-17 12:12:11 +01:00
0c48c809f0 tdf#95845 Use CommandInfoProvider to receive command properties
Change-Id: I41f9a661b7a5b355e50910d7f58f0d9d55dc62a6
2015-11-17 11:10:05 +01:00
16f85dc485 Remove unused methods
Change-Id: Ia78da9dac5fb426fbb145250c4e39eb7d30c4d03
2015-11-17 11:10:05 +01:00
38839ae10c Remove the ability to set tooltips in the toolbar xml files
It was possible to set a tooltip for a certain toolbar entry.
However, this hasn't been used since that tooltip needed to be repeated for each occurence of the same command.
Instead, a TooltipLabel property has been introduced lately (see 9c2f197e8e945f584e718e889938c06fbf644897).

This doesn't affect extensions (They have their own format to specify toolbars).

Change-Id: I0f0fd05b310bb49dd5b4123e31d3e7fec997dd15
2015-11-16 17:34:25 +01:00