summaryrefslogtreecommitdiff
path: root/framework
AgeCommit message (Collapse)AuthorFilesLines
2018-02-15tdf#108005: Problems with progress bar while saving documentStephan Bergmann2-1/+3
...as StatusIndicatorFactory::m_pWakeUp is still non-null after it has already been used while loading the document. Regression introduced with 017f250764ec7b4ecb82ac19f5b3f68cadf1bf56 "Ensure WakeUpThread is joined before exit". (Also, WakeUpThread::stop could take up to 25 msec longer than necessary, as it failed to set condition_, so would always have waited for WakeUpThread::execute to finish its next 25 msec condition_.wait call.) Change-Id: Ic7fe15f1b90f3b8292cd2ceccdc2719a00743d44 Reviewed-on: https://gerrit.libreoffice.org/49718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 57574c2bcc60d37620288c403267c34d960f5863) Reviewed-on: https://gerrit.libreoffice.org/49781 Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-12-01tdf#114025 framework: avoid deadlock between Desktop init ...Michael Stahl1-5/+25
... and SolarMutex: the problem is that rtl::StaticWithArg will first lock the implicit mutex of the C++11 static variable, and then the SolarMutex. So if one thread creates the Desktop singleton with SolarMutex locked and another thread without SolarMutex locked, this can deadlock. If we use rtl_Instance directly with SolarMutex, then there is still a static variable, but the SolarMutex will always be locked first, preventing this deadlock. Change-Id: Ibd37fdfa96a4a2b57f661be3814dd597eb52d338 Reviewed-on: https://gerrit.libreoffice.org/45508 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit fa9c083c6071a0a4dc812f3c34731f347ddbabf7) Reviewed-on: https://gerrit.libreoffice.org/45559 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-07-04notify the clipboard terminate listener before any other terminate listenerMarkus Mohrhard2-0/+53
Otherwise we may have destroyed a service that is needed to generate one of the clipboard formats requested by the system clipboard. Change-Id: Id05de3ac569e3ed38cd97efc4c48326bc6a8db0b Reviewed-on: https://gerrit.libreoffice.org/39429 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 7250bc4721b334714bb0fa1345211c83330f94b2) Reviewed-on: https://gerrit.libreoffice.org/39489 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-05-18SVT_RESSTR can go nowCaolán McNamara1-2/+0
Change-Id: I641fbea510d56cabb440f894aae938430ce30ce0
2017-05-18Revert "Popup menu controllers never attached to empty menus"Maxim Monastirsky1-2/+24
This reverts commit 005f4a75e129dcbc74261b90432e2944ca99b131. There might be however old profiles/documents with this behavior. Let's revert for now. Change-Id: I2ee26287b7bd64e01a9b6b0a9586d70e63b9c83d
2017-05-18Remove slot usage from MenuBarManagerMaxim Monastirsky1-21/+4
Change-Id: I9d6a8c541da3bfeb1fddbf8aa3c9cef6e37cc917
2017-05-18Popup menu controllers never attached to empty menusMaxim Monastirsky1-24/+2
... in our xml files, only to plain menu items. Change-Id: I1614a1b31a05e08cf317d2637d64d3e450855fc9
2017-05-18Use WeakComponentImplHelper for MenuBarManagerMaxim Monastirsky2-78/+41
Change-Id: Ia0c47186f5f266d512c02e92d7983872e207f878
2017-05-18Use CommandInfoProvider::GetModuleIdentifierMaxim Monastirsky2-31/+11
Change-Id: I09f23360259e794ab2a0d8ad6d8bf6fc18d08597
2017-05-18Remove the useless AddonMenu and AddonPopupMenuMaxim Monastirsky3-44/+11
Change-Id: I3022d609e813d90e52990b570aa471540c9e2c18
2017-05-18Clean obsolete code from menu document writerMaxim Monastirsky2-15/+1
Remove special handling of New, Wizards, and Addon sub-menus. Many years ago they used to be injected into the menu structure at runtime, so we had to not write their contents back to xml. Now we have a clear separation between the contents of a menu at UNO API level, and the actual contents of the VCL menubar. Change-Id: I5e791e8963faca9f26ad31c9b4e6b8763b70d1d9
2017-05-18Addon items will get their icons in Activate anywayMaxim Monastirsky1-29/+0
(This piece of code is about the "OfficeHelp" feature of Addons.xcu. "AddonMenu" and "OfficeMenuBar" use a different MenuBarManager ctor, which never calls FillMenuManager.) Change-Id: Iab9ac5c606dd23a208de7f99d2883168fd2b588a
2017-05-18Fix AddonMenu iconMaxim Monastirsky3-37/+9
Another victim of tdf#96059. CommandInfoProvider can only handle .uno:Something, not slot:12345. Also, given that we're using the .uno command name, we can just get the label from officecfg, dropping the local framework string resource. Change-Id: Ia0c32bacb67699311f6bbbec0f350321802f75a0
2017-05-17FwkResId and FwlResId are the sameCaolán McNamara16-131/+40
and FWK_RESSTR/.toString can be removed now Change-Id: I7d2d56681fc9be31948bbb4dae737a75cc59d065
2017-05-16loplugin:unusedfields improve write-only analysisNoel Grandin3-7/+1
by whitelisting a couple of methods we know only write to their parameters Change-Id: Id7aef9c03c23d10c27707b21eb9a0db4a6c2757c Reviewed-on: https://gerrit.libreoffice.org/37647 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-14tdf#96444 Shortcuts are saved with non-parsed URLMaxim Monastirsky2-2/+3
MenuBarManager overwrites the item URL with the parsed version. This causes the keyboard shortcuts of style commands to no longer be found on subsequent opening of the menu, because they have spaces, which in the parsed version were replaced with "%20". Change-Id: I80b559203742922f70b7cec54b5a5ae57d3ef7dd
2017-05-14tdf#106999 Feedback for style commandsMaxim Monastirsky5-1/+330
The .uno:StyleApply command takes some arguments, which make it possible to apply any style of any type. The problem is that it doesn't provide toggle state to be used when placing such commands on a toolbar or a menubar. The reason is that sfx2, by design, can provide status updates only for the .uno:StyleApply command as a whole, ignoring any arguments that might be specified in the UI element description. This behavior is even documented in the XDispatch idl. wrt solution, changing the generic UI code to handle the specifics of an individual command can never be a good idea. The usual approach in such cases is to create separate commands which will handle the status updates correctly. This is however not possible in our case because styles can be created by users, and we can't predict their names and create separate commands for all of them (given that now it's easy to add style commands to toolbars and menus - see tdf#106681). One possible solution is to create a toolbar button controller on top of .uno:StyleApply, which will be able to translate its status update to a state compatible with the toolbar. The downside is that it won't work when placing such command inside a menu, and in general the menu code in framework doesn't provide any way to control individual menu items, only a whole sub-menus via a popup menu controller. To fix the menu use-case too, this commit introduces a "proxy" dispatch implementation, which can be used by MenuBarManager in a transparent way, as if it was the "real" application-level dispatcher. This means that the changes needed in MenuBarManager are minimal and do not over-complicate the code, which is a good thing (Alternatively, such dispatcher could be registered via the dispatch interception mechanism, but it will add no gain, given the current requirements, and just add more complexity). And to make it easier to reuse the code, the new dispatcher is also used for the toolbar solution. Change-Id: Ia73b0fa70fd4d1d59360b255aa8fd19570b971ee Reviewed-on: https://gerrit.libreoffice.org/37590 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-05-14Allow destroying old MenuBarManager instancesMaxim Monastirsky1-1/+10
... after dispatch interception change. To reproduce: 1. Open the testdoc of tdf#102355 2. If not under gtk3 - Open several menus or sub menus. 3. Click the "Intercept" button. 4. Tools > Customize.. > Menus, make some change, click OK. Expected that old MenuBarManagers (except the top level) are destructed, and new ones are created. Actually the dtors of MenuBarManagers from step 2 aren't called (but they will be eventually called after closing Writer). The reason we keep active status listening is mainly for Unity's HUD (see my comment in MenuBarManager::Activate). But it assumes that Activate was called for all menus, which is done by GtkSalMenu at application startup, but not after dispatch interception change. Should we fix that, or maybe we can just kill this hack (along with some related code in GtkSalMenu) anytime soon, given that Unity is officially dead? Change-Id: Ia1cb24391b393e31c98355dc91833c7511a17cda Reviewed-on: https://gerrit.libreoffice.org/37589 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-05-14Remove useless m_xContext.is() checkMaxim Monastirsky1-71/+60
Similar to commit 32680923221e1 ("Fix the copy-paste"). The original code was using this to get URLTransformer, but it was later switched to using m_xURLTransformer in ca00697e3dae9 ("CWS-TOOLING: integrate CWS oj18"). Change-Id: I05592915a651a9d8e0fc443f6adeb494704a99d8 Reviewed-on: https://gerrit.libreoffice.org/37588 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-05-12remove unused uno::Reference varsNoel Grandin18-51/+11
found by temporarily marking Reference as SAL_WARN_UNUSED. Change-Id: I18809b62654467f890016adcc92576980ced393b Reviewed-on: https://gerrit.libreoffice.org/37511 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-10Resolves: rhbz#144437 make gnome-documents not crash the whole timeCaolán McNamara1-3/+5
accept that once initted that LibreOffice cannot be deinitted and reinited (without lots of work), but allow the main loop to quit and restart so LOKs thread can run and exit successfully, new LOK connections will restart the main loop. The buckets of global state continues to be valid the whole time this way Change-Id: Ide54c0df2ce4065f7c192ae8c2cedfaaa2b58d72 Reviewed-on: https://gerrit.libreoffice.org/37399 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-09cleanup osl/diagnose.h includesJochen Nitschke1-1/+0
with command > git grep -l osl/diagnose.h *.cxx | xargs grep -L -w 'OSL_\w*' | xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d' headers need more work Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab Reviewed-on: https://gerrit.libreoffice.org/37350 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-09remove unnecessary empty OUString fields and varsNoel Grandin2-15/+13
Change-Id: I940120087a0bc6b1b0abc30a3e7727ce22b7d9a7 Reviewed-on: https://gerrit.libreoffice.org/37394 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08cleanup tools/debug.hxx includesJochen Nitschke2-2/+0
with command > git grep -l tools/debug.hxx | xargs grep -L DBG_ | xargs sed -i '/#include *\(<\|\"\)tools\/debug.hxx.*/d' don't change files in includes/ and */pch Change-Id: Ie429d6a7dca5dfa1073e0f5ba037f7c84bdbec08 Reviewed-on: https://gerrit.libreoffice.org/37349 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-07revert OSL_ASSERT changesChris Sherlock4-6/+6
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07tdf#43157: convert framework module away from OSL_ASSERT to assertChris Sherlock4-6/+6
Change-Id: Iac0093a2a69d53c91c827ebba01fcdb5353e9b96
2017-05-05Fix typosAndrea Gelmini2-2/+2
To complete commit 0ef94e2b559547bc4e906e7f24e57ff5d642e108 and f12096272e684ddcd8ffa4e34dcb0a680cc594c2 Change-Id: Ie86bbfbd58dd728a013bef221e4d5c8fbcaf8e03 Reviewed-on: https://gerrit.libreoffice.org/37199 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-05-05fix spelling, methode -> methodNoel Grandin1-1/+1
Change-Id: I1c7a4e657601e28d9d50d86e24c4e0ba7579b9d4 Reviewed-on: https://gerrit.libreoffice.org/37289 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-03remove empty commentsNoel Grandin2-12/+0
found with: git ls-files | xargs grep -Pzl '/\*\* (\*|\s| )*\*/' Change-Id: I1f47bcb94d5a7b290a6c622c6941195fbb578597 Reviewed-on: https://gerrit.libreoffice.org/37159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-02loplugin:checkunusedparams in frameworkNoel Grandin15-47/+32
Change-Id: I963159550da9d735bb70636917ecc290744298b4 Reviewed-on: https://gerrit.libreoffice.org/37142 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-28loplugin:salunicodeliteral: frameworkStephan Bergmann1-1/+1
Change-Id: I80665b97a7fb278dd9a1e9cc0fc48174ce18b4a9
2017-04-27fwk_services.src doesn't existCaolán McNamara1-3/+0
since 748ed65ffba9d69ed333fd1347c30dd7a3a944b8 Change-Id: Ief2efad17b3f485aeb975257e120ce20e67fb5b8
2017-04-27remove svx bitmaps from .src filesCaolán McNamara2-5/+26
Change-Id: Ie3795870484648e62dea483f9976af31cd1be167 Reviewed-on: https://gerrit.libreoffice.org/37006 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-27Use ToolBox::GetImageSizeMaxim Monastirsky1-6/+1
Change-Id: Iaad0ca0e3957e54f11dfa1687b33b08239451bfb
2017-04-27Fix the copy-pasteMaxim Monastirsky1-5/+3
Use m_xUrlTransformer, and drop the now unneeded m_xContext.is() check. Here is the history of this: - commit ef8f9cfb262a7 (CWS docking1) introduced this code in ToolboxController::execute. - commit a2bbbc5130b80 (CWS docking3) copy-pasted this into GenericToolbarController::execute. - commit 0fc90c8a064f7 (CWS insight02) changed the original code, but not the copy-pasted one. - commit d7afd8e128177 (CWS toolbars2) That CWS didn't have the above change yet, and copy-pasted the old code to yet another place (GenericToolboxController::execute). Change-Id: I7f4e8dfb52b96ea5285ea7b2bb3083847dd84932
2017-04-26remove framework bitmaps from .src filesCaolán McNamara4-22/+23
Change-Id: Iea85517a60874d49cdf60860071f0924b96cbf62 Reviewed-on: https://gerrit.libreoffice.org/36966 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-26use strong_int for LanguageTypeNoel Grandin1-1/+1
Change-Id: If99a944f7032180355da291ad283b4cfcea4f448 Reviewed-on: https://gerrit.libreoffice.org/36629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-25errinf.hxx moved out of tools and into vcl moduleChris Sherlock6-6/+6
ErrorInfo has a hard depency on VCL, yet is in the tools package. It is more appropriate to have it reside in the VCL module. Change-Id: Ica54a46c3a7f86cf0331ed7245234bea69c05650 Reviewed-on: https://gerrit.libreoffice.org/36839 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock2-0/+2
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-23Replace GetImage with CommandInfoProvider::GetImageForCommandMaxim Monastirsky1-14/+2
And move ToolBoxButtonSize->ImageType mapping code to a common place. Change-Id: If158f4b6f2750054fcf64491c2941706e7d3a329
2017-04-23tdf#95845 Use CommandInfoProviderMaxim Monastirsky2-3/+0
And a few unused theUICommandDescription includes. Change-Id: Ic80dbfb91e5e7662723efe0cb4090416994adabd
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky6-6/+0
Uwinapi is discontinued. Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01 Reviewed-on: https://gerrit.libreoffice.org/23198 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
2017-04-21remove some old MSVC workaroundsNoel Grandin5-6/+4
Change-Id: I6abd8aaffb27b3c85df7c0518f7f576be4e32222 Reviewed-on: https://gerrit.libreoffice.org/36660 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-20convert EDynamicMenuType to scoped enumNoel Grandin1-1/+1
and drop unused E_HELPBOOKMARKS Change-Id: I5756ea326bdc1a99f7d6f1ba43baf6aca9f7f2fc Reviewed-on: https://gerrit.libreoffice.org/36728 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-20loplugin:unusedmethodsNoel Grandin5-5/+0
Change-Id: Ib7a9b1b0802ca751da258065e89b412b090bb672 Reviewed-on: https://gerrit.libreoffice.org/36718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-19clang-tidy readability-simplify-boolean-expr in dbaccess..frameworkNoel Grandin5-30/+9
Change-Id: I96e1bd4000f4ade6ccfac53c57653772b249df99 Reviewed-on: https://gerrit.libreoffice.org/36678 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-19remove freshly unused menu support from src filesCaolán McNamara2-1/+1
Change-Id: I038711a0c4d440d452d5b2ae1bfcba5c9305815b Reviewed-on: https://gerrit.libreoffice.org/36646 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-19convert over weird hidden RID_FMSHELL_CONVERSIONMENU use to new .uiCaolán McNamara2-60/+39
Change-Id: I61691a4148c1ff38703bb0d6ad9169242eb09871
2017-04-15Fix typosAndrea Gelmini1-4/+4
Change-Id: I0238202c0dc0380b0e33a9c4567a9513c0afbe91 Reviewed-on: https://gerrit.libreoffice.org/36556 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-14rework POPUPMENU_TOOLBAR_QUICKCUSTOMIZATIONCaolán McNamara3-101/+108
don't create a menu in order to copy certain entries under certain conditions to another menu, just insert the specific entries from more elemental parts Change-Id: I2254753fdc374742422afdb40fed7e78ae5dfbb2