summaryrefslogtreecommitdiff
path: root/framework/source
AgeCommit message (Collapse)AuthorFilesLines
2017-11-09new loplugin simplifydynamiccastNoel Grandin1-2/+2
simplify dynamic_cast followed by static_cast Change-Id: I965afcf05d1675094cfde53d3590a0fd00f26279 Reviewed-on: https://gerrit.libreoffice.org/44460 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-09rename AvoidConfig to FuzzingCaolán McNamara2-2/+2
cause that's what its really used for and a couple of cases are not specifically about avoiding config but avoiding uninteresting disk acccess and what not Change-Id: I4c6454f98388579fcd0bf9798321d30408ab65ee Reviewed-on: https://gerrit.libreoffice.org/44491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-04Related: tdf#113160 set parent of warning dialogs during loadCaolán McNamara1-8/+23
to the new window frame being constructed that (may) contain the progress bar, that way such modal dialogs affect the loading document window and not whatever window happens to be active Change-Id: I1c7d3185e47fa316eef003b80d18b31d341b79d6 Reviewed-on: https://gerrit.libreoffice.org/44269 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-03Resolves: tdf#113160 changing all warning dialogs to non-modal is unsafeCaolán McNamara2-13/+0
existing code doesn't expect that so stuff crashes partial revert of... commit db6b703d391838c481fd090065f6d329edcd4efa Date: Thu Aug 24 18:32:38 2017 +0200 Allow non-modal Dialogs during FileImport/Load Change-Id: I152feb849186cf035664a700d3f94ee049cdf6d3 Reviewed-on: https://gerrit.libreoffice.org/44227 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-31loplugin:constantparam in f*Noel Grandin3-18/+5
Change-Id: I87145db3af6c3eb180cea6b4244f98b00205a306 Reviewed-on: https://gerrit.libreoffice.org/44095 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-26vcl: make MapMode constructor explicitMichael Stahl3-3/+3
Insert constructor everywhere, except a couple places that apparently want to compare GetMapUnit(). Change-Id: I1910deb60562e5e949203435e827057f70a3f988
2017-10-26More loplugin:unnecessaryparenStephan Bergmann3-5/+5
81892b2037453108b9bde1512a500cf3b2ce438a "loplugin:unnecessaryparen when compiling as C++17, so the ParenExpr is no longer hidden behind ExprWithCleanups/CXXConstructExpr/MaterializedTemporaryExpr wrappers" gave me the idea to generally look though IgnoreImplicit instead of IngoreImpCasts in loplugin:unnecessaryparen. However, that would still not look through implicit CXXConstructExpr, so would still not have found the occurrences in 81892b2037453108b9bde1512a500cf3b2ce438a when compiling in pre-C++17 mode. Therefore, let ignoreAllImplicit also look through CXXConstructExpr. (I am not entirely sure in which situations non-implicit CXXConstructExpr---that should thus not be ignored---would occur, but assume they would be underneath something like a CXXFunctionalCastExpr, which is not ignored.) Change-Id: I947d08742e1809150ecc34a7abe84cca5e0ce843
2017-10-23loplugin:includeform: frameworkStephan Bergmann46-61/+61
Change-Id: Ib5eaab06ff0cc1b44db9e4057ab349a0990af14d
2017-10-23overload std::hash for OUString and OStringNoel Grandin19-34/+26
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-21tdf#113295 Fix typo in translation domain nameGabor Kelemen1-1/+1
The translations for the framework module go to fwk.mo files. This change will make LO look for them in the correct file name. Change-Id: Icca662bbdd6693a31f1acce59fbac77bdd36ae5f Reviewed-on: https://gerrit.libreoffice.org/43624 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2017-10-16tdf#79657 Support add-on controls in the overflow toolbarMaxim Monastirsky2-0/+6
Change-Id: Idf76887a49561475587329c304329007034610a1 Reviewed-on: https://gerrit.libreoffice.org/43436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-10-06Related: tdf#107569 Remove useless slotsMaxim Monastirsky1-12/+5
With the current implementation of MenuBarManager, there is no need to have sdi slots for menu items with submenus, and moreover they have no effect at all. Note that SID_PICKLIST was also (mis)used as an argument to avoid adding a document to the recent list (which isn't related to its mapping to .uno:PickList). But there seem to be only read attempts, nothing actually sets it, so I think this usage can be removed too. (For information, at least in OOo 1.0.3 sources, there were 2 places where it was used as an argument for SID_SAVEASDOC, although it was not present there in the SID_SAVEASDOC def. in sfx.sdi.) Change-Id: I18b0afe106f858406e13188bbc004ac99a3a0246 Reviewed-on: https://gerrit.libreoffice.org/43184 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-10-05tdf#96505 Get rid of cargo cult long integer literalsudareechk1-1/+1
toolbarsmenucontrollers.cxx file Change-Id: I25a842c2be3c6edbc8c0644e78cf36a9e45176a7 Reviewed-on: https://gerrit.libreoffice.org/42561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-10-05Rename and move SAL_U/W to o3tl::toU/WMike Kaganski1-2/+3
Previosly (since commit 9ac98e6e3488e434bf4864ecfb13a121784f640b) it was expected to gradually remove SAL_U/W usage in Windows code by replacing with reinterpret_cast or changing to some bettertypes. But as it's useful to make use of fact that LibreOffice and Windows use compatible representation of strings, this commit puts these functions to a better-suited o3tl, and recommends that the functions be consistently used throughout Windows-specific code to reflect the compatibility and keep the casts safe. Change-Id: I2f7c65606d0e2d0c01a00f08812bb4ab7659c5f6 Reviewed-on: https://gerrit.libreoffice.org/43150 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin5-9/+8
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-03Replace more reinterpret_cast with SAL_W/SAL_UMike Kaganski1-4/+3
Change-Id: Ia632e4083222ad9e7f17c2ad0d0825f189c700cc Reviewed-on: https://gerrit.libreoffice.org/43071 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-03framework, lok: It's okay to have valid non-existent user inst. pathPranav Kant1-1/+5
Change-Id: I3b9f00adb76fc702e1847d9fab866b7796cfd942 Reviewed-on: https://gerrit.libreoffice.org/43061 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-03new loplugin:blockblockNoel Grandin2-19/+17
Change-Id: I7b68b70fa4c7234e8882f7627026959a596968fd Reviewed-on: https://gerrit.libreoffice.org/43025 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-01throw more useful uno::Exception'sNoel Grandin1-2/+2
if we're going to throw the base class of the exception hierarchy, we can at least put a useful message in there to make the source a little bit easier to locate. Change-Id: I2f3106c99ba25125eacef8fa77e2f3a2c89f2566 Reviewed-on: https://gerrit.libreoffice.org/42968 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-01Wayland: Make the shapes popup work in the overflow toolbarMaxim Monastirsky5-38/+47
Was failing to show, with this warning: Gdk-WARNING **: Tried to map a popup with a non-top most parent To make it work, needed to implement a way to pass as extra "ParentWindow" property to the ui element. It's documented in the XUIElementFactory idl, but was not used by the framework impl. Change-Id: Ifea24fc333709478634f70230699963e952e9157 Reviewed-on: https://gerrit.libreoffice.org/42937 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-09-29loplugin:flatten check for throw in then clauseNoel Grandin7-179/+148
also make the plugin ignore the case where we have var decl's in the clause we want to flatten, which could lead to problematic extension of variable lifetime Change-Id: I3061f7104e8c6a460bf74f5eac325a516ec50c59 Reviewed-on: https://gerrit.libreoffice.org/42889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-27loplugin:flatten in variousNoel Grandin6-218/+185
Change-Id: I42dca691ffadbddad38a7e8f978b1da9d5d9a7b0 Reviewed-on: https://gerrit.libreoffice.org/42842 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-27tdf#112646 Flush the clipboard holding SolarMutexJan-Marek Glogowski1-4/+5
It seems Desktop::terminate can be called with or without the SolarMutex. So make sure we actually hold the mutex to release it correctly when flushing the clipboard on termination. Change-Id: Ie42daf5dba0f4208318a8c1fe463cd3a80dd9141 Reviewed-on: https://gerrit.libreoffice.org/42802 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2017-09-25Fix typosAndrea Gelmini2-2/+2
Change-Id: I879a52820d78d9151ef64dd21612379f617f66e2 Reviewed-on: https://gerrit.libreoffice.org/42726 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-09-25tdf#83320 Hide vertical text commands earlyMaxim Monastirsky1-5/+1
Instead of listing all commands in one big "if", just do it unconditionally in the shared controller. Change-Id: Ie415c4551a77ca8e1e29e73c0dabaff1dd13cbcb Reviewed-on: https://gerrit.libreoffice.org/42715 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-09-22loplugin:flatten in filter..i18npoolNoel Grandin7-241/+215
Change-Id: I9024b8b614a4de83a4d927e1918f6d4904a7fccb Reviewed-on: https://gerrit.libreoffice.org/42592 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-21Rename GetSelectEntry -> GetSelectedEntrySamuel Mehrbrodt1-1/+1
Change-Id: Ibb7d8c59c0e61b0e87455bd78f241d8691dd9dce Reviewed-on: https://gerrit.libreoffice.org/42282 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-20unused m_aModuleIdentifier in StatusBarManagerNoel Grandin1-6/+6
Change-Id: I1f8260fd148b694337ea0440eb2edde4753b34c1
2017-09-20unused m_aModuleIdentifier in UIConfigurationManagerNoel Grandin1-2/+1
Change-Id: Idd4ced156201e81ee818d4b6b69e6c4d254f3387
2017-09-19unused m_xLastFrame in DesktopNoel Grandin1-4/+2
sinice commit abf3022d6378deb71946d644de92d26c73515ac2 Date: Wed Jul 31 10:03:28 2002 +0000 #101886# roll it back temp. Change-Id: If1058c0130d1a2c68bc041a3f7433df87effc0e4
2017-09-18unused menu extension supplier stuffNoel Grandin2-79/+0
since commit 5298b1b32d90002be8d09fe82955550c18eae8bc Date: Mon Aug 8 11:48:55 2011 +0100 callcatcher: ditch some more methods Change-Id: I123081cbe7fe351ce6613a5e7491b11e133d1d29
2017-09-14improve redundantcast lopluginNoel Grandin1-2/+2
to find c-style casts where the expression is a templated method Change-Id: Ifbd1e2cdc72d906fc95a7ec0f9408c3f6d2a836b Reviewed-on: https://gerrit.libreoffice.org/42275 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-11clang-tidy modernize-use-emplace in editeng..frameworkNoel Grandin2-15/+15
Change-Id: I7739c4f77c856d34f8484754244df13d8fef840e Reviewed-on: https://gerrit.libreoffice.org/42151 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-11tdf#46037: Replace ConfigurationHelper with new configuration APIIvan Safonov1-167/+105
Remove all occurences of ConfigurationHelper in /framework/source/services/autorecovery.cxx. com.sun.star.configuration.ConfigurationAccess used only to receive configuration updates. In the second version of the patch corrected the indentation and fdo replaced with tdf in the patch title. comphelper::ConfigurationChanges::create returns shared_ptr, using unique_ptr can result in bugs. Also rebase this patch. Change-Id: I27d34dd4d4b59e2e9cc701d4726bcd7f5fb45b3c Reviewed-on: https://gerrit.libreoffice.org/41477 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-05Drop lazywrite property, which is silently ignored by configmgr anywayStephan Bergmann2-4/+2
...at least ever since the "new" configmgr reimplementation, 6b849a6aeeb9ea8b1e25e28d5a8be390e425f84e "#i101955# initial work in progress of a configmgr reimplementation (for now in an extra module 'configmgr2')" et al Change-Id: I43430d991647fb2e26762463d51175247db0604b
2017-09-04loplugin:unnecessaryparen include c++ castsNoel Grandin17-41/+41
Change-Id: I132d3c66f0562e2c37a02eaf4c168d06c2b473eb Reviewed-on: https://gerrit.libreoffice.org/41874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-02use more ErrCode.IsWarning()Noel Grandin2-2/+2
Change-Id: I92a84cbe3d9a9e794d3e875c60d8db7cb40ae5bd Reviewed-on: https://gerrit.libreoffice.org/41827 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-01Replace list by vector in substitutepathvars (framework)Julien Nabet1-2/+2
Change-Id: I40cfc4925f14ebdc6f7b01274d2d60149008b426 Reviewed-on: https://gerrit.libreoffice.org/41800 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-08-25Drop gratuitous initial :: from comphelper::ProfileZoneTor Lillqvist2-2/+2
Change-Id: Iae7d86b857d0563d9ed9d9b4187e009554698412
2017-08-25Allow non-modal Dialogs during FileImport/LoadArmin Le Grand2-0/+13
When opening a file that triggers Dialogs (e.g. cannot read/repair/FileType) the Frame from which it was initialized gets blocked. This irritates quite some people. Changed this to a non-modal Dialog so that the user can continue to work with all opened docs, open new ones, close and print/PDF/export these. Change-Id: I048d3de3369527cec20d26396b87439254764b8a Reviewed-on: https://gerrit.libreoffice.org/41534 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2017-08-24loplugin:useuniqueptr in frameworkNoel Grandin3-25/+9
Change-Id: I89bcfaa605251912bd1f979b38f12e983dcaf76e Reviewed-on: https://gerrit.libreoffice.org/41512 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-23convert message box style bits to scoped enumNoel Grandin1-1/+1
and fix harmless bug in ImpSVGDialog::ImpSVGDialog, which there since commit 6456f1d81090dd5fe44455c09ae3ede7ec6ac38a Date: Fri Feb 4 14:52:54 2011 +0100 ka102: added/removed files for SVG import and module cleanup Change-Id: I66b2ec2b029431ab453e54e962863e4ed7d78962 Reviewed-on: https://gerrit.libreoffice.org/41412 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-22Add some exception messages to the removeSettings methodMuhammet Kara2-8/+20
in UIConfigurationManager and ModuleUIConfigurationManager Change-Id: I82c5369dc43dc8ccd9be62acaf327a39f3b4d68f Reviewed-on: https://gerrit.libreoffice.org/41403 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-22Really run the layouter every 50msJan-Marek Glogowski1-6/+5
By Start()-ing the Idle, it's always reset, so with fast resizes you could actually postpone layouting indefinitly. Change-Id: Ie90b6f3f378ee8d163f621fce51280e09c826f14
2017-08-19convert extended WinBits to scoped enumNoel Grandin2-3/+3
Change-Id: If35f4fcda2415c858ba8f963e9f471c87169bc99 Reviewed-on: https://gerrit.libreoffice.org/41301 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-18loplugin:unnecessaryparenNoel Grandin1-1/+1
look for statements like return (function()); Change-Id: I906cf2183489f87225b99b987caca67e39b26cc3 Reviewed-on: https://gerrit.libreoffice.org/41260 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-18Fix typosAndrea Gelmini2-2/+2
Change-Id: If13c1408a3e597c6f9b21d209722ef6bc87c0c94 Reviewed-on: https://gerrit.libreoffice.org/41270 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-08-17remove unnecessary use of OUString::getStrNoel Grandin1-2/+2
Change-Id: I3d13e1c0bb6aa4a7aacc463198747c1368ebc9b4 Reviewed-on: https://gerrit.libreoffice.org/38114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11convert std::map::insert to std::map::emplace IINoel Grandin2-6/+4
Change-Id: Ief8bd59c903625ba65b75114b7b52c3b7ecbd331 Reviewed-on: https://gerrit.libreoffice.org/41019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11convert std::map::insert to std::map::emplaceNoel Grandin19-49/+46
which is considerably less verbose Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b Reviewed-on: https://gerrit.libreoffice.org/40978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>