summaryrefslogtreecommitdiff
path: root/vcl/inc
AgeCommit message (Collapse)Author
2017-10-02tdf#112769 Don't multi-trigger AllEventsProcessedJan-Marek Glogowski
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-02WIN handle timer Impl* access via friend functionJan-Marek Glogowski
Not sure if this is the better approach, but this gives the application window dispatch function access to the now private timer implementation, so nobody else can call them. Change-Id: Ic361d2c93116fbd6c85b20f7da3cffbd538b3558 Reviewed-on: https://gerrit.libreoffice.org/43041 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-30Use explicit function names for fooA/fooW WinAPI; prefer fooWMike Kaganski
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-29OSX rename mpFirstInstance to mpInstanceJan-Marek Glogowski
In the same spirit as the Windows commit 7c52d86f7b05fe7e0178f6d98a12a531b88a32ff. Change-Id: Ic45803c0715723b6f57c9f6a0c731edd559aa92c Reviewed-on: https://gerrit.libreoffice.org/42932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-29tdf#112605 OSX refactor SalAquaTimerJan-Marek Glogowski
Drops all the static calls and variables from SalAquaTimer and moves all timer handling logic inside the class. This also fixes the leak in timerElapsed. Change-Id: Ie7a1a8fffb70b8579ec6876eed10a275d2f06d27 Reviewed-on: https://gerrit.libreoffice.org/42913 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-29Drop check for Windows versions we don't supportMike Kaganski
Since we dropped support of Vista and below in master toward 6.0, those checks are needless. Removing the code that only worked in older versions, and streamlining the resulting code. Also, use kernel32.dll version for Windows version, instead of deprecated GetVersionEx, and inconvenient VersionHelpers. Since both GetVersion(Ex) and VersionHelpers (based on VerifyVersionInfo) are subject to manifest-based behavior since Windows 8.1, this move will hopefully result in more reliable OS version detection. Change-Id: I3edd8fc1843e64b6a65bd3a126be6a085511f13c Reviewed-on: https://gerrit.libreoffice.org/42905 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-29check for unnecessary DLLPUBLIC annotationsNoel Grandin
on classes which are fully defined in a header file Rename the dllprivate plugin to dllmacro and add the functionality there. Change-Id: I4581d551c46a8f61213d95973f323359d08278d8
2017-09-28Fix SalUserEventList usage on AndroidJan-Marek Glogowski
Change-Id: I598446c6f14e9df798bf37cb64c8b7bcbb04dd91
2017-09-28Missing includes (--disable-pch)Stephan Bergmann
Change-Id: Iaa87663255f815e4f837df25d5338439d79c70dd
2017-09-28Unify SalUserEvent handlingJan-Marek Glogowski
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-27rename mpFirstInstance->mpInstanceNoel Grandin
Change-Id: I472df5821cb74a16d5ea00a1939b0e1bdf9072aa Reviewed-on: https://gerrit.libreoffice.org/42518 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-27Don't wait-yield non-main threads in the main threadJan-Marek Glogowski
This prevents blocking the main thread by a yielding non-main thread. The current solution is to wait on a condition, which is set by the main thread on wakeup. Change-Id: I8d680bb51a36ce1e0d3d4713d47d8e2ef93d7297 Reviewed-on: https://gerrit.libreoffice.org/42808 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-26WIN run main thread redirects ignoring SolarMutexJan-Marek Glogowski
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-25vcl: [loplugin:badstatics] X11OpenGLDeviceInfoMichael Stahl
class X11OpenGLDeviceInfo actually looks harmless but it has an out-of-line destructor so the plugin can't see that it's harmless, so use default destructor instead. Change-Id: I50de6916360a944cbda3a85f4062e72e4c6d3768
2017-09-25vcl: [loplugin:badstatics] aDocumentFocusListenerMichael Stahl
Move it into class GtkSalData; have to use 2 variables because the class is only defined in atkutil.cxx but the ~GtkSalData is in gtkdata.cxx. Change-Id: I3b12f02a1a5454f39206cbd0fe224d3f08a44c73 Reviewed-on: https://gerrit.libreoffice.org/42673 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-25Translate German comments and debug strings (leftovers)Johnny_M
Additionally: - A few grammatical fixes Change-Id: I15ba3809f6b4746be5a691ec2adc0ea17730fa4a Reviewed-on: https://gerrit.libreoffice.org/42690 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-09-25Rename GetSelectEntryCount -> GetSelectedEntryCountSamuel Mehrbrodt
Change-Id: I405b347b404ed0acb3b6a0204e0b914a7698ce25 Reviewed-on: https://gerrit.libreoffice.org/42284 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-23vcl: Drop a couple of unused member variablesTakeshi Abe
Its usage was gone at df6ba2adbaeea9c5abe6e3ea0a583ec78ca9e7bd. Change-Id: Ia153cb8fb9247818684be09a81ac5eabdb1120e4 Reviewed-on: https://gerrit.libreoffice.org/42682 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-22Fresh run of bin/update_pch.shMike Kaganski
Change-Id: I69d4157aaf6570cecd51ea59df20556914942e06 Reviewed-on: https://gerrit.libreoffice.org/42565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-22Put definition of _CRT_RAND_S into bin/update_pchMike Kaganski
so it doesn't get removed again from sal/inc/pch/precompiled_sal.hxx (see commit 4af9612f2be9e023e762831207cbdb1d5f25906f). Also make necessary changes to some of the files that start to fail building after running bin/update_pch.sh, so that the patch is self-contained and leaves the tree in fully functional state. tools namespace had to be prepended with :: to disambiguate from drawinglayer::tools vcl/inc/window.h includes were amended, because ExtTextInputAttr is from vcl/commandevent.hxx, and enum class ShowTrackFlags is from vcl/window.hxx Change-Id: I47179622350754cba2f95d26a1bafd3dfbbc935b Reviewed-on: https://gerrit.libreoffice.org/42559 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-22vcl: [loplugin:badstatics] pManagerMichael Stahl
Move this to class GenericUnixSalData, which is deleted on shutdown. Change-Id: I6366c12f255bfeca737b22259c3f58ffa2c6222c Reviewed-on: https://gerrit.libreoffice.org/42632 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-22vcl: [loplugin:badstatics] aInstanceMichael Stahl
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-22vcl: [loplugin:badstatics] xCharClassMichael Stahl
There's even 2 of these; move them to struct ImplSVData which is deleted on shutdown. Change-Id: I8040cd6f9f31c0a1ab48987a490395f316d52220 Reviewed-on: https://gerrit.libreoffice.org/42630 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-22tdf#111994 WIN workaround PostMessage delaysJan-Marek Glogowski
Fixes the "Multiple timers in queue" assertion by effectively removing it. When debugging it became obvious, that PostMessage returns, even if the message was not yet added to the message queue. The assert happens, because we start the timer in the Scheduler before Invoke(), so it fires, if we block in Invoke(), and then reset the timer after Invoke, if there were changes to the Task list. In this case it fires during Invoke(), the message is added. We restart the timer, first by stopping it (we wait in DeleteTimerQueueTimer, to be sure the timer function has either finished or was not run). And the try to remove the message with PeekMessageW, which doesn't remove the posted message. Then the timer is restarted, and when the event is processed, we end up with an additional timer event, which was asserted. As a fix this adds a (microsecond) timestamp to the timer message, which is validated in the WinProc function. So if we stop the timer too fast, the event is ignored based on the timestamp. And while at it, the patch moves timer related variables from SalData into WinSalTimer. Change-Id: Ib840a421e8bd040d40f39473e1d44491e5b332bd Reviewed-on: https://gerrit.libreoffice.org/42575 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-21Rename GetSelectEntryPos -> GetSelectedEntryPosSamuel Mehrbrodt
Change-Id: I0bd4cb463575af843c72d9c8aaf91742203532a4 Reviewed-on: https://gerrit.libreoffice.org/42283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-21Rename GetSelectEntry -> GetSelectedEntrySamuel Mehrbrodt
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-21WaE: -Wunused-variableTor Lillqvist
Change-Id: I6bcc39cd749f8cdbe550b94346c5cb8fd9f67097
2017-09-21tdf#99784 OSX run GUI stuff in the main threadJan-Marek Glogowski
The extension manager starts dialogs from its own thread. But the OSX backend currently doesn't defer these calls to the main thread. This implements the deference by running the called function in the main thread, using a code ^Block, and returning the result via a SalYieldMutex member. Change-Id: Id8977991e3eda91da27c23d8021e028d4f4cefe5 Reviewed-on: https://gerrit.libreoffice.org/42448 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-19rename GetGenericData to GetGenericUnixSalDataNoel Grandin
Change-Id: Id95334da347c8341d9d190307603218eedb9c1e6 Reviewed-on: https://gerrit.libreoffice.org/42457 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-19rename SalGenericData to GenericUnixSalDataNoel Grandin
since it's generic over the various unixen, not anything else Change-Id: I994d5c9be99134b804e96bc045bf054fd9b434ef Reviewed-on: https://gerrit.libreoffice.org/42455 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-19rename GtkData to GtkSalDataNoel Grandin
to match all of the other SalData derivates Change-Id: I1d40ea5934edbeab747c10570657ac7d23230840 Reviewed-on: https://gerrit.libreoffice.org/42454 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-19loplugin:unnecessaryoverrideStephan Bergmann
Change-Id: I37c338fd08df3dc102963ccffc65c1f0684653be
2017-09-19loplugin:overrideStephan Bergmann
Change-Id: I439beb03e18cbdabf89bfacad63911c2910ad772
2017-09-19Unify SolarMutex implementationsJan-Marek Glogowski
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-18vcl: [loplugin:reservedid]Michael Stahl
Change-Id: I47d4322f094456761e497b3ca5feb5a5dfc73704
2017-09-18Acknowledge that WinSalGraphicsImpl::drawPolyLine modifies pPtAryStephan Bergmann
Change-Id: Idde44857f8ace883cc759321c71e2ca7a4359334 Reviewed-on: https://gerrit.libreoffice.org/42406 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-16tdf#79877 add button text for 'previous' button (gtk-media-previous)Bernhard Widl
Change-Id: I605849cd753ed3f33b8dec5921488730dc9682dd Reviewed-on: https://gerrit.libreoffice.org/42332 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-14use unique_ptr for mpControlFontNoel Grandin
Change-Id: I71eed3254cf073b754c1a634315e6e739a816606 Reviewed-on: https://gerrit.libreoffice.org/42264 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-12stub things to build without dbus or gioCaolán McNamara
Change-Id: Ibdcf33a6f0a688b322aedd531e8dfbf107e9e755
2017-09-12Add Common Printing Dialog FunctionalityYash Srivastav
Summary: These set of commits add support for the Common Printing Dialog Backends being developed as part of GSoC'17. All backends exist as dbus-services which can be queried for printers, their options, etc. Test Plan: Firstly, without adding any CPD backend, LO printing should work as it works now with graceful fallback to CUPS. Next, we need to install a backend. The backend providing CUPS interface is at git@github.com:NilanjanaLodh/PrintDialog_Backend.git See README.md for installation instructions. After this, run LO and existing CUPS Printers should show up. Also printing does send a job to cups which can be seen at: http://localhost:631/jobs?which_jobs=completed Due to LO shutdown not being handled properly currently, the backend might need to be killed via `pkill print_backend_cups` Future Plans: * Fix shutdown actions. Change-Id: I3bdea5d3272ec4c9c0dfe510f5848fcb398b4b14 Reviewed-on: https://gerrit.libreoffice.org/40565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-12WIP: Implement Basic Common Printing BackendYash Srivastav
Can list printers and basic printing set up. Change-Id: I2be3ac448cec8f40f632dbfa22657088e9cf7ee9 Reviewed-on: https://gerrit.libreoffice.org/38987 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-11Translate German comments/debug strings (leftovers in dirs vbahelper and vcl)Johnny_M
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-05rename GetTTFontMterics -> GetTTFontMetricsNoel Grandin
Change-Id: I9952ddf0b1256e768a664f4da70455245cf67f41 Reviewed-on: https://gerrit.libreoffice.org/41934 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-04Resolves: tdf#110452 stop menubar processing Alt+foo if handled by core widgetCaolán McNamara
Change-Id: I69f975d0f7a753e55f72fcd63f6580e958a80f38 Reviewed-on: https://gerrit.libreoffice.org/41884 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-04Resolves: tdf#111864 render progress bar for Ambiance theme properlyCaolán McNamara
Change-Id: I8ce43e4516413ea3779a128b374a931b080ae970 Reviewed-on: https://gerrit.libreoffice.org/41879 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-02Replace lists by vectors printer part (vcl)Julien Nabet
Change-Id: I0e4685b78f114296b115b4fef5eed4140755e1a1 Reviewed-on: https://gerrit.libreoffice.org/41804 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-02Use FPicker parentwindow argument to set file picker parentCaolán McNamara
the secret argument of xParentWindow already exists here we use XSystemDependentWindowPeer and getWindowHandle to get the window handle (which is a bit spurious in the wayland case but close enough) and then look up all our toplevel frames for a matching one in order to get the associated widget to use a a parent window If the fpicker was still in fpicker we could get the vcl::Window for the xParentWindow and get the frame directly from that but that necessitates linking to toolkit, so do it this way instead Change-Id: Ia6f51e6d2016587c1f314d7a0b1f9a20269facd0 Reviewed-on: https://gerrit.libreoffice.org/41808 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-02remove some castingCaolán McNamara
Change-Id: Idf6c82b0c609d8680e2017602bfe9a93acb093b9 Reviewed-on: https://gerrit.libreoffice.org/41807 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-31loplugin:constparams: vcl (clang-cl)Stephan Bergmann
Change-Id: Iabcbb6e09616a28c0d8927d11af3da47e48cbd90
2017-08-31inline some use-once typedefsNoel Grandin
and remove some dead ones Change-Id: I6946d717d3c15dc5207489ed3d56d985dd953d59 Reviewed-on: https://gerrit.libreoffice.org/41746 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>