summaryrefslogtreecommitdiff
path: root/framework
AgeCommit message (Collapse)AuthorFilesLines
2016-01-18loplugin: unused return valuesNoel Grandin1-5/+3
Change-Id: I9c61a46c57894bc63a57740206c0bcb4a16553af Reviewed-on: https://gerrit.libreoffice.org/21571 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-18Don't update the save icon on every keystrokeMaxim Monastirsky1-2/+9
Change-Id: Iad6195ea8b082ca5e6c1a7e9fa48742ff2b495a6
2016-01-16tdf#96949 Remove global static variable m_bPreferrFirstInterceptor and ↵shubhamtibra2-22/+1
unused code Remove global static variable "m_bPreferrFirstInterceptor" which is always true, and remove the ifs where it is false. Change-Id: I54dcea7a6010c825a66020ec3f7448bb32d120b8 Reviewed-on: https://gerrit.libreoffice.org/21519 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-01-15framework: loplugin:defaultparamsMiklos Vajna1-1/+1
Change-Id: Ie1a5c11c7ae8c2288bba7e2ef228d85479d7808e
2016-01-15Related tdf#96059 Fix icons in File->New menuSusobhan Ghosh1-1/+6
Change-Id: Iecfa69ab9db76ce0390a06d9d9574f30469c131a Reviewed-on: https://gerrit.libreoffice.org/21483 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-01-14tdf#95845 Use CommandInfoProvider to receive UNO command labelsSusobhan Ghosh2-51/+2
Replaced getUINameFromCommand by GetMenuLabelForCommand Change-Id: Icd89fed4d9944653996a2218c6ed80af72cefe89 Reviewed-on: https://gerrit.libreoffice.org/21464 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-01-14fix the MSVC 2013 --enable-lto buildMichael Stahl2-0/+3
... by sacrificing the appropriate number of chickens to the template dllexport gods. Change-Id: I27fb6a1f0a8a32c9bdc67574b3a2f3ec9f27b00f Reviewed-on: https://gerrit.libreoffice.org/21442 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-01-13-Werror=attributes (GCC 6)Stephan Bergmann1-1/+1
Change-Id: I4450caf9411fcfbe979a41a67a38e7238ece0be6
2016-01-13Increase relevancyTor Lillqvist1-5/+2
Change-Id: I3a7e46f96898d535b4beff35fdf7245c0eea989e
2016-01-13Modified state icons not packaged into zipMaxim Monastirsky3-7/+17
It seems that images must be mentioned in some src file. Unfortunately had to copy the save icon in place of the modified icon in galaxy, to satisfy the resource compiler. Change-Id: If3fa7a8a194a0289c79fa10987138dfb35eaeca2
2016-01-12GetImageFromURL/SetImageProducer unusedNoel Grandin13-61/+0
looks like these have been abandoned recently in the toolbar manager update Change-Id: I5556833dfef0db5958a5779bdb32482c18a46a5f
2016-01-11loplugin:unusedmethods unused return value in frameworkNoel Grandin10-90/+44
Change-Id: I6e02f34702ba59a961c3fec3d025e775f4e26760
2016-01-10Fix typosAndrea Gelmini34-49/+49
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-09Fix Addons.xcu toolbar items width handlingMaxim Monastirsky4-9/+28
This is useful for some complex controls (e.g. Combobox). Regression of cb4177b5f6d2c63548fa544a19b36001c57193e4 Change-Id: I683cc20e9db72a4dd58d89063ec6bfcd05a1068e
2016-01-08framework: re-enable two dispatch tests, and make them work harder.Michael Meeks2-10/+22
Change-Id: I63d72b2d8f0b4835ab0ead51b518deab635ff3b0 Reviewed-on: https://gerrit.libreoffice.org/21222 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2016-01-07framework: restore dispatch API test.Michael Meeks3-58/+63
Change-Id: I8a78fee2b43c67feaffb8dbbcd36e96743ca2c9c Reviewed-on: https://gerrit.libreoffice.org/21208 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-01-07Some cleanup for sal_uIntPtr usageJohannes Hauf2-4/+4
Change-Id: Ia9779e6477d8848588f3543d09ea6b4477f594a2 Reviewed-on: https://gerrit.libreoffice.org/21022 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-01-05tdf#96059 Replaced imageproducer with CommandInfoProvidersusobhang707-19/+25
Replaced all instances of framework::GetImageFromURL with vcl::CommandInfoProvider::Instance().GetImageForCommand Change-Id: I895a4a80d0219a6523b62d90ca88ec67a433b01c Reviewed-on: https://gerrit.libreoffice.org/21101 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-01-04Related tdf#82775: Check for disposed-nessStephan Bergmann2-37/+43
...instead of dereferencing null pointers Change-Id: I9d1709468a5b601b9f3d86dadea7a8e817f449d8
2016-01-04Cleanup after removing vcl::FontInfo classChris Sherlock1-2/+2
Change-Id: I544eac439cb7277e47a23a90c6fbc45496161c3b
2016-01-03vcl: Excise vcl::FontInfo classChris Sherlock1-1/+1
This may sound crazy, but literally vcl::FontInfo serves no purpose that I can see. The inheritance chain is like this: ┌────────────────────────┐ │ │ │ vcl::Font │ │ │ └────────────────────────┘ ^ ╱ ╲ │ │ ┌────────────────────────┐ │ │ │ vcl::FontInfo │ │ │ └────────────────────────┘ ^ ╱ ╲ │ │ ┌────────────────────────┐ │ │ │ FontMetric │ │ │ └────────────────────────┘ vcl::FontInfo (which, incidentally, needs to be put into the vcl namespace due to collisions with poppler!) literally does nothing and is acting as a bridge between FontMetric and vcl::Font. Unlike a bridge though, this bridge doesn't actually *do* anything. So I'm removing it, which means one less class to deal with in the vcl fonts world. Change-Id: I32725669c9bca7fbb0846b6a062135464046e4f6 Reviewed-on: https://gerrit.libreoffice.org/21058 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2015-12-29cppcheck: noExplicitConstructorCaolán McNamara18-20/+20
Change-Id: Ib43e53d5b6c9c130adb765ac9b769f58060ac640
2015-12-29PopupMenuToolbarController: Update the menu before openingMaxim Monastirsky1-1/+5
Just like we do for the menubar, we must tell the popup menu controller to update itself. Change-Id: Ib914b22b909f9e5c1c4ebc8af58496d73e867416
2015-12-27Small OUStringBuffer cleanupMatúš Kukan1-36/+15
Change-Id: I7b608400eea39eef4c620a1d4d67b11637c54436
2015-12-23New saving behaviorMaxim Monastirsky1-6/+153
Changes in this commit: - AlwaysAllowSave config is gone. Saving is always permitted, unless in a read only document. Also changed the behavior in dbaccess to match sfx2. - The toolbar save button is always enabled, to always give access to the dropdown. That's the case even in a read only document, except that it changes to DROPDOWNONLY, and the save as command icon+tooltip. In table/query designers we still disable the button in read only state. - When the document is modified, the toolbar button gets a special icon to indicate that. TODO: - Icons for the document modified state are still missing. I added some fake links to Tango's links.txt in order to test the new behavior. These links shouldn't stay as-is in a production version! Change-Id: I56c169bf48b78faaf53c2989ce8624f8297ffb6e Reviewed-on: https://gerrit.libreoffice.org/20839 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2015-12-23loplugin:unusedfields in frameworkNoel Grandin7-25/+3
Change-Id: Ic6cfbe9f0c7589804b7ffddac0350c188d974c3d
2015-12-21loplugin:unusedmethodsNoel Grandin1-1/+0
Change-Id: Ifafdaf6da0225f244853a0042a6458643b570623
2015-12-20Probably a better way to detect readonly docMaxim Monastirsky1-10/+5
Change-Id: I91f260ad878eba0bd7459c4246357e768c158765
2015-12-20ResourceMenuController: fix detection of verbs for readonly docsMaxim Monastirsky1-2/+2
Change-Id: If1f84e6ace0e42b69b8cd845e4827f1aed6552df
2015-12-17Remove unused ToolPanel (aka TaskPane)Samuel Mehrbrodt2-28/+0
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-16Simplify Desktop::getInfoHelperStephan Bergmann2-74/+25
Change-Id: I13058816e8b2b1c821f0123f110671706bf90449
2015-12-16Remove comment noiseStephan Bergmann1-37/+4
Change-Id: I7794e40e07520c1e504b1167aa64cf24819271f2
2015-12-16No need for TransactionGuard::stopStephan Bergmann3-88/+62
Change-Id: If1c0b7285817bb10338077460b77de4a27d35753
2015-12-16Simplify TransactionManagerStephan Bergmann2-110/+25
Change-Id: I51d1969f9f88d9e29fc081fd54df365578900126
2015-12-16No need to pass eReason out of TransactionManager::registerTransactionStephan Bergmann3-8/+4
Change-Id: I0c8468219a4a9df904f34ec1363043bc46265c14
2015-12-16TransactionGuard is always called with null eReasonStephan Bergmann1-11/+3
Change-Id: If416f9539136563dba43f38f7622d70e7fb1f005
2015-12-16Remove dead ctorStephan Bergmann1-14/+0
Change-Id: If1576f9eabcad4e0287181838e0a019fe9372065
2015-12-16Clean upStephan Bergmann2-44/+33
Change-Id: I170b12d1024d51beb5c48333c0759bc33049f577
2015-12-16Fix indentationSamuel Mehrbrodt1-30/+29
Change-Id: Ie0b842cd35ca05e4adfc0b8692423e0a91e1739c
2015-12-16Fix NotebookBar not showing up when directly opening a documentSamuel Mehrbrodt1-5/+5
Change-Id: I6bb154102d5e58e7c7e1f1b0d68629555a6d1697
2015-12-16vcl: Initial NotebookBar implementation.Jan Holesovsky1-0/+7
Re-introduced, this is still useful code to have :-) Change-Id: I91535c13d68261f7195989ec78bd305cf572c87c
2015-12-15loplugin:constantfunctionNoel Grandin8-98/+1
Change-Id: Id72123039409b7559fb4fdfe5f29bf1bb83ac23f
2015-12-13tdf#93837 Add helper code to load popup menus from xmlMaxim Monastirsky3-0/+337
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-12No need for a separate <vcl/lstbox.h>Tor Lillqvist1-1/+1
Change-Id: Ib8d0e3d240e693c678d575b4791f69ca760919ec
2015-12-11No need for a separate <vcl/graph.h>Tor Lillqvist4-4/+0
Change-Id: I962544005b5d408f7c044a02eefe09b87d8a81fe
2015-12-11Clear all m_pVCLMenu->pItemList->maItemList[i]->m_pSubMenuStephan Bergmann1-5/+6
...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::star::uno::Reference<com::sun::star::accessibility::XAccessible> const&, AtkObject*) at vcl/unx/gtk3/a11y/../../gtk/a11y/atkwrapper.cxx:839 > atk_object_wrapper_ref(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> const&, bool) at vcl/unx/gtk3/a11y/../../gtk/a11y/atkwrapper.cxx:795 > AtkListener::handleChildAdded(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleContext> const&, com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> const&) at vcl/unx/gtk3/a11y/../../gtk/a11y/atklistener.cxx:157 > AtkListener::notifyEvent(com::sun::star::accessibility::AccessibleEventObject const&) at vcl/unx/gtk3/a11y/../../gtk/a11y/atklistener.cxx:296 > comphelper::AccessibleEventNotifier::addEvent(unsigned int, com::sun::star::accessibility::AccessibleEventObject const&) at comphelper/source/misc/accessibleeventnotifier.cxx:281 > comphelper::OAccessibleContextHelper::NotifyAccessibleEvent(short, com::sun::star::uno::Any const&, com::sun::star::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-10Unbreak reference upon disposing notificationStephan Bergmann1-1/+4
Change-Id: Ifd9d4fe187c8259db5816f9cdb50cfeae50c8057
2015-12-10loplugin:nullptr: More NULL -> nullptr automatic rewriteStephan Bergmann1-2/+2
Change-Id: Ie83819e2bcdc5fa160b39296b005ca9a5ff74b1d
2015-12-08Move icon rotation/flip handling from ToolbarManager to vcl's ToolbarSamuel Mehrbrodt2-157/+1
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-06ThesaurusMenuController improvementsMaxim Monastirsky1-51/+8
- 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