summaryrefslogtreecommitdiff
path: root/framework
AgeCommit message (Collapse)Author
2017-07-04loplugin:unusedfields in frameworkNoel Grandin
Change-Id: Ibb602e037bcee518c31dfe9734a5c5773cff23ab Reviewed-on: https://gerrit.libreoffice.org/39492 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03C++11 remove std::unary_function bases from functorsJochen Nitschke
std::unary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::unary_function base class was used in 3 places: * chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole is used in a std::not1 function helper who uses the members return_type and argument_type. - replace deprecated std::not1 with a lambda * chart2/source/tools/ModifyListenerHelper.cxx: lcl_weakReferenceToSame used the argument_type member in the operator() parameter. - inline the parameter type. * xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement used result_type and argument_type in operator(). - inline the types Also fix compile error with gcc about finding std::for_each. Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f Reviewed-on: https://gerrit.libreoffice.org/39358 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-03Fix typosAndrea Gelmini
Change-Id: Iaf63c488f895c446bb54119d8c9f15e0adcd1eff Reviewed-on: https://gerrit.libreoffice.org/39454 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-07-02loplugin:casttovoid: frameworkStephan Bergmann
Change-Id: I9e111f06520019ac87fbb55a9ca813fb97e6ed3a
2017-07-02notify the clipboard terminate listener before any other terminate listenerMarkus Mohrhard
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>
2017-06-26s/catched/caughtNoel Grandin
Change-Id: I7ea6977a9749e86f8058b78cdb91cd2c62da8264 Reviewed-on: https://gerrit.libreoffice.org/39164 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-25loplugin:oncevar in formula..frameworkNoel Grandin
Change-Id: I96d6af49c1994ebd7d6dcc41469127e3151b4350 Reviewed-on: https://gerrit.libreoffice.org/39186 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23simplify some string handling in tracing callsNoel Grandin
Change-Id: I0fb76562429e691400a02216019c7f96791cf9b3 Reviewed-on: https://gerrit.libreoffice.org/39159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23loplugin:unusedfields in forms..idlcNoel Grandin
Change-Id: If250ff47c1f375fe24c61b5bf271da9a9c330822 Reviewed-on: https://gerrit.libreoffice.org/39133 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21convert ErrCode to strong typedefNoel Grandin
would have preferred to re-use o3tl::strong_int, of which this is a modified copy, but there are lots of convenience accessors which are nice to define on the class. Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a Reviewed-on: https://gerrit.libreoffice.org/38497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-18remove unused osl/mutex.hxx includesJochen Nitschke
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb Reviewed-on: https://gerrit.libreoffice.org/38905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-16Profiling API: add ProfileZonesLászló Németh
Change-Id: Ie5669bd75d9b4be047d98402cb69ac313ab618df Reviewed-on: https://gerrit.libreoffice.org/38787 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-15Fix typosAndrea Gelmini
Change-Id: Iea1f82e95c37bdf778941a568d61f17f179f838d Reviewed-on: https://gerrit.libreoffice.org/38795 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-06-15fix bug in MenuBarManager::FillMenuManagerNoel Grandin
which appears to have been there since this function was created in commit 635d8b5b0c2152efb80694bb27fa8df9487b108d Author: Kurt Zenker <kz@openoffice.org> Date: Wed Feb 25 16:51:59 2004 +0000 INTEGRATION: CWS layoutmanager (1.1.2); FILE ADDED Change-Id: I117241152e99f1ee6ec33e32f8fdc63ae7c87043 Reviewed-on: https://gerrit.libreoffice.org/38791 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-14use ERRCODE_NONE instead of 0Noel Grandin
peeling off a small chunk of my ErrCode strong_int conversion Change-Id: Idc89e8496083beed7608cba705cd981139eb7111 Reviewed-on: https://gerrit.libreoffice.org/38777 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12cleanup unused css/frame/* includesJochen Nitschke
Change-Id: I173a29fd1ee889127369d2bc2fce8e010b89ca65 Reviewed-on: https://gerrit.libreoffice.org/38633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-08framework: replace double checked locking patternsJochen Nitschke
with thread safe local statics. Change-Id: I660f6a899d1821bab627ed4972c4fc0d40610de2 Reviewed-on: https://gerrit.libreoffice.org/38541 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-08framework: remove unused macrosJochen Nitschke
Change-Id: I10589a17b9c01998a54328ea290983de72067f5e Reviewed-on: https://gerrit.libreoffice.org/38540 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-08framework: cleanup xserviceinfo.hxx includesJochen Nitschke
Change-Id: Ie5addc277fd47663726199dd7b94fb7299aa4d9c Reviewed-on: https://gerrit.libreoffice.org/38539 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-08framework: cleanup xinterface.hxx includesJochen Nitschke
Change-Id: I66b27e623e411c9ba9c5ba17c46c052336d031b8 Reviewed-on: https://gerrit.libreoffice.org/38503 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-07framework: cleanup xtypeprovider.hxx includesJochen Nitschke
LayoutManager uses macro impl from comphelper, so use declarations from comphelper too. Change-Id: I638492849742782d48c3bb5439c2255e72f9f694 Reviewed-on: https://gerrit.libreoffice.org/38496 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-05spelling instanciate -> instantiateNoel Grandin
Change-Id: Ic1393da64328c0dc7e2860334b204139bf537d81 Reviewed-on: https://gerrit.libreoffice.org/38401 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-02Improved loplugin:redundantcast static_cast handling: frameworkStephan Bergmann
Change-Id: I3b4fa47a14a68edcdd3305787685531b0a760ab2
2017-06-01Fix typosAndrea Gelmini
Change-Id: I3cd50e374c45bc1c400b24c8fffd6d8f5cd1de56 Reviewed-on: https://gerrit.libreoffice.org/38208 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-05-30teach redundantcast plugin about functional castsNoel Grandin
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0 Reviewed-on: https://gerrit.libreoffice.org/37910 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-28remove unnecessary use of OString::getStrNoel Grandin
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-28cleanup unused css/linguistic2/ includesJochen Nitschke
Change-Id: Ifd4b495f965f948d37557d83a03a38df9322039a Reviewed-on: https://gerrit.libreoffice.org/38109 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-20cleanup unused css/uri/ includesJochen Nitschke
Change-Id: I08c7981ecce45e343ff9e98277dd3aea4ed68ab9 Reviewed-on: https://gerrit.libreoffice.org/37860 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-20Translate German comments and debug strings (leftovers in f... dirs)Johnny_M
Translates all (leftovers) found using a custom regex, in directories not shown by /bin/find-german-comments and beginning with "f". Additionally: - Fixed translation in formula/source/ui/dlg/funcutl.cxx (translated in https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=5e04331fc0a6434c61d3d18843cb4f80a44e5989 ), because clearing an event is quite the opposite of its triggering. Change-Id: I0fd62193a29883796cd05e5a80ce8a2900636b6c Reviewed-on: https://gerrit.libreoffice.org/37839 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-05-19loplugin:stringcopy: frameworkStephan Bergmann
Change-Id: Id63d99bc5048cfdffc834cf034f078d783ca95dc
2017-05-19loplugin:unusedfieldsNoel Grandin
make it a little smarter in dealing with fields that are smart pointers Change-Id: I44072105170882dc29fb19558f1065cffc7e5f11 Reviewed-on: https://gerrit.libreoffice.org/37751 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-18SVT_RESSTR can go nowCaolán McNamara
Change-Id: I641fbea510d56cabb440f894aae938430ce30ce0
2017-05-18Revert "Popup menu controllers never attached to empty menus"Maxim Monastirsky
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 Monastirsky
Change-Id: I9d6a8c541da3bfeb1fddbf8aa3c9cef6e37cc917
2017-05-18Popup menu controllers never attached to empty menusMaxim Monastirsky
... in our xml files, only to plain menu items. Change-Id: I1614a1b31a05e08cf317d2637d64d3e450855fc9
2017-05-18Use WeakComponentImplHelper for MenuBarManagerMaxim Monastirsky
Change-Id: Ia0c47186f5f266d512c02e92d7983872e207f878
2017-05-18Use CommandInfoProvider::GetModuleIdentifierMaxim Monastirsky
Change-Id: I09f23360259e794ab2a0d8ad6d8bf6fc18d08597
2017-05-18Remove the useless AddonMenu and AddonPopupMenuMaxim Monastirsky
Change-Id: I3022d609e813d90e52990b570aa471540c9e2c18
2017-05-18Clean obsolete code from menu document writerMaxim Monastirsky
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 Monastirsky
(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 Monastirsky
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 McNamara
and FWK_RESSTR/.toString can be removed now Change-Id: I7d2d56681fc9be31948bbb4dae737a75cc59d065
2017-05-16loplugin:unusedfields improve write-only analysisNoel Grandin
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 Monastirsky
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 Monastirsky
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 Monastirsky
... 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 Monastirsky
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 Grandin
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 McNamara
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 Nitschke
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>