summaryrefslogtreecommitdiff
path: root/vcl/source/app
AgeCommit message (Collapse)AuthorFilesLines
2017-12-19Report more debug information about caught exceptionStephan Bergmann2-6/+41
...in an attempt to track down why various tinderbox builds started to fail CppunitTest_sw_filters_test with an "Uncaught exception during Task::Invoke()!" abort. On IRC, jmux claims that catching exceptions and turning them into abort() here (instead of letting them propagate) is necessary: "The main problem was the wrong state in the scheduler. So something actually handled the exception, but the next caller into the scheduler had an invalid linked list of tasks, breaking things left and right." Change-Id: Ic3365e282404483518652c00160c2036b79991cf Reviewed-on: https://gerrit.libreoffice.org/46450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit ba81ac19b7aec4fd7f07fcec9f6ea6f85d9aaa24) Reviewed-on: https://gerrit.libreoffice.org/46532 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-24don't worry about dangling timers at fuzzer exitCaolán McNamara1-1/+2
Change-Id: I9e18257f7e6e0438c6ce2801c0c2f8885b060870 Reviewed-on: https://gerrit.libreoffice.org/45214 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-18silence some coverity warningsCaolán McNamara1-1/+1
Change-Id: I5a530e37156b5cd36e8a07ac20851880a46f520d Reviewed-on: https://gerrit.libreoffice.org/44875 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-16vcl: StyleSettings - start to unwind code duplication.Michael Meeks1-1/+18
This should be a pure re-factor, plus: switch from Serif -> Sans font default for the UI (wow). enable larger font size for LOK only that avoids a hard to debug svx junit test failure. Change-Id: Id438026064983ea4907819bab55c4be740954605 Reviewed-on: https://gerrit.libreoffice.org/44625 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-11-15loplugin:flatten in vclNoel Grandin1-22/+23
Change-Id: I3527477277a9ae96eaf9fd068232f672da7c28c3 Reviewed-on: https://gerrit.libreoffice.org/44753 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-11vcl: StyleSettings - start to unwind code duplication.Michael Meeks1-0/+13
This should be a pure re-factor, plus headless tweak. Change-Id: Iad7f524ea76625601b3f85cc13a50311ed1de171 Reviewed-on: https://gerrit.libreoffice.org/44624 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-11-09rename AvoidConfig to FuzzingCaolán McNamara2-8/+8
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-07Fix memory leak for skipped Sal user eventsJan-Marek Glogowski1-10/+16
User SalEvents allocate an ImplSVEvent data structure, which must be freed in DispatchUserEvents, if it's skipped. Change-Id: I17874f06a2da996b6546b14dd886061e3e81f35c Reviewed-on: https://gerrit.libreoffice.org/44370 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 McNamara1-16/+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-11-03Replace some lists by vectors (vcl)Julien Nabet1-2/+2
Change-Id: Ic31f4f5a2f44e39ee965e7c3fc6a2246bbb10076 Reviewed-on: https://gerrit.libreoffice.org/44237 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-31ReleaseYieldMutex is always called with trueNoel Grandin1-1/+1
so drop param and rename to ReleaseYieldMutexAll Change-Id: Ic4fcee24d46405659e54363c87f21d88696b0ce1 Reviewed-on: https://gerrit.libreoffice.org/44057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-30loplugin:constantparam in vclNoel Grandin1-3/+3
Change-Id: Ic32e4098dcdae5ca5d7fe2749badedabda86a90d Reviewed-on: https://gerrit.libreoffice.org/44043 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-27loplugin:includeform: vcl (Windows)Stephan Bergmann1-1/+1
Change-Id: I4a0fc4b483069141d2b943079adf5aa741df968e
2017-10-26vcl: make MapMode constructor explicitMichael Stahl1-1/+1
Insert constructor everywhere, except a couple places that apparently want to compare GetMapUnit(). Change-Id: I1910deb60562e5e949203435e827057f70a3f988
2017-10-23loplugin:includeform: vclStephan Bergmann11-71/+71
Change-Id: Id7dea3917740aaf4db8dada5e2bea6e117d714ea
2017-10-22Avoid compiler eliding redundant dynamic_castStephan Bergmann1-1/+1
...from vcl::Window to itself. This relies on vcl::Window deriving solely from OutputDevice. Change-Id: I530108ff41d2c141a88e9ec9d9d6929abc773c0d
2017-10-19tdf#112830 measure test with ApplySettings appliedCaolán McNamara1-11/+1
and don't invalidate on first view Change-Id: I1156c83c0365ef27946cc414cad8dfa07206e5af Reviewed-on: https://gerrit.libreoffice.org/43498 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-13tdf#110742 add support for icon themes via extension managerCaolán McNamara2-25/+44
Change-Id: Ic33c086ef67cdcb634d9f03f84799c234fe3beec Reviewed-on: https://gerrit.libreoffice.org/43341 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-09tdf#112931 always signal AllUserEventsProcessedJan-Marek Glogowski1-9/+19
If the last user event triggers a nested event loop, there is no event in the nested loop, but AllUserEventsProcessed will not be signaled, resulting in a busy loop in the gtk backend. So just always signal AllUserEventsProcessed, if it was not yet signaled. While at it catch and std::abort on uncaught exceptions and fix the default to have been signaled, so we won't signal on an empty list on first run. Change-Id: I480da906d87d3b95ba30b4c18420d2e20ffb5b2e Reviewed-on: https://gerrit.libreoffice.org/43282 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-10-06Process all pending events during Cppunit setUpJan-Marek Glogowski1-1/+2
Larger unit tests collect a lot of events, which are just processed on shutdown. But since the Scheduler is just an unsorted linked list, processing these in order is O(n^2) for lookup, which really adds up, e.g. sw_ooxmlexport8 has 35047 tasks on shutdown. So this just processes all pending events before running each unit test. Also adds missing spellchecking components to some calc tests. Change-Id: Icf12146015afc17a1f52f79c18f248b72650ad46 Reviewed-on: https://gerrit.libreoffice.org/43199 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-10-06KDE update system loop integrationJan-Marek Glogowski1-0/+1
This updates the system loop integration to be on par with the other backends. This includes: 1. Process LO user events before other LO events 2. Correctly handle elapsed QTimer events 3. Don't wait-yield in the main thread from a non-main thread Change-Id: Ia17be032ae39dc4c7bfa44cadd22d85a1b9c4fbd Reviewed-on: https://gerrit.libreoffice.org/43198 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin3-5/+4
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-03Resolves: tdf#112827 gtk3 menubar not RTL under RTL localesCaolán McNamara1-4/+1
Change-Id: Icb2fa621e1f7da1e2d4bd221c8e1d8677cc956a2 Reviewed-on: https://gerrit.libreoffice.org/43057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-02tdf#112769 Don't multi-trigger AllEventsProcessedJan-Marek Glogowski1-5/+12
User events processing - as all event processing - can be nested, which can cause TriggerAllUserEventsProcessed to be called multiple times, when a nested event loops ends. So track TriggerAllUserEventsProcessed calls and just reset, if a new event was inserted. Change-Id: I4a1b1b08901c99a7ece08f8baf008c8bb73506bf Reviewed-on: https://gerrit.libreoffice.org/43043 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-10-02Add IDialogRenderable interface for rendering of dialogsTomaž Vajngerl1-0/+22
Change-Id: I1d85729a1ac1a99d33ea2bde1b50ccf4c05ca9a9
2017-10-02move ITileRenderable implementation to own fileTomaž Vajngerl1-0/+22
Change-Id: Ib05ecf5f92e0ae4adf99c4dd10d60e730a95cf45
2017-09-30Use explicit function names for fooA/fooW WinAPI; prefer fooWMike Kaganski1-16/+16
We should only use generic foo function name when it takes params that are also dependent on UNICODE define, like LoadCursor( nullptr, IDC_ARROW ) where IDC_ARROW is defined in MSVC headers synchronised with LoadCursor definition. We should always use Unicode API for any file paths operations, because otherwise we will get "?" for any character in path that is not in current non-unicode codepage, which will result in failed file operations. Change-Id: I3a7f453ca0f893002d8a9764318919709fd8b633 Reviewed-on: https://gerrit.libreoffice.org/42935 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-30Access to ProcessEventsToSignal's bSignal is racyStephan Bergmann1-5/+0
...so spell out its single use, locking the appropriate mutex around the access Change-Id: I8e8f47de1979f5a80cf1ad65e5ec24d25145c463 Reviewed-on: https://gerrit.libreoffice.org/42908 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-28Unify SalUserEvent handlingJan-Marek Glogowski1-0/+119
Merges the various SalUserEvent structs and their handling into a single class. This includes a common SalFrame* hash map, as all backends use such a map to verify alive SalFrames. It also reverts the "FIXME: lousy workaround" for i#90083, which was part of commit d6f7c94e5c27ba02ff5c3229760c9808cc9b5bea. At least on my current OSX box application based window switching "just works" "out of the box", even without the code. Change-Id: I188b567e44fd79c162b2d9cabbd771d1f66c7dc4 Reviewed-on: https://gerrit.libreoffice.org/42845 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-27loplugin:flatten in vcl..xmlsecurityNoel Grandin1-8/+2
Change-Id: I730fc0b3b6b7ac1803d75b5d9e007b15395888c6 Reviewed-on: https://gerrit.libreoffice.org/42826 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-26tdf#112288 Clarify Reschedule implementationsJan-Marek Glogowski1-2/+3
Application::Reschedule(true) must just process all currently pending events and ignore all new events generated while processing them. In contrast to Scheduler::ProcessEventsToIdle, this way it can't busy-lock the application with background jobs. This way we also can drop nMaxEvents from the Windows backend. This limit was also never implemented on OSX and for the KDE4 backend it's actually impossible to handle single events, and a call to QAbstractEventDispatcher::processEvents works like this. Also changes various call sites to just process all pending events instead of some made up number of times. Change-Id: I1ab95df89b079cc8c6319a808194fe3127144d1c Reviewed-on: https://gerrit.libreoffice.org/42659 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-26WIN run main thread redirects ignoring SolarMutexJan-Marek Glogowski1-28/+6
This way we can drop all the special nReleased handling. Instead we use the same mechanism as on Mac, where we keep the lock, but disable it for the main thread. As a security measure we assert on duplicate redirects, which should not happen. As a result we can't use SendMessage on the main thread itself, which would normally just call the WinProc directly. This could be accomplished by converting the redirect bool into a counter, which should be safe, as no other thread could acquire the SolarMutex, as we don't release it. Change-Id: Icd87b3da37a2489f3cad2bc80215bf93fc41d388 Reviewed-on: https://gerrit.libreoffice.org/42583 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-25Disable Scheduler shutdown assertionJan-Marek Glogowski1-1/+1
This currently kills 50% of Windows Jenkins build, which I can't reproduce. So disable the assertion while looking for a real solution. Change-Id: Ic03787893b6a970b608e3e8bdd3247f4664be40e
2017-09-25Different take on tdf#108406: exclude helpimg from installed themesKatarina Behrens1-0/+6
as it still might get selected as default theme under some circumstances and removing it from list in optgdlg.cxx leads to crash This reverts commit 60adba3fb904ed66251ff39c82fe20bec151ef0b but allegedly still crashes on Debian Change-Id: Ib853cc27058d8635482f19a8db26075d64103e1b Reviewed-on: https://gerrit.libreoffice.org/42545 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-22vcl: [loplugin:badstatics] aInstanceMichael Stahl1-0/+1
Move this to struct ImplSVWinData, which is deleted on shutdown. Change-Id: Ie604c2105f1176858b4050fb34d37cf376f8f82a Reviewed-on: https://gerrit.libreoffice.org/42631 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-21Ignore AquaBlinker on Scheduler shutdownJan-Marek Glogowski1-0/+1
Change-Id: If107d2ac01b7be91be34ff753b52f307a6e10f58
2017-09-21Workaround static Task destruction errorJan-Marek Glogowski1-3/+11
A task has to get the SchedulerLock to remove itself from the Scheduler list. This doesn't work, if the Task is static, as the static Scheduler might be destroyed earlier. In this case we fail with the following backtrace: #0 SchedulerMutex::acquire #1 Task::~Task #2 __run_exit_handlers Thanks to Michael Stahl to catching this backtrace. As a workaround this marks static tasks, so they ignore the SchedulerMutex in the destructor, We also mark all scheduled Tasks as "static" in DeInitScheduler, as their cleanup was already done. In the end all Tasks should be removed from static objects. Change-Id: I38be3206378b9449193efaccbc96896ac8de9478 Reviewed-on: https://gerrit.libreoffice.org/42574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-20Ignore DrawWorkStartupTimer on Scheduler shutdownJan-Marek Glogowski1-0/+1
Change-Id: Ia0cf4311b42dfa170ce429a958a26afd9c70ff0c
2017-09-19Assert active Tasks on scheduler de-initJan-Marek Glogowski2-3/+58
This shuts down the VCL scheduler later in the DeInitVCL call and asserts active pending tasks, as these will never be processed after shutdown. There is currently a TODO whitelist, so the unit tests still pass but probably most of these should be fixed. No task in the list looks critical - all seem to do some idle / cleanup work. This also processes all the Idles before shutdown. All seem to be of type sfx::SfxItemDisruptor_Impl. Change-Id: I9cc484a525cc2bacd54c4f271f86997517393e92 Reviewed-on: https://gerrit.libreoffice.org/40533 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-19Unify SolarMutex implementationsJan-Marek Glogowski2-4/+4
All backends implement the SolarMutex in mostly the same way. So this consolidates this code into a GenericSolarMutex. We still need the abstract SolarMutex class for the fake AKA fascade implementation in dbaccess. The patch also replaces various places of direct mutex usage with either SolarMutexGuard or SolarMutexReleaser objects. Change-Id: Ia0146dd6c51a3b9a513cc6af34a66def58aad831 Reviewed-on: https://gerrit.libreoffice.org/42325 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-14clang-tidy modernize-use-emplace in vclNoel Grandin2-3/+3
Change-Id: Ie0a6d105b0167431275e628935df4f4c1a36d070 Reviewed-on: https://gerrit.libreoffice.org/42259 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-11Translate German comments/debug strings (leftovers in dirs vbahelper and vcl)Johnny_M1-1/+1
Translates leftovers found using a custom regex. Additionally: - Translated the "SGV Fonts for StarView" INI file parameter group in vcl/source/filter/sgf.ini and .../sgvtext.cxx Change-Id: I1360aac1a2f3fa825f86d77ac1b05e2de9ffb007 Reviewed-on: https://gerrit.libreoffice.org/42145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-06Rename wrong name of vars in auto loopJulien Nabet1-29/+29
My commit https://cgit.freedesktop.org/libreoffice/core/commit/?id=8c7b42c942d6693915dc825ede80279f720a5775 was wrong for some variable names, var in for loops aren't iterators on objects but objects Change-Id: I13484e5faa50aa8585231661846afa007b7a6eab Reviewed-on: https://gerrit.libreoffice.org/42026 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-04loplugin:unnecessaryparen include c++ castsNoel Grandin2-5/+5
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-02Just remove an unused variable, no need to keep it commented-outTor Lillqvist1-2/+0
Change-Id: I9719013074413c98f6557c2ef9605838d32855d2
2017-09-02MAC, remove build breaker in session.cxxjan Iversen1-1/+1
commented out unused variable, to allow mac to build. Change-Id: Ibc9f7418f402f4646cd68dd434597b3c1bee53df
2017-09-02Replace list by vector session.cxx (vcl)Julien Nabet1-52/+42
+ simplify loops Change-Id: Ic25576db83fe47f7da45667912d24d8ec44494e1 Reviewed-on: https://gerrit.libreoffice.org/41803 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-29Avoid deadlock under --enable-debugStephan Bergmann1-11/+2
...as seen during JunitTest_sc_unoapi_2 in an --enable-dbgutil build, where thread 1 owns the SolarMutex and tries to acquire the scheduler mutex while thread 7 owns the scheduler mutex and tries to re-acquire the SolarMutex. Keep the SAL_WARN output about unprocessed idles just in case somebody considers it useful (but it needs to be taken with a grain of salt, of course). Change-Id: Ib83d02876dc0d3b3b9a4c08581edf9c378fc911b
2017-08-25coverity#1416668 Uncaught exceptionCaolán McNamara1-9/+16
Change-Id: Ibc2be8fe44295a8ea08105549448609e00262740 Reviewed-on: https://gerrit.libreoffice.org/41560 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-25Drop gratuitous initial :: from comphelper::ProfileZoneTor Lillqvist1-1/+1
Change-Id: Iae7d86b857d0563d9ed9d9b4187e009554698412