summaryrefslogtreecommitdiff
path: root/vcl/android
AgeCommit message (Collapse)Author
2023-08-02split Point/Size/Rectangle into AbsoluteScreenPixel* typesNoel Grandin
to attempt to make it obvious in code what kind of coordinate system we are dealing with. The idea is that by doing this, the compile-time type checking will flush out inconsistencies between different code. I started with vcl::Window::OutputToAbsoluteScreenPixel and worked outwards from there. Change-Id: Ia967d7a0bb38886695f3a761b85c8b9340ddb1c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154676 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-23Revert "svp: don't directly yield in main thread"Stephan Bergmann
This reverts commit d2de55c93f94bbccff51fa7715b613341f1f4ae6 for now, because it appears to have caused a massive uptick in hung UITest_impress_tests (sd/qa/uitest/impress_tests/save_readonly_with_password.py, line 95) and UITest_writer_test6 (sw/qa/uitest/writer_tests6/save_readonly_with_password.py, line 54) tests across Jenkins, see the comments starting at <https://gerrit.libreoffice.org/c/core/+/117900/8#message-e439f5f2b9ed7a24d6f47fd640defe14dc392eb5> "svp: don't directly yield in main thread". Change-Id: Id114a0d904580024352e4acf37e2558f9f0ae6f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136250 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-22svp: don't directly yield in main threadJan-Marek Glogowski
AKA svp: always release SolarMutex on yield, v2 Implement the TODO when yielding a non-main thread: "use a SolarMutexReleaser here and drop the m_bNoYieldLock usage" This whole concept of "deferred yield" is prone to spurious "deadlocks", if DoYield spawns a nested event loop. This will not only block one yielding threads, but all indefinitly. And not releasing the SolarMutex is also not fair for any other threads waiting. That whole m_nNoYieldLock hack is just needed to defer GUI processing to the main thread without releasing the SolarMutex, the exact opposite of what yielding does. While we can't do anything for the main thread as long as the whole nested event loop concept prevails, we can prevent the yielding thread deadlock using conditionals. With all the special m_nNoYieldLock gone from SvpSalYieldMutex there isn't any reason to keep it around. Change-Id: I87c006ad36b4959f7e0dd18dda99a58c4e25032d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117900 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-17iOS+SVP convert remaining VCL plugins to salplugJan-Marek Glogowski
While this makes the preprocessor usage even larger, the code in salplug.cxx is now hopefully easier to follow. I added a comment about the main code structure at the beginning. It also includes changes to the generic plugin list to include gtk3_kde5 before gen, qt5 and qt6 after gen, but still skips the headless / svp plugin. And I explicitly excluded salplug.cxx from the externandnotdefined compiler plugin. I could have added a dummy, but that seemed not worth the effort. My try on a non-dummy with correct includes and defines made the code in salplug.cxx much harder to follow. FWIW, the iOS VCL plugin actually seems to use the osx SalData, so I think these changes to iosinst.cxx are more correct then commit 7d990aafdc363b2a12b5db78637d7f3bef7780bd ("VCL drop m_pInstance from *nix SalData"). But hard to tell without a compiler. Change-Id: I0e2944d4221ca5910fb2120cc8b24def5c5b3f33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128477 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-14VCL drop m_pInstance from *nix SalDataJan-Marek Glogowski
AKA the "*nix SalData untangling" commit. The original plan was to get rid of vcl/inc/saldatabasic.hxx and even SalData for all the *nix backends. But after many backs and forths, reinspecting the code and imagining the resulting code, I decided against that plan. All these variants would have resulted in reinterpret_cast calls, I wanted to prevent. And they would have required larger renames for no benefit. An other, related idea was to include all SalData implementations in the vcl/inc/svdata.hxx header, but that seemed like an include explosion, so was also dropped. I tried to untangling iOS from using GenericUnixSalData, as it doesn't use any of it's features. The new, minimal SalData should be sufficient. I'm leaving the easier drop of mpInstance from the Windows and MacOSX backend as a minimal interesting EasyHack. Change-Id: I5be01c1f42131a7e31cb30899392308e1e2de53b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128402 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-14iOS+Android+SVP "merge" all SalData instancesJan-Marek Glogowski
It's always the same code. Change-Id: I2385d0bda24939b964306e27a3df99ea44356eac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128401 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-07-02vcl: drop GenericUnixSalDataTypeJan-Marek Glogowski
It's just used for a singke assert and SalData is generally just used as a static cast. Change-Id: I8d74e82e511413d940a3f200f022a9204e588cd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118288 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-05-29vcl: Implement static vclplug usageJan-Marek Glogowski
.. and convert Android to it. Will also be used by WASM. It's also kind of a followup on commit f5af2104fc490b90510e36bbf1d2adec8017c594. Change-Id: I3a1b5bc2eae2692e706da10c6352534433c61e57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116385 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-05-11change usage of boost::hash_combine to o3tl::hash_combineTomaž Vajngerl
Change-Id: I840518a36ac43d36c95f38e09c7bfcfe1a25a525 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114984 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-12-12Fix typoAndrea Gelmini
Change-Id: Ifbd91583d745d021b3bfb2168bf84f785c8a05c8 Reviewed-on: https://gerrit.libreoffice.org/85082 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-12-12android: add abstraction to allow us to DetachThread sensibly.Michael Meeks
If we fail to do this after runLoop - some Android VMs can get really upset if we quit a thread without doing this, also ensure that we AttachThread to new polling loop threads as we come in for good measure - duplicate Attach's are NOPs. Change-Id: I32454773af4e02c97df0b6c02f61b1dc74df80b0 Reviewed-on: https://gerrit.libreoffice.org/84956 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 7241382ccc0a028c5f08304090a6344e582db068) Reviewed-on: https://gerrit.libreoffice.org/84969 Tested-by: Jenkins
2019-02-08o3tl::make_unique -> std::make_unique in tools..xmloffGabor Kelemen
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: Ib3201f865d43f372007cdf381c7e244e9cbeae26 Reviewed-on: https://gerrit.libreoffice.org/67474 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-10-02Unify sal plugin loadersJan-Marek Glogowski
Change-Id: Ic099761eaff80349e985ccf62e3f4aa6b2e98022 Reviewed-on: https://gerrit.libreoffice.org/61103 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-08-22fix android buildNoel Grandin
after commit f05f4e042ca6ac8ae7f1d1e8e6bfb4cbba17a044 Date: Sun Aug 19 08:53:29 2018 +0200 loplugin:useuniqueptr in SvpSalInstance Change-Id: I0479139c28b88c049a4584c825a28217fa20b7c0
2018-02-26vcl: fix hangs in SvpSalInstanceMichael Stahl
Since commit cb8bfa9a32799bcde4e960fa56e388d5f7b2a928 the main thread will read from the timer pipe until it is empty. But evidently this introduces the problem that the poll() in another thread will not return, as the file descriptor will no longer be readable; see https://paste.debian.net/1011306/ for a reproducer of that rather under-documented poll behaviour. So other threads can get stuck forever in poll, and then the main thread can block in poll too with no other thread to wake it up. This is the problem that plagues UITest_writerperfect_epubexport. The timer pipe is difficult to fix, since the main thread can block on either the poll or the subsequent AcquireYieldMutex(). So replace the timer pipe with a condition etc. that is mostly copied from the OSX AquaSalInstance/SalYieldMutex implementation. The main thread now does something different than the other threads, and blocks on a condition_variable with a timeout, while other threads still block on acquiring the mutex. Non-main threads can poke the main thread to do a DoYield() on their behalf, and then get the result back with a blocking read from a pipe, all while holding the YieldMutex. This requires some fudging of the YieldMutex so that the main thread can borrow the ownership temporarily. Unfortunately SvpSalInstance, in addition to being directly instantiable for --headless, has a whole bunch of subclasses: * HeadlessSalInstance * AndroidSalInstance * IosSalInstance * GtkInstance (in the gtk3 case) * KDE5SalInstance Of these GtkInstance overrides everything related to the DoYield/SalYieldMutex implementation, but the others will be affected by the change. This commit will probably break IOS due to me not understanding the point of the undocumented random #ifdef IOS in svpinst.cxx. Change-Id: I1bbb143952dda89579e97ac32cd147e5b987573c Reviewed-on: https://gerrit.libreoffice.org/50237 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-23blind android build fixCaolán McNamara
Change-Id: I8e5722ee922c609fa71c766692f79f138217bf05
2017-11-11Replace list by vector for ShowNativeDialog (vcl)Julien Nabet
Change-Id: I1101c5b5426507ce8e5fd1ed34930f385f527775 Reviewed-on: https://gerrit.libreoffice.org/44639 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-31ReleaseYieldMutex is always called with trueNoel Grandin
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-09-28Fix SalUserEventList usage on AndroidJan-Marek Glogowski
Change-Id: I598446c6f14e9df798bf37cb64c8b7bcbb04dd91
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-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-08-08loplugin:constantparamNoel Grandin
Change-Id: Ib92aba17c46a4ada75c2a0630f281759d995f32e Reviewed-on: https://gerrit.libreoffice.org/40843 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-18another fix after loplugin:unusedfields in vclMarkus Mohrhard
Change-Id: I11a43d1285b474efcb5d4fb157d9e80f0930f081
2017-04-28probably android build fixCaolán McNamara
Change-Id: I95fe4879fe2e43e5b11165a703066ae1a029b5b1
2017-03-31vcl: attempt to blindly make androids properly rectangularMichael Stahl
Change-Id: I5d43744b754817174401558a200a4cd204779515
2016-11-18includes should be at the top of the fileNoel Grandin
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>
2016-10-05InfoFont/Color is not used by vcl nowCaolán McNamara
anywhere anyone wanted to Get[Font|Color] give it the Label ones instead. why this is exposed through uno is bewildering, stubbed those out for the moment Change-Id: I7a31d027287436be1c075c76a370047efd010bf3
2016-02-01vcl: -Werror=unused-variableMiklos Vajna
Change-Id: I544d42994bd46171d5d507af450cd1ca5f9c912a
2016-02-01work around lack of cairo_rectangle_int_t with basegfxCaolán McNamara
ditch the CAIRO_VERSION_ENCODE(1, 10, 0) + sub optional damage rect and just use our always-available basegfx foo here. Change-Id: I680453180f4725ac37cabf38d71b935c99edf6c7 Reviewed-on: https://gerrit.libreoffice.org/21971 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-01-18basebmp now only used from vcl/headless codeCaolán McNamara
Change-Id: I068d404431d3565f6ad5741edbd3693225824a4d
2016-01-18some android build fixesCaolán McNamara
Change-Id: I2d60a6d70ca9d63f49b12b5d4c3855cc4ef53478
2016-01-18fix android buildCaolán McNamara
Change-Id: I180ed41a52e8f83fba86fb07e79ae2a7a3f095fc
2016-01-11vcl: fix Android buildMiklos Vajna
Change-Id: I05ce4ddb4c933eb1100e3a3410cea27520072933
2015-11-16fix android buildCaolán McNamara
Change-Id: Ida1447bad7f81ebfcc0da1e8278a74c11a139afe
2015-10-05convert SAL_FRAME_STYLE to scoped enumNoel Grandin
Change-Id: Ic3f7fddcea36c18ffe43c4c633d415f596a58cbc Reviewed-on: https://gerrit.libreoffice.org/19094 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-04convert basebmp::Format to scoped enumNoel Grandin
Change-Id: I6eb213d6dcf387936967271fba9e2de3879ef479
2015-05-25cppcheck: noExplicitConstructorCaolán McNamara
Change-Id: I62076450ab77472bfd09b3fb9824f54b6ea1e0f7
2015-05-21Bin unused codeTor Lillqvist
2015-05-21WaE: macro "LOGW" is not usedTor Lillqvist
2015-05-21Remove more obsolete Android code: The 'AppSupport' stuffTor Lillqvist
2015-04-28allow a different notebook tab font than the rest of the uiCaolán McNamara
Change-Id: Ia41276033c1f656217bc3ae929faab001db36ca4
2015-03-24Kill dead <touch/touch.h> APITor Lillqvist
Has all been obsoleted by LibreOfficeKit. Only some MOBILE_* constant #defines are now left in touch.h, but probably those are used only by dead code. Change-Id: I646945c4408b4e6cd5510da535cfc12088dd391c
2015-01-07fdo#84938: convert VCL_INPUT_ #defines to 'enum class'Noel Grandin
Change-Id: I155e45f58974a2b946c4a7703b350bcbfbad342e
2014-12-04Call DetachCurrentThread() in the AndroidSalInstance destructorTor Lillqvist
As we call AttachCurrentThread() in the constructor, it seems logical to call DetachCurrentThread() in the destructor. Some warning messages in the logcat indicated that DetachCurrentThread() hadn't been called for a thread that died. Actually I would prefer to call both AttachCurrentThread() and DetachCurrentThread() in the actual thread function, instead of somewhat haphazardly and imlicitly in the AndroidSalInstance constructor and destructor. Do we know for sure that the lifetime of the AndroidSalInstance singleton (is is a singleton, right?) is 1:1 coupled to that of the LO "main thread"? Change-Id: Ifcc0e0b9af88b19389c416c5646499d44ad0e941
2014-11-08These constants are now in the MouseEventModifiers class enumTor Lillqvist
Change-Id: Ie6a0c86b18a7a01c8b020c37dcbcadc529deb80b
2014-09-18Use vcl::FontTor Lillqvist
Change-Id: I25b1ce4396a8e125b23e088310b970ef746cbaf0
2014-08-18ErrorBox->MessageDialogCaolán McNamara
Change-Id: I57d4e43460e40d3aff54873280eddbb18c12446b
2014-05-24cppcheck: Prefer prefix ++/-- operatorsJulien Nabet
Change-Id: I290ccba1487e59ea6f86bfb0382671ca4ed50831
2014-04-02Kill superfluous vertical whitespaceTor Lillqvist
Change-Id: I81ce8fd7022bf283db668705efdfb0666f87bde9
2014-02-20vcl: try to make android tinderbox happy tooMichael Stahl
Change-Id: If83b12578ce1e5dcae688589e92a54b96040abdd