summaryrefslogtreecommitdiffstats
path: root/include/vcl/svapp.hxx
Commit message (Collapse)AuthorAgeFilesLines
* replace Application::GetMainThreadIdentifier to Application::IsMainThreadAndras Timar2018-11-061-10/+10
| | | | | | | Change-Id: I2b9ea77b48673af3575a3142feea5bed84f75d74 Reviewed-on: https://gerrit.libreoffice.org/62950 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins
* only vcl and toolkit need to use [G|S]etUnoWrapperCaolán McNamara2018-10-141-17/+0
| | | | | | | | Change-Id: I47cdb47cceda32f0871fd2f713ea565852383ca7 Reviewed-on: https://gerrit.libreoffice.org/61765 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Unify sal plugin loadersJan-Marek Glogowski2018-10-021-5/+0
| | | | | | | Change-Id: Ic099761eaff80349e985ccf62e3f4aa6b2e98022 Reviewed-on: https://gerrit.libreoffice.org/61103 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
* loplugin:constfields in vclNoel Grandin2018-09-141-1/+1
| | | | | | | Change-Id: I1072642be4fdfa720e61f2d7bad3c2701eb81610 Reviewed-on: https://gerrit.libreoffice.org/60430 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* weld SwTextGridPageCaolán McNamara2018-07-261-0/+1
| | | | | | | | Change-Id: I4f8e5f643126bea5deef7636b6d20f8080cb6662 Reviewed-on: https://gerrit.libreoffice.org/56309 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Fix typosAndrea Gelmini2018-05-121-1/+1
| | | | | | | Change-Id: Ic1234560cf9bf646e5499f3192fb37f1d36a6010 Reviewed-on: https://gerrit.libreoffice.org/54165 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* place an intermediate class as parent for SfxTabPagesCaolán McNamara2018-04-221-0/+1
| | | | | | | | | | | | | | | | | so a SfxTabPage can be parented by a vcl::Window or a welded native notebook tabpage. That ways the same SfxTabPage can be used at the same time in both a native dialog or a vcl dialog. The impl can be changed to the weld api, and when hosted in a native dialog the vcl impl of that will be instantiated, while native otherwise. e.g. print options appearing in print options dialog and general options. This allows incremental changeover. Change-Id: I6f1fed1e8d0898b01853bb878757bad41cbf9bba Reviewed-on: https://gerrit.libreoffice.org/53193 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* enable mapping direct from awt::XWindow and weld::WindowCaolán McNamara2018-04-051-0/+4
| | | | | | | | Change-Id: I33b1309a4b81bfd84449213099c4f3f781413e00 Reviewed-on: https://gerrit.libreoffice.org/52456 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* loplugin:constantparam in vclNoel Grandin2018-03-091-2/+1
| | | | | | | Change-Id: I1618280494ff10d884a3285501303c6a74ef3542 Reviewed-on: https://gerrit.libreoffice.org/50951 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* lok: update main threadHenry Castro2018-02-281-0/+3
| | | | | | | | | | | | In the pre-initialization phase of the tiled rendering case the SvpSalInstance is created in a different process and when a new process is created (fork), the main thread identifier does not match so it is required to update it. Change-Id: I189e53f0b46c60f34a8016222079c9b1e2b3fef8 Reviewed-on: https://gerrit.libreoffice.org/50477 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
* native dialog initial basisCaolán McNamara2018-02-161-0/+11
| | | | | | | | Change-Id: I392be563e38257390f748c70bb71c67a66778ddd Reviewed-on: https://gerrit.libreoffice.org/49677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Fix typosAndrea Gelmini2018-01-291-1/+1
| | | | | | | Change-Id: I4f15a41b7a67abe9f2c45b6004948decd58a8360 Reviewed-on: https://gerrit.libreoffice.org/48832 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
* loplugin:passstuffbyref improved returns in vclNoel Grandin2017-12-231-1/+1
| | | | | | | Change-Id: I0b103df2e7ce59093869f547225c95865d33da27 Reviewed-on: https://gerrit.libreoffice.org/46916 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Resolves: tdf#113160 changing all warning dialogs to non-modal is unsafeCaolán McNamara2017-11-031-6/+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>
* loplugin:constantparam in vclNoel Grandin2017-10-301-1/+1
| | | | | | | 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>
* Fix typosAndrea Gelmini2017-09-261-1/+1
| | | | | | | Change-Id: I9aaefa47399f35d563c1a4df364512dd29db41ce Reviewed-on: https://gerrit.libreoffice.org/42817 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
* Unexport the other SolarMutex*Guard templatesJan-Marek Glogowski2017-09-261-2/+2
| | | | | | | | | The logical follow-up on commit 6d1c8a43586503e703baebabc5330a1898f7ec43. Also complete inlined templates, so no need for explicit export, which actually can break the non-pch build on Windows. Change-Id: Ifebd7608673bba9f3530c01be30bab6414a66976
* tdf#112288 Clarify Reschedule implementationsJan-Marek Glogowski2017-09-261-6/+8
| | | | | | | | | | | | | | | | | | | | 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>
* WIN run main thread redirects ignoring SolarMutexJan-Marek Glogowski2017-09-261-7/+1
| | | | | | | | | | | | | | | | | | 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>
* Avoid VCL_DLLPUBLIC SolarMutexGuard "taking over" template base class on MSVCStephan Bergmann2017-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | ...and thus exporting osl::Guard<comphelper::SolarMutex> members from vcl. With --disable-pch that caused linking Library_acc to fail with duplicate symbols, as accessibility/source/standard/vclxaccessiblebutton.cxx uses comphelper::OExternalLockGuard (include/comphelper/accessiblecontexthelper.hxx), which also derives from osl::Guard<comphelper::SolarMutex> (and is also all- inline, and not marked as DLLPUBLIC), so also emits such members. With --enable-pch, vclxaccessiblebutton.cxx happens to see SolarMutexGuard from include/vcl/svapp.hxx before comphelper::OExternalLockGuard, and thus doesn't emit any such members. As SolarMutexGuard is all-inline, there should not be much point in making it VCL_DLLPUBLIC in the first place (was there ever since the class's introduction in b450a32890184a18ed176dbf717e944190cbe643 "create a class SolarMutexGuard to take a Guard on the SolarMutex"), so just drop that. Change-Id: Ie9d493370c7d34981bb35e5d9e100cf987eb83ca Reviewed-on: https://gerrit.libreoffice.org/42616 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Unify SolarMutex implementationsJan-Marek Glogowski2017-09-191-100/+14
| | | | | | | | | | | | | | | | | 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>
* Allow non-modal Dialogs during FileImport/LoadArmin Le Grand2017-08-251-0/+6
| | | | | | | | | | | | | | 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>
* loplugin:unusedfields in vclNoel Grandin2017-07-201-12/+0
| | | | | | | Change-Id: I207866df495ec81bb9288e6d0f664b96d90251d6 Reviewed-on: https://gerrit.libreoffice.org/40217 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:constparams in vclNoel Grandin2017-07-181-4/+4
| | | | | | | Change-Id: I36afe2107e07ffb9b73c0b76be600e3e999a0fd4 Reviewed-on: https://gerrit.libreoffice.org/40116 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Add some Scheduler unit tests and loggingJan-Marek Glogowski2017-07-131-3/+10
| | | | | | | | | | | 1. calling Start() for invoked tasks 2. correctly schedule by priority 3. self-stopping AutoTimer This also adds SAL_INFO output to Scheduler and Task to log the scheduling processing tasks. Change-Id: I3c8a708d1fd51c550320f8af3f9486c43c32e358
* tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna2017-03-311-2/+2
| | | | | | | | | | | | | | | Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
* loplugin:unusedmethodsNoel Grandin2017-03-291-2/+0
| | | | | | | Change-Id: Ib008613fb06c82791c63d5b074a3e2ff1c3607a0 Reviewed-on: https://gerrit.libreoffice.org/35834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Fix typosAndrea Gelmini2017-03-251-1/+1
| | | | | | | Change-Id: Ia8bd59be341b0731198d48df974b60ecb04e289c Reviewed-on: https://gerrit.libreoffice.org/35635 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* convert VCLEVENT constants to scoped enumNoel Grandin2016-12-071-4/+4
| | | | | | | Change-Id: Ic8ccb0a9715ec05182dacddab2c015b0de6a0fba Reviewed-on: https://gerrit.libreoffice.org/31675 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#103852 avoid clipboard deadlockTomaž Vajngerl2016-11-241-0/+4
| | | | | | | | | | | | | | | | | Deallocate the XTransferable object async using AsyncCallback (that uses Application::PostUserEvent) which executes the callback in a thread-safe way on the main thread. This avoids a deadlock at deallocation so that the XTransferable. Modify AsyncCallback to not hold the SolarMutexGuard because Application::PostUserEvent is considered thread-safe. Document Application::PostUserEvent thread-safety Change-Id: I4237a1cf380e8be66b3eefc393a58bb4853bf4e1 Reviewed-on: https://gerrit.libreoffice.org/31126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
* includes should be at the top of the fileNoel Grandin2016-11-181-3/+3
| | | | | | | | | | | | not randomly scattered through the code found with something like: git ls-files *.cpp | xargs grep -Pzl "(?s){.*#include" Change-Id: I9c242fa4ef99e8677f2800d7ec9f16d16e488351 Reviewed-on: https://gerrit.libreoffice.org/30952 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* new loplugin finalprotectedNoel Grandin2016-11-161-6/+2
| | | | | | | | | look for final classes, and make sure they don't have protected members Change-Id: I1fa810659bba02b61a5160dbfd8e24185ec9abf4 Reviewed-on: https://gerrit.libreoffice.org/30895 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:singlevalfieldsNoel Grandin2016-11-021-7/+0
| | | | | | | Change-Id: I65f96d9cd24572c8d0946acf4d2d45eb3db83a76 Reviewed-on: https://gerrit.libreoffice.org/30476 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:unusedmethodsNoel Grandin2016-10-181-8/+0
| | | | | | | Change-Id: Icf773925c37dde8b7404edac9864e7b10fe113b4 Reviewed-on: https://gerrit.libreoffice.org/29968 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Force disable OpenGL in Safe ModeSamuel Mehrbrodt2016-10-171-0/+6
| | | | | | | Change-Id: I3f19231d9a9168499d9f9ed970d4da1a69cca36a Reviewed-on: https://gerrit.libreoffice.org/29959 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
* Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann2016-10-051-1/+1
| | | | | | | | | ...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually typed Link" to distinguish the new, typed versions from the old, untyped ones, but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173 "remove untyped Link<>" removed the old versions. Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
* vcl: remove Application::InsertIdleHdl() and ImplIdleMgrMichael Stahl2016-07-281-18/+0
| | | | | | | | | This is obsolete since 5.0 introduced the new Idle scheduler. Change-Id: I8555fe35e2befb0cc2a4c39ae469a5c32a32fcb9 Reviewed-on: https://gerrit.libreoffice.org/27598 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
* ditch the application per-language IsAutoMnemonicEnabled settingCaolán McNamara2016-07-101-16/+0
| | | | Change-Id: I9734ada09edb6544a332893a7c5d31730b0d081d
* ditch the multiply dialog width * X where X is based on language thingCaolán McNamara2016-07-101-7/+0
| | | | | | | Which should be unnecessary since the vcl layout work and optimal size widgets, and its a small and arbitary set of languages for which its set. Change-Id: Ifa397218510ade251f795cdd9360d6bdccb115b7
* Convert ApplicationEvent::Type to scoped enumNoel Grandin2016-05-301-39/+39
| | | | | | | Change-Id: Ie65951d5fd1e155e3d3b36d4725792fb95fb9a52 Reviewed-on: https://gerrit.libreoffice.org/25608 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* Convert DialogCancelMode to scoped enumNoel Grandin2016-05-301-4/+4
| | | | | | | Change-Id: I7aca03334c6609a8729bbc88ada6ecce4309c21d Reviewed-on: https://gerrit.libreoffice.org/25607 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* convert EXCEPTION_ to scoped enumNoel Grandin2016-05-131-8/+3
| | | | | | | | | | | | - simplify VCLExceptionSignal_impl - drop "minor" part of error code, nobody passes it in, and nobody checks it - rename Display to UserInterface, to prevent -Werror=shadow Change-Id: I503fd8a50ded30d59c30fb388796f6b1a0c058de Reviewed-on: https://gerrit.libreoffice.org/24892 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* mpDefDialogParent is not used since 2002Caolán McNamara2016-05-121-15/+5
| | | | | | | | | | | | | | i.e. commit c0ae87cb5f2989bc4b8dff4907994d513ee87e39 Author: Stephan Schäfer <ssa@openoffice.org> Date: Tue Oct 22 08:39:05 2002 +0000 #103442# choose DefDialogParent on-the-fly and so calling SetDefDialogParent doesn't achieve anything Change-Id: I2ec72da47b2dac03fdddbdb9eba5ae4bf205eb22
* vcl: misleading copypasta in documentationMichael Stahl2016-03-291-1/+1
| | | | Change-Id: I673940fde7484500cbf30d4a4b760a8bf4448e33
* loplugin:unuseddefaultparams in /include/vclNoel Grandin2016-02-261-3/+1
| | | | | | | Change-Id: I36daccd90bfa6ba0ee8b9e76bff2bd8494155a04 Reviewed-on: https://gerrit.libreoffice.org/22710 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* Resolves: tdf#97904 opengl stuff isn't implemented for gtk3Caolán McNamara2016-02-181-0/+6
| | | | Change-Id: I1abbceebadf320f28955f54058b2d0ebfc79b9bc
* vcl: split exception types from input typesChris Sherlock2016-02-061-3/+4
| | | | | | | Having them in the file apptypes.hxx isn't necessary helpful, IMO so I've split the types into inputtypes.hxx and exceptiontypes.hxx Change-Id: I89a1ff168c3ae276b2f5486669d4ec2dda062d57
* loplugin: unused return valuesNoel Grandin2016-01-211-3/+1
| | | | | | | Change-Id: I4eb1f0c9245c04058fd5e47046f043f8840a79c7 Reviewed-on: https://gerrit.libreoffice.org/21628 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* Fix typosAndrea Gelmini2016-01-101-2/+2
| | | | | | | Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
* vcl: document parameters in svapp.hxxChris Sherlock2016-01-081-3/+6
| | | | Change-Id: Ifab1794363cd9bbe2cc1bb8010edbe25f0a0ac0d